From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 01:01:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 822181065720 for ; Sun, 14 Mar 2010 01:01:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 11C878FC22 for ; Sun, 14 Mar 2010 01:01:54 +0000 (UTC) Received: (qmail 11839 invoked by uid 399); 14 Mar 2010 01:01:54 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 14 Mar 2010 01:01:54 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B9C3581.2010302@FreeBSD.org> Date: Sat, 13 Mar 2010 17:01:53 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <201003100217.o2A2HvrL099296@svn.freebsd.org> <861vfs5s5u.fsf@ds4.des.no> In-Reply-To: <861vfs5s5u.fsf@ds4.des.no> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204939 - head/secure/libexec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 01:01:55 -0000 On 03/10/10 03:31, Dag-Erling Smørgrav wrote: > Doug Barton writes: >> Log: >> Fix the build. The ssh-pkcs11-helper directory is empty, which is >> causing confusion. > > The proper way to handle this would have been to send me an email asking > if perhaps I had forgotten to commit the Makefile. 1. Broken needs to be fixed, sooner rather than later. 2. The change I made didn't affect any functionality because there was nothing there to break. 3. I actually meant to drop you a note that I made the change, but given that I know you follow the lists with regularity the priority for doing this in my own mind wasn't high enough, and it slipped my mind, apologies for that. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 01:26:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBDCC1065670 for ; Sun, 14 Mar 2010 01:26:39 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9F88FC1B for ; Sun, 14 Mar 2010 01:26:38 +0000 (UTC) Received: (qmail 4839 invoked by uid 399); 14 Mar 2010 01:26:38 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 14 Mar 2010 01:26:38 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B9C3B4C.7060706@FreeBSD.org> Date: Sat, 13 Mar 2010 17:26:36 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: "Simon L. Nielsen" References: <201003131922.o2DJMfY4010389@svn.freebsd.org> <4B9C114A.4020802@FreeBSD.org> <20100313223903.GE1316@frankie.nitro.dk> In-Reply-To: <20100313223903.GE1316@frankie.nitro.dk> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205128 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 01:26:40 -0000 On 03/13/10 14:39, Simon L. Nielsen wrote: > B0;251;0cOn 2010.03.13 14:27:22 -0800, Doug Barton wrote: >> On 03/13/10 11:22, Simon L. Nielsen wrote: >>> Author: simon >>> Date: Sat Mar 13 19:22:41 2010 >>> New Revision: 205128 >>> URL: http://svn.freebsd.org/changeset/base/205128 >>> >>> Log: >>> Merge OpenSSL 0.9.8m into head. >>> >>> This also "reverts" some FreeBSD local changes so we should now >>> be back to using entirely stock OpenSSL. The local changes were >>> simple $FreeBSD$ lines additions, which were required in the CVS >>> days, and the patch for FreeBSD-SA-09:15.ssl which has been >>> superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation >>> extension' support. >> >> The $FreeBSD$ on src/crypto/openssl/apps/openssl.cnf was useful for >> mergemaster purposes. Can we add it back? > > Sure, I missed that so I re-added it now. Thanks! -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 01:32:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68F751065675 for ; Sun, 14 Mar 2010 01:32:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E9E058FC1E for ; Sun, 14 Mar 2010 01:32:32 +0000 (UTC) Received: (qmail 11917 invoked by uid 399); 14 Mar 2010 01:32:31 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 14 Mar 2010 01:32:31 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B9C3CAE.1040102@FreeBSD.org> Date: Sat, 13 Mar 2010 17:32:30 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: Qing Li References: <201003090111.o291Bj79062503@svn.freebsd.org> <201003101050.46696.jhb@freebsd.org> <20100310160858.GC58634@dragon.NUXI.org> <201003101301.06583.jhb@freebsd.org> <20100310235840.GA70978@dragon.NUXI.org> In-Reply-To: <20100310235840.GA70978@dragon.NUXI.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin , obrien@freebsd.org Subject: Re: svn commit: r204902 - in head/sys: net netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 01:32:33 -0000 On 03/10/10 15:58, David O'Brien wrote: > I guess I don't get it - we have got reports of this badly affecting > basic functionallity for several people and yet we wont fix stock > sources? This is serving users well? Qing, I appreciate the care you took in not wanting to add more breakage to something already broken, however I have to agree with David here. Leaving something so fundamental broken while you investigate the change was not the optimal way to handle this. Either committing the patch you had, or backing out the change while investigating the proper solution would have been preferable (IMO). Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 01:57:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92DE21065673; Sun, 14 Mar 2010 01:57:32 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 680218FC0C; Sun, 14 Mar 2010 01:57:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2E1vWJs098928; Sun, 14 Mar 2010 01:57:32 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2E1vWI9098924; Sun, 14 Mar 2010 01:57:32 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201003140157.o2E1vWI9098924@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 14 Mar 2010 01:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205140 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 01:57:32 -0000 Author: weongyo Date: Sun Mar 14 01:57:32 2010 New Revision: 205140 URL: http://svn.freebsd.org/changeset/base/205140 Log: fixes a broken software beacon miss handler. There is a race to check vap->iv_bmiss_count == 0 in ieee80211_swbmiss because iv_swbmiss_task is enqueued by taskqueue. Reviewed by: rpaulo Modified: head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_tdma.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Sun Mar 14 00:32:18 2010 (r205139) +++ head/sys/net80211/ieee80211_proto.c Sun Mar 14 01:57:32 2010 (r205140) @@ -1432,8 +1432,6 @@ ieee80211_swbmiss(void *arg) } else if (vap->iv_swbmiss_count == 0) { if (vap->iv_bmiss != NULL) ieee80211_runtask(ic, &vap->iv_swbmiss_task); - if (vap->iv_bmiss_count == 0) /* don't re-arm timer */ - return; } else vap->iv_swbmiss_count = 0; callout_reset(&vap->iv_swbmiss, vap->iv_swbmiss_period, Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Sun Mar 14 00:32:18 2010 (r205139) +++ head/sys/net80211/ieee80211_sta.c Sun Mar 14 01:57:32 2010 (r205140) @@ -141,6 +141,8 @@ sta_beacon_miss(struct ieee80211vap *vap vap->iv_bss->ni_essid, vap->iv_bss->ni_esslen); return; } + + callout_stop(&vap->iv_swbmiss); vap->iv_bmiss_count = 0; vap->iv_stats.is_beacon_miss++; if (vap->iv_roaming == IEEE80211_ROAMING_AUTO) { Modified: head/sys/net80211/ieee80211_tdma.c ============================================================================== --- head/sys/net80211/ieee80211_tdma.c Sun Mar 14 00:32:18 2010 (r205139) +++ head/sys/net80211/ieee80211_tdma.c Sun Mar 14 01:57:32 2010 (r205140) @@ -295,6 +295,8 @@ tdma_beacon_miss(struct ieee80211vap *va "beacon miss, mode %u state %s\n", vap->iv_opmode, ieee80211_state_name[vap->iv_state]); + callout_stop(&vap->iv_swbmiss); + if (ts->tdma_peer != NULL) { /* XXX? can this be null? */ ieee80211_notify_node_leave(vap->iv_bss); ts->tdma_peer = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 02:13:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABB0A106566B; Sun, 14 Mar 2010 02:13:11 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6838FC14; Sun, 14 Mar 2010 02:13:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2E2DBki002563; Sun, 14 Mar 2010 02:13:11 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2E2DBTM002561; Sun, 14 Mar 2010 02:13:11 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201003140213.o2E2DBTM002561@svn.freebsd.org> From: Weongyo Jeong Date: Sun, 14 Mar 2010 02:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205141 - head/sys/dev/bwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 02:13:11 -0000 Author: weongyo Date: Sun Mar 14 02:13:11 2010 New Revision: 205141 URL: http://svn.freebsd.org/changeset/base/205141 Log: enables S/W beacon miss handler. Reported by: imp Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Sun Mar 14 01:57:32 2010 (r205140) +++ head/sys/dev/bwn/if_bwn.c Sun Mar 14 02:13:11 2010 (r205141) @@ -1076,6 +1076,8 @@ bwn_attach_post(struct bwn_softc *sc) | IEEE80211_C_TXPMGT /* capable of txpow mgt */ ; + ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; /* s/w bmiss */ + /* call MI attach routine. */ ieee80211_ifattach(ic, bwn_is_valid_ether_addr(siba_sprom_get_mac_80211a(sc->sc_dev)) ? From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 05:22:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76D50106566C; Sun, 14 Mar 2010 05:22:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AEF08FC0C; Sun, 14 Mar 2010 05:22:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2E5MlPw044438; Sun, 14 Mar 2010 05:22:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2E5Mlnr044435; Sun, 14 Mar 2010 05:22:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003140522.o2E5Mlnr044435@svn.freebsd.org> From: Doug Barton Date: Sun, 14 Mar 2010 05:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205145 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 05:22:47 -0000 Author: dougb Date: Sun Mar 14 05:22:46 2010 New Revision: 205145 URL: http://svn.freebsd.org/changeset/base/205145 Log: Make it more clear in the docs that -a is not compatible with -iFU, and enforce this in the code. Apparently a lot of users mistakenly combine -a with these flags and are then mystified that no changes were made. While I'm here, fix a trailing space in mergemaster.8 Modified: head/usr.sbin/mergemaster/mergemaster.8 head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.8 Sun Mar 14 02:54:36 2010 (r205144) +++ head/usr.sbin/mergemaster/mergemaster.8 Sun Mar 14 05:22:46 2010 (r205145) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd March 13, 2010 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,7 +32,8 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipFCPU +.Op Fl scrvhpCP +.Op Fl a|iFU .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d @@ -168,7 +169,7 @@ and therefore can override both files. When the comparison is done if there are any files remaining in the temproot directory they will be listed, and if the .Fl a -option is not in use the user will be given the option of +option is not in use the user will be given the option of deleting the temproot directory. If there are no files remaining in the temproot directory it will be deleted. @@ -206,9 +207,11 @@ If the directory exists, it creates a new one in a previously non-existent directory. This option unsets the verbose flag, -but other than -.Fl U -it is compatible with all other options. +and is not compatible with +.Fl i , +.Fl F , +or +.Fl U . Setting .Fl a makes Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Sun Mar 14 02:54:36 2010 (r205144) +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Mar 14 05:22:46 2010 (r205145) @@ -15,7 +15,7 @@ PATH=/bin:/usr/bin:/usr/sbin display_usage () { VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` echo "mergemaster version ${VERSION_NUMBER}" - echo 'Usage: mergemaster [-scrvahipFCPU]' + echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]]' echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]' echo "Options:" echo " -s Strict comparison (diff every pair of files)" @@ -337,6 +337,18 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F esac done +if [ -n "$AUTO_RUN" ]; then + if [ -n "$FREEBSD_ID" -o -n "$AUTO_UPGRADE" -o -n "$AUTO_INSTALL" ]; then + echo '' + echo "*** You have included the -a option along with one or more options" + echo ' that indicate that you wish mergemaster to actually make updates' + echo ' (-F, -U, or -i), however these options are not compatible.' + echo ' Please read mergemaster(8) for more information.' + echo '' + exit 1 + fi +fi + # Assign the location of the mtree database # MTREEDB=${MTREEDB:-${DESTDIR}/var/db} From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 10:18:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BB6C106564A; Sun, 14 Mar 2010 10:18:58 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 886468FC13; Sun, 14 Mar 2010 10:18:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EAIwBI009491; Sun, 14 Mar 2010 10:18:58 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EAIwHj009485; Sun, 14 Mar 2010 10:18:58 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003141018.o2EAIwHj009485@svn.freebsd.org> From: Ed Schouten Date: Sun, 14 Mar 2010 10:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205146 - in head: . include lib/libcompat lib/libcompat/4.3 lib/libcompat/regexp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 10:18:58 -0000 Author: ed Date: Sun Mar 14 10:18:58 2010 New Revision: 205146 URL: http://svn.freebsd.org/changeset/base/205146 Log: Trim down libcompat by removing . Erwin ran an exp-run with libcompat and removed. It turns out the regexp library is almost entirely unused. In fact, it looks like it is sometimes used by accident. Because these function names clash with libc's , some application use both and libcompat, which means they link against the wrong regex library. This commit removes the regexp library and reimplements re_comp() and re_exec() using . It seems the grammar of the regular expressions accepted by these functions is similar to POSIX EREs. After this commit, 1 low-profile port will be broken, but the maintainer already has a patch for it sitting in his mailbox. Added: head/lib/libcompat/4.3/re_comp.c - copied, changed from r205145, head/lib/libcompat/4.3/regex.c Deleted: head/include/regexp.h head/lib/libcompat/4.3/regex.c head/lib/libcompat/regexp/ Modified: head/ObsoleteFiles.inc head/include/Makefile head/lib/libcompat/4.3/re_comp.3 head/lib/libcompat/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 14 05:22:46 2010 (r205145) +++ head/ObsoleteFiles.inc Sun Mar 14 10:18:58 2010 (r205146) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100314: removal of regexp.h +OLD_FILES+=usr/include/regexp.h +OLD_FILES+=usr/share/man/man3/regexp.3.gz +OLD_FILES+=usr/share/man/man3/regsub.3.gz # 20100303: actual removal of utmp.h OLD_FILES+=usr/include/utmp.h # 20100227: [ia64] removed and Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Mar 14 05:22:46 2010 (r205145) +++ head/include/Makefile Sun Mar 14 10:18:58 2010 (r205146) @@ -17,7 +17,7 @@ INCS= a.out.h ar.h assert.h bitstring.h ndbm.h netconfig.h \ netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ printf.h proc_service.h pthread.h \ - pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ + pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \ signal.h spawn.h stab.h \ stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ Modified: head/lib/libcompat/4.3/re_comp.3 ============================================================================== --- head/lib/libcompat/4.3/re_comp.3 Sun Mar 14 05:22:46 2010 (r205145) +++ head/lib/libcompat/4.3/re_comp.3 Sun Mar 14 10:18:58 2010 (r205146) @@ -100,15 +100,10 @@ returns \-1 for an internal error. The .Fn re_comp function -returns one of the following strings if an error occurs: -.Bd -unfilled -offset indent -No previous regular expression, -Regular expression too long, -unmatched \e(, -missing ], -too many \e(\e) pairs, -unmatched \e). -.Ed +returns +.Dq no previous regular expression +or one of the strings generated by +.Xr regerror 3 . .Sh SEE ALSO .Xr ed 1 , .Xr egrep 1 , Copied and modified: head/lib/libcompat/4.3/re_comp.c (from r205145, head/lib/libcompat/4.3/regex.c) ============================================================================== --- head/lib/libcompat/4.3/regex.c Sun Mar 14 05:22:46 2010 (r205145, copy source) +++ head/lib/libcompat/4.3/re_comp.c Sun Mar 14 10:18:58 2010 (r205146) @@ -44,49 +44,49 @@ __FBSDID("$FreeBSD$"); static char sccsid[] = "@(#)regex.c 5.1 (Berkeley) 3/29/92"; #endif /* LIBC_SCCS and not lint */ -#include +#include #include -#include -#include -#include -#include - -static regexp *re_regexp; -static int re_goterr; -static char *re_errstr; +#include + +static regex_t re_regexp; +static int re_gotexp; +static char re_errstr[100]; char * -re_comp(char *s) +re_comp(const char *s) { + int rc; + if (s == NULL || *s == '\0') { - if (re_regexp == NULL) - return "no previous regular expression"; + if (!re_gotexp) + return __DECONST(char *, + "no previous regular expression"); + return (NULL); + } + + if (re_gotexp) { + regfree(&re_regexp); + re_gotexp = 0; + } + + rc = regcomp(&re_regexp, s, REG_EXTENDED); + if (rc == 0) { + re_gotexp = 1; return (NULL); } - if (re_regexp) - free(re_regexp); - if (re_errstr) - free(re_errstr); - re_goterr = 0; - re_regexp = regcomp(s); - return (re_goterr ? re_errstr : NULL); + + regerror(rc, &re_regexp, re_errstr, sizeof(re_errstr)); + re_errstr[sizeof(re_errstr) - 1] = '\0'; + return (re_errstr); } int -re_exec(char *s) +re_exec(const char *s) { int rc; - re_goterr = 0; - rc = regexec(re_regexp, s); - return (re_goterr ? -1 : rc); -} - -void -regerror(const char *s) -{ - re_goterr = 1; - if (re_errstr) - free(re_errstr); - re_errstr = strdup(s); + if (!re_gotexp) + return (-1); + rc = regexec(&re_regexp, s, 0, NULL, 0); + return (rc == 0 ? 1 : 0); } Modified: head/lib/libcompat/Makefile ============================================================================== --- head/lib/libcompat/Makefile Sun Mar 14 05:22:46 2010 (r205145) +++ head/lib/libcompat/Makefile Sun Mar 14 10:18:58 2010 (r205146) @@ -1,19 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ -LIB=compat +LIB= compat CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale NO_PIC= WARNS?= 0 -.PATH: ${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \ - ${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \ - ${.CURDIR}/4.4/${MACHINE_ARCH} ${.CURDIR}/4.4 \ - ${.CURDIR}/regexp +.PATH: ${.CURDIR}/4.1 ${.CURDIR}/4.3 ${.CURDIR}/4.4 # compat 4.1 sources -# XXX MISSING: tell.c SRCS+= ascftime.c cftime.c ftime.c getpw.c MAN+= 4.1/ftime.3 4.1/getpw.3 @@ -22,27 +18,15 @@ MAN+= 4.1/cftime.3 MLINKS+=cftime.3 ascftime.3 # compat 4.3 sources -# XXX MISSING: ecvt.c gcvt.c sibuf.c sobuf.c strout.c -SRCS+= cfree.c regex.c rexec.c +SRCS+= cfree.c re_comp.c rexec.c -# XXX MISSING: ecvt.0 MAN+= 4.3/cfree.3 4.3/re_comp.3 4.3/rexec.3 -# XXX MISSING: ecvt.3, so can't MLINK -#MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 MLINKS+=re_comp.3 re_exec.3 # compat 4.4 sources SRCS+= cuserid.c -MAN+= 4.4/cuserid.3 - -# regexp sources -SRCS+= regerror.c regexp.c regsub.c -MAN+= regexp/regexp.3 - -# XXX name clash with libc -# MLINKS+=regexp.3 regcomp.3 regexp.3 regexec.3 regexp.3 regerror.3 -MLINKS+=regexp.3 regsub.3 +MAN+= 4.4/cuserid.3 .include From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 10:24:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C74611065674; Sun, 14 Mar 2010 10:24:04 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1E188FC14; Sun, 14 Mar 2010 10:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EAO4Kk010745; Sun, 14 Mar 2010 10:24:04 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EAO3jH010652; Sun, 14 Mar 2010 10:24:03 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003141024.o2EAO3jH010652@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 14 Mar 2010 10:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205147 - in head/tools/regression/usr.bin: . ncal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 10:24:05 -0000 Author: edwin Date: Sun Mar 14 10:24:03 2010 New Revision: 205147 URL: http://svn.freebsd.org/changeset/base/205147 Log: Create regression tests for ncal: - A couple of tests to check if the layout of the generated calenders is correct. - A couple of tests to see if impossible combinations for -3, -A, -m, -y etc properly abort. - A couple of test to confirm that the order of -A, -B, -3 etc give the right number of months. Added: head/tools/regression/usr.bin/ncal/ head/tools/regression/usr.bin/ncal/Makefile (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200901-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200901-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200902-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200902-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200903-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200903-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200904-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200904-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200905-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200905-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200906-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200906-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200907-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200907-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200908-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200908-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200909-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200909-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200910-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200910-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200911-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200911-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200912-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-3m200912-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2008-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2008-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2009-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2009-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2010-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2010-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2011-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.b-y2011-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-3A-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-3AB-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-3B-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-3gy-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-3y-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-mgm-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-yA-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-yAB-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-yB-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-ygm-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.f-ym-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200901-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200901-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200902-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200902-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200903-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200903-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200904-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200904-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200905-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200905-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200906-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200906-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200907-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200907-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200908-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200908-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200909-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200909-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200910-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200910-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200911-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200911-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200912-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-3m200912-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2008-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2008-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2009-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2009-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2010-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2010-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2011-jd-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.r-y2011-md-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-3-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-A-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-AB-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-B-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-gmgy-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-m-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-b-mgy-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-3-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-A-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-AB-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-B-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-gmgy-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-m-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.s-r-mgy-nhl.out (contents, props changed) head/tools/regression/usr.bin/ncal/regress.sh (contents, props changed) head/tools/regression/usr.bin/ncal/regress.t (contents, props changed) Modified: head/tools/regression/usr.bin/Makefile Modified: head/tools/regression/usr.bin/Makefile ============================================================================== --- head/tools/regression/usr.bin/Makefile Sun Mar 14 10:18:58 2010 (r205146) +++ head/tools/regression/usr.bin/Makefile Sun Mar 14 10:24:03 2010 (r205147) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= apply calendar comm file2c join jot m4 printf sed tr \ +SUBDIR= apply calendar comm file2c join jot m4 ncal printf sed tr \ uudecode uuencode xargs .if !defined(AUTOMATED) SUBDIR+= lastcomm Added: head/tools/regression/usr.bin/ncal/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/Makefile Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +all: + @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} Added: head/tools/regression/usr.bin/ncal/regress.b-3m200901-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200901-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,17 @@ + December 2008 January 2009 + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 336 337 338 339 340 341 1 2 3 +342 343 344 345 346 347 348 4 5 6 7 8 9 10 +349 350 351 352 353 354 355 11 12 13 14 15 16 17 +356 357 358 359 360 361 362 18 19 20 21 22 23 24 +363 364 365 366 25 26 27 28 29 30 31 + + + February 2009 + Su Mo Tu We Th Fr Sa + 32 33 34 35 36 37 38 + 39 40 41 42 43 44 45 + 46 47 48 49 50 51 52 + 53 54 55 56 57 58 59 + + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200901-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200901-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + December 2008 January 2009 February 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 1 2 3 1 2 3 4 5 6 7 + 7 8 9 10 11 12 13 4 5 6 7 8 9 10 8 9 10 11 12 13 14 +14 15 16 17 18 19 20 11 12 13 14 15 16 17 15 16 17 18 19 20 21 +21 22 23 24 25 26 27 18 19 20 21 22 23 24 22 23 24 25 26 27 28 +28 29 30 31 25 26 27 28 29 30 31 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200902-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200902-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,18 @@ + 2009 + January February + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 32 33 34 35 36 37 38 + 4 5 6 7 8 9 10 39 40 41 42 43 44 45 + 11 12 13 14 15 16 17 46 47 48 49 50 51 52 + 18 19 20 21 22 23 24 53 54 55 56 57 58 59 + 25 26 27 28 29 30 31 + + + March + Su Mo Tu We Th Fr Sa + 60 61 62 63 64 65 66 + 67 68 69 70 71 72 73 + 74 75 76 77 78 79 80 + 81 82 83 84 85 86 87 + 88 89 90 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200902-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200902-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5 6 7 + 4 5 6 7 8 9 10 8 9 10 11 12 13 14 8 9 10 11 12 13 14 +11 12 13 14 15 16 17 15 16 17 18 19 20 21 15 16 17 18 19 20 21 +18 19 20 21 22 23 24 22 23 24 25 26 27 28 22 23 24 25 26 27 28 +25 26 27 28 29 30 31 29 30 31 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200903-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200903-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,17 @@ + February 2009 March 2009 + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 32 33 34 35 36 37 38 60 61 62 63 64 65 66 + 39 40 41 42 43 44 45 67 68 69 70 71 72 73 + 46 47 48 49 50 51 52 74 75 76 77 78 79 80 + 53 54 55 56 57 58 59 81 82 83 84 85 86 87 + 88 89 90 + + + April 2009 + Su Mo Tu We Th Fr Sa + 91 92 93 94 + 95 96 97 98 99 100 101 +102 103 104 105 106 107 108 +109 110 111 112 113 114 115 +116 117 118 119 120 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200903-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200903-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + February 2009 March 2009 April 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 + 8 9 10 11 12 13 14 8 9 10 11 12 13 14 5 6 7 8 9 10 11 +15 16 17 18 19 20 21 15 16 17 18 19 20 21 12 13 14 15 16 17 18 +22 23 24 25 26 27 28 22 23 24 25 26 27 28 19 20 21 22 23 24 25 + 29 30 31 26 27 28 29 30 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200904-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200904-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,18 @@ + 2009 + March April + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 60 61 62 63 64 65 66 91 92 93 94 + 67 68 69 70 71 72 73 95 96 97 98 99 100 101 + 74 75 76 77 78 79 80 102 103 104 105 106 107 108 + 81 82 83 84 85 86 87 109 110 111 112 113 114 115 + 88 89 90 116 117 118 119 120 + + + May + Su Mo Tu We Th Fr Sa + 121 122 +123 124 125 126 127 128 129 +130 131 132 133 134 135 136 +137 138 139 140 141 142 143 +144 145 146 147 148 149 150 +151 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200904-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200904-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + March 2009 April 2009 May 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 1 2 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 +29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 + 31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200905-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200905-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,17 @@ + April 2009 May 2009 + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 91 92 93 94 121 122 + 95 96 97 98 99 100 101 123 124 125 126 127 128 129 +102 103 104 105 106 107 108 130 131 132 133 134 135 136 +109 110 111 112 113 114 115 137 138 139 140 141 142 143 +116 117 118 119 120 144 145 146 147 148 149 150 + 151 + + June 2009 + Su Mo Tu We Th Fr Sa + 152 153 154 155 156 157 +158 159 160 161 162 163 164 +165 166 167 168 169 170 171 +172 173 174 175 176 177 178 +179 180 181 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200905-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200905-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 2 1 2 3 4 5 6 + 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13 +12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20 +19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27 +26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 + 31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200906-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200906-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,18 @@ + 2009 + May June + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 121 122 152 153 154 155 156 157 +123 124 125 126 127 128 129 158 159 160 161 162 163 164 +130 131 132 133 134 135 136 165 166 167 168 169 170 171 +137 138 139 140 141 142 143 172 173 174 175 176 177 178 +144 145 146 147 148 149 150 179 180 181 +151 + + July + Su Mo Tu We Th Fr Sa + 182 183 184 185 +186 187 188 189 190 191 192 +193 194 195 196 197 198 199 +200 201 202 203 204 205 206 +207 208 209 210 211 212 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200906-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200906-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + May 2009 June 2009 July 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 1 2 3 4 5 6 1 2 3 4 + 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11 +10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18 +17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25 +24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 +31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200907-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200907-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,17 @@ + June 2009 July 2009 + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 152 153 154 155 156 157 182 183 184 185 +158 159 160 161 162 163 164 186 187 188 189 190 191 192 +165 166 167 168 169 170 171 193 194 195 196 197 198 199 +172 173 174 175 176 177 178 200 201 202 203 204 205 206 +179 180 181 207 208 209 210 211 212 + + + August 2009 + Su Mo Tu We Th Fr Sa + 213 +214 215 216 217 218 219 220 +221 222 223 224 225 226 227 +228 229 230 231 232 233 234 +235 236 237 238 239 240 241 +242 243 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200907-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200907-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + June 2009 July 2009 August 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 1 2 3 4 1 + 7 8 9 10 11 12 13 5 6 7 8 9 10 11 2 3 4 5 6 7 8 +14 15 16 17 18 19 20 12 13 14 15 16 17 18 9 10 11 12 13 14 15 +21 22 23 24 25 26 27 19 20 21 22 23 24 25 16 17 18 19 20 21 22 +28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 + 30 31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200908-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200908-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,18 @@ + 2009 + July August + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 182 183 184 185 213 +186 187 188 189 190 191 192 214 215 216 217 218 219 220 +193 194 195 196 197 198 199 221 222 223 224 225 226 227 +200 201 202 203 204 205 206 228 229 230 231 232 233 234 +207 208 209 210 211 212 235 236 237 238 239 240 241 + 242 243 + + September + Su Mo Tu We Th Fr Sa + 244 245 246 247 248 +249 250 251 252 253 254 255 +256 257 258 259 260 261 262 +263 264 265 266 267 268 269 +270 271 272 273 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200908-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200908-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 3 4 5 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 6 7 8 9 10 11 12 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 13 14 15 16 17 18 19 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 20 21 22 23 24 25 26 +26 27 28 29 30 31 23 24 25 26 27 28 29 27 28 29 30 + 30 31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200909-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200909-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,17 @@ + August 2009 September 2009 + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 213 244 245 246 247 248 +214 215 216 217 218 219 220 249 250 251 252 253 254 255 +221 222 223 224 225 226 227 256 257 258 259 260 261 262 +228 229 230 231 232 233 234 263 264 265 266 267 268 269 +235 236 237 238 239 240 241 270 271 272 273 +242 243 + + October 2009 + Su Mo Tu We Th Fr Sa + 274 275 276 +277 278 279 280 281 282 283 +284 285 286 287 288 289 290 +291 292 293 294 295 296 297 +298 299 300 301 302 303 304 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200909-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200909-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + August 2009 September 2009 October 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 3 4 5 1 2 3 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 +30 31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200910-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200910-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,18 @@ + 2009 + September October + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 244 245 246 247 248 274 275 276 +249 250 251 252 253 254 255 277 278 279 280 281 282 283 +256 257 258 259 260 261 262 284 285 286 287 288 289 290 +263 264 265 266 267 268 269 291 292 293 294 295 296 297 +270 271 272 273 298 299 300 301 302 303 304 + + + November + Su Mo Tu We Th Fr Sa +305 306 307 308 309 310 311 +312 313 314 315 316 317 318 +319 320 321 322 323 324 325 +326 327 328 329 330 331 332 +333 334 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200910-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200910-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + September 2009 October 2009 November 2009 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 + 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 +13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 +20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 +27 28 29 30 25 26 27 28 29 30 31 29 30 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200911-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200911-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,17 @@ + October 2009 November 2009 + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 274 275 276 305 306 307 308 309 310 311 +277 278 279 280 281 282 283 312 313 314 315 316 317 318 +284 285 286 287 288 289 290 319 320 321 322 323 324 325 +291 292 293 294 295 296 297 326 327 328 329 330 331 332 +298 299 300 301 302 303 304 333 334 + + + December 2009 + Su Mo Tu We Th Fr Sa + 335 336 337 338 339 +340 341 342 343 344 345 346 +347 348 349 350 351 352 353 +354 355 356 357 358 359 360 +361 362 363 364 365 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200911-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200911-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5 + 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12 +11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19 +18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26 +25 26 27 28 29 30 31 29 30 27 28 29 30 31 + Added: head/tools/regression/usr.bin/ncal/regress.b-3m200912-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200912-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,19 @@ + 2009 + November December + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa +305 306 307 308 309 310 311 335 336 337 338 339 +312 313 314 315 316 317 318 340 341 342 343 344 345 346 +319 320 321 322 323 324 325 347 348 349 350 351 352 353 +326 327 328 329 330 331 332 354 355 356 357 358 359 360 +333 334 361 362 363 364 365 + + + 2010 + January + Su Mo Tu We Th Fr Sa + 1 2 + 3 4 5 6 7 8 9 + 10 11 12 13 14 15 16 + 17 18 19 20 21 22 23 + 24 25 26 27 28 29 30 + 31 Added: head/tools/regression/usr.bin/ncal/regress.b-3m200912-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-3m200912-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + November 2009 December 2009 January 2010 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 5 1 2 + 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9 +15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16 +22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23 +29 30 27 28 29 30 31 24 25 26 27 28 29 30 + 31 Added: head/tools/regression/usr.bin/ncal/regress.b-y2008-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2008-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,54 @@ + 2008 + January February + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 32 33 + 6 7 8 9 10 11 12 34 35 36 37 38 39 40 + 13 14 15 16 17 18 19 41 42 43 44 45 46 47 + 20 21 22 23 24 25 26 48 49 50 51 52 53 54 + 27 28 29 30 31 55 56 57 58 59 60 + + + March April + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 61 92 93 94 95 96 + 62 63 64 65 66 67 68 97 98 99 100 101 102 103 + 69 70 71 72 73 74 75 104 105 106 107 108 109 110 + 76 77 78 79 80 81 82 111 112 113 114 115 116 117 + 83 84 85 86 87 88 89 118 119 120 121 + 90 91 + + May June + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 122 123 124 153 154 155 156 157 158 159 +125 126 127 128 129 130 131 160 161 162 163 164 165 166 +132 133 134 135 136 137 138 167 168 169 170 171 172 173 +139 140 141 142 143 144 145 174 175 176 177 178 179 180 +146 147 148 149 150 151 152 181 182 + + + July August + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 183 184 185 186 187 214 215 +188 189 190 191 192 193 194 216 217 218 219 220 221 222 +195 196 197 198 199 200 201 223 224 225 226 227 228 229 +202 203 204 205 206 207 208 230 231 232 233 234 235 236 +209 210 211 212 213 237 238 239 240 241 242 243 + 244 + + September October + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 245 246 247 248 249 250 275 276 277 278 +251 252 253 254 255 256 257 279 280 281 282 283 284 285 +258 259 260 261 262 263 264 286 287 288 289 290 291 292 +265 266 267 268 269 270 271 293 294 295 296 297 298 299 +272 273 274 300 301 302 303 304 305 + + + November December + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 306 336 337 338 339 340 341 +307 308 309 310 311 312 313 342 343 344 345 346 347 348 +314 315 316 317 318 319 320 349 350 351 352 353 354 355 +321 322 323 324 325 326 327 356 357 358 359 360 361 362 +328 329 330 331 332 333 334 363 364 365 366 +335 Added: head/tools/regression/usr.bin/ncal/regress.b-y2008-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2008-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,36 @@ + 2008 + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 1 2 1 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 2 3 4 5 6 7 8 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 9 10 11 12 13 14 15 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 16 17 18 19 20 21 22 +27 28 29 30 31 24 25 26 27 28 29 23 24 25 26 27 28 29 + 30 31 + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 + 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 +13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 +20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 +27 28 29 30 25 26 27 28 29 30 31 29 30 + + + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 1 2 1 2 3 4 5 6 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 7 8 9 10 11 12 13 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 14 15 16 17 18 19 20 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 21 22 23 24 25 26 27 +27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 + 31 + + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 3 4 5 6 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 7 8 9 10 11 12 13 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 14 15 16 17 18 19 20 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 21 22 23 24 25 26 27 +26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31 + 30 Added: head/tools/regression/usr.bin/ncal/regress.b-y2009-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2009-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,54 @@ + 2009 + January February + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 32 33 34 35 36 37 38 + 4 5 6 7 8 9 10 39 40 41 42 43 44 45 + 11 12 13 14 15 16 17 46 47 48 49 50 51 52 + 18 19 20 21 22 23 24 53 54 55 56 57 58 59 + 25 26 27 28 29 30 31 + + + March April + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 60 61 62 63 64 65 66 91 92 93 94 + 67 68 69 70 71 72 73 95 96 97 98 99 100 101 + 74 75 76 77 78 79 80 102 103 104 105 106 107 108 + 81 82 83 84 85 86 87 109 110 111 112 113 114 115 + 88 89 90 116 117 118 119 120 + + + May June + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 121 122 152 153 154 155 156 157 +123 124 125 126 127 128 129 158 159 160 161 162 163 164 +130 131 132 133 134 135 136 165 166 167 168 169 170 171 +137 138 139 140 141 142 143 172 173 174 175 176 177 178 +144 145 146 147 148 149 150 179 180 181 +151 + + July August + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 182 183 184 185 213 +186 187 188 189 190 191 192 214 215 216 217 218 219 220 +193 194 195 196 197 198 199 221 222 223 224 225 226 227 +200 201 202 203 204 205 206 228 229 230 231 232 233 234 +207 208 209 210 211 212 235 236 237 238 239 240 241 + 242 243 + + September October + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 244 245 246 247 248 274 275 276 +249 250 251 252 253 254 255 277 278 279 280 281 282 283 +256 257 258 259 260 261 262 284 285 286 287 288 289 290 +263 264 265 266 267 268 269 291 292 293 294 295 296 297 +270 271 272 273 298 299 300 301 302 303 304 + + + November December + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa +305 306 307 308 309 310 311 335 336 337 338 339 +312 313 314 315 316 317 318 340 341 342 343 344 345 346 +319 320 321 322 323 324 325 347 348 349 350 351 352 353 +326 327 328 329 330 331 332 354 355 356 357 358 359 360 +333 334 361 362 363 364 365 + Added: head/tools/regression/usr.bin/ncal/regress.b-y2009-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2009-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,36 @@ + 2009 + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5 6 7 + 4 5 6 7 8 9 10 8 9 10 11 12 13 14 8 9 10 11 12 13 14 +11 12 13 14 15 16 17 15 16 17 18 19 20 21 15 16 17 18 19 20 21 +18 19 20 21 22 23 24 22 23 24 25 26 27 28 22 23 24 25 26 27 28 +25 26 27 28 29 30 31 29 30 31 + + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 2 1 2 3 4 5 6 + 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13 +12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20 +19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27 +26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 + 31 + + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 3 4 5 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 6 7 8 9 10 11 12 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 13 14 15 16 17 18 19 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 20 21 22 23 24 25 26 +26 27 28 29 30 31 23 24 25 26 27 28 29 27 28 29 30 + 30 31 + + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5 + 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12 +11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19 +18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26 +25 26 27 28 29 30 31 29 30 27 28 29 30 31 + Added: head/tools/regression/usr.bin/ncal/regress.b-y2010-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2010-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,54 @@ + 2010 + January February + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 32 33 34 35 36 37 + 3 4 5 6 7 8 9 38 39 40 41 42 43 44 + 10 11 12 13 14 15 16 45 46 47 48 49 50 51 + 17 18 19 20 21 22 23 52 53 54 55 56 57 58 + 24 25 26 27 28 29 30 59 + 31 + + March April + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 60 61 62 63 64 65 91 92 93 + 66 67 68 69 70 71 72 94 95 96 97 98 99 100 + 73 74 75 76 77 78 79 101 102 103 104 105 106 107 + 80 81 82 83 84 85 86 108 109 110 111 112 113 114 + 87 88 89 90 115 116 117 118 119 120 + + + May June + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 121 152 153 154 155 156 +122 123 124 125 126 127 128 157 158 159 160 161 162 163 +129 130 131 132 133 134 135 164 165 166 167 168 169 170 +136 137 138 139 140 141 142 171 172 173 174 175 176 177 +143 144 145 146 147 148 149 178 179 180 181 +150 151 + + July August + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 182 183 184 213 214 215 216 217 218 219 +185 186 187 188 189 190 191 220 221 222 223 224 225 226 +192 193 194 195 196 197 198 227 228 229 230 231 232 233 +199 200 201 202 203 204 205 234 235 236 237 238 239 240 +206 207 208 209 210 211 212 241 242 243 + + + September October + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 244 245 246 247 274 275 +248 249 250 251 252 253 254 276 277 278 279 280 281 282 +255 256 257 258 259 260 261 283 284 285 286 287 288 289 +262 263 264 265 266 267 268 290 291 292 293 294 295 296 +269 270 271 272 273 297 298 299 300 301 302 303 + 304 + + November December + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 305 306 307 308 309 310 335 336 337 338 +311 312 313 314 315 316 317 339 340 341 342 343 344 345 +318 319 320 321 322 323 324 346 347 348 349 350 351 352 +325 326 327 328 329 330 331 353 354 355 356 357 358 359 +332 333 334 360 361 362 363 364 365 + Added: head/tools/regression/usr.bin/ncal/regress.b-y2010-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2010-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,36 @@ + 2010 + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 1 2 3 4 5 6 1 2 3 4 5 6 + 3 4 5 6 7 8 9 7 8 9 10 11 12 13 7 8 9 10 11 12 13 +10 11 12 13 14 15 16 14 15 16 17 18 19 20 14 15 16 17 18 19 20 +17 18 19 20 21 22 23 21 22 23 24 25 26 27 21 22 23 24 25 26 27 +24 25 26 27 28 29 30 28 28 29 30 31 +31 + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 1 1 2 3 4 5 + 4 5 6 7 8 9 10 2 3 4 5 6 7 8 6 7 8 9 10 11 12 +11 12 13 14 15 16 17 9 10 11 12 13 14 15 13 14 15 16 17 18 19 +18 19 20 21 22 23 24 16 17 18 19 20 21 22 20 21 22 23 24 25 26 +25 26 27 28 29 30 23 24 25 26 27 28 29 27 28 29 30 + 30 31 + + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 1 2 3 4 5 6 7 1 2 3 4 + 4 5 6 7 8 9 10 8 9 10 11 12 13 14 5 6 7 8 9 10 11 +11 12 13 14 15 16 17 15 16 17 18 19 20 21 12 13 14 15 16 17 18 +18 19 20 21 22 23 24 22 23 24 25 26 27 28 19 20 21 22 23 24 25 +25 26 27 28 29 30 31 29 30 31 26 27 28 29 30 + + + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 1 2 3 4 5 6 1 2 3 4 + 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11 +10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18 +17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25 +24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 +31 Added: head/tools/regression/usr.bin/ncal/regress.b-y2011-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2011-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,54 @@ + 2011 + January February + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 32 33 34 35 36 + 2 3 4 5 6 7 8 37 38 39 40 41 42 43 + 9 10 11 12 13 14 15 44 45 46 47 48 49 50 + 16 17 18 19 20 21 22 51 52 53 54 55 56 57 + 23 24 25 26 27 28 29 58 59 + 30 31 + + March April + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 60 61 62 63 64 91 92 + 65 66 67 68 69 70 71 93 94 95 96 97 98 99 + 72 73 74 75 76 77 78 100 101 102 103 104 105 106 + 79 80 81 82 83 84 85 107 108 109 110 111 112 113 + 86 87 88 89 90 114 115 116 117 118 119 120 + + + May June + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa +121 122 123 124 125 126 127 152 153 154 155 +128 129 130 131 132 133 134 156 157 158 159 160 161 162 +135 136 137 138 139 140 141 163 164 165 166 167 168 169 +142 143 144 145 146 147 148 170 171 172 173 174 175 176 +149 150 151 177 178 179 180 181 + + + July August + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 182 183 213 214 215 216 217 218 +184 185 186 187 188 189 190 219 220 221 222 223 224 225 +191 192 193 194 195 196 197 226 227 228 229 230 231 232 +198 199 200 201 202 203 204 233 234 235 236 237 238 239 +205 206 207 208 209 210 211 240 241 242 243 +212 + + September October + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 244 245 246 274 +247 248 249 250 251 252 253 275 276 277 278 279 280 281 +254 255 256 257 258 259 260 282 283 284 285 286 287 288 +261 262 263 264 265 266 267 289 290 291 292 293 294 295 +268 269 270 271 272 273 296 297 298 299 300 301 302 + 303 304 + + November December + Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 305 306 307 308 309 335 336 337 +310 311 312 313 314 315 316 338 339 340 341 342 343 344 +317 318 319 320 321 322 323 345 346 347 348 349 350 351 +324 325 326 327 328 329 330 352 353 354 355 356 357 358 +331 332 333 334 359 360 361 362 363 364 365 + Added: head/tools/regression/usr.bin/ncal/regress.b-y2011-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.b-y2011-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,36 @@ + 2011 + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 3 4 5 1 2 3 4 5 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 6 7 8 9 10 11 12 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 13 14 15 16 17 18 19 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 20 21 22 23 24 25 26 +23 24 25 26 27 28 29 27 28 27 28 29 30 31 +30 31 + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 1 2 3 4 5 6 7 1 2 3 4 + 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 +10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 +17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 +24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 + + + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 1 2 3 4 5 6 1 2 3 + 3 4 5 6 7 8 9 7 8 9 10 11 12 13 4 5 6 7 8 9 10 +10 11 12 13 14 15 16 14 15 16 17 18 19 20 11 12 13 14 15 16 17 +17 18 19 20 21 22 23 21 22 23 24 25 26 27 18 19 20 21 22 23 24 +24 25 26 27 28 29 30 28 29 30 31 25 26 27 28 29 30 +31 + + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 3 4 5 1 2 3 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 +30 31 Added: head/tools/regression/usr.bin/ncal/regress.f-3A-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-3A-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -3 together with -A and -B is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-3AB-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-3AB-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -3 together with -A and -B is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-3B-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-3B-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -3 together with -A and -B is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-3gy-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-3gy-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -3 together with a given year but no given month is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-3y-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-3y-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -3 together with -y is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-mgm-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-mgm-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -m together with a given month is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-yA-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-yA-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -y together a -A or -B is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-yAB-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-yAB-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -y together a -A or -B is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-yB-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-yB-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -y together a -A or -B is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-ygm-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-ygm-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -y together a given month is not supported. Added: head/tools/regression/usr.bin/ncal/regress.f-ym-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.f-ym-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1 @@ +ncal: -y together with -m is not supported. Added: head/tools/regression/usr.bin/ncal/regress.r-3m200901-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200901-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + December 2008 January 2009 February 2009 +Mo 336 343 350 357 364 5 12 19 26 33 40 47 54 +Tu 337 344 351 358 365 6 13 20 27 34 41 48 55 +We 338 345 352 359 366 7 14 21 28 35 42 49 56 +Th 339 346 353 360 1 8 15 22 29 36 43 50 57 +Fr 340 347 354 361 2 9 16 23 30 37 44 51 58 +Sa 341 348 355 362 3 10 17 24 31 38 45 52 59 +Su 342 349 356 363 4 11 18 25 32 39 46 53 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200901-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200901-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + December 2008 January 2009 February 2009 +Mo 1 8 15 22 29 5 12 19 26 2 9 16 23 +Tu 2 9 16 23 30 6 13 20 27 3 10 17 24 +We 3 10 17 24 31 7 14 21 28 4 11 18 25 +Th 4 11 18 25 1 8 15 22 29 5 12 19 26 +Fr 5 12 19 26 2 9 16 23 30 6 13 20 27 +Sa 6 13 20 27 3 10 17 24 31 7 14 21 28 +Su 7 14 21 28 4 11 18 25 1 8 15 22 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200902-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200902-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + January February March +Mo 5 12 19 26 33 40 47 54 61 68 75 82 89 +Tu 6 13 20 27 34 41 48 55 62 69 76 83 90 +We 7 14 21 28 35 42 49 56 63 70 77 84 +Th 1 8 15 22 29 36 43 50 57 64 71 78 85 +Fr 2 9 16 23 30 37 44 51 58 65 72 79 86 +Sa 3 10 17 24 31 38 45 52 59 66 73 80 87 +Su 4 11 18 25 32 39 46 53 60 67 74 81 88 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200902-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200902-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + January 2009 February 2009 March 2009 +Mo 5 12 19 26 2 9 16 23 2 9 16 23 30 +Tu 6 13 20 27 3 10 17 24 3 10 17 24 31 +We 7 14 21 28 4 11 18 25 4 11 18 25 +Th 1 8 15 22 29 5 12 19 26 5 12 19 26 +Fr 2 9 16 23 30 6 13 20 27 6 13 20 27 +Sa 3 10 17 24 31 7 14 21 28 7 14 21 28 +Su 4 11 18 25 1 8 15 22 1 8 15 22 29 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200903-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200903-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + February 2009 March 2009 April 2009 +Mo 33 40 47 54 61 68 75 82 89 96 103 110 117 +Tu 34 41 48 55 62 69 76 83 90 97 104 111 118 +We 35 42 49 56 63 70 77 84 91 98 105 112 119 +Th 36 43 50 57 64 71 78 85 92 99 106 113 120 +Fr 37 44 51 58 65 72 79 86 93 100 107 114 +Sa 38 45 52 59 66 73 80 87 94 101 108 115 +Su 32 39 46 53 60 67 74 81 88 95 102 109 116 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200903-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200903-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + February 2009 March 2009 April 2009 +Mo 2 9 16 23 2 9 16 23 30 6 13 20 27 +Tu 3 10 17 24 3 10 17 24 31 7 14 21 28 +We 4 11 18 25 4 11 18 25 1 8 15 22 29 +Th 5 12 19 26 5 12 19 26 2 9 16 23 30 +Fr 6 13 20 27 6 13 20 27 3 10 17 24 +Sa 7 14 21 28 7 14 21 28 4 11 18 25 +Su 1 8 15 22 1 8 15 22 29 5 12 19 26 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200904-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200904-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + March 2009 April 2009 May 2009 +Mo 61 68 75 82 89 96 103 110 117 124 131 138 145 +Tu 62 69 76 83 90 97 104 111 118 125 132 139 146 +We 63 70 77 84 91 98 105 112 119 126 133 140 147 +Th 64 71 78 85 92 99 106 113 120 127 134 141 148 +Fr 65 72 79 86 93 100 107 114 121 128 135 142 149 +Sa 66 73 80 87 94 101 108 115 122 129 136 143 150 +Su 60 67 74 81 88 95 102 109 116 123 130 137 144 151 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200904-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200904-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + March 2009 April 2009 May 2009 +Mo 2 9 16 23 30 6 13 20 27 4 11 18 25 +Tu 3 10 17 24 31 7 14 21 28 5 12 19 26 +We 4 11 18 25 1 8 15 22 29 6 13 20 27 +Th 5 12 19 26 2 9 16 23 30 7 14 21 28 +Fr 6 13 20 27 3 10 17 24 1 8 15 22 29 +Sa 7 14 21 28 4 11 18 25 2 9 16 23 30 +Su 1 8 15 22 29 5 12 19 26 3 10 17 24 31 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200905-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200905-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + April May June +Mo 96 103 110 117 124 131 138 145 152 159 166 173 180 +Tu 97 104 111 118 125 132 139 146 153 160 167 174 181 +We 91 98 105 112 119 126 133 140 147 154 161 168 175 +Th 92 99 106 113 120 127 134 141 148 155 162 169 176 +Fr 93 100 107 114 121 128 135 142 149 156 163 170 177 +Sa 94 101 108 115 122 129 136 143 150 157 164 171 178 +Su 95 102 109 116 123 130 137 144 151 158 165 172 179 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200905-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200905-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + April 2009 May 2009 June 2009 +Mo 6 13 20 27 4 11 18 25 1 8 15 22 29 +Tu 7 14 21 28 5 12 19 26 2 9 16 23 30 +We 1 8 15 22 29 6 13 20 27 3 10 17 24 +Th 2 9 16 23 30 7 14 21 28 4 11 18 25 +Fr 3 10 17 24 1 8 15 22 29 5 12 19 26 +Sa 4 11 18 25 2 9 16 23 30 6 13 20 27 +Su 5 12 19 26 3 10 17 24 31 7 14 21 28 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200906-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200906-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + May 2009 June 2009 July 2009 +Mo 124 131 138 145 152 159 166 173 180 187 194 201 208 +Tu 125 132 139 146 153 160 167 174 181 188 195 202 209 +We 126 133 140 147 154 161 168 175 182 189 196 203 210 +Th 127 134 141 148 155 162 169 176 183 190 197 204 211 +Fr 121 128 135 142 149 156 163 170 177 184 191 198 205 212 +Sa 122 129 136 143 150 157 164 171 178 185 192 199 206 +Su 123 130 137 144 151 158 165 172 179 186 193 200 207 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200906-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200906-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + May 2009 June 2009 July 2009 +Mo 4 11 18 25 1 8 15 22 29 6 13 20 27 +Tu 5 12 19 26 2 9 16 23 30 7 14 21 28 +We 6 13 20 27 3 10 17 24 1 8 15 22 29 +Th 7 14 21 28 4 11 18 25 2 9 16 23 30 +Fr 1 8 15 22 29 5 12 19 26 3 10 17 24 31 +Sa 2 9 16 23 30 6 13 20 27 4 11 18 25 +Su 3 10 17 24 31 7 14 21 28 5 12 19 26 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200907-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200907-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + June 2009 July 2009 August 2009 +Mo 152 159 166 173 180 187 194 201 208 215 222 229 236 243 +Tu 153 160 167 174 181 188 195 202 209 216 223 230 237 +We 154 161 168 175 182 189 196 203 210 217 224 231 238 +Th 155 162 169 176 183 190 197 204 211 218 225 232 239 +Fr 156 163 170 177 184 191 198 205 212 219 226 233 240 +Sa 157 164 171 178 185 192 199 206 213 220 227 234 241 +Su 158 165 172 179 186 193 200 207 214 221 228 235 242 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200907-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200907-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + June 2009 July 2009 August 2009 +Mo 1 8 15 22 29 6 13 20 27 3 10 17 24 31 +Tu 2 9 16 23 30 7 14 21 28 4 11 18 25 +We 3 10 17 24 1 8 15 22 29 5 12 19 26 +Th 4 11 18 25 2 9 16 23 30 6 13 20 27 +Fr 5 12 19 26 3 10 17 24 31 7 14 21 28 +Sa 6 13 20 27 4 11 18 25 1 8 15 22 29 +Su 7 14 21 28 5 12 19 26 2 9 16 23 30 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200908-jd-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200908-jd-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,9 @@ + 2009 + July August September +Mo 187 194 201 208 215 222 229 236 243 250 257 264 271 +Tu 188 195 202 209 216 223 230 237 244 251 258 265 272 +We 182 189 196 203 210 217 224 231 238 245 252 259 266 273 +Th 183 190 197 204 211 218 225 232 239 246 253 260 267 +Fr 184 191 198 205 212 219 226 233 240 247 254 261 268 +Sa 185 192 199 206 213 220 227 234 241 248 255 262 269 +Su 186 193 200 207 214 221 228 235 242 249 256 263 270 Added: head/tools/regression/usr.bin/ncal/regress.r-3m200908-md-nhl.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/ncal/regress.r-3m200908-md-nhl.out Sun Mar 14 10:24:03 2010 (r205147) @@ -0,0 +1,8 @@ + July 2009 August 2009 September 2009 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 11:26:16 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09833106564A; Sun, 14 Mar 2010 11:26:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 8F0408FC08; Sun, 14 Mar 2010 11:26:15 +0000 (UTC) Received: from c122-107-126-6.carlnfd1.nsw.optusnet.com.au (c122-107-126-6.carlnfd1.nsw.optusnet.com.au [122.107.126.6]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2EBQBKk007189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Mar 2010 22:26:12 +1100 Date: Sun, 14 Mar 2010 22:26:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Garrett Cooper In-Reply-To: <7d6fde3d1003131313l3559b6dbt1566fb23be150408@mail.gmail.com> Message-ID: <20100314212000.N23495@delplex.bde.org> References: <201003131108.o2DB8vmu001454@svn.freebsd.org> <7d6fde3d1003131313l3559b6dbt1566fb23be150408@mail.gmail.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-2088975880-1268565971=:23495" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Cran Subject: Re: svn commit: r205118 - head/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 11:26:16 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-2088975880-1268565971=:23495 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 13 Mar 2010, Garrett Cooper wrote: >> Log: >> =A0Free the memory allocated via strdup. Why bother? 1. Memory is infinite :-). 2. Memory is infinite relative to sysctl's requirements, especially for this strdup. Normally this strdup is never reached. It is normally reached a whole 1 time for sysctl -a (e.g., on ref9-amd64 now), since there is a whole 1 sysctl with a timeval format in the configured kernel, and not many more (if any more) than 1 in /sys. >> Modified: head/sbin/sysctl/sysctl.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/sbin/sysctl/sysctl.c =A0 Sat Mar 13 11:06:47 2010 =A0 =A0 =A0 = =A0(r205117) >> +++ head/sbin/sysctl/sysctl.c =A0 Sat Mar 13 11:08:57 2010 =A0 =A0 =A0 = =A0(r205118) >> @@ -382,6 +382,7 @@ S_timeval(int l2, void *p) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (*p2 =3D=3D '\n') >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*p2 =3D '\0'; >> =A0 =A0 =A0 =A0fputs(p1, stdout); >> + =A0 =A0 =A0 free(p1); >> =A0 =A0 =A0 =A0return (0); >> =A0} The \xa0's are ugly. > strdup(3) can fail in that section of code, thus the fputs(3) > could segfault: Who cares? 1. strdup() can't fail, since memory is infinite :-) 2. ... since memory is infinite relative to sysctl's requirements (see abov= e). 3. Most systems are (mis)configured with MALLOC_OPTIONS=3DA..., so if strdu= p() fails it doesn't return, and all the careful code that checks malloc() and strdup() for failing becomes just an obfuscation. MALLOC_OPTIONS=3DA... seriously breaks programs that are likely to run out of memory and handle this, but such programs became rare when address spaces exceeded 64K and rarer when they exceeded 640K...; they are now infinite :-), so problems are rarely seen. The strdup() is bogus anyway. ctime() returns a non-const string so the the string should be modified directly. It is just as easy to avoid the modification. The function with this has lots more style bugs: % static int % S_timeval(int l2, void *p) Style bug: *p should be const. % { % =09struct timeval *tv =3D (struct timeval*)p; Style bug: initialization in declaration. % =09time_t tv_sec; % =09char *p1, *p2; %=20 % =09if (l2 !=3D sizeof(*tv)) { % =09=09warnx("S_timeval %d !=3D %zu", l2, sizeof(*tv)); % =09=09return (1); % =09} % =09printf(hflag ? "{ sec =3D %'jd, usec =3D %'ld } " : % =09=09"{ sec =3D %jd, usec =3D %ld } ", % =09=09(intmax_t)tv->tv_sec, tv->tv_usec); Style bugs: non-KNF indentation of continued lines. % =09tv_sec =3D tv->tv_sec; % =09p1 =3D strdup(ctime(&tv_sec)); Style bug: strdup() just adds bloat (especially when you add memory management and error handling for it). % =09for (p2=3Dp1; *p2 ; p2++) Style bug: missing spaces around binary operator. % =09=09if (*p2 =3D=3D '\n') % =09=09=09*p2 =3D '\0'; To avoid the modification, break here and print the (p2 - p1) characters starting at p1 using "%.*s" format. This leads to complete de-bloatation: 1: the newline is always at the end, so it can be located using strlen() 2: strlen() is unnecessary to, since the string always has length 25. Thus "%.*s", ..., [p2 - p1 OR strlen(p1) -1] reduces to "%.24s". % =09fputs(p1, stdout); There is also a style rule against using fputs()... % =09free(p1); So the above lines (here they are again, indented a bit, with some error handling added for not-quite maximal verboseness): =09% =09p1 =3D strdup(ctime(&tv_sec)); =09%=09if (p1 =3D=3D NULL) =09%=09=09err(1, "strdup"); =09% =09for (p2=3Dp1; *p2 ; p2++) =09% =09=09if (*p2 =3D=3D '\n') =09% =09=09=09*p2 =3D '\0'; =09% =09fputs(p1, stdout); =09% =09free(p1); are a verbose way of writing: =09printf("%.24s", ctime(&tv_sec)); To reduce verboseness a little more, merge this printf() with the preceding one. To increase verboseness for both, add error handling for fputs() and printf= (). % =09return (0); % } --0-2088975880-1268565971=:23495-- From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 13:04:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE461106566B; Sun, 14 Mar 2010 13:04:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3198FC16; Sun, 14 Mar 2010 13:04:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ED49II047389; Sun, 14 Mar 2010 13:04:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ED49oH047387; Sun, 14 Mar 2010 13:04:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003141304.o2ED49oH047387@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Mar 2010 13:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205148 - head/tools/regression/posixsem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 13:04:09 -0000 Author: kib Date: Sun Mar 14 13:04:09 2010 New Revision: 205148 URL: http://svn.freebsd.org/changeset/base/205148 Log: Make it compile on LP64 arches. MFC after: 3 days Modified: head/tools/regression/posixsem/posixsem.c Modified: head/tools/regression/posixsem/posixsem.c ============================================================================== --- head/tools/regression/posixsem/posixsem.c Sun Mar 14 10:24:03 2010 (r205147) +++ head/tools/regression/posixsem/posixsem.c Sun Mar 14 13:04:09 2010 (r205148) @@ -1239,7 +1239,8 @@ exhaust_unnamed_sems(void) return; } - if (child_worker(exhaust_unnamed_child, (void *)nsems_max, &stat)) + if (child_worker(exhaust_unnamed_child, (void *)(uintptr_t)nsems_max, + &stat)) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1293,7 +1294,8 @@ exhaust_named_sems(void) return; } - if (child_worker(exhaust_named_child, (void *)nsems_max, &stat) < 0) + if (child_worker(exhaust_named_child, (void *)(uintptr_t)nsems_max, + &stat) < 0) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1351,7 +1353,8 @@ fdlimit_unnamed_sems(void) int nsems_max, stat; nsems_max = 10; - if (child_worker(fdlimit_unnamed_child, (void *)nsems_max, &stat)) + if (child_worker(fdlimit_unnamed_child, (void *)(uintptr_t)nsems_max, + &stat)) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1395,7 +1398,8 @@ fdlimit_named_sems(void) int i, nsems_max, stat; nsems_max = 10; - if (child_worker(fdlimit_named_child, (void *)nsems_max, &stat) < 0) + if (child_worker(fdlimit_named_child, (void *)(uintptr_t)nsems_max, + &stat) < 0) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 13:05:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F841065674; Sun, 14 Mar 2010 13:05:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2439A8FC16; Sun, 14 Mar 2010 13:05:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ED5nXP047792; Sun, 14 Mar 2010 13:05:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ED5nL8047790; Sun, 14 Mar 2010 13:05:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003141305.o2ED5nL8047790@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Mar 2010 13:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205149 - head/tools/regression/posixsem2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 13:05:49 -0000 Author: kib Date: Sun Mar 14 13:05:48 2010 New Revision: 205149 URL: http://svn.freebsd.org/changeset/base/205149 Log: Adjust style, fix typo, do not print errno because it is meaningless there. This test fails for now. MFC after: 3 days Modified: head/tools/regression/posixsem2/semtest.c Modified: head/tools/regression/posixsem2/semtest.c ============================================================================== --- head/tools/regression/posixsem2/semtest.c Sun Mar 14 13:04:09 2010 (r205148) +++ head/tools/regression/posixsem2/semtest.c Sun Mar 14 13:05:48 2010 (r205149) @@ -65,7 +65,8 @@ test_named(void) if (s2 == SEM_FAILED) err(2, "second sem_open call failed"); if (s != s2) - err(3, "two sem_open calls for same semaphore do not returm same address."); + errx(3, +"two sem_open calls for same semaphore do not return same address."); if (sem_close(s2)) err(4, "sem_close failed"); if ((pid = fork()) == 0) { From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 13:07:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E0C01065674; Sun, 14 Mar 2010 13:07:41 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7ED8FC13; Sun, 14 Mar 2010 13:07:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ED7efP048270; Sun, 14 Mar 2010 13:07:40 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ED7eID048268; Sun, 14 Mar 2010 13:07:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003141307.o2ED7eID048268@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Mar 2010 13:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205150 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 13:07:41 -0000 Author: jilles Date: Sun Mar 14 13:07:40 2010 New Revision: 205150 URL: http://svn.freebsd.org/changeset/base/205150 Log: MFC r204410: Include terminated threads in ps's process cpu time field. When a kinfo_proc is filled, first fill_kinfo_proc_only() fills in ki_runtime using p->p_rux.rux_runtime (all cpu time used by the process including terminated threads). If information for a specific thread is requested, fill_kinfo_thread() then overwrites this with the thread's td->td_runtime (good). If not, fill_kinfo_aggregate() overwrote it with the sum of all threads' td->td_runtime which does not include terminated threads. This affects ps(1)'s TIME field, not its %CPU field nor anything in top(1). Modified: stable/8/sys/kern/kern_proc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Sun Mar 14 13:05:48 2010 (r205149) +++ stable/8/sys/kern/kern_proc.c Sun Mar 14 13:07:40 2010 (r205150) @@ -675,11 +675,9 @@ fill_kinfo_aggregate(struct proc *p, str kp->ki_estcpu = 0; kp->ki_pctcpu = 0; - kp->ki_runtime = 0; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); kp->ki_pctcpu += sched_pctcpu(td); - kp->ki_runtime += cputick2usec(td->td_runtime); kp->ki_estcpu += td->td_estcpu; thread_unlock(td); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 13:29:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAB4C106566C; Sun, 14 Mar 2010 13:29:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB4018FC13; Sun, 14 Mar 2010 13:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EDT9TO052940; Sun, 14 Mar 2010 13:29:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EDT9vc052938; Sun, 14 Mar 2010 13:29:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003141329.o2EDT9vc052938@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Mar 2010 13:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205151 - head/tools/regression/posixsem2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 13:29:09 -0000 Author: kib Date: Sun Mar 14 13:29:09 2010 New Revision: 205151 URL: http://svn.freebsd.org/changeset/base/205151 Log: Remove dot at the end of errx() message. Noted by: bde MFC after: 3 days Modified: head/tools/regression/posixsem2/semtest.c Modified: head/tools/regression/posixsem2/semtest.c ============================================================================== --- head/tools/regression/posixsem2/semtest.c Sun Mar 14 13:07:40 2010 (r205150) +++ head/tools/regression/posixsem2/semtest.c Sun Mar 14 13:29:09 2010 (r205151) @@ -66,7 +66,7 @@ test_named(void) err(2, "second sem_open call failed"); if (s != s2) errx(3, -"two sem_open calls for same semaphore do not return same address."); +"two sem_open calls for same semaphore do not return same address"); if (sem_close(s2)) err(4, "sem_close failed"); if ((pid = fork()) == 0) { From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 13:32:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13A1B106567D; Sun, 14 Mar 2010 13:32:41 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 033378FC18; Sun, 14 Mar 2010 13:32:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EDWexx053781; Sun, 14 Mar 2010 13:32:40 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EDWeqG053779; Sun, 14 Mar 2010 13:32:40 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003141332.o2EDWeqG053779@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Mar 2010 13:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205152 - stable/7/sys/compat/linprocfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 13:32:41 -0000 Author: gavin Date: Sun Mar 14 13:32:40 2010 New Revision: 205152 URL: http://svn.freebsd.org/changeset/base/205152 Log: Merge r183385 from head (by cognet) Advertise bit 26 as sse2. PR: kern/130724 Approved by: cognet Modified: stable/7/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/7/sys/compat/linprocfs/linprocfs.c Sun Mar 14 13:29:09 2010 (r205151) +++ stable/7/sys/compat/linprocfs/linprocfs.c Sun Mar 14 13:32:40 2010 (r205152) @@ -222,7 +222,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "sep", "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "pn", "b19", "b20", "b21", "mmxext", "mmx", "fxsr", - "xmm", "b26", "b27", "b28", "b29", + "xmm", "sse2", "b27", "b28", "b29", "3dnowext", "3dnow" }; From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 13:51:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4E3106566C; Sun, 14 Mar 2010 13:51:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBDDA8FC08; Sun, 14 Mar 2010 13:51:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EDpCRf057851; Sun, 14 Mar 2010 13:51:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EDpCko057849; Sun, 14 Mar 2010 13:51:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003141351.o2EDpCko057849@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Mar 2010 13:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205153 - head/tools/regression/bin/sh/errors X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 13:51:13 -0000 Author: jilles Date: Sun Mar 14 13:51:12 2010 New Revision: 205153 URL: http://svn.freebsd.org/changeset/base/205153 Log: sh: Add test for redirection error on subshell (should not abort). Added: head/tools/regression/bin/sh/errors/redirection-error5.0 (contents, props changed) Added: head/tools/regression/bin/sh/errors/redirection-error5.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/errors/redirection-error5.0 Sun Mar 14 13:51:12 2010 (r205153) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# A redirection error on a subshell should not abort the shell. +exec 2>/dev/null +( echo bad ) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B37EF1065672; Sun, 14 Mar 2010 14:24:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A32E58FC08; Sun, 14 Mar 2010 14:24:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EEOZvx065460; Sun, 14 Mar 2010 14:24:35 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EEOZCP065456; Sun, 14 Mar 2010 14:24:35 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003141424.o2EEOZCP065456@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Mar 2010 14:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205154 - in head: bin/sh tools/regression/bin/sh/builtins tools/regression/bin/sh/errors X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 14:24:35 -0000 Author: jilles Date: Sun Mar 14 14:24:35 2010 New Revision: 205154 URL: http://svn.freebsd.org/changeset/base/205154 Log: sh: Do not abort on a redirection error on a compound command. Redirection errors on subshells already did not abort the shell because the redirection is executed in the subshell. Other shells seem to agree that these redirection errors should not abort the shell. Also ensure that the redirections will be cleaned up properly in cases like command eval '{ shift x; } 2>/dev/null' Example: { echo bad; } nbinary.ch2, flags); break; case NREDIR: - expredir(n->nredir.redirect); - redirect(n->nredir.redirect, REDIR_PUSH); - evaltree(n->nredir.n, flags); - popredir(); + evalredir(n, flags); break; case NSUBSHELL: evalsubshell(n, flags); @@ -415,6 +413,46 @@ evalsubshell(union node *n, int flags) } +/* + * Evaluate a redirected compound command. + */ + +STATIC void +evalredir(union node *n, int flags) +{ + struct jmploc jmploc; + struct jmploc *savehandler; + volatile int in_redirect = 1; + + expredir(n->nredir.redirect); + savehandler = handler; + if (setjmp(jmploc.loc)) { + int e; + + handler = savehandler; + e = exception; + if (e == EXERROR || e == EXEXEC) { + popredir(); + if (in_redirect) { + exitstatus = 2; + return; + } + } + longjmp(handler->loc, 1); + } else { + INTOFF; + handler = &jmploc; + redirect(n->nredir.redirect, REDIR_PUSH); + in_redirect = 0; + INTON; + evaltree(n->nredir.n, flags); + } + INTOFF; + handler = savehandler; + popredir(); + INTON; +} + /* * Compute the names of the files in a redirection list. Added: head/tools/regression/bin/sh/builtins/command11.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/command11.0 Sun Mar 14 14:24:35 2010 (r205154) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '"$({ command eval \{ shift x\; \} 2\>/dev/null; } >/dev/null; echo hi)" = hi' + +exit $((failures > 0)) Added: head/tools/regression/bin/sh/errors/redirection-error6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/errors/redirection-error6.0 Sun Mar 14 14:24:35 2010 (r205154) @@ -0,0 +1,12 @@ +# $FreeBSD$ +# A redirection error on a compound command should not abort the shell. +exec 2>/dev/null +{ echo bad; } Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D04F0106566C; Sun, 14 Mar 2010 15:49:04 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18DD8FC12; Sun, 14 Mar 2010 15:49:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EFn4oB084095; Sun, 14 Mar 2010 15:49:04 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EFn4mH084093; Sun, 14 Mar 2010 15:49:04 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003141549.o2EFn4mH084093@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Mar 2010 15:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205155 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 15:49:04 -0000 Author: gavin Date: Sun Mar 14 15:49:04 2010 New Revision: 205155 URL: http://svn.freebsd.org/changeset/base/205155 Log: Add extra Xrefs PR: docs/114184 Submitted by: Julian Stacey MFC after: 1 week Modified: head/share/man/man4/ndis.4 Modified: head/share/man/man4/ndis.4 ============================================================================== --- head/share/man/man4/ndis.4 Sun Mar 14 14:24:35 2010 (r205154) +++ head/share/man/man4/ndis.4 Sun Mar 14 15:49:04 2010 (r205155) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd March 14, 2010 .Dt NDIS 4 .Os .Sh NAME @@ -133,8 +133,10 @@ before a timeout expired. .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 , +.Xr ndis_events 8 , .Xr ndiscvt 8 , -.Xr ndisgen 8 +.Xr ndisgen 8 , +.Xr wpa_supplicant 8 .Rs .%T "NDIS 5.1 specification" .%U http://www.microsoft.com From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 16:03:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80273106564A; Sun, 14 Mar 2010 16:03:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66F578FC0C; Sun, 14 Mar 2010 16:03:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EG3apo087359; Sun, 14 Mar 2010 16:03:36 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EG3akZ087355; Sun, 14 Mar 2010 16:03:36 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003141603.o2EG3akZ087355@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 14 Mar 2010 16:03:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205156 - stable/7/bin/cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 16:03:36 -0000 Author: gavin Date: Sun Mar 14 16:03:36 2010 New Revision: 205156 URL: http://svn.freebsd.org/changeset/base/205156 Log: Merge r202461 from head: Implement an "-x" option to cp(1), for compatibility with Linux and feature parity with du(1) and similar: When set, cp(1) will not traverse mount points. PR: bin/88056 Initial patch by: Graham J Lee Modified: stable/7/bin/cp/cp.1 stable/7/bin/cp/cp.c stable/7/bin/cp/utils.c Directory Properties: stable/7/bin/cp/ (props changed) Modified: stable/7/bin/cp/cp.1 ============================================================================== --- stable/7/bin/cp/cp.1 Sun Mar 14 15:49:04 2010 (r205155) +++ stable/7/bin/cp/cp.1 Sun Mar 14 16:03:36 2010 (r205156) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 27, 2006 +.Dd January 17, 2010 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -183,6 +183,8 @@ permissions. Cause .Nm to be verbose, showing files as they are copied. +.It Fl x +File system mount points are not traversed. .El .Pp For each destination file that already exists, its contents are Modified: stable/7/bin/cp/cp.c ============================================================================== --- stable/7/bin/cp/cp.c Sun Mar 14 15:49:04 2010 (r205155) +++ stable/7/bin/cp/cp.c Sun Mar 14 16:03:36 2010 (r205156) @@ -101,8 +101,9 @@ main(int argc, char *argv[]) int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; char *target; + fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprv")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -150,6 +151,9 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'x': + fts_options |= FTS_XDEV; + break; default: usage(); break; @@ -160,7 +164,6 @@ main(int argc, char *argv[]) if (argc < 2) usage(); - fts_options = FTS_NOCHDIR | FTS_PHYSICAL; if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); if (rflag) Modified: stable/7/bin/cp/utils.c ============================================================================== --- stable/7/bin/cp/utils.c Sun Mar 14 15:49:04 2010 (r205155) +++ stable/7/bin/cp/utils.c Sun Mar 14 16:03:36 2010 (r205156) @@ -429,8 +429,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... " +"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", +" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " "target_directory"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 18:59:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B9D4106564A; Sun, 14 Mar 2010 18:59:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 598768FC17; Sun, 14 Mar 2010 18:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EIxCWa026513; Sun, 14 Mar 2010 18:59:12 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EIxCPv026506; Sun, 14 Mar 2010 18:59:12 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003141859.o2EIxCPv026506@svn.freebsd.org> From: Robert Watson Date: Sun, 14 Mar 2010 18:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205157 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 18:59:12 -0000 Author: rwatson Date: Sun Mar 14 18:59:11 2010 New Revision: 205157 URL: http://svn.freebsd.org/changeset/base/205157 Log: Abstract out initialization of most aspects of struct inpcbinfo from their calling contexts in {IP divert, raw IP sockets, TCP, UDP} and create new helper functions: in_pcbinfo_init() and in_pcbinfo_destroy() to do this work in a central spot. As inpcbinfo becomes more complex due to ongoing work to add connection groups, this will reduce code duplication. MFC after: 1 month Reviewed by: bz Sponsored by: Juniper Networks Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_divert.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Mar 14 16:03:36 2010 (r205156) +++ head/sys/netinet/in_pcb.c Sun Mar 14 18:59:11 2010 (r205157) @@ -184,6 +184,47 @@ SYSCTL_VNET_INT(_net_inet_ip_portrange, */ /* + * Initialize an inpcbinfo -- we should be able to reduce the number of + * arguments in time. + */ +void +in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name, + struct inpcbhead *listhead, int hash_nelements, int porthash_nelements, + char *inpcbzone_name, uma_init inpcbzone_init, uma_fini inpcbzone_fini, + uint32_t inpcbzone_flags) +{ + + INP_INFO_LOCK_INIT(pcbinfo, name); +#ifdef VIMAGE + pcbinfo->ipi_vnet = curvnet; +#endif + pcbinfo->ipi_listhead = listhead; + LIST_INIT(pcbinfo->ipi_listhead); + pcbinfo->ipi_hashbase = hashinit(hash_nelements, M_PCB, + &pcbinfo->ipi_hashmask); + pcbinfo->ipi_porthashbase = hashinit(porthash_nelements, M_PCB, + &pcbinfo->ipi_porthashmask); + pcbinfo->ipi_zone = uma_zcreate(inpcbzone_name, sizeof(struct inpcb), + NULL, NULL, inpcbzone_init, inpcbzone_fini, UMA_ALIGN_PTR, + inpcbzone_flags); + uma_zone_set_max(pcbinfo->ipi_zone, maxsockets); +} + +/* + * Destroy an inpcbinfo. + */ +void +in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) +{ + + hashdestroy(pcbinfo->ipi_hashbase, M_PCB, pcbinfo->ipi_hashmask); + hashdestroy(pcbinfo->ipi_porthashbase, M_PCB, + pcbinfo->ipi_porthashmask); + uma_zdestroy(pcbinfo->ipi_zone); + INP_INFO_LOCK_DESTROY(pcbinfo); +} + +/* * Allocate a PCB and associate it with the socket. * On success return with the PCB locked. */ Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sun Mar 14 16:03:36 2010 (r205156) +++ head/sys/netinet/in_pcb.h Sun Mar 14 18:59:11 2010 (r205157) @@ -42,6 +42,7 @@ #ifdef _KERNEL #include #include +#include #endif #define in6pcb inpcb /* for KAME src sync over BSD*'s */ @@ -483,6 +484,10 @@ VNET_DECLARE(int, ipport_tcpallocs); extern struct callout ipport_tick_callout; +void in_pcbinfo_destroy(struct inpcbinfo *); +void in_pcbinfo_init(struct inpcbinfo *, const char *, struct inpcbhead *, + int, int, char *, uma_init, uma_fini, uint32_t); + void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); int in_pcballoc(struct socket *, struct inpcbinfo *); int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun Mar 14 16:03:36 2010 (r205156) +++ head/sys/netinet/ip_divert.c Sun Mar 14 18:59:11 2010 (r205157) @@ -147,35 +147,20 @@ static void div_init(void) { - INP_INFO_LOCK_INIT(&V_divcbinfo, "div"); - LIST_INIT(&V_divcb); - V_divcbinfo.ipi_listhead = &V_divcb; -#ifdef VIMAGE - V_divcbinfo.ipi_vnet = curvnet; -#endif /* - * XXX We don't use the hash list for divert IP, but it's easier - * to allocate a one entry hash list than it is to check all - * over the place for hashbase == NULL. + * XXX We don't use the hash list for divert IP, but it's easier to + * allocate one-entry hash lists than it is to check all over the + * place for hashbase == NULL. */ - V_divcbinfo.ipi_hashbase = hashinit(1, M_PCB, &V_divcbinfo.ipi_hashmask); - V_divcbinfo.ipi_porthashbase = hashinit(1, M_PCB, - &V_divcbinfo.ipi_porthashmask); - V_divcbinfo.ipi_zone = uma_zcreate("divcb", sizeof(struct inpcb), - NULL, NULL, div_inpcb_init, div_inpcb_fini, UMA_ALIGN_PTR, - UMA_ZONE_NOFREE); - uma_zone_set_max(V_divcbinfo.ipi_zone, maxsockets); + in_pcbinfo_init(&V_divcbinfo, "div", &V_divcb, 1, 1, "divcb", + div_inpcb_init, div_inpcb_fini, UMA_ZONE_NOFREE); } static void div_destroy(void) { - INP_INFO_LOCK_DESTROY(&V_divcbinfo); - uma_zdestroy(V_divcbinfo.ipi_zone); - hashdestroy(V_divcbinfo.ipi_hashbase, M_PCB, V_divcbinfo.ipi_hashmask); - hashdestroy(V_divcbinfo.ipi_porthashbase, M_PCB, - V_divcbinfo.ipi_porthashmask); + in_pcbinfo_destroy(&V_divcbinfo); } /* Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Sun Mar 14 16:03:36 2010 (r205156) +++ head/sys/netinet/raw_ip.c Sun Mar 14 18:59:11 2010 (r205157) @@ -185,19 +185,8 @@ void rip_init(void) { - INP_INFO_LOCK_INIT(&V_ripcbinfo, "rip"); - LIST_INIT(&V_ripcb); -#ifdef VIMAGE - V_ripcbinfo.ipi_vnet = curvnet; -#endif - V_ripcbinfo.ipi_listhead = &V_ripcb; - V_ripcbinfo.ipi_hashbase = - hashinit(INP_PCBHASH_RAW_SIZE, M_PCB, &V_ripcbinfo.ipi_hashmask); - V_ripcbinfo.ipi_porthashbase = - hashinit(1, M_PCB, &V_ripcbinfo.ipi_porthashmask); - V_ripcbinfo.ipi_zone = uma_zcreate("ripcb", sizeof(struct inpcb), - NULL, NULL, rip_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(V_ripcbinfo.ipi_zone, maxsockets); + in_pcbinfo_init(&V_ripcbinfo, "rip", &V_ripcb, INP_PCBHASH_RAW_SIZE, + 1, "ripcb", rip_inpcb_init, NULL, UMA_ZONE_NOFREE); EVENTHANDLER_REGISTER(maxsockets_change, rip_zone_change, NULL, EVENTHANDLER_PRI_ANY); } @@ -207,10 +196,7 @@ void rip_destroy(void) { - hashdestroy(V_ripcbinfo.ipi_hashbase, M_PCB, - V_ripcbinfo.ipi_hashmask); - hashdestroy(V_ripcbinfo.ipi_porthashbase, M_PCB, - V_ripcbinfo.ipi_porthashmask); + in_pcbinfo_destroy(&V_ripcbinfo); } #endif Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Mar 14 16:03:36 2010 (r205156) +++ head/sys/netinet/tcp_subr.c Sun Mar 14 18:59:11 2010 (r205157) @@ -376,25 +376,15 @@ tcp_init(void) TUNABLE_INT_FETCH("net.inet.tcp.sack.enable", &V_tcp_do_sack); - INP_INFO_LOCK_INIT(&V_tcbinfo, "tcp"); - LIST_INIT(&V_tcb); -#ifdef VIMAGE - V_tcbinfo.ipi_vnet = curvnet; -#endif - V_tcbinfo.ipi_listhead = &V_tcb; hashsize = TCBHASHSIZE; TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize); if (!powerof2(hashsize)) { printf("WARNING: TCB hash size not a power of 2\n"); hashsize = 512; /* safe default */ } - V_tcbinfo.ipi_hashbase = hashinit(hashsize, M_PCB, - &V_tcbinfo.ipi_hashmask); - V_tcbinfo.ipi_porthashbase = hashinit(hashsize, M_PCB, - &V_tcbinfo.ipi_porthashmask); - V_tcbinfo.ipi_zone = uma_zcreate("tcp_inpcb", sizeof(struct inpcb), - NULL, NULL, tcp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(V_tcbinfo.ipi_zone, maxsockets); + in_pcbinfo_init(&V_tcbinfo, "tcp", &V_tcb, hashsize, hashsize, + "tcp_inpcb", tcp_inpcb_init, NULL, UMA_ZONE_NOFREE); + /* * These have to be type stable for the benefit of the timers. */ @@ -463,18 +453,9 @@ tcp_destroy(void) tcp_hc_destroy(); syncache_destroy(); tcp_tw_destroy(); - - /* XXX check that hashes are empty! */ - hashdestroy(V_tcbinfo.ipi_hashbase, M_PCB, - V_tcbinfo.ipi_hashmask); - hashdestroy(V_tcbinfo.ipi_porthashbase, M_PCB, - V_tcbinfo.ipi_porthashmask); - + in_pcbinfo_destroy(&V_tcbinfo); uma_zdestroy(V_sack_hole_zone); uma_zdestroy(V_tcpcb_zone); - uma_zdestroy(V_tcbinfo.ipi_zone); - - INP_INFO_LOCK_DESTROY(&V_tcbinfo); } #endif Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Mar 14 16:03:36 2010 (r205156) +++ head/sys/netinet/udp_usrreq.c Sun Mar 14 18:59:11 2010 (r205157) @@ -180,25 +180,11 @@ udp_init(void) { V_udp_blackhole = 0; - - INP_INFO_LOCK_INIT(&V_udbinfo, "udp"); - LIST_INIT(&V_udb); -#ifdef VIMAGE - V_udbinfo.ipi_vnet = curvnet; -#endif - V_udbinfo.ipi_listhead = &V_udb; - V_udbinfo.ipi_hashbase = hashinit(UDBHASHSIZE, M_PCB, - &V_udbinfo.ipi_hashmask); - V_udbinfo.ipi_porthashbase = hashinit(UDBHASHSIZE, M_PCB, - &V_udbinfo.ipi_porthashmask); - V_udbinfo.ipi_zone = uma_zcreate("udp_inpcb", sizeof(struct inpcb), - NULL, NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(V_udbinfo.ipi_zone, maxsockets); - + in_pcbinfo_init(&V_udbinfo, "udp", &V_udb, UDBHASHSIZE, UDBHASHSIZE, + "udp_inpcb", udp_inpcb_init, NULL, UMA_ZONE_NOFREE); V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(V_udpcb_zone, maxsockets); - EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); } @@ -241,14 +227,8 @@ void udp_destroy(void) { - hashdestroy(V_udbinfo.ipi_hashbase, M_PCB, - V_udbinfo.ipi_hashmask); - hashdestroy(V_udbinfo.ipi_porthashbase, M_PCB, - V_udbinfo.ipi_porthashmask); - + in_pcbinfo_destroy(&V_udbinfo); uma_zdestroy(V_udpcb_zone); - uma_zdestroy(V_udbinfo.ipi_zone); - INP_INFO_LOCK_DESTROY(&V_udbinfo); } #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 19:04:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02B2C106566C; Sun, 14 Mar 2010 19:04:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6ADB8FC12; Sun, 14 Mar 2010 19:04:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EJ4gVr027769; Sun, 14 Mar 2010 19:04:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EJ4gx1027767; Sun, 14 Mar 2010 19:04:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003141904.o2EJ4gx1027767@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Mar 2010 19:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205158 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 19:04:43 -0000 Author: imp Date: Sun Mar 14 19:04:42 2010 New Revision: 205158 URL: http://svn.freebsd.org/changeset/base/205158 Log: Go ahead and add USB support to the generic config. Modified: head/sys/mips/conf/AR71XX Modified: head/sys/mips/conf/AR71XX ============================================================================== --- head/sys/mips/conf/AR71XX Sun Mar 14 18:59:11 2010 (r205157) +++ head/sys/mips/conf/AR71XX Sun Mar 14 19:04:42 2010 (r205158) @@ -67,10 +67,11 @@ device ath_rate_sample device mii device arge -# device usb -# options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order +device usb +options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order # options USB_DEBUG -# device ehci +device ohci +device ehci device spibus device ar71xx_spi From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 22:38:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 369571065670; Sun, 14 Mar 2010 22:38:19 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 254538FC13; Sun, 14 Mar 2010 22:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2EMcJPS074660; Sun, 14 Mar 2010 22:38:19 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2EMcJYM074658; Sun, 14 Mar 2010 22:38:19 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003142238.o2EMcJYM074658@svn.freebsd.org> From: Attilio Rao Date: Sun, 14 Mar 2010 22:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205160 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 22:38:19 -0000 Author: attilio Date: Sun Mar 14 22:38:18 2010 New Revision: 205160 URL: http://svn.freebsd.org/changeset/base/205160 Log: Checkin a facility for specifying a passthrough FIB from userland. arcconf tool by Adaptec already seems to use for identifying the Serial Number of the devices. Some simple things (like FIB setup and bound checks) are retrieved from the Adaptec's driver, but this implementation is quite different because it does use the normal buffer dmat area for loading segments and not a special one (like the Adaptec's one does). Sponsored by: Sandvine Incorporated Discussed with: emaste, scottl Reviewed by: emaste, scottl MFC: 2 weeks Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sun Mar 14 21:14:25 2010 (r205159) +++ head/sys/dev/aac/aac.c Sun Mar 14 22:38:18 2010 (r205160) @@ -3063,7 +3063,147 @@ out: static int aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg) { - return (EINVAL); + struct aac_command *cm; + struct aac_event *event; + struct aac_fib *fib; + struct aac_srb *srbcmd, *user_srb; + struct aac_sg_entry *sge; + struct aac_sg_entry64 *sge64; + void *srb_sg_address, *ureply; + uint32_t fibsize, srb_sg_bytecount; + int error, transfer_data; + + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + cm = NULL; + transfer_data = 0; + fibsize = 0; + user_srb = (struct aac_srb *)arg; + + mtx_lock(&sc->aac_io_lock); + if (aac_alloc_command(sc, &cm)) { + event = malloc(sizeof(struct aac_event), M_AACBUF, + M_NOWAIT | M_ZERO); + if (event == NULL) { + error = EBUSY; + mtx_unlock(&sc->aac_io_lock); + goto out; + } + event->ev_type = AAC_EVENT_CMFREE; + event->ev_callback = aac_ioctl_event; + event->ev_arg = &cm; + aac_add_event(sc, event); + msleep(cm, &sc->aac_io_lock, 0, "aacraw", 0); + } + mtx_unlock(&sc->aac_io_lock); + + cm->cm_data = NULL; + fib = cm->cm_fib; + srbcmd = (struct aac_srb *)fib->data; + error = copyin(&user_srb->data_len, &fibsize, sizeof(uint32_t)); + if (error != 0) + goto out; + if (fibsize > (sc->aac_max_fib_size - sizeof(struct aac_fib_header))) { + error = EINVAL; + goto out; + } + error = copyin(user_srb, srbcmd, fibsize); + if (error != 0) + goto out; + srbcmd->function = 0; + srbcmd->retry_limit = 0; + if (srbcmd->sg_map.SgCount > 1) { + error = EINVAL; + goto out; + } + + /* Retrieve correct SG entries. */ + if (fibsize == (sizeof(struct aac_srb) + + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry))) { + sge = srbcmd->sg_map.SgEntry; + sge64 = NULL; + srb_sg_bytecount = sge->SgByteCount; +#ifdef __amd64__ + srb_sg_address = (void *)(uint64_t)sge->SgAddress; +#else + srb_sg_address = (void *)sge->SgAddress; +#endif + } +#ifdef __amd64__ + else if (fibsize == (sizeof(struct aac_srb) + + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) { + sge = NULL; + sge64 = (struct aac_sg_entry64 *)srbcmd->sg_map.SgEntry; + srb_sg_bytecount = sge64->SgByteCount; + srb_sg_address = (void *)sge64->SgAddress; + if (sge64->SgAddress > 0xffffffffull && + (sc->flags & AAC_FLAGS_SG_64BIT) == 0) { + error = EINVAL; + goto out; + } + } +#endif + else { + error = EINVAL; + goto out; + } + ureply = (char *)arg + fibsize; + srbcmd->data_len = srb_sg_bytecount; + if (srbcmd->sg_map.SgCount == 1) + transfer_data = 1; + + cm->cm_sgtable = (struct aac_sg_table *)&srbcmd->sg_map; + if (transfer_data) { + cm->cm_datalen = srb_sg_bytecount; + cm->cm_data = malloc(cm->cm_datalen, M_AACBUF, M_NOWAIT); + if (cm->cm_data == NULL) { + error = ENOMEM; + goto out; + } + if (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN) + cm->cm_flags |= AAC_CMD_DATAIN; + if (srbcmd->flags & AAC_SRB_FLAGS_DATA_OUT) { + cm->cm_flags |= AAC_CMD_DATAOUT; + error = copyin(srb_sg_address, cm->cm_data, + cm->cm_datalen); + if (error != 0) + goto out; + } + } + + fib->Header.Size = sizeof(struct aac_fib_header) + + sizeof(struct aac_srb); + fib->Header.XferState = + AAC_FIBSTATE_HOSTOWNED | + AAC_FIBSTATE_INITIALISED | + AAC_FIBSTATE_EMPTY | + AAC_FIBSTATE_FROMHOST | + AAC_FIBSTATE_REXPECTED | + AAC_FIBSTATE_NORM | + AAC_FIBSTATE_ASYNC | + AAC_FIBSTATE_FAST_RESPONSE; + fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) != 0 ? + ScsiPortCommandU64 : ScsiPortCommand; + + mtx_lock(&sc->aac_io_lock); + aac_wait_command(cm); + mtx_unlock(&sc->aac_io_lock); + + if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN) != 0) { + error = copyout(cm->cm_data, srb_sg_address, cm->cm_datalen); + if (error != 0) + goto out; + } + error = copyout(fib->data, ureply, sizeof(struct aac_srb_response)); +out: + if (cm != NULL) { + if (cm->cm_data != NULL) + free(cm->cm_data, M_AACBUF); + mtx_lock(&sc->aac_io_lock); + aac_release_command(cm); + mtx_unlock(&sc->aac_io_lock); + } + return(error); } /* From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 22:40:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5338F1065672; Sun, 14 Mar 2010 22:40:07 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.211.181]) by mx1.freebsd.org (Postfix) with ESMTP id DC8478FC17; Sun, 14 Mar 2010 22:40:06 +0000 (UTC) Received: by ywh11 with SMTP id 11so607489ywh.27 for ; Sun, 14 Mar 2010 15:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=aEQZe0uaG4/fnTkdVP/rwtranKNMlzpbFC/JSFtVKAM=; b=c8exLxBjjHjVQKe1Vl8bEsxQFhtHinTqkTI0v7rmtKWp0NPHe3p83cs7nEz3lHGE0J JdZ5EC1oYhag9CQYGsBpEgcj8bKXBZ6XH8WaSP+a2RZ6Q6PlJT2yDm5IWgSYzl/jdlo7 or4Ps3AHSiJx+oqx/WA8fIlCrPNEhYluodCLQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=jjL90YylriV0m2b+LA8b91VgcDBzXXCW9GE6sfLykaIaUsdDyGEYzMyUx2GVPzSOOL x95m23usovcPgzOmTlYSPZdS7/ZCYpzRsagR+dxLr4C53jnpLqtQ1Iq8sA1v55Iy9rlb jrVwrv63uyIsEI4StnjlaLfT99E4GuecQI1pQ= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.101.108.6 with SMTP id k6mr2024853anm.162.1268606405827; Sun, 14 Mar 2010 15:40:05 -0700 (PDT) In-Reply-To: <201003142238.o2EMcJYM074658@svn.freebsd.org> References: <201003142238.o2EMcJYM074658@svn.freebsd.org> Date: Sun, 14 Mar 2010 23:40:05 +0100 X-Google-Sender-Auth: 97c27dc2bc2c6fcf Message-ID: <3bbf2fe11003141540g533be90fia6fd308233d7034d@mail.gmail.com> From: Attilio Rao To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Cc: Subject: Re: svn commit: r205160 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 22:40:07 -0000 V2UgY2FuIGNsb3NlIHRoaXMgdGlja2V0IG5vdy4KVGhlcmUgaXMgc29tZXRoaW5nIGVsc2Ugd2Ug c2hvdWxkIGRvIHJlbGF0ZWQgdG8gdGhlIGFhYyBkcml2ZXIgaXRzZWxmPwpNYXliZSBoYW5kbGlu ZyB0aGUgcHJvYmxlbSByZXBvcnRlZCBpbiB0aGUgbGFzdCBmaWxsZWQgUFI/CgpBdHRpbGlvCgoK LS0tLS0tLS0tLSBGb3J3YXJkZWQgbWVzc2FnZSAtLS0tLS0tLS0tCkZyb206IEF0dGlsaW8gUmFv IDxhdHRpbGlvQGZyZWVic2Qub3JnPgpEYXRlOiAyMDEwLzMvMTQKU3ViamVjdDogc3ZuIGNvbW1p dDogcjIwNTE2MCAtIGhlYWQvc3lzL2Rldi9hYWMKVG86IHNyYy1jb21taXR0ZXJzQGZyZWVic2Qu b3JnLCBzdm4tc3JjLWFsbEBmcmVlYnNkLm9yZywKc3ZuLXNyYy1oZWFkQGZyZWVic2Qub3JnCgoK QXV0aG9yOiBhdHRpbGlvCkRhdGU6IFN1biBNYXIgMTQgMjI6Mzg6MTggMjAxMApOZXcgUmV2aXNp b246IDIwNTE2MApVUkw6IGh0dHA6Ly9zdm4uZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMjA1 MTYwCgpMb2c6CsKgQ2hlY2tpbiBhIGZhY2lsaXR5IGZvciBzcGVjaWZ5aW5nIGEgcGFzc3Rocm91 Z2ggRklCIGZyb20gdXNlcmxhbmQuCsKgYXJjY29uZiB0b29sIGJ5IEFkYXB0ZWMgYWxyZWFkeSBz ZWVtcyB0byB1c2UgZm9yIGlkZW50aWZ5aW5nIHRoZQrCoFNlcmlhbCBOdW1iZXIgb2YgdGhlIGRl dmljZXMuCsKgU29tZSBzaW1wbGUgdGhpbmdzIChsaWtlIEZJQiBzZXR1cCBhbmQgYm91bmQgY2hl Y2tzKSBhcmUgcmV0cmlldmVkCsKgZnJvbSB0aGUgQWRhcHRlYydzIGRyaXZlciwgYnV0IHRoaXMg aW1wbGVtZW50YXRpb24gaXMgcXVpdGUgZGlmZmVyZW50CsKgYmVjYXVzZSBpdCBkb2VzIHVzZSB0 aGUgbm9ybWFsIGJ1ZmZlciBkbWF0IGFyZWEgZm9yIGxvYWRpbmcgc2VnbWVudHMKwqBhbmQgbm90 IGEgc3BlY2lhbCBvbmUgKGxpa2UgdGhlIEFkYXB0ZWMncyBvbmUgZG9lcykuCgrCoFNwb25zb3Jl ZCBieTogU2FuZHZpbmUgSW5jb3Jwb3JhdGVkCsKgRGlzY3Vzc2VkIHdpdGg6IMKgIMKgIMKgIGVt YXN0ZSwgc2NvdHRsCsKgUmV2aWV3ZWQgYnk6IMKgZW1hc3RlLCBzY290dGwKwqBNRkM6IMKgIMKg IMKgIMKgIMKgMiB3ZWVrcwoKTW9kaWZpZWQ6CsKgaGVhZC9zeXMvZGV2L2FhYy9hYWMuYwoKTW9k aWZpZWQ6IGhlYWQvc3lzL2Rldi9hYWMvYWFjLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBo ZWFkL3N5cy9kZXYvYWFjL2FhYy5jIMKgIMKgIMKgU3VuIE1hciAxNCAyMToxNDoyNSAyMDEwIMKg IMKgIMKgIMKgKHIyMDUxNTkpCisrKyBoZWFkL3N5cy9kZXYvYWFjL2FhYy5jIMKgIMKgIMKgU3Vu IE1hciAxNCAyMjozODoxOCAyMDEwIMKgIMKgIMKgIMKgKHIyMDUxNjApCkBAIC0zMDYzLDcgKzMw NjMsMTQ3IEBAIG91dDoKwqBzdGF0aWMgaW50CsKgYWFjX2lvY3RsX3NlbmRfcmF3X3NyYihzdHJ1 Y3QgYWFjX3NvZnRjICpzYywgY2FkZHJfdCBhcmcpCsKgewotIMKgIMKgIMKgIHJldHVybiAoRUlO VkFMKTsKKyDCoCDCoCDCoCBzdHJ1Y3QgYWFjX2NvbW1hbmQgKmNtOworIMKgIMKgIMKgIHN0cnVj dCBhYWNfZXZlbnQgKmV2ZW50OworIMKgIMKgIMKgIHN0cnVjdCBhYWNfZmliICpmaWI7CisgwqAg wqAgwqAgc3RydWN0IGFhY19zcmIgKnNyYmNtZCwgKnVzZXJfc3JiOworIMKgIMKgIMKgIHN0cnVj dCBhYWNfc2dfZW50cnkgKnNnZTsKKyDCoCDCoCDCoCBzdHJ1Y3QgYWFjX3NnX2VudHJ5NjQgKnNn ZTY0OworIMKgIMKgIMKgIHZvaWQgKnNyYl9zZ19hZGRyZXNzLCAqdXJlcGx5OworIMKgIMKgIMKg IHVpbnQzMl90IGZpYnNpemUsIHNyYl9zZ19ieXRlY291bnQ7CisgwqAgwqAgwqAgaW50IGVycm9y LCB0cmFuc2Zlcl9kYXRhOworCisgwqAgwqAgwqAgZndwcmludGYoc2MsIEhCQV9GTEFHU19EQkdf RlVOQ1RJT05fRU5UUllfQiwgIiIpOworCisgwqAgwqAgwqAgY20gPSBOVUxMOworIMKgIMKgIMKg IHRyYW5zZmVyX2RhdGEgPSAwOworIMKgIMKgIMKgIGZpYnNpemUgPSAwOworIMKgIMKgIMKgIHVz ZXJfc3JiID0gKHN0cnVjdCBhYWNfc3JiICopYXJnOworCisgwqAgwqAgwqAgbXR4X2xvY2soJnNj LT5hYWNfaW9fbG9jayk7CisgwqAgwqAgwqAgaWYgKGFhY19hbGxvY19jb21tYW5kKHNjLCAmY20p KSB7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBldmVudCA9IG1hbGxvYyhzaXplb2Yoc3RydWN0 IGFhY19ldmVudCksIE1fQUFDQlVGLAorIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIE1fTk9X QUlUIHwgTV9aRVJPKTsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBpZiAoZXZlbnQgPT0gTlVMTCkg eworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGVycm9yID0gRUJVU1k7CisgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgbXR4X3VubG9jaygmc2MtPmFhY19pb19sb2Nr KTsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCBnb3RvIG91dDsKKyDCoCDCoCDC oCDCoCDCoCDCoCDCoCB9CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgZXZlbnQtPmV2X3R5cGUgPSBB QUNfRVZFTlRfQ01GUkVFOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGV2ZW50LT5ldl9jYWxsYmFj ayA9IGFhY19pb2N0bF9ldmVudDsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBldmVudC0+ZXZfYXJn ID0gJmNtOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGFhY19hZGRfZXZlbnQoc2MsIGV2ZW50KTsK KyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBtc2xlZXAoY20sICZzYy0+YWFjX2lvX2xvY2ssIDAsICJh YWNyYXciLCAwKTsKKyDCoCDCoCDCoCB9CisgwqAgwqAgwqAgbXR4X3VubG9jaygmc2MtPmFhY19p b19sb2NrKTsKKworIMKgIMKgIMKgIGNtLT5jbV9kYXRhID0gTlVMTDsKKyDCoCDCoCDCoCBmaWIg PSBjbS0+Y21fZmliOworIMKgIMKgIMKgIHNyYmNtZCA9IChzdHJ1Y3QgYWFjX3NyYiAqKWZpYi0+ ZGF0YTsKKyDCoCDCoCDCoCBlcnJvciA9IGNvcHlpbigmdXNlcl9zcmItPmRhdGFfbGVuLCAmZmli c2l6ZSwgc2l6ZW9mKHVpbnQzMl90KSk7CisgwqAgwqAgwqAgaWYgKGVycm9yICE9IDApCisgwqAg wqAgwqAgwqAgwqAgwqAgwqAgZ290byBvdXQ7CisgwqAgwqAgwqAgaWYgKGZpYnNpemUgPiAoc2Mt PmFhY19tYXhfZmliX3NpemUgLSBzaXplb2Yoc3RydWN0IGFhY19maWJfaGVhZGVyKSkpIHsKKyDC oCDCoCDCoCDCoCDCoCDCoCDCoCBlcnJvciA9IEVJTlZBTDsKKyDCoCDCoCDCoCDCoCDCoCDCoCDC oCBnb3RvIG91dDsKKyDCoCDCoCDCoCB9CisgwqAgwqAgwqAgZXJyb3IgPSBjb3B5aW4odXNlcl9z cmIsIHNyYmNtZCwgZmlic2l6ZSk7CisgwqAgwqAgwqAgaWYgKGVycm9yICE9IDApCisgwqAgwqAg wqAgwqAgwqAgwqAgwqAgZ290byBvdXQ7CisgwqAgwqAgwqAgc3JiY21kLT5mdW5jdGlvbiA9IDA7 CisgwqAgwqAgwqAgc3JiY21kLT5yZXRyeV9saW1pdCA9IDA7CisgwqAgwqAgwqAgaWYgKHNyYmNt ZC0+c2dfbWFwLlNnQ291bnQgPiAxKSB7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgZXJyb3IgPSBF SU5WQUw7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgZ290byBvdXQ7CisgwqAgwqAgwqAgfQorCisg wqAgwqAgwqAgLyogUmV0cmlldmUgY29ycmVjdCBTRyBlbnRyaWVzLiAqLworIMKgIMKgIMKgIGlm IChmaWJzaXplID09IChzaXplb2Yoc3RydWN0IGFhY19zcmIpICsKKyDCoCDCoCDCoCDCoCDCoCBz cmJjbWQtPnNnX21hcC5TZ0NvdW50ICogc2l6ZW9mKHN0cnVjdCBhYWNfc2dfZW50cnkpKSkgewor IMKgIMKgIMKgIMKgIMKgIMKgIMKgIHNnZSA9IHNyYmNtZC0+c2dfbWFwLlNnRW50cnk7CisgwqAg wqAgwqAgwqAgwqAgwqAgwqAgc2dlNjQgPSBOVUxMOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIHNy Yl9zZ19ieXRlY291bnQgPSBzZ2UtPlNnQnl0ZUNvdW50OworI2lmZGVmIF9fYW1kNjRfXworIMKg IMKgIMKgIMKgIMKgIMKgIMKgIHNyYl9zZ19hZGRyZXNzID0gKHZvaWQgKikodWludDY0X3Qpc2dl LT5TZ0FkZHJlc3M7CisjZWxzZQorIMKgIMKgIMKgIMKgIMKgIMKgIMKgIHNyYl9zZ19hZGRyZXNz ID0gKHZvaWQgKilzZ2UtPlNnQWRkcmVzczsKKyNlbmRpZgorIMKgIMKgIMKgIH0KKyNpZmRlZiBf X2FtZDY0X18KKyDCoCDCoCDCoCBlbHNlIGlmIChmaWJzaXplID09IChzaXplb2Yoc3RydWN0IGFh Y19zcmIpICsKKyDCoCDCoCDCoCDCoCDCoCBzcmJjbWQtPnNnX21hcC5TZ0NvdW50ICogc2l6ZW9m KHN0cnVjdCBhYWNfc2dfZW50cnk2NCkpKSB7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgc2dlID0g TlVMTDsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBzZ2U2NCA9IChzdHJ1Y3QgYWFjX3NnX2VudHJ5 NjQgKilzcmJjbWQtPnNnX21hcC5TZ0VudHJ5OworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIHNyYl9z Z19ieXRlY291bnQgPSBzZ2U2NC0+U2dCeXRlQ291bnQ7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAg c3JiX3NnX2FkZHJlc3MgPSAodm9pZCAqKXNnZTY0LT5TZ0FkZHJlc3M7CisgwqAgwqAgwqAgwqAg wqAgwqAgwqAgaWYgKHNnZTY0LT5TZ0FkZHJlc3MgPiAweGZmZmZmZmZmdWxsICYmCisgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgKHNjLT5mbGFncyAmIEFBQ19GTEFHU19TR182NEJJVCkgPT0g MCkgeworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGVycm9yID0gRUlOVkFMOwor IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGdvdG8gb3V0OworIMKgIMKgIMKgIMKg IMKgIMKgIMKgIH0KKyDCoCDCoCDCoCB9CisjZW5kaWYKKyDCoCDCoCDCoCBlbHNlIHsKKyDCoCDC oCDCoCDCoCDCoCDCoCDCoCBlcnJvciA9IEVJTlZBTDsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBn b3RvIG91dDsKKyDCoCDCoCDCoCB9CisgwqAgwqAgwqAgdXJlcGx5ID0gKGNoYXIgKilhcmcgKyBm aWJzaXplOworIMKgIMKgIMKgIHNyYmNtZC0+ZGF0YV9sZW4gPSBzcmJfc2dfYnl0ZWNvdW50Owor IMKgIMKgIMKgIGlmIChzcmJjbWQtPnNnX21hcC5TZ0NvdW50ID09IDEpCisgwqAgwqAgwqAgwqAg wqAgwqAgwqAgdHJhbnNmZXJfZGF0YSA9IDE7CisKKyDCoCDCoCDCoCBjbS0+Y21fc2d0YWJsZSA9 IChzdHJ1Y3QgYWFjX3NnX3RhYmxlICopJnNyYmNtZC0+c2dfbWFwOworIMKgIMKgIMKgIGlmICh0 cmFuc2Zlcl9kYXRhKSB7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgY20tPmNtX2RhdGFsZW4gPSBz cmJfc2dfYnl0ZWNvdW50OworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGNtLT5jbV9kYXRhID0gbWFs bG9jKGNtLT5jbV9kYXRhbGVuLCBNX0FBQ0JVRiwgTV9OT1dBSVQpOworIMKgIMKgIMKgIMKgIMKg IMKgIMKgIGlmIChjbS0+Y21fZGF0YSA9PSBOVUxMKSB7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgZXJyb3IgPSBFTk9NRU07CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAg wqAgwqAgZ290byBvdXQ7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgfQorIMKgIMKgIMKgIMKgIMKg IMKgIMKgIGlmIChzcmJjbWQtPmZsYWdzICYgQUFDX1NSQl9GTEFHU19EQVRBX0lOKQorIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGNtLT5jbV9mbGFncyB8PSBBQUNfQ01EX0RBVEFJ TjsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBpZiAoc3JiY21kLT5mbGFncyAmIEFBQ19TUkJfRkxB R1NfREFUQV9PVVQpIHsKKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCBjbS0+Y21f ZmxhZ3MgfD0gQUFDX0NNRF9EQVRBT1VUOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg IMKgIGVycm9yID0gY29weWluKHNyYl9zZ19hZGRyZXNzLCBjbS0+Y21fZGF0YSwKKyDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCBjbS0+Y21fZGF0YWxlbik7CisgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgaWYgKGVycm9yICE9IDApCisgwqAgwqAgwqAgwqAg wqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgZ290byBvdXQ7CisgwqAgwqAgwqAgwqAg wqAgwqAgwqAgfQorIMKgIMKgIMKgIH0KKworIMKgIMKgIMKgIGZpYi0+SGVhZGVyLlNpemUgPSBz aXplb2Yoc3RydWN0IGFhY19maWJfaGVhZGVyKSArCisgwqAgwqAgwqAgwqAgwqAgc2l6ZW9mKHN0 cnVjdCBhYWNfc3JiKTsKKyDCoCDCoCDCoCBmaWItPkhlYWRlci5YZmVyU3RhdGUgPQorIMKgIMKg IMKgIMKgIMKgIEFBQ19GSUJTVEFURV9IT1NUT1dORUQgwqAgfAorIMKgIMKgIMKgIMKgIMKgIEFB Q19GSUJTVEFURV9JTklUSUFMSVNFRCB8CisgwqAgwqAgwqAgwqAgwqAgQUFDX0ZJQlNUQVRFX0VN UFRZIMKgIMKgIMKgIHwKKyDCoCDCoCDCoCDCoCDCoCBBQUNfRklCU1RBVEVfRlJPTUhPU1QgwqAg wqB8CisgwqAgwqAgwqAgwqAgwqAgQUFDX0ZJQlNUQVRFX1JFWFBFQ1RFRCDCoCB8CisgwqAgwqAg wqAgwqAgwqAgQUFDX0ZJQlNUQVRFX05PUk0gwqAgwqAgwqAgwqB8CisgwqAgwqAgwqAgwqAgwqAg QUFDX0ZJQlNUQVRFX0FTWU5DIMKgIMKgIMKgIHwKKyDCoCDCoCDCoCDCoCDCoCBBQUNfRklCU1RB VEVfRkFTVF9SRVNQT05TRTsKKyDCoCDCoCDCoCBmaWItPkhlYWRlci5Db21tYW5kID0gKHNjLT5m bGFncyAmIEFBQ19GTEFHU19TR182NEJJVCkgIT0gMCA/CisgwqAgwqAgwqAgwqAgwqAgU2NzaVBv cnRDb21tYW5kVTY0IDogU2NzaVBvcnRDb21tYW5kOworCisgwqAgwqAgwqAgbXR4X2xvY2soJnNj LT5hYWNfaW9fbG9jayk7CisgwqAgwqAgwqAgYWFjX3dhaXRfY29tbWFuZChjbSk7CisgwqAgwqAg wqAgbXR4X3VubG9jaygmc2MtPmFhY19pb19sb2NrKTsKKworIMKgIMKgIMKgIGlmICh0cmFuc2Zl cl9kYXRhICYmIChzcmJjbWQtPmZsYWdzICYgQUFDX1NSQl9GTEFHU19EQVRBX0lOKSAhPSAwKSB7 CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgZXJyb3IgPSBjb3B5b3V0KGNtLT5jbV9kYXRhLCBzcmJf c2dfYWRkcmVzcywgY20tPmNtX2RhdGFsZW4pOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGlmIChl cnJvciAhPSAwKQorIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGdvdG8gb3V0Owor IMKgIMKgIMKgIH0KKyDCoCDCoCDCoCBlcnJvciA9IGNvcHlvdXQoZmliLT5kYXRhLCB1cmVwbHks IHNpemVvZihzdHJ1Y3QgYWFjX3NyYl9yZXNwb25zZSkpOworb3V0OgorIMKgIMKgIMKgIGlmIChj bSAhPSBOVUxMKSB7CisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgaWYgKGNtLT5jbV9kYXRhICE9IE5V TEwpCisgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqAgZnJlZShjbS0+Y21fZGF0YSwg TV9BQUNCVUYpOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIG10eF9sb2NrKCZzYy0+YWFjX2lvX2xv Y2spOworIMKgIMKgIMKgIMKgIMKgIMKgIMKgIGFhY19yZWxlYXNlX2NvbW1hbmQoY20pOworIMKg IMKgIMKgIMKgIMKgIMKgIMKgIG10eF91bmxvY2soJnNjLT5hYWNfaW9fbG9jayk7CisgwqAgwqAg wqAgfQorIMKgIMKgIMKgIHJldHVybihlcnJvcik7CsKgfQoKwqAvKgoKCgotLSAKUGVhY2UgY2Fu IG9ubHkgYmUgYWNoaWV2ZWQgYnkgdW5kZXJzdGFuZGluZyAtIEEuIEVpbnN0ZWluCg== From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 22:54:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27983106566B; Sun, 14 Mar 2010 22:54:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gx0-f214.google.com (mail-gx0-f214.google.com [209.85.217.214]) by mx1.freebsd.org (Postfix) with ESMTP id 937C28FC12; Sun, 14 Mar 2010 22:54:44 +0000 (UTC) Received: by gxk6 with SMTP id 6so1604908gxk.14 for ; Sun, 14 Mar 2010 15:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=WYRafYRTlpyWgFZ8TFbZivG2BaGU0K8JJj57H5ip1Ow=; b=xPSal475bGkUwERwBSk/tPif2E2+76ebeNUy7GXCvDAOaUv+qrkjTKZIze9nX1WwPj ftAxnDRaGjrdT1iebqZTiEg0NYk8h4SgP+mQtJOy5TyU5bL8O6o9h4juRMqM8Zr6JZq8 gfJdxvJwdU/eLcZeuuqJGIZvhLT1f+SZ+lFR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=LMGx0u16C1lD8SNbG5hp6javCOAY9lcvVs/1waYvC8BmRNb5XdqzeQT4tJhWCjGLGj RsWDMyRQ6OhSalNjrQGyK1kS4cVK83zT3oCiT9Nd+Gs+v8fqQkUZ2Lqj3SfKtDqLUONJ Kvk0rQm8JNninUKOKI1QUeUxbpkRdrpGTAppA= Received: by 10.101.136.1 with SMTP id o1mr3203532ann.17.1268607283617; Sun, 14 Mar 2010 15:54:43 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 5sm1382745ywd.59.2010.03.14.15.54.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Mar 2010 15:54:42 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 14 Mar 2010 15:54:09 -0700 From: Pyun YongHyeon Date: Sun, 14 Mar 2010 15:54:09 -0700 To: Bruce Evans Message-ID: <20100314225409.GA1245@michelle.cdnetworks.com> References: <201003121818.o2CII4ri076014@svn.freebsd.org> <20100313222131.K22847@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100313222131.K22847@delplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r205090 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages 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, 14 Mar 2010 22:54:45 -0000 On Sat, Mar 13, 2010 at 11:05:11PM +1100, Bruce Evans wrote: > On Fri, 12 Mar 2010, Pyun YongHyeon wrote: > > >Log: > > Reorder interrupt handler a bit such that producer/consumer > > index of status block is read first before acknowledging the > > interrupts. Otherwise bge(4) may get stale status block as > > acknowledging an interrupt may yield another status block update. > > > > Reviewed by: marius > > Er, doesn't this give a race instead? It undoes a critical part of > rev.1.169 but not the comment part which still says that the ack is You're probably right it may increase race window for interrupts. But it ensures coherent accesses to the status block which is more important than losing interrupts. I think old code fought not to lose interrupts by acknowledging interrupts first and tried to get next interrupts if status block was updated in interrupt handler. Old code also had similar race window because it blindly acknowledged the interrupt, status block could be updated after the acknowledgment of the interrupt. > done first, and why (to ensure getting another interrupt if the status > block changes after we have looked at it). > > % /* > % * Do the mandatory PCI flush as well as get the link status. > % */ > % statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; > % > % /* Make sure the descriptor ring indexes are coherent. */ > % bus_dmamap_sync(sc->bge_cdata.bge_status_tag, > % sc->bge_cdata.bge_status_map, > % BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > % rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; > % tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; > % sc->bge_ldata.bge_status_block->bge_status = 0; > % bus_dmamap_sync(sc->bge_cdata.bge_status_tag, > % sc->bge_cdata.bge_status_map, > % BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); > > The above presumably gives sufficiently coherent accesses to the status > block, but what happens if a status update occurs now (before the ack). Theoretically this may happen if interrupt is shared with other devices. Since bge(4) does not check whether the interrupt is ours it may blindly process the interrupt. > Doesn't the ack prevent an interrupt for this status update? I think If interrupt is shared with other devices it wouldn't. > tx_prod and tx cons (read above) don't become stale since they are only > advanced by software, and we may processes tx and rx descriptors beyond > the ones reported by status updates before or after the ack, but > statusword (read above) does become stale. > I think this was a long standing bug of bge(4) and it kept bge(4) from running on PAE environments. In order not to lose interrupts I believe bge(4) should use tagged status mode which will enable interrupt tracking via status block. Relying on some timing in interrupt handler can't solve the root cause. All controllers except BCM5700 supports tagged status mode and this commit is the first step to the tagged status mode which requires coherent accesses to the status block. Because driver should tell which interrupts were handled in the interrupt handler coherent access to status block is critical one. > % > % /* > % * Ack the interrupt by writing something to BGE_MBX_IRQ0_LO. Don't > % * disable interrupts by writing nonzero like we used to, since with > % * our current organization this just gives complications and > % * pessimizations for re-enabling interrupts. We used to have races > % * instead of the necessary complications. Disabling interrupts > > I don't remember seeing races with the current order, but I seem to > remember seeing them when the ack was the last hardware thing in the > function. As described in detail below, the latter gives quite a > large race window so it is easy to miss an interrupt. > > % * would just reduce the chance of a status update while we are > % * running (by switching to the interrupt-mode coalescence > % * parameters), but this chance is already very low so it is more > % * efficient to get another interrupt than prevent it. > > This describes why it doesn't matter if we get an extra interrupt due to > the status block being updated after the ack, even in rev.1.168 when the > race window was much larger (it was the entire runtime of bge_intr(), > which can be several hundred uS; now it is several hundred nS). > Correct. Having an extra interrupt wouldn't hurt so bge(4) should implement reliable way to track last acked interrupts instead of relying on timing. > % * > % * We do the ack first to ensure another interrupt if there is a > % * status update after the ack. We don't check for the status > > But we don't do the ack first any more. > I agree current comment does not match with code. I'll fix that after implementing tagged status mode. > % * changing later because it is more efficient to get another > % * interrupt than prevent it, not quite as above (not checking is > % * a smaller optimization than not toggling the interrupt enable, > % * since checking doesn't involve PCI accesses and toggling require > % * the status check). So toggling would probably be a pessimization > % * even with MSI. It would only be needed for using a task queue. > % */ > % bge_writembx(sc, BGE_MBX_IRQ0_LO, 0); > > Bruce From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 23:23:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0F37106564A; Sun, 14 Mar 2010 23:23:18 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com [209.85.220.209]) by mx1.freebsd.org (Postfix) with ESMTP id 532C98FC08; Sun, 14 Mar 2010 23:23:16 +0000 (UTC) Received: by fxm1 with SMTP id 1so2153006fxm.13 for ; Sun, 14 Mar 2010 16:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PKxisOGk/qWkfa+FJjn5ryLphaFEPFL7LRJ2OjIKe28=; b=C1WVBVZsBDMhcxJOR+0ZVgfg7sTFM4Yx18807YkPX8TgmojhP7RK0EUm1S1bx20Gju QwFtQwJTKN0TFah8HWH2W3ILjotvQjgw/dqObN9hcUEOwl5pTb4pe/YN/CaYCXbcj3L4 dw7WNfc3r+8VmcjCIS+r+93yrjn3pu3GgIzWs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Gh+7MDhWxJEyuD3+cPoPFwmhoA3+WKsasynFlJ6GJMRLeyyJ1NDdGShYLSpoG9Y0Ld KYXGYgzw1hBrYe/9hTE5Y/BZNvst0gSgGTfn3Wl3IfTxBE8RHZK6b8s2jnMnNZ0p9kgp 3Dhvl6fZVfwyOQluGMykvuPDicTTL4xOFbkvg= MIME-Version: 1.0 Received: by 10.239.152.130 with SMTP id v2mr751680hbb.168.1268608996035; Sun, 14 Mar 2010 16:23:16 -0700 (PDT) In-Reply-To: References: <201003111449.o2BEn6QY069179@svn.freebsd.org> <3F878223-7A35-4A27-9DA8-92239C635EC1@FreeBSD.org> <43586297-42AF-46F7-9B55-6A9BADD78752@freebsd.org> Date: Sun, 14 Mar 2010 20:23:15 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo , Nathan Whitehorn Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 23:23:18 -0000 On Sat, Mar 13, 2010 at 10:04 AM, Robert Watson wrote= : > > On Sat, 13 Mar 2010, Rui Paulo wrote: > >>>> There's a lengthy discussion about this on another mailing list. >>>> >>>> This is unlikely to be changed and emailing the committer who provided >>>> valuable time on this code wastes his time and everyone else's. [A bunch of my cruelty that does not deserve to be repeated] >> You said that, I didn't. Please refrain from distorting my own words. If >> you want something discussed, do it on the other list and, please, do it >> with a grown up attitude because, quite frankly, what you wrote doesn't = make >> sense. > > Guys, this is getting out of hand. =A0All three messages in this thread w= ere > over the top, and a step back would be healthy at this point. [...] > Robert You are right, Robert. Rui and Nathan, please forgive me for throwing my sarcasm on you. Be assured that after ten years using, promoting and supporting FreeBSD, I clearly understand how valuable is the time that people involved on the project dedicate to it. Best regards --=20 Not so young, but still crying out Full of anger full of doubt From owner-svn-src-all@FreeBSD.ORG Sun Mar 14 23:23:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F4D9106566B; Sun, 14 Mar 2010 23:23:57 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534528FC23; Sun, 14 Mar 2010 23:23:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2ENNvOt084709; Sun, 14 Mar 2010 23:23:57 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2ENNvfW084707; Sun, 14 Mar 2010 23:23:57 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003142323.o2ENNvfW084707@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 14 Mar 2010 23:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205161 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 14 Mar 2010 23:23:57 -0000 Author: yongari Date: Sun Mar 14 23:23:57 2010 New Revision: 205161 URL: http://svn.freebsd.org/changeset/base/205161 Log: It seems PCI_OUR_REG_[1-5] registers are not mapped on PCI configuration space on Yukon Ultra(88E8056) such that accesses to these registers were NOPs which in turn make msk(4) instable on this controller. Use indirect access method to access PCI_OUR_REG_[1-5] registers. This should fix a long standing instability bug which prevented msk(4) working on Yukon Ultra. Special thanks to koitsu who gave me remote access to his system. PR: kern/114631, kern/116853 MFC after: 1 week Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Sun Mar 14 22:38:18 2010 (r205160) +++ head/sys/dev/msk/if_msk.c Sun Mar 14 23:23:57 2010 (r205161) @@ -1212,7 +1212,7 @@ msk_phy_power(struct msk_softc *sc, int */ CSR_WRITE_1(sc, B2_Y2_CLK_GATE, val); - val = pci_read_config(sc->msk_dev, PCI_OUR_REG_1, 4); + val = CSR_PCI_READ_4(sc, PCI_OUR_REG_1); val &= ~(PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD); if (sc->msk_hw_id == CHIP_ID_YUKON_XL) { if (sc->msk_hw_rev > CHIP_REV_YU_XL_A1) { @@ -1223,7 +1223,7 @@ msk_phy_power(struct msk_softc *sc, int } } /* Release PHY from PowerDown/COMA mode. */ - pci_write_config(sc->msk_dev, PCI_OUR_REG_1, val, 4); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_1, val); switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC_U: case CHIP_ID_YUKON_EX: @@ -1232,16 +1232,16 @@ msk_phy_power(struct msk_softc *sc, int CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ - pci_write_config(sc->msk_dev, PCI_OUR_REG_3, 0, 4); - our = pci_read_config(sc->msk_dev, PCI_OUR_REG_4, 4); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_3, 0); + our = CSR_PCI_READ_4(sc, PCI_OUR_REG_4); our &= (PCI_FORCE_ASPM_REQUEST|PCI_ASPM_GPHY_LINK_DOWN| PCI_ASPM_INT_FIFO_EMPTY|PCI_ASPM_CLKRUN_REQUEST); /* Set all bits to 0 except bits 15..12. */ - pci_write_config(sc->msk_dev, PCI_OUR_REG_4, our, 4); - our = pci_read_config(sc->msk_dev, PCI_OUR_REG_5, 4); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_4, our); + our = CSR_PCI_READ_4(sc, PCI_OUR_REG_5); our &= PCI_CTL_TIM_VMAIN_AV_MSK; - pci_write_config(sc->msk_dev, PCI_OUR_REG_5, our, 4); - pci_write_config(sc->msk_dev, PCI_CFG_REG_1, 0, 4); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_5, our); + CSR_PCI_WRITE_4(sc, PCI_CFG_REG_1, 0); /* * Disable status race, workaround for * Yukon EC Ultra & Yukon EX. @@ -1262,7 +1262,7 @@ msk_phy_power(struct msk_softc *sc, int } break; case MSK_PHY_POWERDOWN: - val = pci_read_config(sc->msk_dev, PCI_OUR_REG_1, 4); + val = CSR_PCI_READ_4(sc, PCI_OUR_REG_1); val |= PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD; if (sc->msk_hw_id == CHIP_ID_YUKON_XL && sc->msk_hw_rev > CHIP_REV_YU_XL_A1) { @@ -1270,7 +1270,7 @@ msk_phy_power(struct msk_softc *sc, int if (sc->msk_num_port > 1) val &= ~PCI_Y2_PHY2_COMA; } - pci_write_config(sc->msk_dev, PCI_OUR_REG_1, val, 4); + CSR_PCI_WRITE_4(sc, PCI_OUR_REG_1, val); val = Y2_PCI_CLK_LNK1_DIS | Y2_COR_CLK_LNK1_DIS | Y2_CLK_GAT_LNK1_DIS | Y2_PCI_CLK_LNK2_DIS | From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 00:27:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9FA106566C; Mon, 15 Mar 2010 00:27:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE5D8FC08; Mon, 15 Mar 2010 00:27:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2F0Reme098899; Mon, 15 Mar 2010 00:27:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2F0ReMa098898; Mon, 15 Mar 2010 00:27:40 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003150027.o2F0ReMa098898@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 15 Mar 2010 00:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205163 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 00:27:41 -0000 Author: nwhitehorn Date: Mon Mar 15 00:27:40 2010 New Revision: 205163 URL: http://svn.freebsd.org/changeset/base/205163 Log: Fix two small bugs. The PowerPC 970 does not support non-coherent memory access, and reflects this by autonomously writing LPTE_M into PTE entries. As such, we should not panic if LPTE_M changes by itself. While here, fix a harmless typo in moea64_sync_icache(). Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sun Mar 14 23:52:30 2010 (r205162) +++ head/sys/powerpc/aim/mmu_oea64.c Mon Mar 15 00:27:40 2010 (r205163) @@ -2268,7 +2268,7 @@ moea64_pvo_to_pte(const struct pvo_entry } if (((pt->pte_lo ^ pvo->pvo_pte.lpte.pte_lo) & - ~(LPTE_CHG|LPTE_REF)) != 0) { + ~(LPTE_M|LPTE_CHG|LPTE_REF)) != 0) { panic("moea64_pvo_to_pte: pvo %p pte does not match " "pte %p in moea64_pteg_table difference is %#x", pvo, pt, @@ -2511,7 +2511,7 @@ moea64_sync_icache(mmu_t mmu, pmap_t pm, len = MIN(lim - va, sz); pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF, NULL); if (pvo != NULL) { - pa = (pvo->pvo_pte.pte.pte_lo & PTE_RPGN) | + pa = (pvo->pvo_pte.pte.pte_lo & LPTE_RPGN) | (va & ADDR_POFF); moea64_syncicache(pm, va, pa, len); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 02:07:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED3FD1065670; Mon, 15 Mar 2010 02:07:27 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-relay3.uni-muenster.de (ZIVM-RELAY3.UNI-MUENSTER.DE [128.176.192.19]) by mx1.freebsd.org (Postfix) with ESMTP id 1CFD18FC15; Mon, 15 Mar 2010 02:07:26 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,640,1262559600"; d="scan'208";a="28406404" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 15 Mar 2010 03:07:25 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 4908E1B0750; Mon, 15 Mar 2010 03:07:25 +0100 (CET) Date: Mon, 15 Mar 2010 03:07:24 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: John Baldwin Message-ID: In-Reply-To: <201003111311.52606.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205013 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 02:07:28 -0000 John Baldwin schrieb am 2010-03-11: > On Thursday 11 March 2010 12:01:28 pm Alexander Best wrote: > > thanks for the commit. :) > > a few thoughts: > > 1) why does stepping remain to be printed in dec while family and > > model are in > > hex? is this the way amd/intel cpu docs refer to > > stepping/model/family? > I just left it the way it was. > > 2) the hex value for "Id" and "(AMD) Features(2)" gets printed with > > an "0x" > > prepended to indicate it's in hex. maybe this should also be the > > case here. > Because on a typical Intel system you overflow 80 cols if you do > that. :( > Otherwise I would have. We could maybe add an 'h' suffix as that is > what > the manuals and it would only add 2 chars rather than 4. ah i see. not an easy decision. i wouldn't use the 'h' suffix, because there should be only one way of relating to a hex value and i believe the overall convention in freebsd is '0x'.so better keep it the way it is. maybe using %X instead of %x in the printfs makes the output look a bit nicer, but that's just eyecandy. ;) cheers. alex From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 02:14:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03A06106566B; Mon, 15 Mar 2010 02:14:44 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-relay3.uni-muenster.de (ZIVM-RELAY3.UNI-MUENSTER.DE [128.176.192.19]) by mx1.freebsd.org (Postfix) with ESMTP id 27CC78FC16; Mon, 15 Mar 2010 02:14:42 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,640,1262559600"; d="scan'208";a="28406670" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 15 Mar 2010 03:14:41 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id D82DE1B0750; Mon, 15 Mar 2010 03:14:41 +0100 (CET) Date: Mon, 15 Mar 2010 03:14:41 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Edwin Groothuis Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205071 - head/usr.bin/ncal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 02:14:44 -0000 the new options -A, -B and -3 are missing in usage(). also you might want to have a look at the BUGS section of getopt(3) regarding the '-3' switch. cheers. alex From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 08:58:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D001106564A; Mon, 15 Mar 2010 08:58:35 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1508FC15; Mon, 15 Mar 2010 08:58:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2F8wZLQ011309; Mon, 15 Mar 2010 08:58:35 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2F8wZid011308; Mon, 15 Mar 2010 08:58:35 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <201003150858.o2F8wZid011308@svn.freebsd.org> From: Poul-Henning Kamp Date: Mon, 15 Mar 2010 08:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 08:58:35 -0000 Author: phk Date: Mon Mar 15 08:58:35 2010 New Revision: 205165 URL: http://svn.freebsd.org/changeset/base/205165 Log: Comment a fine point, so it does not get lost when people borrow code from FreeBSD for other purposes. Modified: head/lib/libc/gen/daemon.c Modified: head/lib/libc/gen/daemon.c ============================================================================== --- head/lib/libc/gen/daemon.c Mon Mar 15 00:29:15 2010 (r205164) +++ head/lib/libc/gen/daemon.c Mon Mar 15 08:58:35 2010 (r205165) @@ -64,6 +64,10 @@ daemon(nochdir, noclose) case 0: break; default: + /* + * A fine point: _exit(0), not exit(0), to avoid triggering + * atexit(3) processing + */ _exit(0); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 14:20:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65B061065670; Mon, 15 Mar 2010 14:20:17 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5491D8FC0A; Mon, 15 Mar 2010 14:20:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FEKH9d085711; Mon, 15 Mar 2010 14:20:17 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FEKHgT085710; Mon, 15 Mar 2010 14:20:17 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003151420.o2FEKHgT085710@svn.freebsd.org> From: Attilio Rao Date: Mon, 15 Mar 2010 14:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205167 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 14:20:17 -0000 Author: attilio Date: Mon Mar 15 14:20:16 2010 New Revision: 205167 URL: http://svn.freebsd.org/changeset/base/205167 Log: Make the code more readable and compiling on 64-bits arch different than amd64. Sponsored by: Sandvine Incorporated Submitted by: emaste MFC: 2 weeks X-MFC: r205160 Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Mon Mar 15 09:40:23 2010 (r205166) +++ head/sys/dev/aac/aac.c Mon Mar 15 14:20:16 2010 (r205167) @@ -3123,11 +3123,7 @@ aac_ioctl_send_raw_srb(struct aac_softc sge = srbcmd->sg_map.SgEntry; sge64 = NULL; srb_sg_bytecount = sge->SgByteCount; -#ifdef __amd64__ - srb_sg_address = (void *)(uint64_t)sge->SgAddress; -#else - srb_sg_address = (void *)sge->SgAddress; -#endif + srb_sg_address = (void *)(uintptr_t)sge->SgAddress; } #ifdef __amd64__ else if (fibsize == (sizeof(struct aac_srb) + From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 15:33:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DAFA106566B; Mon, 15 Mar 2010 15:33:33 +0000 (UTC) (envelope-from bruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 417D78FC15; Mon, 15 Mar 2010 15:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FFXXXB002005; Mon, 15 Mar 2010 15:33:33 GMT (envelope-from bruno@svn.freebsd.org) Received: (from bruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FFXX6m002003; Mon, 15 Mar 2010 15:33:33 GMT (envelope-from bruno@svn.freebsd.org) Message-Id: <201003151533.o2FFXX6m002003@svn.freebsd.org> From: Bruno Ducrot Date: Mon, 15 Mar 2010 15:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205168 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 15:33:33 -0000 Author: bruno Date: Mon Mar 15 15:33:32 2010 New Revision: 205168 URL: http://svn.freebsd.org/changeset/base/205168 Log: MFC r204519: Deliver siginfo when signal is generated by thr_kill(2) (SI_USER with properly filled si_uid and si_pid). PR: 141956 Modified: stable/8/sys/kern/kern_thr.c Modified: stable/8/sys/kern/kern_thr.c ============================================================================== --- stable/8/sys/kern/kern_thr.c Mon Mar 15 14:20:16 2010 (r205167) +++ stable/8/sys/kern/kern_thr.c Mon Mar 15 15:33:32 2010 (r205168) @@ -303,12 +303,18 @@ int thr_kill(struct thread *td, struct thr_kill_args *uap) /* long id, int sig */ { + ksiginfo_t ksi; struct thread *ttd; struct proc *p; int error; p = td->td_proc; error = 0; + ksiginfo_init(&ksi); + ksi.ksi_signo = uap->sig; + ksi.ksi_code = SI_USER; + ksi.ksi_pid = p->p_pid; + ksi.ksi_uid = td->td_ucred->cr_ruid; PROC_LOCK(p); if (uap->id == -1) { if (uap->sig != 0 && !_SIG_VALID(uap->sig)) { @@ -320,7 +326,7 @@ thr_kill(struct thread *td, struct thr_k error = 0; if (uap->sig == 0) break; - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, &ksi); } } } @@ -336,7 +342,7 @@ thr_kill(struct thread *td, struct thr_k else if (!_SIG_VALID(uap->sig)) error = EINVAL; else - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, &ksi); } PROC_UNLOCK(p); return (error); @@ -346,6 +352,7 @@ int thr_kill2(struct thread *td, struct thr_kill2_args *uap) /* pid_t pid, long id, int sig */ { + ksiginfo_t ksi; struct thread *ttd; struct proc *p; int error; @@ -362,6 +369,11 @@ thr_kill2(struct thread *td, struct thr_ error = p_cansignal(td, p, uap->sig); if (error == 0) { + ksiginfo_init(&ksi); + ksi.ksi_signo = uap->sig; + ksi.ksi_code = SI_USER; + ksi.ksi_pid = td->td_proc->p_pid; + ksi.ksi_uid = td->td_ucred->cr_ruid; if (uap->id == -1) { if (uap->sig != 0 && !_SIG_VALID(uap->sig)) { error = EINVAL; @@ -372,7 +384,8 @@ thr_kill2(struct thread *td, struct thr_ error = 0; if (uap->sig == 0) break; - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, + &ksi); } } } @@ -388,7 +401,7 @@ thr_kill2(struct thread *td, struct thr_ else if (!_SIG_VALID(uap->sig)) error = EINVAL; else - tdsignal(p, ttd, uap->sig, NULL); + tdsignal(p, ttd, uap->sig, &ksi); } } PROC_UNLOCK(p); From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 15:40:54 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15531106566C; Mon, 15 Mar 2010 15:40:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 76E638FC22; Mon, 15 Mar 2010 15:40:53 +0000 (UTC) Received: from c122-107-126-6.carlnfd1.nsw.optusnet.com.au (c122-107-126-6.carlnfd1.nsw.optusnet.com.au [122.107.126.6]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2FFeoiZ000806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Mar 2010 02:40:51 +1100 Date: Tue, 16 Mar 2010 02:40:50 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Poul-Henning Kamp In-Reply-To: <201003150858.o2F8wZid011308@svn.freebsd.org> Message-ID: <20100316021240.N24765@delplex.bde.org> References: <201003150858.o2F8wZid011308@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 15:40:54 -0000 On Mon, 15 Mar 2010, Poul-Henning Kamp wrote: > Log: > Comment a fine point, so it does not get lost when people borrow code > from FreeBSD for other purposes. > > Modified: > head/lib/libc/gen/daemon.c > > Modified: head/lib/libc/gen/daemon.c > ============================================================================== > --- head/lib/libc/gen/daemon.c Mon Mar 15 00:29:15 2010 (r205164) > +++ head/lib/libc/gen/daemon.c Mon Mar 15 08:58:35 2010 (r205165) > @@ -64,6 +64,10 @@ daemon(nochdir, noclose) > case 0: > break; > default: > + /* > + * A fine point: _exit(0), not exit(0), to avoid triggering > + * atexit(3) processing > + */ > _exit(0); > } This point is obvious -- the programmer used _exit() for a reason, and reading _exit(3) gives the reason. _exit(3) only mentions atexit(3) cryptically as "etc.", but it makes it clear that there are more reasons than to avoid triggering atexit(3) -- exit(3) also does things like flushing open streams which are logically and possibly implementationally independent of atexit(3). They _should_ be implementationally independent to avoid bloating all programs with dynamic allocation of the atexit() table. The unobvious points are: - why avoid triggering atexit(), etc. processing in daemon()? - why isn't this documented? Some callers of daemon() need to know that it won't flush open streams, etc., so that they can flush and their open streams, etc., before calling daemon(). Callers should do this anyway before calling any function that can exit (especially exit() itself), so that they can actually check that the output went out, but most are sloppy. Callers should know if they have any open streams but they would have a hard time telling what else they are missing from not calling exit(). There may be profiling cleanup (profiling won't work right for the child?) and other magic destructors. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 15:43:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30DDF106566C; Mon, 15 Mar 2010 15:43:36 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FB528FC1A; Mon, 15 Mar 2010 15:43:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FFhaYU004245; Mon, 15 Mar 2010 15:43:36 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FFhZSw004242; Mon, 15 Mar 2010 15:43:35 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151543.o2FFhZSw004242@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 15:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205169 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 15:43:36 -0000 Author: luigi Date: Mon Mar 15 15:43:35 2010 New Revision: 205169 URL: http://svn.freebsd.org/changeset/base/205169 Log: Implement "lookup dscp N" which does a lookup of the DSCP (top 6 bits of ip->ip_tos) in a table. This can be useful to direct traffic to different pipes/queues according to the DSCP of the packet, as follows: ipfw add 100 queue tablearg lookup dscp 3 // table 3 maps dscp->queue This change is a no-op (but harmless) until the two-line kernel side is committed, which will happen shortly. Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Mar 15 15:33:32 2010 (r205168) +++ head/sbin/ipfw/ipfw2.c Mon Mar 15 15:43:35 2010 (r205169) @@ -231,7 +231,7 @@ static struct _s_x rule_action_params[] */ static int lookup_key[] = { TOK_DSTIP, TOK_SRCIP, TOK_DSTPORT, TOK_SRCPORT, - TOK_UID, TOK_JAIL, -1 }; + TOK_UID, TOK_JAIL, TOK_DSCP, -1 }; static struct _s_x rule_options[] = { { "tagged", TOK_TAGGED }, @@ -258,6 +258,7 @@ static struct _s_x rule_options[] = { { "iplen", TOK_IPLEN }, { "ipid", TOK_IPID }, { "ipprecedence", TOK_IPPRECEDENCE }, + { "dscp", TOK_DSCP }, { "iptos", TOK_IPTOS }, { "ipttl", TOK_IPTTL }, { "ipversion", TOK_IPVER }, @@ -3519,7 +3520,7 @@ read_options: char *p; int j; - if (av[0] && av[1]) + if (!av[0] || !av[1]) errx(EX_USAGE, "format: lookup argument tablenum"); cmd->opcode = O_IP_DST_LOOKUP; cmd->len |= F_INSN_SIZE(ipfw_insn) + 2; Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Mon Mar 15 15:33:32 2010 (r205168) +++ head/sbin/ipfw/ipfw2.h Mon Mar 15 15:43:35 2010 (r205169) @@ -125,6 +125,7 @@ enum tokens { TOK_IPLEN, TOK_IPID, TOK_IPPRECEDENCE, + TOK_DSCP, TOK_IPTOS, TOK_IPTTL, TOK_IPVER, From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:05:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD57F106566B; Mon, 15 Mar 2010 16:05:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 776D28FC13; Mon, 15 Mar 2010 16:05:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2243046B89; Mon, 15 Mar 2010 12:05:29 -0400 (EDT) Received: from zion.baldwin.cx (pool-98-109-181-99.nwrknj.fios.verizon.net [98.109.181.99]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 21BC38A01F; Mon, 15 Mar 2010 12:05:24 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Date: Mon, 15 Mar 2010 11:13:38 -0400 User-Agent: KMail/1.12.4 (FreeBSD/7.3-PRERELEASE; KDE/4.3.4; i386; ; ) References: <20100313090844.GV8200@hoeg.nl> <20100313170725.GW8200@hoeg.nl> <20100313.121932.997044077387131740.imp@bsdimp.com> In-Reply-To: <20100313.121932.997044077387131740.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003151113.38968.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 15 Mar 2010 12:05:24 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.1 required=4.2 tests=AWL,BAYES_00, FH_HOST_EQ_VERIZON_P,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: unixmania@gmail.com, ed@80386.nl, src-committers@freebsd.org, svn-src-all@freebsd.org, nwhitehorn@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 16:05:29 -0000 On Saturday 13 March 2010 02:19:32 pm M. Warner Losh wrote: > In message: <20100313170725.GW8200@hoeg.nl> > > Ed Schouten writes: > : * M. Warner Losh wrote: > : > that sounds like a good idea. But it isn't as simple as changing all > : > the COMPAT_FREEBSDX in the .c code. There's also hooks in the syscall > : > glue generation that would be affected. > : > : Hmmm... Indeed. > : > : I thought a bit more about this and I realized it would be better if we > : wouldn't use a FreeBSD major number for this, but the actual > : __FreeBSD_version. > > Hmmm, that might be harder. The problem is that when I want to run a > program from FreeBSD 3.0, I may need an interface that was in 3.0, but > was removed prior to 5.0 shipping. This means the kernel needs the > COMPAT_FREEBSD4 option right now to work. So things are kind of > confusing. This isn't completely theoretical. Old (<= 4.x) i386 binaries use the foosys() methods for SYSV IPC (e.g. msgsys()) rather than msgget, msgctl, etc., so this is a case that would have to be correctly handled by any new organization of these options. I do think it makes the most sense to have the setting be the oldest major rev, and I also think that using __FreeBSD_version values rather than major versions would be too fine-grained (not very user- friendly). It would also enforce the rule of mandating COMPAT_FREEBSD4 implying COMPAT_FREEBSD5, etc. It just means you can't try to build a stripped kernel that only includes FreeBSD4 support without including FreeBSD5 (which is a way to solve Warner's problem). Trying to enumerate "ranges" of supported compat releases would be too confusing and error-prone I think. Also, the syscall generation bit would not be that hard. You would just replace the code that generates '#ifdef COMPAT_FREEBSD4' with '#if FREEBSD_COMPAT_VERSION <= 4'. Of course, you would probably want to special case version 0 so that you could remove all compat support if the option isn't defined, so it would maybe have to be '#if define(FREEBSD_COMPAT_VERSION) && FREEBSD_COMPAT_VERSION <= 4'. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:06:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02A441065670; Mon, 15 Mar 2010 16:06:53 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5DA08FC24; Mon, 15 Mar 2010 16:06:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FG6q1A009444; Mon, 15 Mar 2010 16:06:52 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FG6qMH009442; Mon, 15 Mar 2010 16:06:52 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201003151606.o2FG6qMH009442@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 15 Mar 2010 16:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205170 - head/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 16:06:53 -0000 Author: joerg Date: Mon Mar 15 16:06:52 2010 New Revision: 205170 URL: http://svn.freebsd.org/changeset/base/205170 Log: then -> than MFC after: 1 day Modified: head/usr.sbin/powerd/powerd.8 Modified: head/usr.sbin/powerd/powerd.8 ============================================================================== --- head/usr.sbin/powerd/powerd.8 Mon Mar 15 15:43:35 2010 (r205169) +++ head/usr.sbin/powerd/powerd.8 Mon Mar 15 16:06:52 2010 (r205170) @@ -58,7 +58,7 @@ the system appears idle and increasing i It offers a good balance between a small performance loss for greatly increased power savings. Hiadaptive mode is like adaptive mode, but tuned for systems where -performance and interactivity are more important then power consumption. +performance and interactivity are more important than power consumption. It increases frequency faster, reduces the frequency less aggressively and will maintain full frequency for longer. The default mode is adaptive for battery power and hiadaptive for the rest. From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:07:09 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16114106574B; Mon, 15 Mar 2010 16:07:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id A4B0D8FC0C; Mon, 15 Mar 2010 16:07:08 +0000 (UTC) Received: from c122-107-126-6.carlnfd1.nsw.optusnet.com.au (c122-107-126-6.carlnfd1.nsw.optusnet.com.au [122.107.126.6]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2FG75BF025230 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Mar 2010 03:07:06 +1100 Date: Tue, 16 Mar 2010 03:07:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Bruce Evans In-Reply-To: <20100316021240.N24765@delplex.bde.org> Message-ID: <20100316024446.A24853@delplex.bde.org> References: <201003150858.o2F8wZid011308@svn.freebsd.org> <20100316021240.N24765@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Poul-Henning Kamp Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 16:07:09 -0000 On Tue, 16 Mar 2010, Bruce Evans wrote: > ... > The unobvious points are: > - why avoid triggering atexit(), etc. processing in daemon()? > - why isn't this documented? Some callers of daemon() need to know that > it won't flush open streams, etc., so that they can flush and their > open streams, etc., before calling daemon(). Callers should do this > anyway before calling any function that can exit (especially exit() > itself), so that they can actually check that the output went out, > but most are sloppy. Callers should know if they have any open > streams but they would have a hard time telling what else they are > missing from not calling exit(). There may be profiling cleanup > (profiling won't work right for the child?) and other magic destructors. Due to the way that daemon() works, it is really an error to have any open streams when it is called. This is also undocumented, except implicitly. The errors are: - unflushed output on stdout and stderr won't get flushed normally by the child. stdout and stderr are redirected so it will go there if the child erroneously (?) uses these streams or simply calls exit() which will give the default flush. - unflushed input in stdin may cause problems, since although stdin is redirected, the input may be in stdio's buffers. - it is unclear if stdio can do something better than crash when its fd's for stdinout/err are redirected without telling it. - fd's above 2 are not touched, so the child inherits any open streams on these fd's. These streams are likely to get flushed on exit() if not explicitly. I think daeomon() should be doing an fflush(NULL) or fcloseall() and most other cleanups done by atexit processing. Before the fork() of course, so that the child doesn't inherit stuff. fcloseall() would be too destructive if the fork() fails, but fflush(NULL) is almost as clean. At least the fflush(NULL) is safe since it has no effect except for buggy callers that have unflushed streams. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:39:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E5AB1065670; Mon, 15 Mar 2010 16:39:52 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C48F8FC1B; Mon, 15 Mar 2010 16:39:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FGdq31016676; Mon, 15 Mar 2010 16:39:52 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FGdq54016674; Mon, 15 Mar 2010 16:39:52 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003151639.o2FGdq54016674@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 15 Mar 2010 16:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205171 - stable/8/usr.bin/xlint/lint1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 16:39:52 -0000 Author: jh Date: Mon Mar 15 16:39:52 2010 New Revision: 205171 URL: http://svn.freebsd.org/changeset/base/205171 Log: MFC r204872: Pass the correct size to memset(). PR: bin/128094 Modified: stable/8/usr.bin/xlint/lint1/scan.l Directory Properties: stable/8/usr.bin/xlint/ (props changed) Modified: stable/8/usr.bin/xlint/lint1/scan.l ============================================================================== --- stable/8/usr.bin/xlint/lint1/scan.l Mon Mar 15 16:06:52 2010 (r205170) +++ stable/8/usr.bin/xlint/lint1/scan.l Mon Mar 15 16:39:52 2010 (r205171) @@ -319,7 +319,7 @@ allocsb(void) if ((sb = malloc(sizeof (sbuf_t))) == NULL) nomem(); } - (void)memset(sb, 0, sizeof (sb)); + (void)memset(sb, 0, sizeof (*sb)); return (sb); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:47:33 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D13C106567F; Mon, 15 Mar 2010 16:47:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id E7BC78FC2C; Mon, 15 Mar 2010 16:47:32 +0000 (UTC) Received: from besplex.bde.org (c122-107-126-6.carlnfd1.nsw.optusnet.com.au [122.107.126.6]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2FGlTqI010223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Mar 2010 03:47:30 +1100 Date: Tue, 16 Mar 2010 03:47:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pyun YongHyeon In-Reply-To: <20100314225409.GA1245@michelle.cdnetworks.com> Message-ID: <20100316031232.H1539@besplex.bde.org> References: <201003121818.o2CII4ri076014@svn.freebsd.org> <20100313222131.K22847@delplex.bde.org> <20100314225409.GA1245@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans , Pyun YongHyeon Subject: Re: svn commit: r205090 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 16:47:33 -0000 On Sun, 14 Mar 2010, Pyun YongHyeon wrote: > On Sat, Mar 13, 2010 at 11:05:11PM +1100, Bruce Evans wrote: >> On Fri, 12 Mar 2010, Pyun YongHyeon wrote: >> >>> Log: >>> Reorder interrupt handler a bit such that producer/consumer >>> index of status block is read first before acknowledging the >>> interrupts. Otherwise bge(4) may get stale status block as >>> acknowledging an interrupt may yield another status block update. >>> >>> Reviewed by: marius >> >> Er, doesn't this give a race instead? It undoes a critical part of >> rev.1.169 but not the comment part which still says that the ack is > > You're probably right it may increase race window for interrupts. Rev.1.169 was supposed to fix all races involving the interrupt ack. An increase from 0 to epsilon is large :-). > But it ensures coherent accesses to the status block which is more > important than losing interrupts. Interrupts weren't lost after 1.169 AFAIK. Rather the reverse. We take a few extra interrupts in order not to miss any. I don't see how your change improves coherency but don't really understand the coherency. But^2 I now remember discussing with scottl that there is no locking for the status block and it is not clear whether there should be or how things mostly work when there isn't (mutex-type locking seems to be useless). > I think old code fought not to > lose interrupts by acknowledging interrupts first and tried to get > next interrupts if status block was updated in interrupt handler. > Old code also had similar race window because it blindly > acknowledged the interrupt, status block could be updated after the > acknowledgment of the interrupt. Why is this fighting? Acking the interrupt should have no affect on the contents of the status block, and any status block update after acking should cause a new interrupt. Of course the hardware might not be as nice as that, but something like this seems to be needed for a status block to work efficiently. Anyway, the old race window (if it is a race that matters) isn't similar, but is the opposite race. > >> done first, and why (to ensure getting another interrupt if the status >> block changes after we have looked at it). >> >> % /* >> % * Do the mandatory PCI flush as well as get the link status. >> % */ >> % statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; >> % >> % /* Make sure the descriptor ring indexes are coherent. */ >> % bus_dmamap_sync(sc->bge_cdata.bge_status_tag, >> % sc->bge_cdata.bge_status_map, >> % BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); >> % rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; >> % tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; >> % sc->bge_ldata.bge_status_block->bge_status = 0; >> % bus_dmamap_sync(sc->bge_cdata.bge_status_tag, >> % sc->bge_cdata.bge_status_map, >> % BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); >> >> The above presumably gives sufficiently coherent accesses to the status >> block, but what happens if a status update occurs now (before the ack). > > Theoretically this may happen if interrupt is shared with other > devices. Since bge(4) does not check whether the interrupt is ours > it may blindly process the interrupt. Well, my version checks, but you said before that some hardware cannot be trusted to get this right (it works with my 5701 UP no-MSI). I see that you are saying that your change doesn't help if the interrupt isn't ours. Then the ack is still done first (long ago, on the last bge_intr()) so the above may run partly before the interrupt is ours and partly after, giving the same problem (the one that I don't understand :-) caused by running the above after an ack. Is the status block supposed to be frozen once an interrupt really for us occurs until we ack the interrupt? > >> Doesn't the ack prevent an interrupt for this status update? I think > > If interrupt is shared with other devices it wouldn't. > >> tx_prod and tx cons (read above) don't become stale since they are only >> advanced by software, and we may processes tx and rx descriptors beyond >> the ones reported by status updates before or after the ack, but >> statusword (read above) does become stale. >> > > I think this was a long standing bug of bge(4) and it kept bge(4) > from running on PAE environments. In order not to lose interrupts I > believe bge(4) should use tagged status mode which will enable > interrupt tracking via status block. Relying on some timing in > interrupt handler can't solve the root cause. All controllers > except BCM5700 supports tagged status mode and this commit is the > first step to the tagged status mode which requires coherent > accesses to the status block. Because driver should tell which > interrupts were handled in the interrupt handler coherent access > to status block is critical one. > ... >> % * >> % * We do the ack first to ensure another interrupt if there is a >> % * status update after the ack. We don't check for the status >> >> But we don't do the ack first any more. >> > > I agree current comment does not match with code. I'll fix that > after implementing tagged status mode. OK, if you as fast as usual :-). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 16:53:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B772F106564A; Mon, 15 Mar 2010 16:53:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B97A8FC20; Mon, 15 Mar 2010 16:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FGr9kK019720; Mon, 15 Mar 2010 16:53:09 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FGr9wO019718; Mon, 15 Mar 2010 16:53:09 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003151653.o2FGr9wO019718@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 15 Mar 2010 16:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205172 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 16:53:09 -0000 Author: marcel Date: Mon Mar 15 16:53:09 2010 New Revision: 205172 URL: http://svn.freebsd.org/changeset/base/205172 Log: Have cpu_throw() loop on blocked_lock as well. This bug has existed a long time and has gone unnoticed just as long, because I kept using sched_4bsd (due to sched_ule not working with preemption), but GENERIC had sched_ule by default -- including SMP. While here, remove unused inclusion of , remove totally bogus inclusion of . Modified: head/sys/ia64/ia64/machdep.c Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Mon Mar 15 16:39:52 2010 (r205171) +++ head/sys/ia64/ia64/machdep.c Mon Mar 15 16:53:09 2010 (r205172) @@ -80,7 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -100,8 +99,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - SYSCTL_NODE(_hw, OID_AUTO, freq, CTLFLAG_RD, 0, ""); SYSCTL_NODE(_machdep, OID_AUTO, cpu, CTLFLAG_RD, 0, ""); @@ -450,18 +447,22 @@ cpu_switch(struct thread *old, struct th old->td_frame->tf_special.psr |= IA64_PSR_DFH; if (!savectx(oldpcb)) { atomic_store_rel_ptr(&old->td_lock, mtx); -#if defined(SCHED_ULE) && defined(SMP) - /* td_lock is volatile */ - while (new->td_lock == &blocked_lock) - ; -#endif + newpcb = new->td_pcb; oldpcb->pcb_current_pmap = pmap_switch(newpcb->pcb_current_pmap); + +#if defined(SCHED_ULE) && defined(SMP) + while (atomic_load_acq_ptr(&new->td_lock) == &blocked_lock) + cpu_spinwait(); +#endif + PCPU_SET(curthread, new); + #ifdef COMPAT_FREEBSD32 ia32_restorectx(newpcb); #endif + if (PCPU_GET(fpcurthread) == new) new->td_frame->tf_special.psr &= ~IA64_PSR_DFH; restorectx(newpcb); @@ -478,10 +479,18 @@ cpu_throw(struct thread *old __unused, s newpcb = new->td_pcb; (void)pmap_switch(newpcb->pcb_current_pmap); + +#if defined(SCHED_ULE) && defined(SMP) + while (atomic_load_acq_ptr(&new->td_lock) == &blocked_lock) + cpu_spinwait(); +#endif + PCPU_SET(curthread, new); + #ifdef COMPAT_FREEBSD32 ia32_restorectx(newpcb); #endif + restorectx(newpcb); /* We should not get here. */ panic("cpu_throw: restorectx() returned"); From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 17:14:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3892106566C; Mon, 15 Mar 2010 17:14:27 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8259E8FC20; Mon, 15 Mar 2010 17:14:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FHERCS024546; Mon, 15 Mar 2010 17:14:27 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FHERGp024537; Mon, 15 Mar 2010 17:14:27 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151714.o2FHERGp024537@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 17:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205173 - in head: sbin/ipfw sys/netinet sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 17:14:27 -0000 Author: luigi Date: Mon Mar 15 17:14:27 2010 New Revision: 205173 URL: http://svn.freebsd.org/changeset/base/205173 Log: + implement (two lines) the kernel side of 'lookup dscp N' to use the dscp as a search key in table lookups; + (re)implement a sysctl variable to control the expire frequency of pipes and queues when they become empty; + add 'queue number' as optional part of the flow_id. This can be enabled with the command queue X config mask queue ... and makes it possible to support priority-based schedulers, where packets should be grouped according to the priority and not some fields in the 5-tuple. This is implemented as follows: - redefine a field in the ipfw_flow_id (in sys/netinet/ip_fw.h) but without changing the size or shape of the structure, so there are no ABI changes. On passing, also document how other fields are used, and remove some useless assignments in ip_fw2.c - implement small changes in the userland code to set/read the field; - revise the functions in ip_dummynet.c to manipulate masks so they also handle the additional field; There are no ABI changes in this commit. Modified: head/sbin/ipfw/dummynet.c head/sys/netinet/ip_fw.h head/sys/netinet/ipfw/ip_dn_io.c head/sys/netinet/ipfw/ip_dn_private.h head/sys/netinet/ipfw/ip_dummynet.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_dynamic.c head/sys/netinet/ipfw/ip_fw_log.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Mon Mar 15 16:53:09 2010 (r205172) +++ head/sbin/ipfw/dummynet.c Mon Mar 15 17:14:27 2010 (r205173) @@ -141,7 +141,8 @@ print_mask(struct ipfw_flow_id *id) { if (!IS_IP6_FLOW_ID(id)) { printf(" " - "mask: 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n", + "mask: %s 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n", + id->extra ? "queue," : "", id->proto, id->src_ip, id->src_port, id->dst_ip, id->dst_port); @@ -151,7 +152,8 @@ print_mask(struct ipfw_flow_id *id) "Tot_pkt/bytes Pkt/Byte Drp\n"); } else { char buf[255]; - printf("\n mask: proto: 0x%02x, flow_id: 0x%08x, ", + printf("\n mask: %sproto: 0x%02x, flow_id: 0x%08x, ", + id->extra ? "queue," : "", id->proto, id->flow_id6); inet_ntop(AF_INET6, &(id->src_ip6), buf, sizeof(buf)); printf("%s/0x%04x -> ", buf, id->src_port); @@ -175,7 +177,8 @@ list_flow(struct dn_flow *ni) pe = getprotobynumber(id->proto); /* XXX: Should check for IPv4 flows */ - printf("%3u ", (ni->oid.id) & 0xff); + printf("%3u%c", (ni->oid.id) & 0xff, + id->extra ? '*' : ' '); if (!IS_IP6_FLOW_ID(id)) { if (pe) printf("%-4s ", pe->p_name); @@ -910,6 +913,7 @@ ipfw_config_pipe(int ac, char **av) case TOK_ALL: /* * special case, all bits significant + * except 'extra' (the queue number) */ mask->dst_ip = ~0; mask->src_ip = ~0; @@ -922,6 +926,11 @@ ipfw_config_pipe(int ac, char **av) *flags |= DN_HAVE_MASK; goto end_mask; + case TOK_QUEUE: + mask->extra = ~0; + *flags |= DN_HAVE_MASK; + goto end_mask; + case TOK_DSTIP: mask->addr_type = 4; p32 = &mask->dst_ip; @@ -992,7 +1001,7 @@ ipfw_config_pipe(int ac, char **av) if (a > 0xFF) errx(EX_DATAERR, "proto mask must be 8 bit"); - fs->flow_mask.proto = (uint8_t)a; + mask->proto = (uint8_t)a; } if (a != 0) *flags |= DN_HAVE_MASK; Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ip_fw.h Mon Mar 15 17:14:27 2010 (r205173) @@ -487,24 +487,27 @@ struct ip_fw { #define RULESIZE(rule) (sizeof(struct ip_fw) + \ ((struct ip_fw *)(rule))->cmd_len * 4 - 4) -#if 1 // moved to in.h +#if 1 // should be moved to in.h /* * This structure is used as a flow mask and a flow id for various * parts of the code. + * addr_type is used in userland and kernel to mark the address type. + * fib is used in the kernel to record the fib in use. + * _flags is used in the kernel to store tcp flags for dynamic rules. */ struct ipfw_flow_id { uint32_t dst_ip; uint32_t src_ip; uint16_t dst_port; uint16_t src_port; - uint8_t fib; - uint8_t proto; - uint8_t flags; /* protocol-specific flags */ - uint8_t addr_type; /* 4 = ipv4, 6 = ipv6, 1=ether ? */ + uint8_t fib; + uint8_t proto; + uint8_t _flags; /* protocol-specific flags */ + uint8_t addr_type; /* 4=ip4, 6=ip6, 1=ether ? */ struct in6_addr dst_ip6; struct in6_addr src_ip6; uint32_t flow_id6; - uint32_t frag_id6; + uint32_t extra; /* queue/pipe or frag_id */ }; #endif Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ipfw/ip_dn_io.c Mon Mar 15 17:14:27 2010 (r205173) @@ -113,6 +113,10 @@ SYSCTL_INT(_net_inet_ip_dummynet, OID_AU CTLFLAG_RW, &dn_cfg.io_fast, 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, CTLFLAG_RW, &dn_cfg.debug, 0, "Dummynet debug level"); +SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire, + CTLFLAG_RW, &dn_cfg.expire, 0, "Expire empty queues/pipes"); +SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, + CTLFLAG_RD, &dn_cfg.expire_cycle, 0, "Expire cycle for queues/pipes"); /* RED parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth, @@ -546,8 +550,11 @@ dummynet_task(void *context, int pending transmit_event(&q, (struct delay_line *)p, dn_cfg.curr_time); } } - dn_drain_scheduler(); - dn_drain_queue(); + if (dn_cfg.expire && ++dn_cfg.expire_cycle >= dn_cfg.expire) { + dn_cfg.expire_cycle = 0; + dn_drain_scheduler(); + dn_drain_queue(); + } DN_BH_WUNLOCK(); dn_reschedule(); Modified: head/sys/netinet/ipfw/ip_dn_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_dn_private.h Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ipfw/ip_dn_private.h Mon Mar 15 17:14:27 2010 (r205173) @@ -141,10 +141,14 @@ struct dn_parms { struct dn_alg_head schedlist; /* list of algorithms */ /* Store the fs/sch to scan when draining. The value is the - * bucket number of the hash table + * bucket number of the hash table. Expire can be disabled + * with net.inet.ip.dummynet.expire=0, or it happens every + * expire ticks. **/ int drain_fs; int drain_sch; + uint32_t expire; + uint32_t expire_cycle; /* tick count */ /* if the upper half is busy doing something long, * can set the busy flag and we will enqueue packets in Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ipfw/ip_dummynet.c Mon Mar 15 17:14:27 2010 (r205173) @@ -122,6 +122,12 @@ ipdn_bound_var(int *v, int dflt, int lo, } /*---- flow_id mask, hash and compare functions ---*/ +/* + * The flow_id includes the 5-tuple, the queue/pipe number + * which we store in the extra area in host order, + * and for ipv6 also the flow_id6. + * XXX see if we want the tos byte (can store in 'flags') + */ static struct ipfw_flow_id * flow_id_mask(struct ipfw_flow_id *mask, struct ipfw_flow_id *id) { @@ -130,7 +136,7 @@ flow_id_mask(struct ipfw_flow_id *mask, id->dst_port &= mask->dst_port; id->src_port &= mask->src_port; id->proto &= mask->proto; - id->flags = 0; /* we don't care about this one */ + id->extra &= mask->extra; if (is_v6) { APPLY_MASK(&id->dst_ip6, &mask->dst_ip6); APPLY_MASK(&id->src_ip6, &mask->src_ip6); @@ -151,7 +157,7 @@ flow_id_or(struct ipfw_flow_id *src, str dst->dst_port |= src->dst_port; dst->src_port |= src->src_port; dst->proto |= src->proto; - dst->flags = 0; /* we don't care about this one */ + dst->extra |= src->extra; if (is_v6) { #define OR_MASK(_d, _s) \ (_d)->__u6_addr.__u6_addr32[0] |= (_s)->__u6_addr.__u6_addr32[0]; \ @@ -172,7 +178,7 @@ flow_id_or(struct ipfw_flow_id *src, str static int nonzero_mask(struct ipfw_flow_id *m) { - if (m->dst_port || m->src_port || m->proto) + if (m->dst_port || m->src_port || m->proto || m->extra) return 1; if (IS_IP6_FLOW_ID(m)) { return @@ -208,10 +214,12 @@ flow_id_hash(struct ipfw_flow_id *id) (s[0] << 16) ^ (s[1] << 16) ^ (s[2] << 16) ^ (s[3] << 16) ^ (id->dst_port << 1) ^ (id->src_port) ^ + (id->extra) ^ (id->proto ) ^ (id->flow_id6); } else { i = (id->dst_ip) ^ (id->dst_ip >> 15) ^ (id->src_ip << 1) ^ (id->src_ip >> 16) ^ + (id->extra) ^ (id->dst_port << 1) ^ (id->src_port) ^ (id->proto); } return i; @@ -223,29 +231,26 @@ flow_id_cmp(struct ipfw_flow_id *id1, st { int is_v6 = IS_IP6_FLOW_ID(id1); - if (is_v6 != IS_IP6_FLOW_ID(id2)) - return 1; /* a ipv4 and a ipv6 flow */ - - if (!is_v6 && id1->dst_ip == id2->dst_ip && - id1->src_ip == id2->src_ip && - id1->dst_port == id2->dst_port && - id1->src_port == id2->src_port && - id1->proto == id2->proto && - id1->flags == id2->flags) - return 0; - - if (is_v6 && + if (!is_v6) { + if (IS_IP6_FLOW_ID(id2)) + return 1; /* different address families */ + + return (id1->dst_ip == id2->dst_ip && + id1->src_ip == id2->src_ip && + id1->dst_port == id2->dst_port && + id1->src_port == id2->src_port && + id1->proto == id2->proto && + id1->extra == id2->extra) ? 0 : 1; + } + /* the ipv6 case */ + return ( !bcmp(&id1->dst_ip6,&id2->dst_ip6, sizeof(id1->dst_ip6)) && !bcmp(&id1->src_ip6,&id2->src_ip6, sizeof(id1->src_ip6)) && id1->dst_port == id2->dst_port && id1->src_port == id2->src_port && id1->proto == id2->proto && - id1->flags == id2->flags && - id1->flow_id6 == id2->flow_id6) - return 0; - - /* Masks differ */ - return 1; + id1->extra == id2->extra && + id1->flow_id6 == id2->flow_id6) ? 0 : 1; } /*--------- end of flow-id mask, hash and compare ---------*/ @@ -2111,10 +2116,13 @@ ip_dn_init(void) if (bootverbose) printf("DUMMYNET with IPv6 initialized (100131)\n"); - /* init defaults here, MSVC does not accept initializers */ + /* Set defaults here. MSVC does not accept initializers, + * and this is also useful for vimages + */ /* queue limits */ dn_cfg.slot_limit = 100; /* Foot shooting limit for queues. */ dn_cfg.byte_limit = 1024 * 1024; + dn_cfg.expire = 1; /* RED parameters */ dn_cfg.red_lookup_depth = 256; /* default lookup table depth */ Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ipfw/ip_fw2.c Mon Mar 15 17:14:27 2010 (r205173) @@ -886,10 +886,13 @@ ipfw_chk(struct ip_fw_args *args) * ulp is NULL if not found. */ void *ulp = NULL; /* upper layer protocol pointer. */ + /* XXX ipv6 variables */ int is_ipv6 = 0; - u_int16_t ext_hd = 0; /* bits vector for extension header filtering */ + uint8_t icmp6_type = 0; + uint16_t ext_hd = 0; /* bits vector for extension header filtering */ /* end of ipv6 variables */ + int is_ipv4 = 0; int done = 0; /* flag to exit the outer loop */ @@ -941,14 +944,15 @@ do { \ switch (proto) { case IPPROTO_ICMPV6: PULLUP_TO(hlen, ulp, struct icmp6_hdr); - args->f_id.flags = ICMP6(ulp)->icmp6_type; + icmp6_type = ICMP6(ulp)->icmp6_type; break; case IPPROTO_TCP: PULLUP_TO(hlen, ulp, struct tcphdr); dst_port = TCP(ulp)->th_dport; src_port = TCP(ulp)->th_sport; - args->f_id.flags = TCP(ulp)->th_flags; + /* save flags for dynamic rules */ + args->f_id._flags = TCP(ulp)->th_flags; break; case IPPROTO_SCTP: @@ -1012,7 +1016,7 @@ do { \ return (IP_FW_DENY); break; } - args->f_id.frag_id6 = + args->f_id.extra = ntohl(((struct ip6_frag *)ulp)->ip6f_ident); ulp = NULL; break; @@ -1115,7 +1119,8 @@ do { \ PULLUP_TO(hlen, ulp, struct tcphdr); dst_port = TCP(ulp)->th_dport; src_port = TCP(ulp)->th_sport; - args->f_id.flags = TCP(ulp)->th_flags; + /* save flags for dynamic rules */ + args->f_id._flags = TCP(ulp)->th_flags; break; case IPPROTO_UDP: @@ -1126,7 +1131,7 @@ do { \ case IPPROTO_ICMP: PULLUP_TO(hlen, ulp, struct icmphdr); - args->f_id.flags = ICMP(ulp)->icmp_type; + //args->f_id.flags = ICMP(ulp)->icmp_type; break; default: @@ -1362,6 +1367,8 @@ do { \ key = dst_ip.s_addr; else if (v == 1) key = src_ip.s_addr; + else if (v == 6) /* dscp */ + key = (ip->ip_tos >> 2) & 0x3f; else if (offset != 0) break; else if (proto != IPPROTO_TCP && @@ -2034,7 +2041,7 @@ do { \ if (hlen > 0 && is_ipv6 && ((offset & IP6F_OFF_MASK) == 0) && (proto != IPPROTO_ICMPV6 || - (is_icmp6_query(args->f_id.flags) == 1)) && + (is_icmp6_query(icmp6_type) == 1)) && !(m->m_flags & (M_BCAST|M_MCAST)) && !IN6_IS_ADDR_MULTICAST(&args->f_id.dst_ip6)) { send_reject6( Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Mon Mar 15 17:14:27 2010 (r205173) @@ -476,7 +476,7 @@ next: V_ipfw_dyn_v[i] = q; } if (pkt->proto == IPPROTO_TCP) { /* update state according to flags */ - u_char flags = pkt->flags & (TH_FIN|TH_SYN|TH_RST); + u_char flags = pkt->_flags & (TH_FIN|TH_SYN|TH_RST); #define BOTH_SYN (TH_SYN | (TH_SYN << 8)) #define BOTH_FIN (TH_FIN | (TH_FIN << 8)) Modified: head/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_log.c Mon Mar 15 16:53:09 2010 (r205172) +++ head/sys/netinet/ipfw/ip_fw_log.c Mon Mar 15 17:14:27 2010 (r205173) @@ -395,7 +395,7 @@ ipfw_log(struct ip_fw *f, u_int hlen, st if (offset & (IP6F_OFF_MASK | IP6F_MORE_FRAG)) snprintf(SNPARGS(fragment, 0), " (frag %08x:%d@%d%s)", - args->f_id.frag_id6, + args->f_id.extra, ntohs(ip6->ip6_plen) - hlen, ntohs(offset & IP6F_OFF_MASK) << 3, (offset & IP6F_MORE_FRAG) ? "+" : ""); From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 17:39:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 842E2106566C; Mon, 15 Mar 2010 17:39:16 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215]) by mx1.freebsd.org (Postfix) with ESMTP id 855D28FC17; Mon, 15 Mar 2010 17:39:15 +0000 (UTC) Received: by fxm7 with SMTP id 7so457614fxm.3 for ; Mon, 15 Mar 2010 10:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=beeC7vyKsyqAtDMoB83RXZTtLEOsgZ0Egv3E3PznHeQ=; b=YYpREpK5taQ092fOOuvJzQvXmcTOZDvePlzMhADg2s3xqbqc7kqf2gr85nVozL34EF nB+gN9JZVqB+/0lTZVddH9W6i+p2JqjsDHqU5/Mn4BPw7jMYddClxbv0p7yeBG0EawcK 39Ue+xq6+VVWZmYM4VAh7ShxDeDhqeEIpuLqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=HjS5X7b54fiDh4slFPxlMcXCNWafIoUnEIB/uNKyCNtuxh1CH4rxda/bZIHJeAO46h 1CoLCDofVQ33VUXbgP1wtUkdT0PcBOj4Kz7vY60cQeZYBFfTBUdeym++szvfH/8zLkS1 EetYY7HqQ5rBuOjkEZiCNC38Or0uDmkDv/FCc= Received: by 10.87.76.30 with SMTP id d30mr8196999fgl.52.1268674754359; Mon, 15 Mar 2010 10:39:14 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id e20sm4733749fga.15.2010.03.15.10.39.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Mar 2010 10:39:13 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 15 Mar 2010 10:38:40 -0700 From: Pyun YongHyeon Date: Mon, 15 Mar 2010 10:38:40 -0700 To: Bruce Evans Message-ID: <20100315173840.GC1178@michelle.cdnetworks.com> References: <201003121818.o2CII4ri076014@svn.freebsd.org> <20100313222131.K22847@delplex.bde.org> <20100314225409.GA1245@michelle.cdnetworks.com> <20100316031232.H1539@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100316031232.H1539@besplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pyun YongHyeon Subject: Re: svn commit: r205090 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages 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, 15 Mar 2010 17:39:16 -0000 On Tue, Mar 16, 2010 at 03:47:29AM +1100, Bruce Evans wrote: > On Sun, 14 Mar 2010, Pyun YongHyeon wrote: > > >On Sat, Mar 13, 2010 at 11:05:11PM +1100, Bruce Evans wrote: > >>On Fri, 12 Mar 2010, Pyun YongHyeon wrote: > >> > >>>Log: > >>>Reorder interrupt handler a bit such that producer/consumer > >>>index of status block is read first before acknowledging the > >>>interrupts. Otherwise bge(4) may get stale status block as > >>>acknowledging an interrupt may yield another status block update. > >>> > >>>Reviewed by: marius > >> > >>Er, doesn't this give a race instead? It undoes a critical part of > >>rev.1.169 but not the comment part which still says that the ack is > > > >You're probably right it may increase race window for interrupts. > > Rev.1.169 was supposed to fix all races involving the interrupt ack. > An increase from 0 to epsilon is large :-). > It may fix the race but ignored status block coherency. > >But it ensures coherent accesses to the status block which is more > >important than losing interrupts. > > Interrupts weren't lost after 1.169 AFAIK. Rather the reverse. We > take a few extra interrupts in order not to miss any. I don't see how > your change improves coherency but don't really understand the coherency. > But^2 I now remember discussing with scottl that there is no locking > for the status block and it is not clear whether there should be or > how things mostly work when there isn't (mutex-type locking seems to > be useless). > Old code (before r196370) had packet drop issues due to the status block coherency problems. > >I think old code fought not to > >lose interrupts by acknowledging interrupts first and tried to get > >next interrupts if status block was updated in interrupt handler. > >Old code also had similar race window because it blindly > >acknowledged the interrupt, status block could be updated after the > >acknowledgment of the interrupt. > > Why is this fighting? Acking the interrupt should have no affect on > the contents of the status block, and any status block update after > acking should cause a new interrupt. Of course the hardware might If you're talking about interrupt only, yes you're right. Acking the interrupt tell the controller can update the status block at any time which in turn can cause packet drops. Tagged status mode will tell acked sequence number to controller so controller will interrupt again if there is sequence number difference between driver and status block. I think this is more reliable way to catch interrupts as well as fixing status block coherency. > not be as nice as that, but something like this seems to be needed > for a status block to work efficiently. > I still think the bge(4) hardwares except BCM5700 were correctly designed. bge(4) just didn't take advantage of it. > Anyway, the old race window (if it is a race that matters) isn't similar, > but is the opposite race. > > > > >>done first, and why (to ensure getting another interrupt if the status > >>block changes after we have looked at it). > >> > >>% /* > >>% * Do the mandatory PCI flush as well as get the link status. > >>% */ > >>% statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; > >>% > >>% /* Make sure the descriptor ring indexes are coherent. */ > >>% bus_dmamap_sync(sc->bge_cdata.bge_status_tag, > >>% sc->bge_cdata.bge_status_map, > >>% BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > >>% rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; > >>% tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; > >>% sc->bge_ldata.bge_status_block->bge_status = 0; > >>% bus_dmamap_sync(sc->bge_cdata.bge_status_tag, > >>% sc->bge_cdata.bge_status_map, > >>% BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); > >> > >>The above presumably gives sufficiently coherent accesses to the status > >>block, but what happens if a status update occurs now (before the ack). > > > >Theoretically this may happen if interrupt is shared with other > >devices. Since bge(4) does not check whether the interrupt is ours > >it may blindly process the interrupt. > > Well, my version checks, but you said before that some hardware cannot > be trusted to get this right (it works with my 5701 UP no-MSI). > Yes, for non-MSI case, interrupt could be delivered first before updating a status block. This is the reason why bge(4) still has CSR_READ_4(sc, BGE_MAC_STS) to ensure status block update. This is different issue and I think it can't be easily avoided. > I see that you are saying that your change doesn't help if the interrupt > isn't ours. Then the ack is still done first (long ago, on the last > bge_intr()) so the above may run partly before the interrupt is ours > and partly after, giving the same problem (the one that I don't As long as status block coherency is guaranteed there is no negative effect except doing some unnecessary work. This is the same behavior as before. > understand :-) caused by running the above after an ack. Is the status > block supposed to be frozen once an interrupt really for us occurs > until we ack the interrupt? > I think so. This means acking interrupt can yield status block update in the middle of interrupt handler. From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 17:52:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36BA21065673; Mon, 15 Mar 2010 17:52:56 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 229BC8FC1B; Mon, 15 Mar 2010 17:52:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FHquNl033005; Mon, 15 Mar 2010 17:52:56 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FHqu2L032992; Mon, 15 Mar 2010 17:52:56 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151752.o2FHqu2L032992@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 17:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205174 - stable/8/release/picobsd/floppy.tree X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 17:52:56 -0000 Author: luigi Date: Mon Mar 15 17:52:55 2010 New Revision: 205174 URL: http://svn.freebsd.org/changeset/base/205174 Log: wrong name for this file... Added: - copied unchanged from r205079, stable/8/release/picobsd/floppy.tree/sbin Directory Properties: stable/8/release/picobsd/floppy.tree/dhclient-script (props changed) Deleted: stable/8/release/picobsd/floppy.tree/sbin Copied: stable/8/release/picobsd/floppy.tree/dhclient-script (from r205079, stable/8/release/picobsd/floppy.tree/sbin) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/release/picobsd/floppy.tree/dhclient-script Mon Mar 15 17:52:55 2010 (r205174, copy of r205079, stable/8/release/picobsd/floppy.tree/sbin) @@ -0,0 +1,384 @@ +#!/bin/sh +# +# $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $ +# $FreeBSD$ +# +# Copyright (c) 2003 Kenneth R Westerback +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# + +ARP=/usr/sbin/arp +HOSTNAME=/bin/hostname +IFCONFIG='/sbin/ifconfig -n' + +LOCALHOST=127.0.0.1 + +if [ -x /usr/bin/logger ]; then + LOGGER="/usr/bin/logger -s -p user.notice -t dhclient" +else + LOGGER=echo +fi + +# +# Helper functions that implement common actions. +# + +check_hostname() { + current_hostname=`$HOSTNAME` + if [ -z "$current_hostname" ]; then + $LOGGER "New Hostname ($interface): $new_host_name" + $HOSTNAME $new_host_name + elif [ "$current_hostname" = "$old_host_name" -a \ + "$new_host_name" != "$old_host_name" ]; then + $LOGGER "New Hostname ($interface): $new_host_name" + $HOSTNAME $new_host_name + fi +} + +arp_flush() { + arp -an -i $interface | \ + sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' | \ + sh >/dev/null 2>&1 +} + +delete_old_address() { + eval "$IFCONFIG $interface inet -alias $old_ip_address $medium" +} + +add_new_address() { + eval "$IFCONFIG $interface \ + inet $new_ip_address \ + netmask $new_subnet_mask \ + broadcast $new_broadcast_address \ + $medium" + + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" + $LOGGER "New Routers ($interface): $new_routers" +} + +delete_old_alias() { + if [ -n "$alias_ip_address" ]; then + $IFCONFIG $interface inet -alias $alias_ip_address > /dev/null 2>&1 + #route delete $alias_ip_address $LOCALHOST > /dev/null 2>&1 + fi +} + +add_new_alias() { + if [ -n "$alias_ip_address" ]; then + $IFCONFIG $interface inet alias $alias_ip_address netmask \ + $alias_subnet_mask + #route add $alias_ip_address $LOCALHOST + fi +} + +fill_classless_routes() { + set $1 + while [ $# -ge 5 ]; do + if [ $1 -eq 0 ]; then + route="default" + elif [ $1 -le 8 ]; then + route="$2.0.0.0/$1" + shift + elif [ $1 -le 16 ]; then + route="$2.$3.0.0/$1" + shift; shift + elif [ $1 -le 24 ]; then + route="$2.$3.$4.0/$1" + shift; shift; shift + else + route="$2.$3.$4.$5/$1" + shift; shift; shift; shift + fi + shift + router="$1.$2.$3.$4" + classless_routes="$classless_routes $route $router" + shift; shift; shift; shift + done +} + +delete_old_routes() { + #route delete "$old_ip_address" $LOCALHOST >/dev/null 2>&1 + if [ -n "$old_classless_routes" ]; then + fill_classless_routes "$old_classless_routes" + set $classless_routes + while [ $# -gt 1 ]; do + route delete "$1" "$2" + shift; shift + done + return 0; + fi + + # If we supported multiple default routes, we'd be removing each + # one here. We don't so just delete the default route if it's + # through our interface. + if is_default_interface; then + route delete default >/dev/null 2>&1 + fi + + if [ -n "$old_static_routes" ]; then + set $old_static_routes + while [ $# -gt 1 ]; do + route delete "$1" "$2" + shift; shift + done + fi + + arp_flush +} + +add_new_routes() { + #route add $new_ip_address $LOCALHOST >/dev/null 2>&1 + + # RFC 3442: If the DHCP server returns both a Classless Static + # Routes option and a Router option, the DHCP client MUST ignore + # the Router option. + # + # DHCP clients that support this option (Classless Static Routes) + # MUST NOT install the routes specified in the Static Routes + # option (option code 33) if both a Static Routes option and the + # Classless Static Routes option are provided. + + if [ -n "$new_classless_routes" ]; then + fill_classless_routes "$new_classless_routes" + $LOGGER "New Classless Static Routes ($interface): $classless_routes" + set $classless_routes + while [ $# -gt 1 ]; do + if [ "0.0.0.0" = "$2" ]; then + route add "$1" -iface "$interface" + else + route add "$1" "$2" + fi + shift; shift + done + return + fi + + for router in $new_routers; do + if is_default_interface; then + + if [ "$new_ip_address" = "$router" ]; then + route add default -iface $router >/dev/null 2>&1 + else + route add default $router >/dev/null 2>&1 + fi + fi + # 2nd and subsequent default routers error out, so explicitly + # stop processing the list after the first one. + break + done + + if [ -n "$new_static_routes" ]; then + $LOGGER "New Static Routes ($interface): $new_static_routes" + set $new_static_routes + while [ $# -gt 1 ]; do + route add $1 $2 + shift; shift + done + fi +} + +add_new_resolv_conf() { + # XXX Old code did not create/update resolv.conf unless both + # $new_domain_name and $new_domain_name_servers were provided. PR + # #3135 reported some ISP's only provide $new_domain_name_servers and + # thus broke the script. This code creates the resolv.conf if either + # are provided. + + local tmpres=/var/run/resolv.conf.${interface} + rm -f $tmpres + + if [ -n "$new_domain_name" ]; then + echo "search $new_domain_name" >>$tmpres + fi + + if [ -n "$new_domain_name_servers" ]; then + for nameserver in $new_domain_name_servers; do + echo "nameserver $nameserver" >>$tmpres + done + fi + + if [ -f $tmpres ]; then + if [ -f /etc/resolv.conf.tail ]; then + cat /etc/resolv.conf.tail >>$tmpres + fi + + # When resolv.conf is not changed actually, we don't + # need to update it. + # If /usr is not mounted yet, we cannot use cmp, then + # the following test fails. In such case, we simply + # ignore an error and do update resolv.conf. + if cmp -s $tmpres /etc/resolv.conf; then + rm -f $tmpres + return 0 + fi 2>/dev/null + + # In case (e.g. during OpenBSD installs) /etc/resolv.conf + # is a symbolic link, take care to preserve the link and write + # the new data in the correct location. + + if [ -f /etc/resolv.conf ]; then + cat /etc/resolv.conf > /etc/resolv.conf.save + fi + cat $tmpres > /etc/resolv.conf + rm -f $tmpres + + # Try to ensure correct ownership and permissions. + chown -RL root:wheel /etc/resolv.conf + chmod -RL 644 /etc/resolv.conf + + return 0 + fi + + return 1 +} + +# Must be used on exit. Invokes the local dhcp client exit hooks, if any. +exit_with_hooks() { + exit_status=$1 + if [ -f /etc/dhclient-exit-hooks ]; then + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script + exit $exit_status +} + +# Get the interface with the current ipv4 default route on it using only +# commands that are available prior to /usr being mounted. +is_default_interface() +{ + routeget="`route -n get -inet default`" + oldifs="$IFS" + IFS=" +" + defif= + for line in $routeget ; do + case $line in + *interface:*) + defif=${line##*: } + ;; + esac + done + IFS=${oldifs} + + if [ -z "$defif" -o "$defif" = "$interface" ]; then + return 0 + else + return 1 + fi +} + +# +# Start of active code. +# + +# Invoke the local dhcp client enter hooks, if they exist. +if [ -f /etc/dhclient-enter-hooks ]; then + exit_status=0 + . /etc/dhclient-enter-hooks + # allow the local script to abort processing of this state + # local script must set exit_status variable to nonzero. + if [ $exit_status -ne 0 ]; then + exit $exit_status + fi +fi + +case $reason in +MEDIUM) + eval "$IFCONFIG $interface $medium" + eval "$IFCONFIG $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1 + sleep 1 + ;; + +PREINIT) + delete_old_alias + $IFCONFIG $interface inet alias 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up + ;; + +ARPCHECK|ARPSEND) + ;; + +BOUND|RENEW|REBIND|REBOOT) + check_hostname + if [ -n "$old_ip_address" ]; then + if [ "$old_ip_address" != "$alias_ip_address" ]; then + delete_old_alias + fi + if [ "$old_ip_address" != "$new_ip_address" ]; then + delete_old_address + delete_old_routes + fi + fi + if [ "$reason" = BOUND ] || \ + [ "$reason" = REBOOT ] || \ + [ -z "$old_ip_address" ] || \ + [ "$old_ip_address" != "$new_ip_address" ]; then + add_new_address + add_new_routes + fi + if [ "$new_ip_address" != "$alias_ip_address" ]; then + add_new_alias + fi + if is_default_interface; then + add_new_resolv_conf + fi + ;; + +EXPIRE|FAIL) + delete_old_alias + if [ -n "$old_ip_address" ]; then + delete_old_address + delete_old_routes + fi + if [ -x $ARP ]; then + $ARP -d -a -i $interface + fi + # XXX Why add alias we just deleted above? + add_new_alias + if is_default_interface; then + if [ -f /etc/resolv.conf.save ]; then + cat /etc/resolv.conf.save > /etc/resolv.conf + fi + fi + ;; + +TIMEOUT) + delete_old_alias + add_new_address + sleep 1 + if [ -n "$new_routers" ]; then + $LOGGER "New Routers ($interface): $new_routers" + set "$new_routers" + if ping -q -c 1 -t 1 "$1"; then + if [ "$new_ip_address" != "$alias_ip_address" ]; then + add_new_alias + fi + add_new_routes + if ! is_default_interface; then + exit_with_hooks 0 + fi + if add_new_resolv_conf; then + exit_with_hooks 0 + fi + fi + fi + eval "$IFCONFIG $interface inet -alias $new_ip_address $medium" + delete_old_routes + exit_with_hooks 1 + ;; +esac + +exit_with_hooks 0 From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 17:54:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6053106567B; Mon, 15 Mar 2010 17:54:01 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2C468FC34; Mon, 15 Mar 2010 17:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FHs1wf033289; Mon, 15 Mar 2010 17:54:01 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FHs1bK033287; Mon, 15 Mar 2010 17:54:01 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151754.o2FHs1bK033287@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 17:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205175 - in stable/8/release/picobsd/floppy.tree: . sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 17:54:01 -0000 Author: luigi Date: Mon Mar 15 17:54:01 2010 New Revision: 205175 URL: http://svn.freebsd.org/changeset/base/205175 Log: and wrong place too! Added: stable/8/release/picobsd/floppy.tree/sbin/ stable/8/release/picobsd/floppy.tree/sbin/dhclient-script - copied unchanged from r205174, stable/8/release/picobsd/floppy.tree/dhclient-script Deleted: stable/8/release/picobsd/floppy.tree/dhclient-script Copied: stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (from r205174, stable/8/release/picobsd/floppy.tree/dhclient-script) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/release/picobsd/floppy.tree/sbin/dhclient-script Mon Mar 15 17:54:01 2010 (r205175, copy of r205174, stable/8/release/picobsd/floppy.tree/dhclient-script) @@ -0,0 +1,384 @@ +#!/bin/sh +# +# $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $ +# $FreeBSD$ +# +# Copyright (c) 2003 Kenneth R Westerback +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# + +ARP=/usr/sbin/arp +HOSTNAME=/bin/hostname +IFCONFIG='/sbin/ifconfig -n' + +LOCALHOST=127.0.0.1 + +if [ -x /usr/bin/logger ]; then + LOGGER="/usr/bin/logger -s -p user.notice -t dhclient" +else + LOGGER=echo +fi + +# +# Helper functions that implement common actions. +# + +check_hostname() { + current_hostname=`$HOSTNAME` + if [ -z "$current_hostname" ]; then + $LOGGER "New Hostname ($interface): $new_host_name" + $HOSTNAME $new_host_name + elif [ "$current_hostname" = "$old_host_name" -a \ + "$new_host_name" != "$old_host_name" ]; then + $LOGGER "New Hostname ($interface): $new_host_name" + $HOSTNAME $new_host_name + fi +} + +arp_flush() { + arp -an -i $interface | \ + sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' | \ + sh >/dev/null 2>&1 +} + +delete_old_address() { + eval "$IFCONFIG $interface inet -alias $old_ip_address $medium" +} + +add_new_address() { + eval "$IFCONFIG $interface \ + inet $new_ip_address \ + netmask $new_subnet_mask \ + broadcast $new_broadcast_address \ + $medium" + + $LOGGER "New IP Address ($interface): $new_ip_address" + $LOGGER "New Subnet Mask ($interface): $new_subnet_mask" + $LOGGER "New Broadcast Address ($interface): $new_broadcast_address" + $LOGGER "New Routers ($interface): $new_routers" +} + +delete_old_alias() { + if [ -n "$alias_ip_address" ]; then + $IFCONFIG $interface inet -alias $alias_ip_address > /dev/null 2>&1 + #route delete $alias_ip_address $LOCALHOST > /dev/null 2>&1 + fi +} + +add_new_alias() { + if [ -n "$alias_ip_address" ]; then + $IFCONFIG $interface inet alias $alias_ip_address netmask \ + $alias_subnet_mask + #route add $alias_ip_address $LOCALHOST + fi +} + +fill_classless_routes() { + set $1 + while [ $# -ge 5 ]; do + if [ $1 -eq 0 ]; then + route="default" + elif [ $1 -le 8 ]; then + route="$2.0.0.0/$1" + shift + elif [ $1 -le 16 ]; then + route="$2.$3.0.0/$1" + shift; shift + elif [ $1 -le 24 ]; then + route="$2.$3.$4.0/$1" + shift; shift; shift + else + route="$2.$3.$4.$5/$1" + shift; shift; shift; shift + fi + shift + router="$1.$2.$3.$4" + classless_routes="$classless_routes $route $router" + shift; shift; shift; shift + done +} + +delete_old_routes() { + #route delete "$old_ip_address" $LOCALHOST >/dev/null 2>&1 + if [ -n "$old_classless_routes" ]; then + fill_classless_routes "$old_classless_routes" + set $classless_routes + while [ $# -gt 1 ]; do + route delete "$1" "$2" + shift; shift + done + return 0; + fi + + # If we supported multiple default routes, we'd be removing each + # one here. We don't so just delete the default route if it's + # through our interface. + if is_default_interface; then + route delete default >/dev/null 2>&1 + fi + + if [ -n "$old_static_routes" ]; then + set $old_static_routes + while [ $# -gt 1 ]; do + route delete "$1" "$2" + shift; shift + done + fi + + arp_flush +} + +add_new_routes() { + #route add $new_ip_address $LOCALHOST >/dev/null 2>&1 + + # RFC 3442: If the DHCP server returns both a Classless Static + # Routes option and a Router option, the DHCP client MUST ignore + # the Router option. + # + # DHCP clients that support this option (Classless Static Routes) + # MUST NOT install the routes specified in the Static Routes + # option (option code 33) if both a Static Routes option and the + # Classless Static Routes option are provided. + + if [ -n "$new_classless_routes" ]; then + fill_classless_routes "$new_classless_routes" + $LOGGER "New Classless Static Routes ($interface): $classless_routes" + set $classless_routes + while [ $# -gt 1 ]; do + if [ "0.0.0.0" = "$2" ]; then + route add "$1" -iface "$interface" + else + route add "$1" "$2" + fi + shift; shift + done + return + fi + + for router in $new_routers; do + if is_default_interface; then + + if [ "$new_ip_address" = "$router" ]; then + route add default -iface $router >/dev/null 2>&1 + else + route add default $router >/dev/null 2>&1 + fi + fi + # 2nd and subsequent default routers error out, so explicitly + # stop processing the list after the first one. + break + done + + if [ -n "$new_static_routes" ]; then + $LOGGER "New Static Routes ($interface): $new_static_routes" + set $new_static_routes + while [ $# -gt 1 ]; do + route add $1 $2 + shift; shift + done + fi +} + +add_new_resolv_conf() { + # XXX Old code did not create/update resolv.conf unless both + # $new_domain_name and $new_domain_name_servers were provided. PR + # #3135 reported some ISP's only provide $new_domain_name_servers and + # thus broke the script. This code creates the resolv.conf if either + # are provided. + + local tmpres=/var/run/resolv.conf.${interface} + rm -f $tmpres + + if [ -n "$new_domain_name" ]; then + echo "search $new_domain_name" >>$tmpres + fi + + if [ -n "$new_domain_name_servers" ]; then + for nameserver in $new_domain_name_servers; do + echo "nameserver $nameserver" >>$tmpres + done + fi + + if [ -f $tmpres ]; then + if [ -f /etc/resolv.conf.tail ]; then + cat /etc/resolv.conf.tail >>$tmpres + fi + + # When resolv.conf is not changed actually, we don't + # need to update it. + # If /usr is not mounted yet, we cannot use cmp, then + # the following test fails. In such case, we simply + # ignore an error and do update resolv.conf. + if cmp -s $tmpres /etc/resolv.conf; then + rm -f $tmpres + return 0 + fi 2>/dev/null + + # In case (e.g. during OpenBSD installs) /etc/resolv.conf + # is a symbolic link, take care to preserve the link and write + # the new data in the correct location. + + if [ -f /etc/resolv.conf ]; then + cat /etc/resolv.conf > /etc/resolv.conf.save + fi + cat $tmpres > /etc/resolv.conf + rm -f $tmpres + + # Try to ensure correct ownership and permissions. + chown -RL root:wheel /etc/resolv.conf + chmod -RL 644 /etc/resolv.conf + + return 0 + fi + + return 1 +} + +# Must be used on exit. Invokes the local dhcp client exit hooks, if any. +exit_with_hooks() { + exit_status=$1 + if [ -f /etc/dhclient-exit-hooks ]; then + . /etc/dhclient-exit-hooks + fi + # probably should do something with exit status of the local script + exit $exit_status +} + +# Get the interface with the current ipv4 default route on it using only +# commands that are available prior to /usr being mounted. +is_default_interface() +{ + routeget="`route -n get -inet default`" + oldifs="$IFS" + IFS=" +" + defif= + for line in $routeget ; do + case $line in + *interface:*) + defif=${line##*: } + ;; + esac + done + IFS=${oldifs} + + if [ -z "$defif" -o "$defif" = "$interface" ]; then + return 0 + else + return 1 + fi +} + +# +# Start of active code. +# + +# Invoke the local dhcp client enter hooks, if they exist. +if [ -f /etc/dhclient-enter-hooks ]; then + exit_status=0 + . /etc/dhclient-enter-hooks + # allow the local script to abort processing of this state + # local script must set exit_status variable to nonzero. + if [ $exit_status -ne 0 ]; then + exit $exit_status + fi +fi + +case $reason in +MEDIUM) + eval "$IFCONFIG $interface $medium" + eval "$IFCONFIG $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1 + sleep 1 + ;; + +PREINIT) + delete_old_alias + $IFCONFIG $interface inet alias 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up + ;; + +ARPCHECK|ARPSEND) + ;; + +BOUND|RENEW|REBIND|REBOOT) + check_hostname + if [ -n "$old_ip_address" ]; then + if [ "$old_ip_address" != "$alias_ip_address" ]; then + delete_old_alias + fi + if [ "$old_ip_address" != "$new_ip_address" ]; then + delete_old_address + delete_old_routes + fi + fi + if [ "$reason" = BOUND ] || \ + [ "$reason" = REBOOT ] || \ + [ -z "$old_ip_address" ] || \ + [ "$old_ip_address" != "$new_ip_address" ]; then + add_new_address + add_new_routes + fi + if [ "$new_ip_address" != "$alias_ip_address" ]; then + add_new_alias + fi + if is_default_interface; then + add_new_resolv_conf + fi + ;; + +EXPIRE|FAIL) + delete_old_alias + if [ -n "$old_ip_address" ]; then + delete_old_address + delete_old_routes + fi + if [ -x $ARP ]; then + $ARP -d -a -i $interface + fi + # XXX Why add alias we just deleted above? + add_new_alias + if is_default_interface; then + if [ -f /etc/resolv.conf.save ]; then + cat /etc/resolv.conf.save > /etc/resolv.conf + fi + fi + ;; + +TIMEOUT) + delete_old_alias + add_new_address + sleep 1 + if [ -n "$new_routers" ]; then + $LOGGER "New Routers ($interface): $new_routers" + set "$new_routers" + if ping -q -c 1 -t 1 "$1"; then + if [ "$new_ip_address" != "$alias_ip_address" ]; then + add_new_alias + fi + add_new_routes + if ! is_default_interface; then + exit_with_hooks 0 + fi + if add_new_resolv_conf; then + exit_with_hooks 0 + fi + fi + fi + eval "$IFCONFIG $interface inet -alias $new_ip_address $medium" + delete_old_routes + exit_with_hooks 1 + ;; +esac + +exit_with_hooks 0 From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:09:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E63FF106566B; Mon, 15 Mar 2010 18:09:21 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D51258FC20; Mon, 15 Mar 2010 18:09:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FI9LPw036835; Mon, 15 Mar 2010 18:09:21 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FI9LhA036833; Mon, 15 Mar 2010 18:09:21 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151809.o2FI9LhA036833@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 18:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205178 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 18:09:22 -0000 Author: luigi Date: Mon Mar 15 18:09:21 2010 New Revision: 205178 URL: http://svn.freebsd.org/changeset/base/205178 Log: small fixes to estimate the buffer size when requesting all pipes/flows. Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Mon Mar 15 17:55:46 2010 (r205177) +++ head/sys/netinet/ipfw/ip_dummynet.c Mon Mar 15 18:09:21 2010 (r205178) @@ -814,15 +814,15 @@ copy_obj(char **start, char *end, void * } /* Specific function to copy a queue. - * It copies only the common part of a queue, and correctly set - * the length + * Copies only the user-visible part of a queue (which is in + * a struct dn_flow), and sets len accordingly. */ static int copy_obj_q(char **start, char *end, void *_o, const char *msg, int i) { struct dn_id *o = _o; int have = end - *start; - int len = sizeof(struct dn_queue); + int len = sizeof(struct dn_flow); /* see above comment */ if (have < len || o->len == 0 || o->type != DN_QUEUE) { D("ERROR type %d %s %d have %d need %d", @@ -1783,9 +1783,13 @@ compute_space(struct dn_id *cmd, struct if (x & DN_C_LINK) { need += dn_cfg.schk_count * sizeof(struct dn_link) / 2; } - /* XXX queue space might be variable */ + /* + * When exporting a queue to userland, only pass up the + * struct dn_flow, which is the only visible part. + */ + if (x & DN_C_QUEUE) - need += dn_cfg.queue_count * sizeof(struct dn_queue); + need += dn_cfg.queue_count * sizeof(struct dn_flow); if (x & DN_C_FLOW) need += dn_cfg.si_count * (sizeof(struct dn_flow)); return need; From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:15:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 099E91065673; Mon, 15 Mar 2010 18:15:08 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id BDB7F8FC19; Mon, 15 Mar 2010 18:15:07 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 541DE5C3A; Mon, 15 Mar 2010 18:15:06 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id o2FIF5AR044641; Mon, 15 Mar 2010 18:15:05 GMT (envelope-from phk@critter.freebsd.dk) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 16 Mar 2010 03:07:05 +1100." <20100316024446.A24853@delplex.bde.org> Date: Mon, 15 Mar 2010 18:15:05 +0000 Message-ID: <44640.1268676905@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 18:15:08 -0000 In message <20100316024446.A24853@delplex.bde.org>, Bruce Evans writes: >On Tue, 16 Mar 2010, Bruce Evans wrote: > >Due to the way that daemon() works, it is really an error to have any >open streams when it is called. This is also undocumented, except >implicitly. The errors are: >- unflushed output on stdout and stderr won't get flushed normally by > the child. stdout and stderr are redirected so it will go there if > the child erroneously (?) uses these streams or simply calls exit() > which will give the default flush. The in-core FILE buffers are copied in the child process, so they should most certainly not be flushed, but rather, as they correctly are, discarded, so that when the child causes the flush, the content is only output once. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:20:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FCAD106566C; Mon, 15 Mar 2010 18:20:52 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8B3D8FC19; Mon, 15 Mar 2010 18:20:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FIKpk3039403; Mon, 15 Mar 2010 18:20:51 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FIKpRF039402; Mon, 15 Mar 2010 18:20:51 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151820.o2FIKpRF039402@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 18:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205179 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 18:20:52 -0000 Author: luigi Date: Mon Mar 15 18:20:51 2010 New Revision: 205179 URL: http://svn.freebsd.org/changeset/base/205179 Log: print correctly commands of the form ipfw add 100 allow ip from { 1.2.3.4 or 5.6.7.8 } (note that the above example could be better written as ipfw add 100 allow dst-ip 1.2.3.4,5.6.7.8 Submitted by: Riccardo Panicucci Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Mon Mar 15 18:09:21 2010 (r205178) +++ head/sbin/ipfw/ipfw2.c Mon Mar 15 18:20:51 2010 (r205179) @@ -921,9 +921,9 @@ print_icmptypes(ipfw_insn_u32 *cmd) #define HAVE_DSTIP 0x0004 #define HAVE_PROTO4 0x0008 #define HAVE_PROTO6 0x0010 +#define HAVE_IP 0x0100 #define HAVE_OPTIONS 0x8000 -#define HAVE_IP (HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP) static void show_prerequisites(int *flags, int want, int cmd __unused) { @@ -1024,7 +1024,9 @@ show_ipfw(struct ip_fw *rule, int pcwidt switch(cmd->opcode) { case O_CHECK_STATE: printf("check-state"); - flags = HAVE_IP; /* avoid printing anything else */ + /* avoid printing anything else */ + flags = HAVE_PROTO | HAVE_SRCIP | + HAVE_DSTIP | HAVE_IP; break; case O_ACCEPT: @@ -1164,7 +1166,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt show_prerequisites(&flags, HAVE_PROTO, 0); printf(" from any to any"); } - flags |= HAVE_IP | HAVE_OPTIONS; + flags |= HAVE_IP | HAVE_OPTIONS | HAVE_PROTO | + HAVE_SRCIP | HAVE_DSTIP; } if (co.comment_only) @@ -1253,9 +1256,12 @@ show_ipfw(struct ip_fw *rule, int pcwidt break; case O_IP_DSTPORT: - show_prerequisites(&flags, HAVE_IP, 0); + show_prerequisites(&flags, + HAVE_PROTO | HAVE_SRCIP | + HAVE_DSTIP | HAVE_IP, 0); case O_IP_SRCPORT: - show_prerequisites(&flags, HAVE_PROTO|HAVE_SRCIP, 0); + show_prerequisites(&flags, + HAVE_PROTO | HAVE_SRCIP, 0); if ((cmd->len & F_OR) && !or_block) printf(" {"); if (cmd->len & F_NOT) @@ -1276,7 +1282,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt if ((flags & (HAVE_PROTO4 | HAVE_PROTO6)) && !(flags & HAVE_PROTO)) show_prerequisites(&flags, - HAVE_IP | HAVE_OPTIONS, 0); + HAVE_PROTO | HAVE_IP | HAVE_SRCIP | + HAVE_DSTIP | HAVE_OPTIONS, 0); if (flags & HAVE_OPTIONS) printf(" proto"); if (pe) @@ -1294,7 +1301,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt ((cmd->opcode == O_IP4) && (flags & HAVE_PROTO4))) break; - show_prerequisites(&flags, HAVE_IP | HAVE_OPTIONS, 0); + show_prerequisites(&flags, HAVE_PROTO | HAVE_SRCIP | + HAVE_DSTIP | HAVE_IP | HAVE_OPTIONS, 0); if ((cmd->len & F_OR) && !or_block) printf(" {"); if (cmd->len & F_NOT && cmd->opcode != O_IN) @@ -1548,7 +1556,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt or_block = 0; } } - show_prerequisites(&flags, HAVE_IP, 0); + show_prerequisites(&flags, HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP + | HAVE_IP, 0); if (comment) printf(" // %s", comment); printf("\n"); From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:22:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 535341065676; Mon, 15 Mar 2010 18:22:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41F278FC26; Mon, 15 Mar 2010 18:22:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FIMKh3039794; Mon, 15 Mar 2010 18:22:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FIMKcN039792; Mon, 15 Mar 2010 18:22:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003151822.o2FIMKcN039792@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Mar 2010 18:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205180 - stable/8/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 18:22:20 -0000 Author: jkim Date: Mon Mar 15 18:22:19 2010 New Revision: 205180 URL: http://svn.freebsd.org/changeset/base/205180 Log: MFC: r204235 Fix FBIO_ADPINFO ioctl on amd64. Modified: stable/8/sys/dev/fb/fb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/fb/fb.c ============================================================================== --- stable/8/sys/dev/fb/fb.c Mon Mar 15 18:20:51 2010 (r205179) +++ stable/8/sys/dev/fb/fb.c Mon Mar 15 18:22:19 2010 (r205180) @@ -653,7 +653,7 @@ fb_commonioctl(video_adapter_t *adp, u_l ((video_adapter_info_t *)arg)->va_mem_base = adp->va_mem_base; ((video_adapter_info_t *)arg)->va_mem_size = adp->va_mem_size; ((video_adapter_info_t *)arg)->va_window -#ifdef __i386__ +#if defined(__amd64__) || defined(__i386__) = vtophys(adp->va_window); #else = adp->va_window; @@ -665,8 +665,8 @@ fb_commonioctl(video_adapter_t *adp, u_l ((video_adapter_info_t *)arg)->va_window_orig = adp->va_window_orig; ((video_adapter_info_t *)arg)->va_unused0 -#ifdef __i386__ - = (adp->va_buffer) ? vtophys(adp->va_buffer) : 0; +#if defined(__amd64__) || defined(__i386__) + = adp->va_buffer != 0 ? vtophys(adp->va_buffer) : 0; #else = adp->va_buffer; #endif From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:26:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 345941065670; Mon, 15 Mar 2010 18:26:10 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 238618FC0A; Mon, 15 Mar 2010 18:26:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FIQAre040666; Mon, 15 Mar 2010 18:26:10 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FIQATv040664; Mon, 15 Mar 2010 18:26:10 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201003151826.o2FIQATv040664@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 15 Mar 2010 18:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205181 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 18:26:10 -0000 Author: luigi Date: Mon Mar 15 18:26:09 2010 New Revision: 205181 URL: http://svn.freebsd.org/changeset/base/205181 Log: accept lower case m as a synonym for Mega (bit/s or bytes/s). Modified: head/sbin/ipfw/dummynet.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Mon Mar 15 18:22:19 2010 (r205180) +++ head/sbin/ipfw/dummynet.c Mon Mar 15 18:26:09 2010 (r205181) @@ -535,7 +535,7 @@ read_bandwidth(char *arg, int *bandwidth if (*end == 'K' || *end == 'k') { end++; bw *= 1000; - } else if (*end == 'M') { + } else if (*end == 'M' || *end == 'm') { end++; bw *= 1000000; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:32:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14A841065676; Mon, 15 Mar 2010 18:32:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 024258FC1B; Mon, 15 Mar 2010 18:32:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FIWvJ7042314; Mon, 15 Mar 2010 18:32:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FIWvhg042311; Mon, 15 Mar 2010 18:32:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151832.o2FIWvhg042311@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 18:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205183 - stable/8/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 18:32:58 -0000 Author: marius Date: Mon Mar 15 18:32:57 2010 New Revision: 205183 URL: http://svn.freebsd.org/changeset/base/205183 Log: MFC: r204974, r205002 - The OPSZ macro actually only does the right thing for int32 and int64 operands but not for double and extended double ones. Instead of trying to fix the macro just nuke it and unroll the loops in the correct way though as extended double operands turn out to be the only special case. - For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded after setting type accordingly as it's generally decoded using the low 2 bits as the type, which are 0 for these three instructions. - Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be re-decoded using not only the operand mask appropriate for int64 but also the correct register number encoding. - Use const where appropriate. - Wrap long lines. Submitted by: Peter Jeremy (partly) Modified: stable/8/lib/libc/sparc64/fpu/fpu.c stable/8/lib/libc/sparc64/fpu/fpu_emu.h Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu.c Mon Mar 15 18:27:51 2010 (r205182) +++ stable/8/lib/libc/sparc64/fpu/fpu.c Mon Mar 15 18:32:57 2010 (r205183) @@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$"); #define X8(x) X4(x),X4(x) #define X16(x) X8(x),X8(x) -static char cx_to_trapx[] = { +static const char cx_to_trapx[] = { X1(FSR_NX), X2(FSR_DZ), X4(FSR_UF), @@ -113,7 +113,8 @@ int __fpe_debug = 0; #endif #endif /* FPU_DEBUG */ -static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, u_long); +static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, + u_long); /* * Need to use an fpstate on the stack; we could switch, so we cannot safely @@ -169,7 +170,7 @@ __fpu_exception(struct utrapframe *uf) void __fpu_dumpfpn(struct fpn *fp) { - static char *class[] = { + static const char *const class[] = { "SNAN", "QNAN", "ZERO", "NUM", "INF" }; @@ -181,15 +182,11 @@ __fpu_dumpfpn(struct fpn *fp) } #endif -static int opmask[] = {0, 0, 1, 3}; +static const int opmask[] = {0, 0, 1, 3, 1}; /* Decode 5 bit register field depending on the type. */ #define RN_DECODE(tp, rn) \ - ((tp == FTYPE_DBL || tp == FTYPE_EXT ? INSFPdq_RN((rn)) : (rn)) & \ - ~opmask[tp]) - -/* Operand size in 32-bit registers. */ -#define OPSZ(tp) ((tp) == FTYPE_LNG ? 2 : (1 << (tp))) + ((tp) >= FTYPE_DBL ? INSFPdq_RN(rn) & ~opmask[tp] : (rn)) /* * Helper for forming the below case statements. Build only the op3 and opf @@ -209,8 +206,6 @@ static void __fpu_mov(struct fpemu *fe, int type, int rd, int rs2, u_int32_t nand, u_int32_t xor) { - u_int64_t tmp64; - int i; if (type == FTYPE_INT || type == FTYPE_SNG) __fpu_setreg(rd, (__fpu_getreg(rs2) & ~nand) ^ xor); @@ -219,13 +214,10 @@ __fpu_mov(struct fpemu *fe, int type, in * Need to use the double versions to be able to access * the upper 32 fp registers. */ - for (i = 0; i < OPSZ(type); i += 2, rd += 2, rs2 += 2) { - tmp64 = __fpu_getreg64(rs2); - if (i == 0) - tmp64 = (tmp64 & ~((u_int64_t)nand << 32)) ^ - ((u_int64_t)xor << 32); - __fpu_setreg64(rd, tmp64); - } + __fpu_setreg64(rd, (__fpu_getreg64(rs2) & + ~((u_int64_t)nand << 32)) ^ ((u_int64_t)xor << 32)); + if (type == FTYPE_EXT) + __fpu_setreg64(rd + 2, __fpu_getreg64(rs2 + 2)); } } @@ -271,17 +263,17 @@ __fpu_cmpck(struct fpemu *fe) * multiply two integers this way. */ static int -__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, u_long tstate) +__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, + u_long tstate) { struct fpn *fp; int opf, rs1, rs2, rd, type, mask, cx, cond; u_long reg, fsr; u_int space[4]; - int i; /* * `Decode' and execute instruction. Start with no exceptions. - * The type of any opf opcode is in the bottom two bits, so we + * The type of almost any OPF opcode is in the bottom two bits, so we * squish them out here. */ opf = insn & (IF_MASK(IF_F3_OP3_SHIFT, IF_F3_OP3_BITS) | @@ -359,7 +351,7 @@ __fpu_execute(struct utrapframe *uf, str __fpu_explode(fe, &fe->fe_f2, type, rs2); __fpu_compare(fe, 1, IF_F3_CC(insn)); return (__fpu_cmpck(fe)); - case FOP(INS2_FPop1, INSFP1_FMOV): /* these should all be pretty obvious */ + case FOP(INS2_FPop1, INSFP1_FMOV): __fpu_mov(fe, type, rd, rs2, 0, 0); return (0); case FOP(INS2_FPop1, INSFP1_FNEG): @@ -410,6 +402,7 @@ __fpu_execute(struct utrapframe *uf, str case FOP(INS2_FPop1, INSFP1_FxTOd): case FOP(INS2_FPop1, INSFP1_FxTOq): type = FTYPE_LNG; + rs2 = RN_DECODE(type, IF_F3_RS2(insn)); __fpu_explode(fe, fp = &fe->fe_f1, type, rs2); /* sneaky; depends on instruction encoding */ type = (IF_F3_OPF(insn) >> 2) & 3; @@ -418,8 +411,7 @@ __fpu_execute(struct utrapframe *uf, str case FOP(INS2_FPop1, INSFP1_FTOx): __fpu_explode(fe, fp = &fe->fe_f1, type, rs2); type = FTYPE_LNG; - mask = 1; /* needs 2 registers */ - rd = IF_F3_RD(insn) & ~mask; + rd = RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOs): case FOP(INS2_FPop1, INSFP1_FTOd): @@ -457,10 +449,10 @@ __fpu_execute(struct utrapframe *uf, str if (type == FTYPE_INT || type == FTYPE_SNG) __fpu_setreg(rd, space[0]); else { - for (i = 0; i < OPSZ(type); i += 2) { - __fpu_setreg64(rd + i, ((u_int64_t)space[i] << 32) | - space[i + 1]); - } + __fpu_setreg64(rd, ((u_int64_t)space[0] << 32) | space[1]); + if (type == FTYPE_EXT) + __fpu_setreg64(rd + 2, + ((u_int64_t)space[2] << 32) | space[3]); } return (0); /* success */ } Modified: stable/8/lib/libc/sparc64/fpu/fpu_emu.h ============================================================================== --- stable/8/lib/libc/sparc64/fpu/fpu_emu.h Mon Mar 15 18:27:51 2010 (r205182) +++ stable/8/lib/libc/sparc64/fpu/fpu_emu.h Mon Mar 15 18:32:57 2010 (r205183) @@ -140,7 +140,7 @@ struct fpn { #define FTYPE_SNG INSFP_s #define FTYPE_DBL INSFP_d #define FTYPE_EXT INSFP_q -#define FTYPE_LNG -1 +#define FTYPE_LNG 4 /* * Emulator state. From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:33:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17BA2106566B; Mon, 15 Mar 2010 18:33:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 057D98FC0A; Mon, 15 Mar 2010 18:33:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FIXNVM042463; Mon, 15 Mar 2010 18:33:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FIXNnb042460; Mon, 15 Mar 2010 18:33:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151833.o2FIXNnb042460@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 18:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205184 - stable/7/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 18:33:24 -0000 Author: marius Date: Mon Mar 15 18:33:23 2010 New Revision: 205184 URL: http://svn.freebsd.org/changeset/base/205184 Log: MFC: r204974, r205002 - The OPSZ macro actually only does the right thing for int32 and int64 operands but not for double and extended double ones. Instead of trying to fix the macro just nuke it and unroll the loops in the correct way though as extended double operands turn out to be the only special case. - For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded after setting type accordingly as it's generally decoded using the low 2 bits as the type, which are 0 for these three instructions. - Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be re-decoded using not only the operand mask appropriate for int64 but also the correct register number encoding. - Use const where appropriate. - Wrap long lines. Submitted by: Peter Jeremy (partly) Modified: stable/7/lib/libc/sparc64/fpu/fpu.c stable/7/lib/libc/sparc64/fpu/fpu_emu.h Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu.c Mon Mar 15 18:32:57 2010 (r205183) +++ stable/7/lib/libc/sparc64/fpu/fpu.c Mon Mar 15 18:33:23 2010 (r205184) @@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$"); #define X8(x) X4(x),X4(x) #define X16(x) X8(x),X8(x) -static char cx_to_trapx[] = { +static const char cx_to_trapx[] = { X1(FSR_NX), X2(FSR_DZ), X4(FSR_UF), @@ -113,7 +113,8 @@ int __fpe_debug = 0; #endif #endif /* FPU_DEBUG */ -static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, u_long); +static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, + u_long); /* * Need to use an fpstate on the stack; we could switch, so we cannot safely @@ -169,7 +170,7 @@ __fpu_exception(struct utrapframe *uf) void __fpu_dumpfpn(struct fpn *fp) { - static char *class[] = { + static const char *const class[] = { "SNAN", "QNAN", "ZERO", "NUM", "INF" }; @@ -181,15 +182,11 @@ __fpu_dumpfpn(struct fpn *fp) } #endif -static int opmask[] = {0, 0, 1, 3}; +static const int opmask[] = {0, 0, 1, 3, 1}; /* Decode 5 bit register field depending on the type. */ #define RN_DECODE(tp, rn) \ - ((tp == FTYPE_DBL || tp == FTYPE_EXT ? INSFPdq_RN((rn)) : (rn)) & \ - ~opmask[tp]) - -/* Operand size in 32-bit registers. */ -#define OPSZ(tp) ((tp) == FTYPE_LNG ? 2 : (1 << (tp))) + ((tp) >= FTYPE_DBL ? INSFPdq_RN(rn) & ~opmask[tp] : (rn)) /* * Helper for forming the below case statements. Build only the op3 and opf @@ -209,8 +206,6 @@ static void __fpu_mov(struct fpemu *fe, int type, int rd, int rs2, u_int32_t nand, u_int32_t xor) { - u_int64_t tmp64; - int i; if (type == FTYPE_INT || type == FTYPE_SNG) __fpu_setreg(rd, (__fpu_getreg(rs2) & ~nand) ^ xor); @@ -219,13 +214,10 @@ __fpu_mov(struct fpemu *fe, int type, in * Need to use the double versions to be able to access * the upper 32 fp registers. */ - for (i = 0; i < OPSZ(type); i += 2, rd += 2, rs2 += 2) { - tmp64 = __fpu_getreg64(rs2); - if (i == 0) - tmp64 = (tmp64 & ~((u_int64_t)nand << 32)) ^ - ((u_int64_t)xor << 32); - __fpu_setreg64(rd, tmp64); - } + __fpu_setreg64(rd, (__fpu_getreg64(rs2) & + ~((u_int64_t)nand << 32)) ^ ((u_int64_t)xor << 32)); + if (type == FTYPE_EXT) + __fpu_setreg64(rd + 2, __fpu_getreg64(rs2 + 2)); } } @@ -271,17 +263,17 @@ __fpu_cmpck(struct fpemu *fe) * multiply two integers this way. */ static int -__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, u_long tstate) +__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, + u_long tstate) { struct fpn *fp; int opf, rs1, rs2, rd, type, mask, cx, cond; u_long reg, fsr; u_int space[4]; - int i; /* * `Decode' and execute instruction. Start with no exceptions. - * The type of any opf opcode is in the bottom two bits, so we + * The type of almost any OPF opcode is in the bottom two bits, so we * squish them out here. */ opf = insn & (IF_MASK(IF_F3_OP3_SHIFT, IF_F3_OP3_BITS) | @@ -359,7 +351,7 @@ __fpu_execute(struct utrapframe *uf, str __fpu_explode(fe, &fe->fe_f2, type, rs2); __fpu_compare(fe, 1, IF_F3_CC(insn)); return (__fpu_cmpck(fe)); - case FOP(INS2_FPop1, INSFP1_FMOV): /* these should all be pretty obvious */ + case FOP(INS2_FPop1, INSFP1_FMOV): __fpu_mov(fe, type, rd, rs2, 0, 0); return (0); case FOP(INS2_FPop1, INSFP1_FNEG): @@ -410,6 +402,7 @@ __fpu_execute(struct utrapframe *uf, str case FOP(INS2_FPop1, INSFP1_FxTOd): case FOP(INS2_FPop1, INSFP1_FxTOq): type = FTYPE_LNG; + rs2 = RN_DECODE(type, IF_F3_RS2(insn)); __fpu_explode(fe, fp = &fe->fe_f1, type, rs2); /* sneaky; depends on instruction encoding */ type = (IF_F3_OPF(insn) >> 2) & 3; @@ -418,8 +411,7 @@ __fpu_execute(struct utrapframe *uf, str case FOP(INS2_FPop1, INSFP1_FTOx): __fpu_explode(fe, fp = &fe->fe_f1, type, rs2); type = FTYPE_LNG; - mask = 1; /* needs 2 registers */ - rd = IF_F3_RD(insn) & ~mask; + rd = RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOs): case FOP(INS2_FPop1, INSFP1_FTOd): @@ -457,10 +449,10 @@ __fpu_execute(struct utrapframe *uf, str if (type == FTYPE_INT || type == FTYPE_SNG) __fpu_setreg(rd, space[0]); else { - for (i = 0; i < OPSZ(type); i += 2) { - __fpu_setreg64(rd + i, ((u_int64_t)space[i] << 32) | - space[i + 1]); - } + __fpu_setreg64(rd, ((u_int64_t)space[0] << 32) | space[1]); + if (type == FTYPE_EXT) + __fpu_setreg64(rd + 2, + ((u_int64_t)space[2] << 32) | space[3]); } return (0); /* success */ } Modified: stable/7/lib/libc/sparc64/fpu/fpu_emu.h ============================================================================== --- stable/7/lib/libc/sparc64/fpu/fpu_emu.h Mon Mar 15 18:32:57 2010 (r205183) +++ stable/7/lib/libc/sparc64/fpu/fpu_emu.h Mon Mar 15 18:33:23 2010 (r205184) @@ -140,7 +140,7 @@ struct fpn { #define FTYPE_SNG INSFP_s #define FTYPE_DBL INSFP_d #define FTYPE_EXT INSFP_q -#define FTYPE_LNG -1 +#define FTYPE_LNG 4 /* * Emulator state. From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:33:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E2F106566B; Mon, 15 Mar 2010 18:33:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 029F78FC19; Mon, 15 Mar 2010 18:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FIXW2U042533; Mon, 15 Mar 2010 18:33:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FIXWf4042530; Mon, 15 Mar 2010 18:33:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151833.o2FIXWf4042530@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 18:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205185 - stable/6/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 18:33:33 -0000 Author: marius Date: Mon Mar 15 18:33:32 2010 New Revision: 205185 URL: http://svn.freebsd.org/changeset/base/205185 Log: MFC: r204974, r205002 - The OPSZ macro actually only does the right thing for int32 and int64 operands but not for double and extended double ones. Instead of trying to fix the macro just nuke it and unroll the loops in the correct way though as extended double operands turn out to be the only special case. - For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded after setting type accordingly as it's generally decoded using the low 2 bits as the type, which are 0 for these three instructions. - Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be re-decoded using not only the operand mask appropriate for int64 but also the correct register number encoding. - Use const where appropriate. - Wrap long lines. Submitted by: Peter Jeremy (partly) Modified: stable/6/lib/libc/sparc64/fpu/fpu.c stable/6/lib/libc/sparc64/fpu/fpu_emu.h Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu.c Mon Mar 15 18:33:23 2010 (r205184) +++ stable/6/lib/libc/sparc64/fpu/fpu.c Mon Mar 15 18:33:32 2010 (r205185) @@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$"); #define X8(x) X4(x),X4(x) #define X16(x) X8(x),X8(x) -static char cx_to_trapx[] = { +static const char cx_to_trapx[] = { X1(FSR_NX), X2(FSR_DZ), X4(FSR_UF), @@ -117,7 +117,8 @@ int __fpe_debug = 0; #endif #endif /* FPU_DEBUG */ -static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, u_long); +static int __fpu_execute(struct utrapframe *, struct fpemu *, u_int32_t, + u_long); /* * Need to use an fpstate on the stack; we could switch, so we cannot safely @@ -173,7 +174,7 @@ __fpu_exception(struct utrapframe *uf) void __fpu_dumpfpn(struct fpn *fp) { - static char *class[] = { + static const char *const class[] = { "SNAN", "QNAN", "ZERO", "NUM", "INF" }; @@ -185,15 +186,11 @@ __fpu_dumpfpn(struct fpn *fp) } #endif -static int opmask[] = {0, 0, 1, 3}; +static const int opmask[] = {0, 0, 1, 3, 1}; /* Decode 5 bit register field depending on the type. */ #define RN_DECODE(tp, rn) \ - ((tp == FTYPE_DBL || tp == FTYPE_EXT ? INSFPdq_RN((rn)) : (rn)) & \ - ~opmask[tp]) - -/* Operand size in 32-bit registers. */ -#define OPSZ(tp) ((tp) == FTYPE_LNG ? 2 : (1 << (tp))) + ((tp) >= FTYPE_DBL ? INSFPdq_RN(rn) & ~opmask[tp] : (rn)) /* * Helper for forming the below case statements. Build only the op3 and opf @@ -213,8 +210,6 @@ static void __fpu_mov(struct fpemu *fe, int type, int rd, int rs2, u_int32_t nand, u_int32_t xor) { - u_int64_t tmp64; - int i; if (type == FTYPE_INT || type == FTYPE_SNG) __fpu_setreg(rd, (__fpu_getreg(rs2) & ~nand) ^ xor); @@ -223,13 +218,10 @@ __fpu_mov(struct fpemu *fe, int type, in * Need to use the double versions to be able to access * the upper 32 fp registers. */ - for (i = 0; i < OPSZ(type); i += 2, rd += 2, rs2 += 2) { - tmp64 = __fpu_getreg64(rs2); - if (i == 0) - tmp64 = (tmp64 & ~((u_int64_t)nand << 32)) ^ - ((u_int64_t)xor << 32); - __fpu_setreg64(rd, tmp64); - } + __fpu_setreg64(rd, (__fpu_getreg64(rs2) & + ~((u_int64_t)nand << 32)) ^ ((u_int64_t)xor << 32)); + if (type == FTYPE_EXT) + __fpu_setreg64(rd + 2, __fpu_getreg64(rs2 + 2)); } } @@ -275,17 +267,17 @@ __fpu_cmpck(struct fpemu *fe) * multiply two integers this way. */ static int -__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, u_long tstate) +__fpu_execute(struct utrapframe *uf, struct fpemu *fe, u_int32_t insn, + u_long tstate) { struct fpn *fp; int opf, rs1, rs2, rd, type, mask, cx, cond; u_long reg, fsr; u_int space[4]; - int i; /* * `Decode' and execute instruction. Start with no exceptions. - * The type of any opf opcode is in the bottom two bits, so we + * The type of almost any OPF opcode is in the bottom two bits, so we * squish them out here. */ opf = insn & (IF_MASK(IF_F3_OP3_SHIFT, IF_F3_OP3_BITS) | @@ -363,7 +355,7 @@ __fpu_execute(struct utrapframe *uf, str __fpu_explode(fe, &fe->fe_f2, type, rs2); __fpu_compare(fe, 1, IF_F3_CC(insn)); return (__fpu_cmpck(fe)); - case FOP(INS2_FPop1, INSFP1_FMOV): /* these should all be pretty obvious */ + case FOP(INS2_FPop1, INSFP1_FMOV): __fpu_mov(fe, type, rd, rs2, 0, 0); return (0); case FOP(INS2_FPop1, INSFP1_FNEG): @@ -414,6 +406,7 @@ __fpu_execute(struct utrapframe *uf, str case FOP(INS2_FPop1, INSFP1_FxTOd): case FOP(INS2_FPop1, INSFP1_FxTOq): type = FTYPE_LNG; + rs2 = RN_DECODE(type, IF_F3_RS2(insn)); __fpu_explode(fe, fp = &fe->fe_f1, type, rs2); /* sneaky; depends on instruction encoding */ type = (IF_F3_OPF(insn) >> 2) & 3; @@ -422,8 +415,7 @@ __fpu_execute(struct utrapframe *uf, str case FOP(INS2_FPop1, INSFP1_FTOx): __fpu_explode(fe, fp = &fe->fe_f1, type, rs2); type = FTYPE_LNG; - mask = 1; /* needs 2 registers */ - rd = IF_F3_RD(insn) & ~mask; + rd = RN_DECODE(type, IF_F3_RD(insn)); break; case FOP(INS2_FPop1, INSFP1_FTOs): case FOP(INS2_FPop1, INSFP1_FTOd): @@ -461,10 +453,10 @@ __fpu_execute(struct utrapframe *uf, str if (type == FTYPE_INT || type == FTYPE_SNG) __fpu_setreg(rd, space[0]); else { - for (i = 0; i < OPSZ(type); i += 2) { - __fpu_setreg64(rd + i, ((u_int64_t)space[i] << 32) | - space[i + 1]); - } + __fpu_setreg64(rd, ((u_int64_t)space[0] << 32) | space[1]); + if (type == FTYPE_EXT) + __fpu_setreg64(rd + 2, + ((u_int64_t)space[2] << 32) | space[3]); } return (0); /* success */ } Modified: stable/6/lib/libc/sparc64/fpu/fpu_emu.h ============================================================================== --- stable/6/lib/libc/sparc64/fpu/fpu_emu.h Mon Mar 15 18:33:23 2010 (r205184) +++ stable/6/lib/libc/sparc64/fpu/fpu_emu.h Mon Mar 15 18:33:32 2010 (r205185) @@ -149,7 +149,7 @@ struct fpn { #define FTYPE_SNG INSFP_s #define FTYPE_DBL INSFP_d #define FTYPE_EXT INSFP_q -#define FTYPE_LNG -1 +#define FTYPE_LNG 4 /* * Emulator state. From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:04:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72894106566C; Mon, 15 Mar 2010 19:04:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 610FB8FC0C; Mon, 15 Mar 2010 19:04:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJ4ip0049548; Mon, 15 Mar 2010 19:04:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJ4iVn049545; Mon, 15 Mar 2010 19:04:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151904.o2FJ4iVn049545@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 19:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205186 - stable/8/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 19:04:44 -0000 Author: marius Date: Mon Mar 15 19:04:44 2010 New Revision: 205186 URL: http://svn.freebsd.org/changeset/base/205186 Log: MFC: r204144 Add support for BCM54K2 found in combination with Apple K2 GMAC. Submitted by: Andreas Tobler Obtained from: OpenBSD Modified: stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/miidevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Mon Mar 15 18:33:32 2010 (r205185) +++ stable/8/sys/dev/mii/brgphy.c Mon Mar 15 19:04:44 2010 (r205186) @@ -104,6 +104,7 @@ static void brgphy_reset(struct mii_soft static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); static void bcm5411_load_dspcode(struct mii_softc *); +static void bcm54k2_load_dspcode(struct mii_softc *); static void brgphy_fixup_5704_a0_bug(struct mii_softc *); static void brgphy_fixup_adc_bug(struct mii_softc *); static void brgphy_fixup_adjust_trim(struct mii_softc *); @@ -117,6 +118,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM, BCM5400), MII_PHY_DESC(xxBROADCOM, BCM5401), MII_PHY_DESC(xxBROADCOM, BCM5411), + MII_PHY_DESC(xxBROADCOM, BCM54K2), MII_PHY_DESC(xxBROADCOM, BCM5701), MII_PHY_DESC(xxBROADCOM, BCM5703), MII_PHY_DESC(xxBROADCOM, BCM5704), @@ -415,6 +417,9 @@ brgphy_service(struct mii_softc *sc, str case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: @@ -730,6 +735,24 @@ bcm5411_load_dspcode(struct mii_softc *s PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } +void +bcm54k2_load_dspcode(struct mii_softc *sc) +{ + static const struct { + int reg; + uint16_t val; + } dspcode[] = { + { 4, 0x01e1 }, + { 9, 0x0300 }, + { 0, 0 }, + }; + int i; + + for (i = 0; dspcode[i].reg != 0; i++) + PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); + +} + static void brgphy_fixup_5704_a0_bug(struct mii_softc *sc) { @@ -932,6 +955,9 @@ brgphy_reset(struct mii_softc *sc) case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Mon Mar 15 18:33:32 2010 (r205185) +++ stable/8/sys/dev/mii/miidevs Mon Mar 15 19:04:44 2010 (r205186) @@ -145,6 +145,7 @@ model xxBROADCOM BCM5703 0x0016 BCM5703 model xxBROADCOM BCM5704 0x0019 BCM5704 10/100/1000baseTX PHY model xxBROADCOM BCM5705 0x001a BCM5705 10/100/1000baseTX PHY model xxBROADCOM BCM5750 0x0018 BCM5750 10/100/1000baseTX PHY +model xxBROADCOM BCM54K2 0x002e BCM54K2 10/100/1000baseTX PHY model xxBROADCOM BCM5714 0x0034 BCM5714 10/100/1000baseTX PHY model xxBROADCOM BCM5780 0x0035 BCM5780 10/100/1000baseTX PHY model xxBROADCOM BCM5708C 0x0036 BCM5708C 10/100/1000baseTX PHY From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:04:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9B18106577B; Mon, 15 Mar 2010 19:04:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A89278FC16; Mon, 15 Mar 2010 19:04:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJ4pfH049588; Mon, 15 Mar 2010 19:04:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJ4pUU049585; Mon, 15 Mar 2010 19:04:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151904.o2FJ4pUU049585@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 19:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205187 - stable/7/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 19:04:51 -0000 Author: marius Date: Mon Mar 15 19:04:51 2010 New Revision: 205187 URL: http://svn.freebsd.org/changeset/base/205187 Log: MFC: r204144 Add support for BCM54K2 found in combination with Apple K2 GMAC. Submitted by: Andreas Tobler Obtained from: OpenBSD Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Mon Mar 15 19:04:44 2010 (r205186) +++ stable/7/sys/dev/mii/brgphy.c Mon Mar 15 19:04:51 2010 (r205187) @@ -104,6 +104,7 @@ static void brgphy_reset(struct mii_soft static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); static void bcm5411_load_dspcode(struct mii_softc *); +static void bcm54k2_load_dspcode(struct mii_softc *); static void brgphy_fixup_5704_a0_bug(struct mii_softc *); static void brgphy_fixup_adc_bug(struct mii_softc *); static void brgphy_fixup_adjust_trim(struct mii_softc *); @@ -117,6 +118,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM, BCM5400), MII_PHY_DESC(xxBROADCOM, BCM5401), MII_PHY_DESC(xxBROADCOM, BCM5411), + MII_PHY_DESC(xxBROADCOM, BCM54K2), MII_PHY_DESC(xxBROADCOM, BCM5701), MII_PHY_DESC(xxBROADCOM, BCM5703), MII_PHY_DESC(xxBROADCOM, BCM5704), @@ -415,6 +417,9 @@ brgphy_service(struct mii_softc *sc, str case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: @@ -718,6 +723,24 @@ bcm5411_load_dspcode(struct mii_softc *s PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } +void +bcm54k2_load_dspcode(struct mii_softc *sc) +{ + static const struct { + int reg; + uint16_t val; + } dspcode[] = { + { 4, 0x01e1 }, + { 9, 0x0300 }, + { 0, 0 }, + }; + int i; + + for (i = 0; dspcode[i].reg != 0; i++) + PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); + +} + static void brgphy_fixup_5704_a0_bug(struct mii_softc *sc) { @@ -920,6 +943,9 @@ brgphy_reset(struct mii_softc *sc) case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Mon Mar 15 19:04:44 2010 (r205186) +++ stable/7/sys/dev/mii/miidevs Mon Mar 15 19:04:51 2010 (r205187) @@ -140,6 +140,7 @@ model xxBROADCOM BCM5703 0x0016 BCM5703 model xxBROADCOM BCM5704 0x0019 BCM5704 10/100/1000baseTX PHY model xxBROADCOM BCM5705 0x001a BCM5705 10/100/1000baseTX PHY model xxBROADCOM BCM5750 0x0018 BCM5750 10/100/1000baseTX PHY +model xxBROADCOM BCM54K2 0x002e BCM54K2 10/100/1000baseTX PHY model xxBROADCOM BCM5714 0x0034 BCM5714 10/100/1000baseTX PHY model xxBROADCOM BCM5780 0x0035 BCM5780 10/100/1000baseTX PHY model xxBROADCOM BCM5708C 0x0036 BCM5708C 10/100/1000baseTX PHY From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:04:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1D84106564A; Mon, 15 Mar 2010 19:04:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60A18FC17; Mon, 15 Mar 2010 19:04:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJ4uDo049657; Mon, 15 Mar 2010 19:04:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJ4uT3049654; Mon, 15 Mar 2010 19:04:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151904.o2FJ4uT3049654@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 19:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205188 - stable/6/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 19:04:57 -0000 Author: marius Date: Mon Mar 15 19:04:56 2010 New Revision: 205188 URL: http://svn.freebsd.org/changeset/base/205188 Log: MFC: r204144 Add support for BCM54K2 found in combination with Apple K2 GMAC. Submitted by: Andreas Tobler Obtained from: OpenBSD Modified: stable/6/sys/dev/mii/brgphy.c stable/6/sys/dev/mii/miidevs Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/mii/brgphy.c ============================================================================== --- stable/6/sys/dev/mii/brgphy.c Mon Mar 15 19:04:51 2010 (r205187) +++ stable/6/sys/dev/mii/brgphy.c Mon Mar 15 19:04:56 2010 (r205188) @@ -104,6 +104,7 @@ static void brgphy_reset(struct mii_soft static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); static void bcm5411_load_dspcode(struct mii_softc *); +static void bcm54k2_load_dspcode(struct mii_softc *); static void brgphy_fixup_5704_a0_bug(struct mii_softc *); static void brgphy_fixup_adc_bug(struct mii_softc *); static void brgphy_fixup_adjust_trim(struct mii_softc *); @@ -117,6 +118,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM, BCM5400), MII_PHY_DESC(xxBROADCOM, BCM5401), MII_PHY_DESC(xxBROADCOM, BCM5411), + MII_PHY_DESC(xxBROADCOM, BCM54K2), MII_PHY_DESC(xxBROADCOM, BCM5701), MII_PHY_DESC(xxBROADCOM, BCM5703), MII_PHY_DESC(xxBROADCOM, BCM5704), @@ -418,6 +420,9 @@ brgphy_service(struct mii_softc *sc, str case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: @@ -717,6 +722,24 @@ bcm5411_load_dspcode(struct mii_softc *s PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } +void +bcm54k2_load_dspcode(struct mii_softc *sc) +{ + static const struct { + int reg; + uint16_t val; + } dspcode[] = { + { 4, 0x01e1 }, + { 9, 0x0300 }, + { 0, 0 }, + }; + int i; + + for (i = 0; dspcode[i].reg != 0; i++) + PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); + +} + static void brgphy_fixup_5704_a0_bug(struct mii_softc *sc) { @@ -917,6 +940,9 @@ brgphy_reset(struct mii_softc *sc) case MII_MODEL_xxBROADCOM_BCM5411: bcm5411_load_dspcode(sc); break; + case MII_MODEL_xxBROADCOM_BCM54K2: + bcm54k2_load_dspcode(sc); + break; } break; case MII_OUI_xxBROADCOM_ALT1: Modified: stable/6/sys/dev/mii/miidevs ============================================================================== --- stable/6/sys/dev/mii/miidevs Mon Mar 15 19:04:51 2010 (r205187) +++ stable/6/sys/dev/mii/miidevs Mon Mar 15 19:04:56 2010 (r205188) @@ -131,6 +131,7 @@ model xxBROADCOM BCM5703 0x0016 BCM5703 model xxBROADCOM BCM5704 0x0019 BCM5704 10/100/1000baseTX PHY model xxBROADCOM BCM5705 0x001a BCM5705 10/100/1000baseTX PHY model xxBROADCOM BCM5750 0x0018 BCM5750 10/100/1000baseTX PHY +model xxBROADCOM BCM54K2 0x002e BCM54K2 10/100/1000baseTX PHY model xxBROADCOM BCM5714 0x0034 BCM5714 10/100/1000baseTX PHY model xxBROADCOM BCM5780 0x0035 BCM5780 10/100/1000baseTX PHY model xxBROADCOM BCM5708C 0x0036 BCM5708C 10/100/1000baseTX PHY From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:13:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E3DB1065672; Mon, 15 Mar 2010 19:13:37 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1538FC16; Mon, 15 Mar 2010 19:13:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJDbFt051710; Mon, 15 Mar 2010 19:13:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJDbZD051708; Mon, 15 Mar 2010 19:13:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151913.o2FJDbZD051708@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 19:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205189 - stable/8/sys/dev/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 19:13:37 -0000 Author: marius Date: Mon Mar 15 19:13:36 2010 New Revision: 205189 URL: http://svn.freebsd.org/changeset/base/205189 Log: MFC: r204222 According to the Linux sungem driver, in case of Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered down the chip so the internal transceiver has to be hardcoded. This is also in line with the AppleGMACEthernet driver, which just doesn't distinguish between internal/external transceiver and MDIO/MDI1 respectively in the first place. Tested by: Andreas Tobler Modified: stable/8/sys/dev/gem/if_gem.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/gem/if_gem.c ============================================================================== --- stable/8/sys/dev/gem/if_gem.c Mon Mar 15 19:04:56 2010 (r205188) +++ stable/8/sys/dev/gem/if_gem.c Mon Mar 15 19:13:36 2010 (r205189) @@ -297,8 +297,11 @@ gem_attach(struct gem_softc *sc) /* * Fall back on an internal PHY if no external PHY was found. + * Note that with Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 can't be + * trusted when the firmware has powered down the chip. */ - if (error != 0 && (v & GEM_MIF_CONFIG_MDI0) != 0) { + if (error != 0 && + ((v & GEM_MIF_CONFIG_MDI0) != 0 || GEM_IS_APPLE(sc))) { v &= ~GEM_MIF_CONFIG_PHY_SEL; GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); switch (sc->sc_variant) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:13:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9915106564A; Mon, 15 Mar 2010 19:13:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 929D38FC19; Mon, 15 Mar 2010 19:13:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJDnWi051782; Mon, 15 Mar 2010 19:13:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJDnor051780; Mon, 15 Mar 2010 19:13:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151913.o2FJDnor051780@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 19:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205190 - stable/7/sys/dev/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 19:13:50 -0000 Author: marius Date: Mon Mar 15 19:13:49 2010 New Revision: 205190 URL: http://svn.freebsd.org/changeset/base/205190 Log: MFC: r204222 According to the Linux sungem driver, in case of Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered down the chip so the internal transceiver has to be hardcoded. This is also in line with the AppleGMACEthernet driver, which just doesn't distinguish between internal/external transceiver and MDIO/MDI1 respectively in the first place. Tested by: Andreas Tobler Modified: stable/7/sys/dev/gem/if_gem.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/gem/if_gem.c ============================================================================== --- stable/7/sys/dev/gem/if_gem.c Mon Mar 15 19:13:36 2010 (r205189) +++ stable/7/sys/dev/gem/if_gem.c Mon Mar 15 19:13:49 2010 (r205190) @@ -297,8 +297,11 @@ gem_attach(struct gem_softc *sc) /* * Fall back on an internal PHY if no external PHY was found. + * Note that with Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 can't be + * trusted when the firmware has powered down the chip. */ - if (error != 0 && (v & GEM_MIF_CONFIG_MDI0) != 0) { + if (error != 0 && + ((v & GEM_MIF_CONFIG_MDI0) != 0 || GEM_IS_APPLE(sc))) { v &= ~GEM_MIF_CONFIG_PHY_SEL; GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); switch (sc->sc_variant) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:13:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 348E6106566C; Mon, 15 Mar 2010 19:13:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23C4F8FC08; Mon, 15 Mar 2010 19:13:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJDrmM051817; Mon, 15 Mar 2010 19:13:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJDr3L051815; Mon, 15 Mar 2010 19:13:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003151913.o2FJDr3L051815@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Mar 2010 19:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205191 - stable/6/sys/dev/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 19:13:53 -0000 Author: marius Date: Mon Mar 15 19:13:52 2010 New Revision: 205191 URL: http://svn.freebsd.org/changeset/base/205191 Log: MFC: r204222 According to the Linux sungem driver, in case of Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered down the chip so the internal transceiver has to be hardcoded. This is also in line with the AppleGMACEthernet driver, which just doesn't distinguish between internal/external transceiver and MDIO/MDI1 respectively in the first place. Tested by: Andreas Tobler Modified: stable/6/sys/dev/gem/if_gem.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/gem/if_gem.c ============================================================================== --- stable/6/sys/dev/gem/if_gem.c Mon Mar 15 19:13:49 2010 (r205190) +++ stable/6/sys/dev/gem/if_gem.c Mon Mar 15 19:13:52 2010 (r205191) @@ -298,8 +298,11 @@ gem_attach(struct gem_softc *sc) /* * Fall back on an internal PHY if no external PHY was found. + * Note that with Apple (K2) GMACs GEM_MIF_CONFIG_MDI0 can't be + * trusted when the firmware has powered down the chip. */ - if (error != 0 && (v & GEM_MIF_CONFIG_MDI0) != 0) { + if (error != 0 && + ((v & GEM_MIF_CONFIG_MDI0) != 0 || GEM_IS_APPLE(sc))) { v &= ~GEM_MIF_CONFIG_PHY_SEL; GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); switch (sc->sc_variant) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:51:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55D22106566B; Mon, 15 Mar 2010 19:51:25 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ACD98FC18; Mon, 15 Mar 2010 19:51:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJpPHU060182; Mon, 15 Mar 2010 19:51:25 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJpP8Y060179; Mon, 15 Mar 2010 19:51:25 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201003151951.o2FJpP8Y060179@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 15 Mar 2010 19:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205192 - in stable/8/sys/arm/mv: . kirkwood X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 19:51:25 -0000 Author: raj Date: Mon Mar 15 19:51:24 2010 New Revision: 205192 URL: http://svn.freebsd.org/changeset/base/205192 Log: MFC r204764 Provide correct TCLK value for Kirkwood A1 silicon revision. While there improve SOC ID output accordingly. Obtained from: Semihalf Modified: stable/8/sys/arm/mv/common.c stable/8/sys/arm/mv/kirkwood/kirkwood.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/mv/common.c ============================================================================== --- stable/8/sys/arm/mv/common.c Mon Mar 15 19:13:52 2010 (r205191) +++ stable/8/sys/arm/mv/common.c Mon Mar 15 19:51:24 2010 (r205192) @@ -261,6 +261,8 @@ soc_identify(void) rev = "Z0"; else if (r == 2) rev = "A0"; + else if (r == 3) + rev = "A1"; break; case MV_DEV_MV78100_Z0: dev = "Marvell MV78100 Z0"; Modified: stable/8/sys/arm/mv/kirkwood/kirkwood.c ============================================================================== --- stable/8/sys/arm/mv/kirkwood/kirkwood.c Mon Mar 15 19:13:52 2010 (r205191) +++ stable/8/sys/arm/mv/kirkwood/kirkwood.c Mon Mar 15 19:51:24 2010 (r205192) @@ -176,11 +176,11 @@ get_tclk(void) /* * On Kirkwood TCLK is not configurable and depends on silicon * revision: - * - A0 has TCLK hardcoded to 200 MHz. + * - A0 and A1 have TCLK hardcoded to 200 MHz. * - Z0 and others have TCLK hardcoded to 166 MHz. */ soc_id(&dev, &rev); - if (dev == MV_DEV_88F6281 && rev == 2) + if (dev == MV_DEV_88F6281 && (rev == 2 || rev == 3)) return (TCLK_200MHZ); return (TCLK_166MHZ); From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 19:59:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6442106566B; Mon, 15 Mar 2010 19:59:16 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA0298FC18; Mon, 15 Mar 2010 19:59:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FJxGST061942; Mon, 15 Mar 2010 19:59:16 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FJxGHI061939; Mon, 15 Mar 2010 19:59:16 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201003151959.o2FJxGHI061939@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 15 Mar 2010 19:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205193 - stable/8/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 19:59:17 -0000 Author: raj Date: Mon Mar 15 19:59:16 2010 New Revision: 205193 URL: http://svn.freebsd.org/changeset/base/205193 Log: MFC r205028 Fix ARM cache handling yet more. 1) vm_machdep.c: remove the dangling allocations so they do not un-necessarily turn off the cache upon consecutive access. 2) busdma_machdep.c: remove the same amount than shadow mapped. Reported by: Maks Verver Submitted by: Mark Tinguely Reviewed by: Grzegorz Bernacki Modified: stable/8/sys/arm/arm/busdma_machdep.c stable/8/sys/arm/arm/vm_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/arm/busdma_machdep.c ============================================================================== --- stable/8/sys/arm/arm/busdma_machdep.c Mon Mar 15 19:51:24 2010 (r205192) +++ stable/8/sys/arm/arm/busdma_machdep.c Mon Mar 15 19:59:16 2010 (r205193) @@ -649,7 +649,8 @@ bus_dmamem_free(bus_dma_tag_t dmat, void KASSERT(map->allocbuffer == vaddr, ("Trying to freeing the wrong DMA buffer")); vaddr = map->origbuffer; - arm_unmap_nocache(map->allocbuffer, dmat->maxsize); + arm_unmap_nocache(map->allocbuffer, + dmat->maxsize + ((vm_offset_t)vaddr & PAGE_MASK)); } if (dmat->maxsize <= PAGE_SIZE && dmat->alignment < dmat->maxsize && Modified: stable/8/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/8/sys/arm/arm/vm_machdep.c Mon Mar 15 19:51:24 2010 (r205192) +++ stable/8/sys/arm/arm/vm_machdep.c Mon Mar 15 19:59:16 2010 (r205193) @@ -171,6 +171,9 @@ sf_buf_free(struct sf_buf *sf) if (sf->ref_count == 0) { TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); nsfbufsused--; + pmap_kremove(sf->kva); + sf->m = NULL; + LIST_REMOVE(sf, list_entry); if (sf_buf_alloc_want > 0) wakeup_one(&sf_buf_freelist); } @@ -502,9 +505,12 @@ arm_unmap_nocache(void *addr, vm_size_t size = round_page(size); i = (raddr - arm_nocache_startaddr) / (PAGE_SIZE); - for (; size > 0; size -= PAGE_SIZE, i++) + for (; size > 0; size -= PAGE_SIZE, i++) { arm_nocache_allocated[i / BITS_PER_INT] &= ~(1 << (i % BITS_PER_INT)); + pmap_kremove(raddr); + raddr += PAGE_SIZE; + } } #ifdef ARM_USE_SMALL_ALLOC From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 20:04:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09BEE106564A; Mon, 15 Mar 2010 20:04:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAE328FC12; Mon, 15 Mar 2010 20:04:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FK4Sgs063155; Mon, 15 Mar 2010 20:04:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FK4Scs063147; Mon, 15 Mar 2010 20:04:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003152004.o2FK4Scs063147@svn.freebsd.org> From: Xin LI Date: Mon, 15 Mar 2010 20:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205194 - in vendor/libz/dist: . contrib contrib/asm686 contrib/gcc_gvmat64 contrib/inflate86 doc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 20:04:29 -0000 Author: delphij Date: Mon Mar 15 20:04:28 2010 New Revision: 205194 URL: http://svn.freebsd.org/changeset/base/205194 Log: Vendor import of zlib 1.2.4 (trimmed). Added: vendor/libz/dist/contrib/ vendor/libz/dist/contrib/README.contrib vendor/libz/dist/contrib/asm686/ vendor/libz/dist/contrib/asm686/README.686 vendor/libz/dist/contrib/asm686/match.S (contents, props changed) vendor/libz/dist/contrib/gcc_gvmat64/ vendor/libz/dist/contrib/gcc_gvmat64/gvmat64.S (contents, props changed) vendor/libz/dist/contrib/inflate86/ vendor/libz/dist/contrib/inflate86/inffas86.c (contents, props changed) vendor/libz/dist/contrib/inflate86/inffast.S (contents, props changed) vendor/libz/dist/doc/ vendor/libz/dist/doc/algorithm.txt (contents, props changed) vendor/libz/dist/doc/rfc1950.txt (contents, props changed) vendor/libz/dist/doc/rfc1951.txt (contents, props changed) vendor/libz/dist/doc/rfc1952.txt (contents, props changed) vendor/libz/dist/doc/txtvsbin.txt (contents, props changed) vendor/libz/dist/gzclose.c (contents, props changed) vendor/libz/dist/gzguts.h (contents, props changed) vendor/libz/dist/gzlib.c (contents, props changed) vendor/libz/dist/gzread.c (contents, props changed) vendor/libz/dist/gzwrite.c (contents, props changed) Deleted: vendor/libz/dist/INDEX vendor/libz/dist/Makefile vendor/libz/dist/algorithm.txt vendor/libz/dist/gzio.c Modified: vendor/libz/dist/ChangeLog vendor/libz/dist/FAQ vendor/libz/dist/README vendor/libz/dist/adler32.c vendor/libz/dist/compress.c vendor/libz/dist/crc32.c vendor/libz/dist/deflate.c vendor/libz/dist/deflate.h vendor/libz/dist/example.c vendor/libz/dist/infback.c vendor/libz/dist/inffast.c vendor/libz/dist/inflate.c vendor/libz/dist/inflate.h vendor/libz/dist/inftrees.c vendor/libz/dist/inftrees.h vendor/libz/dist/minigzip.c vendor/libz/dist/trees.c vendor/libz/dist/uncompr.c vendor/libz/dist/zconf.h vendor/libz/dist/zlib.3 vendor/libz/dist/zlib.h vendor/libz/dist/zutil.c vendor/libz/dist/zutil.h Modified: vendor/libz/dist/ChangeLog ============================================================================== --- vendor/libz/dist/ChangeLog Mon Mar 15 19:59:16 2010 (r205193) +++ vendor/libz/dist/ChangeLog Mon Mar 15 20:04:28 2010 (r205194) @@ -1,6 +1,281 @@ ChangeLog file for zlib +Changes in 1.2.4 (14 Mar 2010) +- Fix VER3 extraction in configure for no fourth subversion +- Update zlib.3, add docs to Makefile.in to make .pdf out of it +- Add zlib.3.pdf to distribution +- Don't set error code in gzerror() if passed pointer is NULL +- Apply destination directory fixes to CMakeLists.txt [Lowman] +- Move #cmakedefine's to a new zconf.in.cmakein +- Restore zconf.h for builds that don't use configure or cmake +- Add distclean to dummy Makefile for convenience +- Update and improve INDEX, README, and FAQ +- Update CMakeLists.txt for the return of zconf.h [Lowman] +- Update contrib/vstudio/vc9 and vc10 [Vollant] +- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc +- Apply license and readme changes to contrib/asm686 [Raiter] +- Check file name lengths and add -c option in minigzip.c [Li] +- Update contrib/amd64 and contrib/masmx86/ [Vollant] +- Avoid use of "eof" parameter in trees.c to not shadow library variable +- Update make_vms.com for removal of zlibdefs.h [Zinser] +- Update assembler code and vstudio projects in contrib [Vollant] +- Remove outdated assembler code contrib/masm686 and contrib/asm586 +- Remove old vc7 and vc8 from contrib/vstudio +- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] +- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() +- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] +- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) +- Fix bug in void-returning vsprintf() case in gzwrite.c +- Fix name change from inflate.h in contrib/inflate86/inffas86.c +- Check if temporary file exists before removing in make_vms.com [Zinser] +- Fix make install and uninstall for --static option +- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] +- Update readme.txt in contrib/masmx64 and masmx86 to assemble + +Changes in 1.2.3.9 (21 Feb 2010) +- Expunge gzio.c +- Move as400 build information to old +- Fix updates in contrib/minizip and contrib/vstudio +- Add const to vsnprintf test in configure to avoid warnings [Weigelt] +- Delete zconf.h (made by configure) [Weigelt] +- Change zconf.in.h to zconf.h.in per convention [Weigelt] +- Check for NULL buf in gzgets() +- Return empty string for gzgets() with len == 1 (like fgets()) +- Fix description of gzgets() in zlib.h for end-of-file, NULL return +- Update minizip to 1.1 [Vollant] +- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c +- Note in zlib.h that gzerror() should be used to distinguish from EOF +- Remove use of snprintf() from gzlib.c +- Fix bug in gzseek() +- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] +- Fix zconf.h generation in CMakeLists.txt [Lowman] +- Improve comments in zconf.h where modified by configure + +Changes in 1.2.3.8 (13 Feb 2010) +- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] +- Use z_off64_t in gz_zero() and gz_skip() to match state->skip +- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) +- Revert to Makefile.in from 1.2.3.6 (live with the clutter) +- Fix missing error return in gzflush(), add zlib.h note +- Add *64 functions to zlib.map [Levin] +- Fix signed/unsigned comparison in gz_comp() +- Use SFLAGS when testing shared linking in configure +- Add --64 option to ./configure to use -m64 with gcc +- Fix ./configure --help to correctly name options +- Have make fail if a test fails [Levin] +- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] +- Remove assembler object files from contrib + +Changes in 1.2.3.7 (24 Jan 2010) +- Always gzopen() with O_LARGEFILE if available +- Fix gzdirect() to work immediately after gzopen() or gzdopen() +- Make gzdirect() more precise when the state changes while reading +- Improve zlib.h documentation in many places +- Catch memory allocation failure in gz_open() +- Complete close operation if seek forward in gzclose_w() fails +- Return Z_ERRNO from gzclose_r() if close() fails +- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL +- Return zero for gzwrite() errors to match zlib.h description +- Return -1 on gzputs() error to match zlib.h description +- Add zconf.in.h to allow recovery from configure modification [Weigelt] +- Fix static library permissions in Makefile.in [Weigelt] +- Avoid warnings in configure tests that hide functionality [Weigelt] +- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] +- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] +- Avoid access of uninitialized data for first inflateReset2 call [Gomes] +- Keep object files in subdirectories to reduce the clutter somewhat +- Remove default Makefile and zlibdefs.h, add dummy Makefile +- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ +- Remove zlibdefs.h completely -- modify zconf.h instead + +Changes in 1.2.3.6 (17 Jan 2010) +- Avoid void * arithmetic in gzread.c and gzwrite.c +- Make compilers happier with const char * for gz_error message +- Avoid unused parameter warning in inflate.c +- Avoid signed-unsigned comparison warning in inflate.c +- Indent #pragma's for traditional C +- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() +- Correct email address in configure for system options +- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] +- Update zlib.map [Brown] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Tšršk] +- Apply various fixes to CMakeLists.txt [Lowman] +- Add checks on len in gzread() and gzwrite() +- Add error message for no more room for gzungetc() +- Remove zlib version check in gzwrite() +- Defer compression of gzprintf() result until need to +- Use snprintf() in gzdopen() if available +- Remove USE_MMAP configuration determination (only used by minigzip) +- Remove examples/pigz.c (available separately) +- Update examples/gun.c to 1.6 + +Changes in 1.2.3.5 (8 Jan 2010) +- Add space after #if in zutil.h for some compilers +- Fix relatively harmless bug in deflate_fast() [Exarevsky] +- Fix same problem in deflate_slow() +- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] +- Add deflate_rle() for faster Z_RLE strategy run-length encoding +- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding +- Change name of "write" variable in inffast.c to avoid library collisions +- Fix premature EOF from gzread() in gzio.c [Brown] +- Use zlib header window size if windowBits is 0 in inflateInit2() +- Remove compressBound() call in deflate.c to avoid linking compress.o +- Replace use of errno in gz* with functions, support WinCE [Alves] +- Provide alternative to perror() in minigzip.c for WinCE [Alves] +- Don't use _vsnprintf on later versions of MSVC [Lowman] +- Add CMake build script and input file [Lowman] +- Update contrib/minizip to 1.1 [Svensson, Vollant] +- Moved nintendods directory from contrib to . +- Replace gzio.c with a new set of routines with the same functionality +- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above +- Update contrib/minizip to 1.1b +- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h + +Changes in 1.2.3.4 (21 Dec 2009) +- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility +- Update comments in configure and Makefile.in for default --shared +- Fix test -z's in configure [Marquess] +- Build examplesh and minigzipsh when not testing +- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h +- Import LDFLAGS from the environment in configure +- Fix configure to populate SFLAGS with discovered CFLAGS options +- Adapt make_vms.com to the new Makefile.in [Zinser] +- Add zlib2ansi script for C++ compilation [Marquess] +- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) +- Add AMD64 assembler code for longest match to contrib [Teterin] +- Include options from $SFLAGS when doing $LDSHARED +- Simplify 64-bit file support by introducing z_off64_t type +- Make shared object files in objs directory to work around old Sun cc +- Use only three-part version number for Darwin shared compiles +- Add rc option to ar in Makefile.in for when ./configure not run +- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* +- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile +- Protect against _FILE_OFFSET_BITS being defined when compiling zlib +- Rename Makefile.in targets allstatic to static and allshared to shared +- Fix static and shared Makefile.in targets to be independent +- Correct error return bug in gz_open() by setting state [Brown] +- Put spaces before ;;'s in configure for better sh compatibility +- Add pigz.c (parallel implementation of gzip) to examples/ +- Correct constant in crc32.c to UL [Leventhal] +- Reject negative lengths in crc32_combine() +- Add inflateReset2() function to work like inflateEnd()/inflateInit2() +- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] +- Correct typo in doc/algorithm.txt [Janik] +- Fix bug in adler32_combine() [Zhu] +- Catch missing-end-of-block-code error in all inflates and in puff + Assures that random input to inflate eventually results in an error +- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ +- Update ENOUGH and its usage to reflect discovered bounds +- Fix gzerror() error report on empty input file [Brown] +- Add ush casts in trees.c to avoid pedantic runtime errors +- Fix typo in zlib.h uncompress() description [Reiss] +- Correct inflate() comments with regard to automatic header detection +- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) +- Put new version of gzlog (2.0) in examples with interruption recovery +- Add puff compile option to permit invalid distance-too-far streams +- Add puff TEST command options, ability to read piped input +- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but + _LARGEFILE64_SOURCE not defined +- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart +- Fix deflateSetDictionary() to use all 32K for output consistency +- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) +- Clear bytes after deflate lookahead to avoid use of uninitialized data +- Change a limit in inftrees.c to be more transparent to Coverity Prevent +- Update win32/zlib.def with exported symbols from zlib.h +- Correct spelling error in zlib.h [Willem] +- Allow Z_BLOCK for deflate() to force a new block +- Allow negative bits in inflatePrime() to delete existing bit buffer +- Add Z_TREES flush option to inflate() to return at end of trees +- Add inflateMark() to return current state information for random access +- Add Makefile for NintendoDS to contrib [Costa] +- Add -w in configure compile tests to avoid spurious warnings [Beucler] +- Fix typos in zlib.h comments for deflateSetDictionary() +- Fix EOF detection in transparent gzread() [Maier] + +Changes in 1.2.3.3 (2 October 2006) +- Make --shared the default for configure, add a --static option +- Add compile option to permit invalid distance-too-far streams +- Add inflateUndermine() function which is required to enable above +- Remove use of "this" variable name for C++ compatibility [Marquess] +- Add testing of shared library in make test, if shared library built +- Use ftello() and fseeko() if available instead of ftell() and fseek() +- Provide two versions of all functions that use the z_off_t type for + binary compatibility -- a normal version and a 64-bit offset version, + per the Large File Support Extension when _LARGEFILE64_SOURCE is + defined; use the 64-bit versions by default when _FILE_OFFSET_BITS + is defined to be 64 +- Add a --uname= option to configure to perhaps help with cross-compiling + +Changes in 1.2.3.2 (3 September 2006) +- Turn off silly Borland warnings [Hay] +- Use off64_t and define _LARGEFILE64_SOURCE when present +- Fix missing dependency on inffixed.h in Makefile.in +- Rig configure --shared to build both shared and static [Teredesai, Truta] +- Remove zconf.in.h and instead create a new zlibdefs.h file +- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] +- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] + +Changes in 1.2.3.1 (16 August 2006) +- Add watcom directory with OpenWatcom make files [Daniel] +- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] +- Update make_vms.com [Zinser] +- Use -fPIC for shared build in configure [Teredesai, Nicholson] +- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck] +- Add some FAQ entries about the contrib directory +- Update the MVS question in the FAQ +- Avoid extraneous reads after EOF in gzio.c [Brown] +- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] +- Add comments to zlib.h about gzerror() usage [Brown] +- Set extra flags in gzip header in gzopen() like deflate() does +- Make configure options more compatible with double-dash conventions + [Weigelt] +- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] +- Fix uninstall target in Makefile.in [Truta] +- Add pkgconfig support [Weigelt] +- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] +- Replace set_data_type() with a more accurate detect_data_type() in + trees.c, according to the txtvsbin.txt document [Truta] +- Swap the order of #include and #include "zlib.h" in + gzio.c, example.c and minigzip.c [Truta] +- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, + Truta] (where?) +- Fix target "clean" from win32/Makefile.bor [Truta] +- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] +- Update zlib www home address in win32/DLL_FAQ.txt [Truta] +- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] +- Enable browse info in the "Debug" and "ASM Debug" configurations in + the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] +- Add pkgconfig support [Weigelt] +- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, + for use in win32/zlib1.rc [Polushin, Rowe, Truta] +- Add a document that explains the new text detection scheme to + doc/txtvsbin.txt [Truta] +- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] +- Move algorithm.txt into doc/ [Truta] +- Synchronize FAQ with website +- Fix compressBound(), was low for some pathological cases [Fearnley] +- Take into account wrapper variations in deflateBound() +- Set examples/zpipe.c input and output to binary mode for Windows +- Update examples/zlib_how.html with new zpipe.c (also web site) +- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems + that gcc became pickier in 4.0) +- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain + un-versioned, the patch adds versioning only for symbols introduced in + zlib-1.2.0 or later. It also declares as local those symbols which are + not designed to be exported." [Levin] +- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure +- Do not initialize global static by default in trees.c, add a response + NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] +- Don't use strerror() in gzio.c under WinCE [Yakimov] +- Don't use errno.h in zutil.h under WinCE [Yakimov] +- Move arguments for AR to its usage to allow replacing ar [Marot] +- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] +- Improve inflateInit() and inflateInit2() documentation +- Fix structure size comment in inflate.h +- Change configure help option from --h* to --help [Santos] + Changes in 1.2.3 (18 July 2005) - Apply security vulnerability fixes to contrib/infback9 as well - Clean up some text files (carriage returns, trailing space) @@ -13,7 +288,7 @@ Changes in 1.2.2.4 (11 July 2005) compile - Fix some spelling errors in comments [Betts] - Correct inflateInit2() error return documentation in zlib.h -- Added zran.c example of compressed data random access to examples +- Add zran.c example of compressed data random access to examples directory, shows use of inflatePrime() - Fix cast for assignments to strm->state in inflate.c and infback.c - Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] Modified: vendor/libz/dist/FAQ ============================================================================== --- vendor/libz/dist/FAQ Mon Mar 15 19:59:16 2010 (r205193) +++ vendor/libz/dist/FAQ Mon Mar 15 20:04:28 2010 (r205194) @@ -3,8 +3,8 @@ If your question is not there, please check the zlib home page -http://www.zlib.org which may have more recent information. -The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html +http://zlib.net/ which may have more recent information. +The lastest zlib FAQ is at http://zlib.net/zlib_faq.html 1. Is zlib Y2K-compliant? @@ -13,54 +13,51 @@ The lastest zlib FAQ is at http://www.gz 2. Where can I get a Windows DLL version? - The zlib sources can be compiled without change to produce a DLL. - See the file win32/DLL_FAQ.txt in the zlib distribution. - Pointers to the precompiled DLL are found in the zlib web site at - http://www.zlib.org. + The zlib sources can be compiled without change to produce a DLL. See the + file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the + precompiled DLL are found in the zlib web site at http://zlib.net/ . 3. Where can I get a Visual Basic interface to zlib? See - * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm - * contrib/visual-basic.txt in the zlib distribution + * http://marknelson.us/1997/01/01/zlib-engine/ * win32/DLL_FAQ.txt in the zlib distribution 4. compress() returns Z_BUF_ERROR. - Make sure that before the call of compress, the length of the compressed - buffer is equal to the total size of the compressed buffer and not - zero. For Visual Basic, check that this parameter is passed by reference + Make sure that before the call of compress(), the length of the compressed + buffer is equal to the available size of the compressed buffer and not + zero. For Visual Basic, check that this parameter is passed by reference ("as any"), not by value ("as long"). 5. deflate() or inflate() returns Z_BUF_ERROR. - Before making the call, make sure that avail_in and avail_out are not - zero. When setting the parameter flush equal to Z_FINISH, also make sure - that avail_out is big enough to allow processing all pending input. - Note that a Z_BUF_ERROR is not fatal--another call to deflate() or - inflate() can be made with more input or output space. A Z_BUF_ERROR - may in fact be unavoidable depending on how the functions are used, since - it is not possible to tell whether or not there is more output pending - when strm.avail_out returns with zero. + Before making the call, make sure that avail_in and avail_out are not zero. + When setting the parameter flush equal to Z_FINISH, also make sure that + avail_out is big enough to allow processing all pending input. Note that a + Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be + made with more input or output space. A Z_BUF_ERROR may in fact be + unavoidable depending on how the functions are used, since it is not + possible to tell whether or not there is more output pending when + strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a + heavily annotated example. 6. Where's the zlib documentation (man pages, etc.)? - It's in zlib.h for the moment, and Francis S. Lin has converted it to a - web page zlib.html. Volunteers to transform this to Unix-style man pages, - please contact us (zlib@gzip.org). Examples of zlib usage are in the files - example.c and minigzip.c. + It's in zlib.h . Examples of zlib usage are in the files example.c and + minigzip.c, with more in examples/ . 7. Why don't you use GNU autoconf or libtool or ...? - Because we would like to keep zlib as a very small and simple - package. zlib is rather portable and doesn't need much configuration. + Because we would like to keep zlib as a very small and simple package. + zlib is rather portable and doesn't need much configuration. 8. I found a bug in zlib. - Most of the time, such problems are due to an incorrect usage of - zlib. Please try to reproduce the problem with a small program and send - the corresponding source to us at zlib@gzip.org . Do not send - multi-megabyte data files without prior agreement. + Most of the time, such problems are due to an incorrect usage of zlib. + Please try to reproduce the problem with a small program and send the + corresponding source to us at zlib@gzip.org . Do not send multi-megabyte + data files without prior agreement. 9. Why do I get "undefined reference to gzputc"? @@ -82,7 +79,7 @@ The lastest zlib FAQ is at http://www.gz 12. Can zlib handle .Z files? - No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt + No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt the code of uncompress on your own. 13. How can I make a Unix shared library? @@ -99,8 +96,10 @@ The lastest zlib FAQ is at http://www.gz However, many flavors of Unix come with a shared zlib already installed. Before going to the trouble of compiling a shared version of zlib and - trying to install it, you may want to check if it's already there! If you - can #include , it's there. The -lz option will probably link to it. + trying to install it, you may want to check if it's already there! If you + can #include , it's there. The -lz option will probably link to + it. You can check the version at the top of zlib.h or with the + ZLIB_VERSION symbol defined in zlib.h . 15. I have a question about OttoPDF. @@ -109,8 +108,8 @@ The lastest zlib FAQ is at http://www.gz 16. Can zlib decode Flate data in an Adobe PDF file? - Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ . - To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ . + Yes. See http://www.pdflib.com/ . To modify PDF forms, see + http://sourceforge.net/projects/acroformtool/ . 17. Why am I getting this "register_frame_info not found" error on Solaris? @@ -121,67 +120,67 @@ The lastest zlib FAQ is at http://www.gz symbol __register_frame_info: referenced symbol not found The symbol __register_frame_info is not part of zlib, it is generated by - the C compiler (cc or gcc). You must recompile applications using zlib - which have this problem. This problem is specific to Solaris. See + the C compiler (cc or gcc). You must recompile applications using zlib + which have this problem. This problem is specific to Solaris. See http://www.sunfreeware.com for Solaris versions of zlib and applications using zlib. 18. Why does gzip give an error on a file I make with compress/deflate? The compress and deflate functions produce data in the zlib format, which - is different and incompatible with the gzip format. The gz* functions in - zlib on the other hand use the gzip format. Both the zlib and gzip - formats use the same compressed data format internally, but have different - headers and trailers around the compressed data. + is different and incompatible with the gzip format. The gz* functions in + zlib on the other hand use the gzip format. Both the zlib and gzip formats + use the same compressed data format internally, but have different headers + and trailers around the compressed data. 19. Ok, so why are there two different formats? - The gzip format was designed to retain the directory information about - a single file, such as the name and last modification date. The zlib - format on the other hand was designed for in-memory and communication - channel applications, and has a much more compact header and trailer and - uses a faster integrity check than gzip. + The gzip format was designed to retain the directory information about a + single file, such as the name and last modification date. The zlib format + on the other hand was designed for in-memory and communication channel + applications, and has a much more compact header and trailer and uses a + faster integrity check than gzip. 20. Well that's nice, but how do I make a gzip file in memory? You can request that deflate write the gzip format instead of the zlib - format using deflateInit2(). You can also request that inflate decode - the gzip format using inflateInit2(). Read zlib.h for more details. + format using deflateInit2(). You can also request that inflate decode the + gzip format using inflateInit2(). Read zlib.h for more details. 21. Is zlib thread-safe? - Yes. However any library routines that zlib uses and any application- - provided memory allocation routines must also be thread-safe. zlib's gz* + Yes. However any library routines that zlib uses and any application- + provided memory allocation routines must also be thread-safe. zlib's gz* functions use stdio library routines, and most of zlib's functions use the - library memory allocation routines by default. zlib's Init functions allow - for the application to provide custom memory allocation routines. + library memory allocation routines by default. zlib's *Init* functions + allow for the application to provide custom memory allocation routines. Of course, you should only operate on any given zlib or gzip stream from a single thread at a time. 22. Can I use zlib in my commercial application? - Yes. Please read the license in zlib.h. + Yes. Please read the license in zlib.h. 23. Is zlib under the GNU license? - No. Please read the license in zlib.h. + No. Please read the license in zlib.h. 24. The license says that altered source versions must be "plainly marked". So what exactly do I need to do to meet that requirement? - You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In + You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In particular, the final version number needs to be changed to "f", and an - identification string should be appended to ZLIB_VERSION. Version numbers + identification string should be appended to ZLIB_VERSION. Version numbers x.x.x.f are reserved for modifications to zlib by others than the zlib - maintainers. For example, if the version of the base zlib you are altering + maintainers. For example, if the version of the base zlib you are altering is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and - ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also + ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also update the version strings in deflate.c and inftrees.c. For altered source distributions, you should also note the origin and nature of the changes in zlib.h, as well as in ChangeLog and README, along - with the dates of the alterations. The origin should include at least your + with the dates of the alterations. The origin should include at least your name (or your company's name), and an email address to contact for help or issues with the library. @@ -197,105 +196,112 @@ The lastest zlib FAQ is at http://www.gz 26. Will zlib work on a 64-bit machine? - It should. It has been tested on 64-bit machines, and has no dependence - on any data types being limited to 32-bits in length. If you have any + Yes. It has been tested on 64-bit machines, and has no dependence on any + data types being limited to 32-bits in length. If you have any difficulties, please provide a complete problem report to zlib@gzip.org 27. Will zlib decompress data from the PKWare Data Compression Library? - No. The PKWare DCL uses a completely different compressed data format - than does PKZIP and zlib. However, you can look in zlib's contrib/blast + No. The PKWare DCL uses a completely different compressed data format than + does PKZIP and zlib. However, you can look in zlib's contrib/blast directory for a possible solution to your problem. 28. Can I access data randomly in a compressed stream? - No, not without some preparation. If when compressing you periodically - use Z_FULL_FLUSH, carefully write all the pending data at those points, - and keep an index of those locations, then you can start decompression - at those points. You have to be careful to not use Z_FULL_FLUSH too - often, since it can significantly degrade compression. + No, not without some preparation. If when compressing you periodically use + Z_FULL_FLUSH, carefully write all the pending data at those points, and + keep an index of those locations, then you can start decompression at those + points. You have to be careful to not use Z_FULL_FLUSH too often, since it + can significantly degrade compression. Alternatively, you can scan a + deflate stream once to generate an index, and then use that index for + random access. See examples/zran.c . 29. Does zlib work on MVS, OS/390, CICS, etc.? - We don't know for sure. We have heard occasional reports of success on - these systems. If you do use it on one of these, please provide us with - a report, instructions, and patches that we can reference when we get - these questions. Thanks. + It has in the past, but we have not heard of any recent evidence. There + were working ports of zlib 1.1.4 to MVS, but those links no longer work. + If you know of recent, successful applications of zlib on these operating + systems, please let us know. Thanks. -30. Is there some simpler, easier to read version of inflate I can look at - to understand the deflate format? +30. Is there some simpler, easier to read version of inflate I can look at to + understand the deflate format? - First off, you should read RFC 1951. Second, yes. Look in zlib's + First off, you should read RFC 1951. Second, yes. Look in zlib's contrib/puff directory. 31. Does zlib infringe on any patents? - As far as we know, no. In fact, that was originally the whole point behind - zlib. Look here for some more information: + As far as we know, no. In fact, that was originally the whole point behind + zlib. Look here for some more information: http://www.gzip.org/#faq11 32. Can zlib work with greater than 4 GB of data? - Yes. inflate() and deflate() will process any amount of data correctly. + Yes. inflate() and deflate() will process any amount of data correctly. Each call of inflate() or deflate() is limited to input and output chunks of the maximum value that can be stored in the compiler's "unsigned int" - type, but there is no limit to the number of chunks. Note however that the - strm.total_in and strm_total_out counters may be limited to 4 GB. These + type, but there is no limit to the number of chunks. Note however that the + strm.total_in and strm_total_out counters may be limited to 4 GB. These counters are provided as a convenience and are not used internally by - inflate() or deflate(). The application can easily set up its own counters + inflate() or deflate(). The application can easily set up its own counters updated after each call of inflate() or deflate() to count beyond 4 GB. compress() and uncompress() may be limited to 4 GB, since they operate in a - single call. gzseek() and gztell() may be limited to 4 GB depending on how - zlib is compiled. See the zlibCompileFlags() function in zlib.h. + single call. gzseek() and gztell() may be limited to 4 GB depending on how + zlib is compiled. See the zlibCompileFlags() function in zlib.h. - The word "may" appears several times above since there is a 4 GB limit - only if the compiler's "long" type is 32 bits. If the compiler's "long" - type is 64 bits, then the limit is 16 exabytes. + The word "may" appears several times above since there is a 4 GB limit only + if the compiler's "long" type is 32 bits. If the compiler's "long" type is + 64 bits, then the limit is 16 exabytes. 33. Does zlib have any security vulnerabilities? - The only one that we are aware of is potentially in gzprintf(). If zlib - is compiled to use sprintf() or vsprintf(), then there is no protection - against a buffer overflow of a 4K string space, other than the caller of - gzprintf() assuring that the output will not exceed 4K. On the other - hand, if zlib is compiled to use snprintf() or vsnprintf(), which should - normally be the case, then there is no vulnerability. The ./configure - script will display warnings if an insecure variation of sprintf() will - be used by gzprintf(). Also the zlibCompileFlags() function will return - information on what variant of sprintf() is used by gzprintf(). + The only one that we are aware of is potentially in gzprintf(). If zlib is + compiled to use sprintf() or vsprintf(), then there is no protection + against a buffer overflow of an 8K string space (or other value as set by + gzbuffer()), other than the caller of gzprintf() assuring that the output + will not exceed 8K. On the other hand, if zlib is compiled to use + snprintf() or vsnprintf(), which should normally be the case, then there is + no vulnerability. The ./configure script will display warnings if an + insecure variation of sprintf() will be used by gzprintf(). Also the + zlibCompileFlags() function will return information on what variant of + sprintf() is used by gzprintf(). If you don't have snprintf() or vsnprintf() and would like one, you can find a portable implementation here: http://www.ijs.si/software/snprintf/ - Note that you should be using the most recent version of zlib. Versions - 1.1.3 and before were subject to a double-free vulnerability. + Note that you should be using the most recent version of zlib. Versions + 1.1.3 and before were subject to a double-free vulnerability, and versions + 1.2.1 and 1.2.2 were subject to an access exception when decompressing + invalid compressed data. 34. Is there a Java version of zlib? Probably what you want is to use zlib in Java. zlib is already included as part of the Java SDK in the java.util.zip package. If you really want a version of zlib written in the Java language, look on the zlib home - page for links: http://www.zlib.org/ + page for links: http://zlib.net/ . 35. I get this or that compiler or source-code scanner warning when I crank it up to maximally-pedantic. Can't you guys write proper code? Many years ago, we gave up attempting to avoid warnings on every compiler - in the universe. It just got to be a waste of time, and some compilers - were downright silly. So now, we simply make sure that the code always - works. + in the universe. It just got to be a waste of time, and some compilers + were downright silly as well as contradicted each other. So now, we simply + make sure that the code always works. 36. Valgrind (or some similar memory access checker) says that deflate is performing a conditional jump that depends on an uninitialized value. Isn't that a bug? - No. That is intentional for performance reasons, and the output of - deflate is not affected. This only started showing up recently since - zlib 1.2.x uses malloc() by default for allocations, whereas earlier - versions used calloc(), which zeros out the allocated memory. + No. That is intentional for performance reasons, and the output of deflate + is not affected. This only started showing up recently since zlib 1.2.x + uses malloc() by default for allocations, whereas earlier versions used + calloc(), which zeros out the allocated memory. Even though the code was + correct, versions 1.2.4 and later was changed to not stimulate these + checkers. 37. Will zlib read the (insert any ancient or arcane format here) compressed data format? @@ -305,20 +311,21 @@ The lastest zlib FAQ is at http://www.gz 38. How can I encrypt/decrypt zip files with zlib? - zlib doesn't support encryption. The original PKZIP encryption is very weak - and can be broken with freely available programs. To get strong encryption, - use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. - For PKZIP compatible "encryption", look at http://www.info-zip.org/ + zlib doesn't support encryption. The original PKZIP encryption is very + weak and can be broken with freely available programs. To get strong + encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib + compression. For PKZIP compatible "encryption", look at + http://www.info-zip.org/ 39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? - "gzip" is the gzip format, and "deflate" is the zlib format. They should - probably have called the second one "zlib" instead to avoid confusion - with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 + "gzip" is the gzip format, and "deflate" is the zlib format. They should + probably have called the second one "zlib" instead to avoid confusion with + the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 correctly points to the zlib specification in RFC 1950 for the "deflate" transfer encoding, there have been reports of servers and browsers that incorrectly produce or expect raw deflate data per the deflate - specficiation in RFC 1951, most notably Microsoft. So even though the + specficiation in RFC 1951, most notably Microsoft. So even though the "deflate" transfer encoding using the zlib format would be the more efficient approach (and in fact exactly what the zlib format was designed for), using the "gzip" transfer encoding is probably more reliable due to @@ -328,12 +335,32 @@ The lastest zlib FAQ is at http://www.gz 40. Does zlib support the new "Deflate64" format introduced by PKWare? - No. PKWare has apparently decided to keep that format proprietary, since - they have not documented it as they have previous compression formats. - In any case, the compression improvements are so modest compared to other - more modern approaches, that it's not worth the effort to implement. + No. PKWare has apparently decided to keep that format proprietary, since + they have not documented it as they have previous compression formats. In + any case, the compression improvements are so modest compared to other more + modern approaches, that it's not worth the effort to implement. -41. Can you please sign these lengthy legal documents and fax them back to us +41. I'm having a problem with the zip functions in zlib, can you help? + + There are no zip functions in zlib. You are probably using minizip by + Giles Vollant, which is found in the contrib directory of zlib. It is not + part of zlib. In fact none of the stuff in contrib is part of zlib. The + files in there are not supported by the zlib authors. You need to contact + the authors of the respective contribution for help. + +42. The match.asm code in contrib is under the GNU General Public License. + Since it's part of zlib, doesn't that mean that all of zlib falls under the + GNU GPL? + + No. The files in contrib are not part of zlib. They were contributed by + other authors and are provided as a convenience to the user within the zlib + distribution. Each item in contrib has its own license. + +43. Is zlib subject to export controls? What is its ECCN? + + zlib is not subject to export controls, and so is classified as EAR99. + +44. Can you please sign these lengthy legal documents and fax them back to us so that we can use your software in our product? No. Go away. Shoo. Modified: vendor/libz/dist/README ============================================================================== --- vendor/libz/dist/README Mon Mar 15 19:59:16 2010 (r205193) +++ vendor/libz/dist/README Mon Mar 15 20:04:28 2010 (r205194) @@ -1,56 +1,51 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.3 is a general purpose data compression library. All the code is +zlib 1.2.4 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) -and rfc1952.txt (gzip format). These documents are also available in other -formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html +and rfc1952.txt (gzip format). All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example +(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example of the library is given in the file example.c which also tests that the library -is working correctly. Another example is given in the file minigzip.c. The +is working correctly. Another example is given in the file minigzip.c. The compression library itself is composed of all source files except example.c and minigzip.c. To compile all files and run the test program, follow the instructions given at -the top of Makefile. In short "make test; make install" should work for most -machines. For Unix: "./configure; make test; make install". For MSDOS, use one -of the special makefiles such as Makefile.msc. For VMS, use make_vms.com. +the top of Makefile.in. In short "./configure; make test", and if that goes +well, "make install" should work for most flavors of Unix. For Windows, use one +of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. Questions about zlib should be sent to , or to Gilles Vollant - for the Windows DLL version. The zlib home page is -http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem, -please check this site to verify that you have the latest version of zlib; -otherwise get the latest version and check whether the problem still exists or -not. - -PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking -for help. - -Mark Nelson wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available in -http://dogma.net/markn/articles/zlibtool/zlibtool.htm - -The changes made in version 1.2.3 are documented in the file ChangeLog. - -Unsupported third party contributions are provided in directory "contrib". - -A Java implementation of zlib is available in the Java Development Kit -http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html -See the zlib home page http://www.zlib.org for details. - -A Perl interface to zlib written by Paul Marquess is in the -CPAN (Comprehensive Perl Archive Network) sites -http://www.cpan.org/modules/by-module/Compress/ + for the Windows DLL version. The zlib home page is +http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. + +PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. + +Mark Nelson wrote an article about zlib for the Jan. 1997 +issue of Dr. Dobb's Journal; a copy of the article is available at +http://marknelson.us/1997/01/01/zlib-engine/ . + +The changes made in version 1.2.4 are documented in the file ChangeLog. + +Unsupported third party contributions are provided in directory contrib/ . + +zlib is available in Java using the java.util.zip package, documented at +http://java.sun.com/developer/technicalArticles/Programming/compression/ . + +A Perl interface to zlib written by Paul Marquess is available +at CPAN (Comprehensive Perl Archive Network) sites, including +http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . A Python interface to zlib written by A.M. Kuchling is available in Python 1.5 and later versions, see -http://www.python.org/doc/lib/module-zlib.html +http://www.python.org/doc/lib/module-zlib.html . -A zlib binding for TCL written by Andreas Kupries is -availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html +zlib is built into tcl: http://wiki.tcl.tk/4610 . An experimental package to read and write files in .zip format, written on top of zlib by Gilles Vollant , is available in the @@ -74,25 +69,21 @@ Notes for some targets: - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with other compilers. Use "make test" to check your compiler. -- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers. +- gzdopen is not supported on RISCOS or BEOS. - For PalmOs, see http://palmzlib.sourceforge.net/ -- When building a shared, i.e. dynamic library on Mac OS X, the library must be - installed before testing (do "make install" before "make test"), since the - library location is specified in the library. - Acknowledgments: - The deflate format used by zlib was defined by Phil Katz. The deflate - and zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; - they are too numerous to cite here. + The deflate format used by zlib was defined by Phil Katz. The deflate and + zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; they + are too numerous to cite here. Copyright notice: - (C) 1995-2004 Jean-loup Gailly and Mark Adler + (C) 1995-2010 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -113,13 +104,11 @@ Copyright notice: Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu -If you use the zlib library in a product, we would appreciate *not* -receiving lengthy legal documents to sign. The sources are provided -for free but without warranty of any kind. The library has been -entirely written by Jean-loup Gailly and Mark Adler; it does not -include third-party code. - -If you redistribute modified sources, we would appreciate that you include -in the file ChangeLog history information documenting your changes. Please -read the FAQ for more information on the distribution of modified source -versions. +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. Modified: vendor/libz/dist/adler32.c ============================================================================== --- vendor/libz/dist/adler32.c Mon Mar 15 19:59:16 2010 (r205193) +++ vendor/libz/dist/adler32.c Mon Mar 15 20:04:28 2010 (r205194) @@ -1,12 +1,15 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2007 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ -#define ZLIB_INTERNAL -#include "zlib.h" +#include "zutil.h" + +#define local static + +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2); #define BASE 65521UL /* largest prime smaller than 65536 */ #define NMAX 5552 @@ -125,10 +128,10 @@ uLong ZEXPORT adler32(adler, buf, len) } /* ========================================================================= */ -uLong ZEXPORT adler32_combine(adler1, adler2, len2) +local uLong adler32_combine_(adler1, adler2, len2) uLong adler1; uLong adler2; - z_off_t len2; + z_off64_t len2; { unsigned long sum1; unsigned long sum2; @@ -141,9 +144,26 @@ uLong ZEXPORT adler32_combine(adler1, ad MOD(sum2); sum1 += (adler2 & 0xffff) + BASE - 1; sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; - if (sum1 > BASE) sum1 -= BASE; - if (sum1 > BASE) sum1 -= BASE; - if (sum2 > (BASE << 1)) sum2 -= (BASE << 1); - if (sum2 > BASE) sum2 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; return sum1 | (sum2 << 16); } + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} Modified: vendor/libz/dist/compress.c ============================================================================== --- vendor/libz/dist/compress.c Mon Mar 15 19:59:16 2010 (r205193) +++ vendor/libz/dist/compress.c Mon Mar 15 20:04:28 2010 (r205194) @@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2005 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -75,5 +75,6 @@ int ZEXPORT compress (dest, destLen, sou uLong ZEXPORT compressBound (sourceLen) uLong sourceLen; { - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13; } Added: vendor/libz/dist/contrib/README.contrib ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libz/dist/contrib/README.contrib Mon Mar 15 20:04:28 2010 (r205194) @@ -0,0 +1,77 @@ +All files under this contrib directory are UNSUPPORTED. There were +provided by users of zlib and were not tested by the authors of zlib. +Use at your own risk. Please contact the authors of the contributions +for help about these, not the zlib authors. Thanks. + + +ada/ by Dmitriy Anisimkov + Support for Ada + See http://zlib-ada.sourceforge.net/ + +amd64/ by Mikhail Teterin + asm code for AMD64 + See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393 + +asm686/ by Brian Raiter + asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax + See http://www.muppetlabs.com/~breadbox/software/assembly.html + +blast/ by Mark Adler + Decompressor for output of PKWare Data Compression Library (DCL) + +delphi/ by Cosmin Truta + Support for Delphi and C++ Builder + +dotzlib/ by Henrik Ravn + Support for Microsoft .Net and Visual C++ .Net + +gcc_gvmat64/by Gilles Vollant + GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64 + assembler to replace longest_match() and inflate_fast() + +infback9/ by Mark Adler + Unsupported diffs to infback to decode the deflate64 format + +inflate86/ by Chris Anderson *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 20:05:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997EA106566C; Mon, 15 Mar 2010 20:05:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F43E8FC1B; Mon, 15 Mar 2010 20:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FK5OOm063394; Mon, 15 Mar 2010 20:05:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FK5ON8063393; Mon, 15 Mar 2010 20:05:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003152005.o2FK5ON8063393@svn.freebsd.org> From: Xin LI Date: Mon, 15 Mar 2010 20:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205195 - vendor/libz/1.2.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 15 Mar 2010 20:05:24 -0000 Author: delphij Date: Mon Mar 15 20:05:24 2010 New Revision: 205195 URL: http://svn.freebsd.org/changeset/base/205195 Log: Tag for zlib 1.2.4. Added: vendor/libz/1.2.4/ - copied from r205194, vendor/libz/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 20:25:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3284A106566C; Mon, 15 Mar 2010 20:25:29 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2223B8FC1B; Mon, 15 Mar 2010 20:25:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FKPTU0067990; Mon, 15 Mar 2010 20:25:29 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FKPTMT067988; Mon, 15 Mar 2010 20:25:29 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201003152025.o2FKPTMT067988@svn.freebsd.org> From: Joel Dahl Date: Mon, 15 Mar 2010 20:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205196 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 20:25:29 -0000 Author: joel (doc committer) Date: Mon Mar 15 20:25:28 2010 New Revision: 205196 URL: http://svn.freebsd.org/changeset/base/205196 Log: Switch to our preferred license. Approved by: Dirk-Willem Van Gulik Modified: head/share/man/man4/urio.4 Modified: head/share/man/man4/urio.4 ============================================================================== --- head/share/man/man4/urio.4 Mon Mar 15 20:05:24 2010 (r205195) +++ head/share/man/man4/urio.4 Mon Mar 15 20:25:28 2010 (r205196) @@ -1,5 +1,5 @@ -.\" Copyright (c) 2000 Dirk-Willem van Gulik -.\" . All rights reserved. +.\" Copyright (c) 2000 Dirk-Willem van Gulik +.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,24 +9,18 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Bill Paul. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" -.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD -.\" 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. +.\" 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$ .\" From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 21:15:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B97D106566C; Mon, 15 Mar 2010 21:15:03 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BE838FC15; Mon, 15 Mar 2010 21:15:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2FLF3tt078879; Mon, 15 Mar 2010 21:15:03 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2FLF3AY078877; Mon, 15 Mar 2010 21:15:03 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <201003152115.o2FLF3AY078877@svn.freebsd.org> From: Max Laier Date: Mon, 15 Mar 2010 21:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205197 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 21:15:03 -0000 Author: mlaier Date: Mon Mar 15 21:15:03 2010 New Revision: 205197 URL: http://svn.freebsd.org/changeset/base/205197 Log: Fix a small bug in drbr_dequeue_cond spotted while preparing MFC of r203834. MFC after: 3 days Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon Mar 15 20:25:28 2010 (r205196) +++ head/sys/net/if_var.h Mon Mar 15 21:15:03 2010 (r205197) @@ -645,7 +645,7 @@ drbr_dequeue_cond(struct ifnet *ifp, str IFQ_UNLOCK(&ifp->if_snd); return (NULL); } - IFQ_DEQUEUE(&ifp->if_snd, m); + IFQ_DEQUEUE_NOLOCK(&ifp->if_snd, m); IFQ_UNLOCK(&ifp->if_snd); return (m); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 00:48:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8765106564A; Tue, 16 Mar 2010 00:48:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A642E8FC17; Tue, 16 Mar 2010 00:48:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2G0mRYR025657; Tue, 16 Mar 2010 00:48:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2G0mReg025652; Tue, 16 Mar 2010 00:48:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003160048.o2G0mReg025652@svn.freebsd.org> From: Xin LI Date: Tue, 16 Mar 2010 00:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205198 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 00:48:27 -0000 Author: delphij Date: Tue Mar 16 00:48:27 2010 New Revision: 205198 URL: http://svn.freebsd.org/changeset/base/205198 Log: Merge OpenSolaris revision 8802:010b31dd4c53: 6773366 "zfs list" memory consumption can be further reduced PR: bin/144720 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris MFC after: 1 month Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Mon Mar 15 21:15:03 2010 (r205197) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Tue Mar 16 00:48:27 2010 (r205198) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -58,6 +58,7 @@ typedef struct callback_data { zfs_type_t cb_types; zfs_sort_column_t *cb_sortcol; zprop_list_t **cb_proplist; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -98,11 +99,20 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist && - zfs_expand_proplist(zhp, cb->cb_proplist) != 0) { - free(node); - return (-1); + + if (cb->cb_proplist) { + if ((*cb->cb_proplist) && + !(*cb->cb_proplist)->pl_all) + zfs_prune_proplist(zhp, + cb->cb_props_table); + + if (zfs_expand_proplist(zhp, cb->cb_proplist) + != 0) { + free(node); + return (-1); + } } + uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -328,7 +338,7 @@ zfs_for_each(int argc, char **argv, int zfs_sort_column_t *sortcol, zprop_list_t **proplist, zfs_iter_f callback, void *data) { - callback_data_t cb; + callback_data_t cb = {0}; int ret = 0; zfs_node_t *node; uu_avl_walk_t *walk; @@ -346,6 +356,39 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; + + /* + * If cb_proplist is provided then in the zfs_handles created we + * retain only those properties listed in cb_proplist and sortcol. + * The rest are pruned. So, the caller should make sure that no other + * properties other than those listed in cb_proplist/sortcol are + * accessed. + * + * If cb_proplist is NULL then we retain all the properties. + */ + if (cb.cb_proplist && *cb.cb_proplist) { + zprop_list_t *p = *cb.cb_proplist; + + while (p) { + if (p->pl_prop >= ZFS_PROP_TYPE && + p->pl_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[p->pl_prop] = B_TRUE; + } + p = p->pl_next; + } + + while (sortcol) { + if (sortcol->sc_prop >= ZFS_PROP_TYPE && + sortcol->sc_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[sortcol->sc_prop] = B_TRUE; + } + sortcol = sortcol->sc_next; + } + } else { + (void) memset(cb.cb_props_table, B_TRUE, + sizeof (cb.cb_props_table)); + } + if ((cb.cb_avl = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL) { (void) fprintf(stderr, gettext("internal error: out of memory\n")); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Mar 15 21:15:03 2010 (r205197) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Tue Mar 16 00:48:27 2010 (r205198) @@ -369,6 +369,7 @@ typedef struct zprop_list { } zprop_list_t; extern int zfs_expand_proplist(zfs_handle_t *, zprop_list_t **); +extern void zfs_prune_proplist(zfs_handle_t *, uint8_t *); #define ZFS_MOUNTPOINT_NONE "none" #define ZFS_MOUNTPOINT_LEGACY "legacy" Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Mar 15 21:15:03 2010 (r205197) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Mar 16 00:48:27 2010 (r205198) @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2045,6 +2045,8 @@ getprop_uint64(zfs_handle_t *zhp, zfs_pr verify(nvlist_lookup_uint64(nv, ZPROP_VALUE, &value) == 0); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { + verify(!zhp->zfs_props_table || + zhp->zfs_props_table[prop] == B_TRUE); value = zfs_prop_default_numeric(prop); *source = ""; } @@ -2064,6 +2066,8 @@ getprop_string(zfs_handle_t *zhp, zfs_pr verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0); (void) nvlist_lookup_string(nv, ZPROP_SOURCE, source); } else { + verify(!zhp->zfs_props_table || + zhp->zfs_props_table[prop] == B_TRUE); if ((value = (char *)zfs_prop_default_string(prop)) == NULL) value = ""; *source = ""; @@ -4267,6 +4271,30 @@ zfs_deleg_share_nfs(libzfs_handle_t *hdl return (error); } +void +zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) +{ + nvpair_t *curr; + + /* + * Keep a reference to the props-table against which we prune the + * properties. + */ + zhp->zfs_props_table = props; + + curr = nvlist_next_nvpair(zhp->zfs_props, NULL); + + while (curr) { + zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); + nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); + + if (props[zfs_prop] == B_FALSE) + (void) nvlist_remove(zhp->zfs_props, + nvpair_name(curr), nvpair_type(curr)); + curr = next; + } +} + /* * Attach/detach the given filesystem to/from the given jail. */ Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Mar 15 21:15:03 2010 (r205197) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Tue Mar 16 00:48:27 2010 (r205198) @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -77,6 +77,7 @@ struct zfs_handle { nvlist_t *zfs_user_props; boolean_t zfs_mntcheck; char *zfs_mntopts; + uint8_t *zfs_props_table; }; /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 00:49:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A52E106566C; Tue, 16 Mar 2010 00:49:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 878B28FC08; Tue, 16 Mar 2010 00:49:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2G0nb3C025923; Tue, 16 Mar 2010 00:49:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2G0nb1A025919; Tue, 16 Mar 2010 00:49:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003160049.o2G0nb1A025919@svn.freebsd.org> From: Xin LI Date: Tue, 16 Mar 2010 00:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205199 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 00:49:37 -0000 Author: delphij Date: Tue Mar 16 00:49:37 2010 New Revision: 205199 URL: http://svn.freebsd.org/changeset/base/205199 Log: Merge OpenSolaris revision 9365:7838a22eccd6: PSARC/2009/171 zfs list -d and zfs get -d 6762432 zfs list --depth PR: bin/144720 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris MFC after: 1 month Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Tue Mar 16 00:48:27 2010 (r205198) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Tue Mar 16 00:49:37 2010 (r205199) @@ -53,12 +53,14 @@ typedef struct zfs_node { } zfs_node_t; typedef struct callback_data { - uu_avl_t *cb_avl; - int cb_flags; - zfs_type_t cb_types; - zfs_sort_column_t *cb_sortcol; - zprop_list_t **cb_proplist; - uint8_t cb_props_table[ZFS_NUM_PROPS]; + uu_avl_t *cb_avl; + int cb_flags; + zfs_type_t cb_types; + zfs_sort_column_t *cb_sortcol; + zprop_list_t **cb_proplist; + int cb_depth_limit; + int cb_depth; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -99,7 +101,6 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist) { if ((*cb->cb_proplist) && !(*cb->cb_proplist)->pl_all) @@ -112,7 +113,6 @@ zfs_callback(zfs_handle_t *zhp, void *da return (-1); } } - uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -123,11 +123,15 @@ zfs_callback(zfs_handle_t *zhp, void *da /* * Recurse if necessary. */ - if (cb->cb_flags & ZFS_ITER_RECURSE) { + if (cb->cb_flags & ZFS_ITER_RECURSE && + ((cb->cb_flags & ZFS_ITER_DEPTH_LIMIT) == 0 || + cb->cb_depth < cb->cb_depth_limit)) { + cb->cb_depth++; if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) (void) zfs_iter_filesystems(zhp, zfs_callback, data); if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) (void) zfs_iter_snapshots(zhp, zfs_callback, data); + cb->cb_depth--; } if (!dontclose) @@ -335,7 +339,7 @@ zfs_sort(const void *larg, const void *r int zfs_for_each(int argc, char **argv, int flags, zfs_type_t types, - zfs_sort_column_t *sortcol, zprop_list_t **proplist, + zfs_sort_column_t *sortcol, zprop_list_t **proplist, int limit, zfs_iter_f callback, void *data) { callback_data_t cb = {0}; @@ -356,7 +360,7 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; - + cb.cb_depth_limit = limit; /* * If cb_proplist is provided then in the zfs_handles created we * retain only those properties listed in cb_proplist and sortcol. Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Tue Mar 16 00:48:27 2010 (r205198) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Tue Mar 16 00:49:37 2010 (r205199) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -41,9 +41,10 @@ typedef struct zfs_sort_column { #define ZFS_ITER_RECURSE (1 << 0) #define ZFS_ITER_ARGS_CAN_BE_PATHS (1 << 1) #define ZFS_ITER_PROP_LISTSNAPS (1 << 2) +#define ZFS_ITER_DEPTH_LIMIT (1 << 3) int zfs_for_each(int, char **, int options, zfs_type_t, - zfs_sort_column_t *, zprop_list_t **, zfs_iter_f, void *); + zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t); void zfs_free_sort_columns(zfs_sort_column_t *); Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Mar 16 00:48:27 2010 (r205198) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Mar 16 00:49:37 2010 (r205199) @@ -190,8 +190,8 @@ get_usage(zfs_help_t idx) return (gettext("\tdestroy [-rRf] " "\n")); case HELP_GET: - return (gettext("\tget [-rHp] [-o field[,...]] " - "[-s source[,...]]\n" + return (gettext("\tget [-rHp] [-d max] " + "[-o field[,...]] [-s source[,...]]\n" "\t <\"all\" | property[,...]> " "[filesystem|volume|snapshot] ...\n")); case HELP_INHERIT: @@ -205,8 +205,8 @@ get_usage(zfs_help_t idx) case HELP_UNJAIL: return (gettext("\tunjail \n")); case HELP_LIST: - return (gettext("\tlist [-rH] [-o property[,...]] " - "[-t type[,...]] [-s property] ...\n" + return (gettext("\tlist [-rH][-d max] " + "[-o property[,...]] [-t type[,...]] [-s property] ...\n" "\t [-S property] ... " "[filesystem|volume|snapshot] ...\n")); case HELP_MOUNT: @@ -432,6 +432,27 @@ parseprop(nvlist_t *props) } +static int +parse_depth(char *opt, int *flags) +{ + char *tmp; + int depth; + + depth = (int)strtol(opt, &tmp, 0); + if (*tmp) { + (void) fprintf(stderr, + gettext("%s is not an integer\n"), optarg); + usage(B_FALSE); + } + if (depth < 0) { + (void) fprintf(stderr, + gettext("Depth can not be negative.\n")); + usage(B_FALSE); + } + *flags |= (ZFS_ITER_DEPTH_LIMIT|ZFS_ITER_RECURSE); + return (depth); +} + /* * zfs clone [-p] [-o prop=value] ... * @@ -1119,6 +1140,7 @@ zfs_do_get(int argc, char **argv) int i, c, flags = 0; char *value, *fields; int ret; + int limit = 0; zprop_list_t fake_name = { 0 }; /* @@ -1132,11 +1154,14 @@ zfs_do_get(int argc, char **argv) cb.cb_type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, ":o:s:rHp")) != -1) { + while ((c = getopt(argc, argv, ":d:o:s:rHp")) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; break; + case 'd': + limit = parse_depth(optarg, &flags); + break; case 'r': flags |= ZFS_ITER_RECURSE; break; @@ -1267,7 +1292,7 @@ zfs_do_get(int argc, char **argv) /* run for each object */ ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, NULL, - &cb.cb_proplist, get_callback, &cb); + &cb.cb_proplist, limit, get_callback, &cb); if (cb.cb_proplist == &fake_name) zprop_free_list(fake_name.pl_next); @@ -1380,10 +1405,10 @@ zfs_do_inherit(int argc, char **argv) if (flags & ZFS_ITER_RECURSE) { ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, - NULL, NULL, inherit_recurse_cb, propname); + NULL, NULL, 0, inherit_recurse_cb, propname); } else { ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, - NULL, NULL, inherit_cb, propname); + NULL, NULL, 0, inherit_cb, propname); } return (ret); @@ -1578,7 +1603,7 @@ zfs_do_upgrade(int argc, char **argv) if (cb.cb_version == 0) cb.cb_version = ZPL_VERSION; ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_set_callback, &cb); + NULL, NULL, 0, upgrade_set_callback, &cb); (void) printf(gettext("%llu filesystems upgraded\n"), cb.cb_numupgraded); if (cb.cb_numsamegraded) { @@ -1596,14 +1621,14 @@ zfs_do_upgrade(int argc, char **argv) flags |= ZFS_ITER_RECURSE; ret = zfs_for_each(0, NULL, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_list_callback, &cb); + NULL, NULL, 0, upgrade_list_callback, &cb); found = cb.cb_foundone; cb.cb_foundone = B_FALSE; cb.cb_newer = B_TRUE; ret = zfs_for_each(0, NULL, flags, ZFS_TYPE_FILESYSTEM, - NULL, NULL, upgrade_list_callback, &cb); + NULL, NULL, 0, upgrade_list_callback, &cb); if (!cb.cb_foundone && !found) { (void) printf(gettext("All filesystems are " @@ -1615,11 +1640,12 @@ zfs_do_upgrade(int argc, char **argv) } /* - * list [-rH] [-o property[,property]...] [-t type[,type]...] + * list [-r][-d max] [-H] [-o property[,property]...] [-t type[,type]...] * [-s property [-s property]...] [-S property [-S property]...] * ... * * -r Recurse over all children + * -d Limit recursion by depth. * -H Scripted mode; elide headers and separate columns by tabs * -o Control which fields to display. * -t Control which object types to display. @@ -1769,16 +1795,20 @@ zfs_do_list(int argc, char **argv) char *fields = NULL; list_cbdata_t cb = { 0 }; char *value; + int limit = 0; int ret; zfs_sort_column_t *sortcol = NULL; int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS; /* check options */ - while ((c = getopt(argc, argv, ":o:rt:Hs:S:")) != -1) { + while ((c = getopt(argc, argv, ":d:o:rt:Hs:S:")) != -1) { switch (c) { case 'o': fields = optarg; break; + case 'd': + limit = parse_depth(optarg, &flags); + break; case 'r': flags |= ZFS_ITER_RECURSE; break; @@ -1869,7 +1899,7 @@ zfs_do_list(int argc, char **argv) cb.cb_first = B_TRUE; ret = zfs_for_each(argc, argv, flags, types, sortcol, &cb.cb_proplist, - list_callback, &cb); + limit, list_callback, &cb); zprop_free_list(cb.cb_proplist); zfs_free_sort_columns(sortcol); @@ -2252,7 +2282,7 @@ zfs_do_set(int argc, char **argv) } ret = zfs_for_each(argc - 2, argv + 2, NULL, - ZFS_TYPE_DATASET, NULL, NULL, set_callback, &cb); + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); return (ret); } @@ -2886,7 +2916,7 @@ zfs_do_unallow(int argc, char **argv) flags |= ZFS_ITER_RECURSE; error = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM|ZFS_TYPE_VOLUME, NULL, - NULL, unallow_callback, (void *)zperms); + NULL, 0, unallow_callback, (void *)zperms); if (zperms) nvlist_free(zperms); From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 00:50:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C96CF1065672; Tue, 16 Mar 2010 00:50:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B84058FC1B; Tue, 16 Mar 2010 00:50:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2G0ovUP026254; Tue, 16 Mar 2010 00:50:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2G0ov3b026252; Tue, 16 Mar 2010 00:50:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003160050.o2G0ov3b026252@svn.freebsd.org> From: Xin LI Date: Tue, 16 Mar 2010 00:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205200 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 00:50:57 -0000 Author: delphij Date: Tue Mar 16 00:50:57 2010 New Revision: 205200 URL: http://svn.freebsd.org/changeset/base/205200 Log: Merge OpenSolaris revision 9396:f41cf682d0d3: 6830813 zfs list -t all fails assertion *Note that this is only a partial merge of this revision addressing only this one issue.* PR: bin/144720 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris MFC after: 1 month Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Tue Mar 16 00:49:37 2010 (r205199) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Tue Mar 16 00:50:57 2010 (r205200) @@ -368,7 +368,10 @@ zfs_for_each(int argc, char **argv, int * properties other than those listed in cb_proplist/sortcol are * accessed. * - * If cb_proplist is NULL then we retain all the properties. + * If cb_proplist is NULL then we retain all the properties. We + * always retain the zoned property, which some other properties + * need (userquota & friends), and the createtxg property, which + * we need to sort snapshots. */ if (cb.cb_proplist && *cb.cb_proplist) { zprop_list_t *p = *cb.cb_proplist; @@ -388,6 +391,9 @@ zfs_for_each(int argc, char **argv, int } sortcol = sortcol->sc_next; } + + cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE; + cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE; } else { (void) memset(cb.cb_props_table, B_TRUE, sizeof (cb.cb_props_table)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 03:32:00 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B5B3106566B; Tue, 16 Mar 2010 03:32:00 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 382728FC12; Tue, 16 Mar 2010 03:31:59 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.4/8.14.2) with ESMTP id o2G3Vqer012972; Mon, 15 Mar 2010 21:31:52 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <201003121818.o2CII4ri076014@svn.freebsd.org> Date: Mon, 15 Mar 2010 21:31:52 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201003121818.o2CII4ri076014@svn.freebsd.org> To: Pyun YongHyeon X-Mailer: Apple Mail (2.1077) X-Spam-Status: No, score=-4.1 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205090 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 03:32:00 -0000 On Mar 12, 2010, at 11:18 AM, Pyun YongHyeon wrote: > Author: yongari > Date: Fri Mar 12 18:18:04 2010 > New Revision: 205090 > URL: http://svn.freebsd.org/changeset/base/205090 >=20 > Log: > Reorder interrupt handler a bit such that producer/consumer > index of status block is read first before acknowledging the > interrupts. Otherwise bge(4) may get stale status block as > acknowledging an interrupt may yield another status block update. >=20 I'm starting a new sub-thread because it quickly became impossible to = keep context straight in the conversation between you and Bruce. The previous rev did this: 1. Write an ACK word to the hardware 2. perform the memory coherency protocol 3 Cache the status descriptors 4. Execute the interrupt handlers for the descriptors I think that your concern was that after performing step 1, the BGE = hardware would be free to assert a new interrupt and/or update memory in = a way that would interfere with steps 2-4, yes? I don't believe that = this is a valid concern. By performing the ACK first, the driver is = guaranteeing that any new updates done by the BGE hardware will generate = a follow-on interrupt that will be seen and trigger a new run through = the interrupt handle. No matter where an unexpected update happens from = the hardware, a new interrupt will be generated and will be guaranteed = to be serviced, ensuring that the update is seen. Also, the status = descriptors are designed to be immune to interference of this nature; = they can go stale, but that can't be corrupted. Again, going stale is = not bad. The previous version affirms that a race exists, but guarantees that it = won't be forgotten. There's nothing wrong with this, in my opinion. = Whether you're using MSI or INTx (obviously assuming that there are no = hardware bugs here), the race will be caught. I don't like your change because it leaves the ACK step incoherent. By = deferring that write to be after the read, there's no guaranteed of when = that write will actually get flushed to the hardware. It will = eventually, but maybe not as soon as we'd like. Scott From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 05:13:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF7581065672; Tue, 16 Mar 2010 05:13:20 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE58C8FC16; Tue, 16 Mar 2010 05:13:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2G5DKD4084002; Tue, 16 Mar 2010 05:13:20 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2G5DKUM084000; Tue, 16 Mar 2010 05:13:20 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201003160513.o2G5DKUM084000@svn.freebsd.org> From: Joerg Wunsch Date: Tue, 16 Mar 2010 05:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205206 - stable/8/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 05:13:21 -0000 Author: joerg Date: Tue Mar 16 05:13:20 2010 New Revision: 205206 URL: http://svn.freebsd.org/changeset/base/205206 Log: r205170: then -> than Modified: stable/8/usr.sbin/powerd/powerd.8 Directory Properties: stable/8/usr.sbin/powerd/ (props changed) Modified: stable/8/usr.sbin/powerd/powerd.8 ============================================================================== --- stable/8/usr.sbin/powerd/powerd.8 Tue Mar 16 04:36:11 2010 (r205205) +++ stable/8/usr.sbin/powerd/powerd.8 Tue Mar 16 05:13:20 2010 (r205206) @@ -58,7 +58,7 @@ the system appears idle and increasing i It offers a good balance between a small performance loss for greatly increased power savings. Hiadaptive mode is like adaptive mode, but tuned for systems where -performance and interactivity are more important then power consumption. +performance and interactivity are more important than power consumption. It increases frequency faster, reduces the frequency less aggressively and will maintain full frequency for longer. The default mode is adaptive for battery power and hiadaptive for the rest. From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 09:25:48 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7650106564A; Tue, 16 Mar 2010 09:25:48 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 22FBE8FC0A; Tue, 16 Mar 2010 09:25:48 +0000 (UTC) Received: from [192.168.1.121] (p508FBDC1.dip.t-dialin.net [80.143.189.193]) by mail-n.franken.de (Postfix) with ESMTP id 322F41C0B4613; Tue, 16 Mar 2010 10:25:45 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <17A93DA8-4022-4AA6-B1B2-28CD3E7719C2@lakerest.net> Date: Tue, 16 Mar 2010 10:25:44 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201003122258.o2CMwqDM039077@svn.freebsd.org> <2F4A2F84-4955-49C2-B25E-BB987BC27815@lakerest.net> <92C0A9B0-9297-4F56-A6A1-603006423230@FreeBSD.org> <4B9B99A9.7040904@incunabulum.net> <17A93DA8-4022-4AA6-B1B2-28CD3E7719C2@lakerest.net> To: Randall Stewart X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Bruce Simpson , "Robert N. M. Watson" , src-committers@FreeBSD.org Subject: Re: svn commit: r205104 - in head/sys: dev/xen/netback netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 09:25:48 -0000 Hi Randy, shouldn't be the right fix "for now" that we do not offload SCTP checksum computation for IPv6? The point is the semantic of the CSUM_SCTP flag. I think it means "will csum SCTP for IPv4" as all the other flags (CSUM_TCP, CSUM_UDP). With "for now" I mean "until there is a IPv6 checksum offload infrastructure" (I know, it is on my TODO list). Best regards Michael On Mar 13, 2010, at 8:54 PM, Randall Stewart wrote: > Hmm... M_PROTO* good idea ;-) >=20 >=20 > On Mar 13, 2010, at 10:56 PM, Bruce Simpson wrote: >=20 >> On 03/13/10 13:53, Robert N. M. Watson wrote: >>> On Mar 13, 2010, at 1:50 PM, Randall Stewart wrote: >>>=20 >>>> I could refactor that this way if you want... it would mean a few = more de-ref's and >>>> looking to see if its a v4 or v6 packet and then doing the proper = offset... >>>>=20 >>=20 >> This is the sort of thing which M_PROTO* flags are good for. >>=20 >> Derefs in the hot path should be amortized whenever that makes sense. >>=20 >=20 > ------------------------------ > Randall Stewart > 803-317-4952 (cell) > 803-345-0391(direct) >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 11:38:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1DDD1065673; Tue, 16 Mar 2010 11:38:07 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E06D38FC22; Tue, 16 Mar 2010 11:38:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GBc7u8070457; Tue, 16 Mar 2010 11:38:07 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GBc7g0070456; Tue, 16 Mar 2010 11:38:07 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201003161138.o2GBc7g0070456@svn.freebsd.org> From: Ulrich Spoerlein Date: Tue, 16 Mar 2010 11:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205208 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 11:38:08 -0000 Author: uqs Date: Tue Mar 16 11:38:07 2010 New Revision: 205208 URL: http://svn.freebsd.org/changeset/base/205208 Log: - Use `Va' for variables instead of `Dv'. - Correctly spell negative values. - Also fixes make manlint. Found by: make manlint Reviewed by: ru Approved by: philip (mentor) Modified: head/share/man/man4/sysmouse.4 Modified: head/share/man/man4/sysmouse.4 ============================================================================== --- head/share/man/man4/sysmouse.4 Tue Mar 16 06:12:30 2010 (r205207) +++ head/share/man/man4/sysmouse.4 Tue Mar 16 11:38:07 2010 (r205208) @@ -94,18 +94,18 @@ Right button status; cleared if pressed, .El .It Byte 2 The first half of horizontal movement count in two's complement; --128 through 127. +\-128 through 127. .It Byte 3 The first half of vertical movement count in two's complement; --128 through 127. +\-128 through 127. .It Byte 4 The second half of the horizontal movement count in two's complement; --128 through 127. +\-128 through 127. To obtain the full horizontal movement count, add the byte 2 and 4. .It Byte 5 The second half of the vertical movement count in two's complement; --128 through 127. +\-128 through 127. To obtain the full vertical movement count, add the byte 3 and 5. .El @@ -148,7 +148,7 @@ These commands manipulate the operation Returns the hardware information of the attached device in the following structure. Only the -.Dv iftype +.Va iftype field is guaranteed to be filled with the correct value in the current version of the .Nm @@ -164,16 +164,16 @@ typedef struct mousehw { .Ed .Pp The -.Dv buttons +.Va buttons field holds the number of buttons detected by the driver. .Pp The -.Dv iftype +.Va iftype is always .Dv MOUSE_IF_SYSMOUSE . .Pp The -.Dv type +.Va type tells the device type: .Dv MOUSE_MOUSE , .Dv MOUSE_TRACKBALL , @@ -183,7 +183,7 @@ or .Dv MOUSE_UNKNOWN . .Pp The -.Dv model +.Va model is always .Dv MOUSE_MODEL_GENERIC at the operation level 0. @@ -194,7 +194,7 @@ or one of constants at higher operation levels. .Pp The -.Dv hwid +.Va hwid is always zero. .Pp .It Dv MOUSE_GETMODE Ar mousemode_t *mode @@ -213,7 +213,7 @@ typedef struct mousemode { .Ed .Pp The -.Dv protocol +.Va protocol field tells the format in which the device status is returned when the mouse data is read by the user program. It is @@ -223,19 +223,19 @@ at the operation level zero. at the operation level one. .Pp The -.Dv rate -is always set to -1. +.Va rate +is always set to \-1. .Pp The -.Dv resolution -is always set to -1. +.Va resolution +is always set to \-1. .Pp The -.Dv accelfactor +.Va accelfactor is always 0. .Pp The -.Dv packetsize +.Va packetsize field specifies the length of the data packet. It depends on the operation level. @@ -248,13 +248,13 @@ operation level. .El .Pp The array -.Dv syncmask +.Va syncmask holds a bit mask and pattern to detect the first byte of the data packet. -.Dv syncmask[0] +.Va syncmask[0] is the bit mask to be ANDed with a byte. If the result is equal to -.Dv syncmask[1] , +.Va syncmask[1] , the byte is likely to be the first byte of the data packet. Note that this method of detecting the first byte is not 100% reliable; thus, it should be taken only as an advisory measure. @@ -264,7 +264,7 @@ The command changes the current operatio as specified in .Ar mode . Only -.Dv level +.Va level may be modifiable. Setting values in the other field does not generate error and has no effect. @@ -323,7 +323,7 @@ struct mouse_info { .Ed .Pp .Bl -tag -width operation -compact -.It Dv operation +.It Va operation This can be one of .Pp .Bl -tag -width MOUSE_MOVEABS -compact @@ -333,21 +333,21 @@ Enables and displays mouse cursor. Disables and hides mouse cursor. .It Dv MOUSE_MOVEABS Moves mouse cursor to position supplied in -.Dv u.data . +.Va u.data . .It Dv MOUSE_MOVEREL Adds position supplied in -.Dv u.data +.Va u.data to current position. .It Dv MOUSE_GETINFO Returns current mouse position in the current virtual console and button status in -.Dv u.data . +.Va u.data . .It Dv MOUSE_MODE This sets the .Xr signal 3 to be delivered to the current process when a button is pressed. The signal to be delivered is set in -.Dv u.mode . +.Va u.mode . .El .Pp The above operations are for virtual consoles. @@ -360,7 +360,7 @@ to pass mouse data to the console driver .It Dv MOUSE_ACTION .It Dv MOUSE_MOTION_EVENT These operations take the information in -.Dv u.data +.Va u.data and act upon it. Mouse data will be sent to the .Nm @@ -370,7 +370,7 @@ also processes button press actions and requested or performs cut and paste operations if the current console is a text interface. .It Dv MOUSE_BUTTON_EVENT -.Dv u.data +.Va u.data specifies a button and its click count. The console driver will use this information for signal delivery if requested or @@ -385,11 +385,11 @@ They are intended to replace functions p .Dv MOUSE_ACTION alone. .Pp -.It Dv Sq u +.It Va u This union is one of .Pp .Bl -tag -width data -compact -.It Dv data +.It Va data .Bd -literal struct mouse_data { int x; @@ -399,18 +399,17 @@ struct mouse_data { }; .Ed .Pp -.Dv x , -.Dv y +.Va x , y and -.Dv z +.Va z represent movement of the mouse along respective directions. -.Dv buttons +.Va buttons tells the state of buttons. It encodes up to 31 buttons in the bit 0 though the bit 30. If a button is held down, the corresponding bit is set. .Pp -.It Dv mode +.It Va mode .Bd -literal struct mouse_mode { int mode; @@ -419,16 +418,16 @@ struct mouse_mode { .Ed .Pp The -.Dv signal +.Va signal field specifies the signal to be delivered to the process. It must be one of the values defined in .In signal.h . The -.Dv mode +.Va mode field is currently unused. .Pp -.It Dv event +.It Va event .Bd -literal struct mouse_event { int id; @@ -437,12 +436,12 @@ struct mouse_event { .Ed .Pp The -.Dv id +.Va id field specifies a button number as in -.Dv u.data.buttons . +.Va u.data.buttons . Only one bit/button is set. The -.Dv value +.Va value field holds the click count: the number of times the user has clicked the button successively. From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 15:27:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76FEC106564A; Tue, 16 Mar 2010 15:27:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C6EE8FC12; Tue, 16 Mar 2010 15:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GFRw6Y020989; Tue, 16 Mar 2010 15:27:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GFRwFb020987; Tue, 16 Mar 2010 15:27:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003161527.o2GFRwFb020987@svn.freebsd.org> From: John Baldwin Date: Tue, 16 Mar 2010 15:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205210 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 15:27:58 -0000 Author: jhb Date: Tue Mar 16 15:27:58 2010 New Revision: 205210 URL: http://svn.freebsd.org/changeset/base/205210 Log: Use unsigned long long constants for fields in 64-bit machine check registers instead of unsigned long constants. MFC after: 3 days Modified: head/sys/i386/include/specialreg.h Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Tue Mar 16 14:44:33 2010 (r205209) +++ head/sys/i386/include/specialreg.h Tue Mar 16 15:27:58 2010 (r205210) @@ -426,22 +426,22 @@ #define MCG_STATUS_RIPV 0x00000001 #define MCG_STATUS_EIPV 0x00000002 #define MCG_STATUS_MCIP 0x00000004 -#define MCG_CTL_ENABLE 0xffffffffffffffffUL -#define MCG_CTL_DISABLE 0x0000000000000000UL +#define MCG_CTL_ENABLE 0xffffffffffffffffULL +#define MCG_CTL_DISABLE 0x0000000000000000ULL #define MSR_MC_CTL(x) (MSR_MC0_CTL + (x) * 4) #define MSR_MC_STATUS(x) (MSR_MC0_STATUS + (x) * 4) #define MSR_MC_ADDR(x) (MSR_MC0_ADDR + (x) * 4) #define MSR_MC_MISC(x) (MSR_MC0_MISC + (x) * 4) -#define MC_STATUS_MCA_ERROR 0x000000000000ffffUL -#define MC_STATUS_MODEL_ERROR 0x00000000ffff0000UL -#define MC_STATUS_OTHER_INFO 0x01ffffff00000000UL -#define MC_STATUS_PCC 0x0200000000000000UL -#define MC_STATUS_ADDRV 0x0400000000000000UL -#define MC_STATUS_MISCV 0x0800000000000000UL -#define MC_STATUS_EN 0x1000000000000000UL -#define MC_STATUS_UC 0x2000000000000000UL -#define MC_STATUS_OVER 0x4000000000000000UL -#define MC_STATUS_VAL 0x8000000000000000UL +#define MC_STATUS_MCA_ERROR 0x000000000000ffffULL +#define MC_STATUS_MODEL_ERROR 0x00000000ffff0000ULL +#define MC_STATUS_OTHER_INFO 0x01ffffff00000000ULL +#define MC_STATUS_PCC 0x0200000000000000ULL +#define MC_STATUS_ADDRV 0x0400000000000000ULL +#define MC_STATUS_MISCV 0x0800000000000000ULL +#define MC_STATUS_EN 0x1000000000000000ULL +#define MC_STATUS_UC 0x2000000000000000ULL +#define MC_STATUS_OVER 0x4000000000000000ULL +#define MC_STATUS_VAL 0x8000000000000000ULL /* * The following four 3-byte registers control the non-cacheable regions. From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 16:01:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80476106564A; Tue, 16 Mar 2010 16:01:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB7F8FC08; Tue, 16 Mar 2010 16:01:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GG1Jq7028504; Tue, 16 Mar 2010 16:01:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GG1JmE028502; Tue, 16 Mar 2010 16:01:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003161601.o2GG1JmE028502@svn.freebsd.org> From: John Baldwin Date: Tue, 16 Mar 2010 16:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205214 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 16:01:19 -0000 Author: jhb Date: Tue Mar 16 16:01:19 2010 New Revision: 205214 URL: http://svn.freebsd.org/changeset/base/205214 Log: - Extend the machine check record structure to include several fields useful for parsing model-specific and other fields in machine check events including the global machine check capabilities and status registers, CPU identification, and the FreeBSD CPU ID. - Report these added fields in the console log of a machine check so that a record structure can be reconstituted from the console messages. - Parse new architectural errors including memory controller errors. MFC after: 1 week Modified: head/sys/amd64/amd64/mca.c head/sys/amd64/include/mca.h head/sys/amd64/include/specialreg.h head/sys/i386/i386/mca.c head/sys/i386/include/mca.h head/sys/i386/include/specialreg.h Modified: head/sys/amd64/amd64/mca.c ============================================================================== --- head/sys/amd64/amd64/mca.c Tue Mar 16 15:55:41 2010 (r205213) +++ head/sys/amd64/amd64/mca.c Tue Mar 16 16:01:19 2010 (r205214) @@ -186,19 +186,46 @@ mca_error_request(uint16_t mca_error) return ("???"); } +static const char * +mca_error_mmtype(uint16_t mca_error) +{ + + switch ((mca_error & 0x70) >> 4) { + case 0x0: + return ("GEN"); + case 0x1: + return ("RD"); + case 0x2: + return ("WR"); + case 0x3: + return ("AC"); + case 0x4: + return ("MS"); + } + return ("???"); +} + /* Dump details about a single machine check. */ static void __nonnull(1) mca_log(const struct mca_record *rec) { uint16_t mca_error; - printf("MCA: bank %d, status 0x%016llx\n", rec->mr_bank, + printf("MCA: Bank %d, Status 0x%016llx\n", rec->mr_bank, (long long)rec->mr_status); - printf("MCA: CPU %d ", rec->mr_apic_id); + printf("MCA: Global Cap 0x%016llx, Status 0x%016llx\n", + (long long)rec->mr_mcg_cap, (long long)rec->mr_mcg_status); + printf("MCA: Vendor \"%s\", ID 0x%x, APIC ID %d\n", cpu_vendor, + rec->mr_cpu_id, rec->mr_apic_id); + printf("MCA: CPU %d ", rec->mr_cpu); if (rec->mr_status & MC_STATUS_UC) printf("UNCOR "); - else + else { printf("COR "); + if (rec->mr_mcg_cap & MCG_CAP_TES_P) + printf("(%lld) ", ((long long)rec->mr_status & + MC_STATUS_COR_COUNT) >> 38); + } if (rec->mr_status & MC_STATUS_PCC) printf("PCC "); if (rec->mr_status & MC_STATUS_OVER) @@ -221,6 +248,9 @@ mca_log(const struct mca_record *rec) case 0x0004: printf("FRC error"); break; + case 0x0005: + printf("internal parity error"); + break; case 0x0400: printf("internal timer error"); break; @@ -245,6 +275,17 @@ mca_log(const struct mca_record *rec) break; } + /* Memory controller error. */ + if ((mca_error & 0xef80) == 0x0080) { + printf("%s channel ", mca_error_mmtype(mca_error)); + if ((mca_error & 0x000f) != 0x000f) + printf("%d", mca_error & 0x000f); + else + printf("??"); + printf(" memory error"); + break; + } + /* Cache error. */ if ((mca_error & 0xef00) == 0x0100) { printf("%sCACHE %s %s error", @@ -322,6 +363,11 @@ mca_check_status(int bank, struct mca_re rec->mr_misc = rdmsr(MSR_MC_MISC(bank)); rec->mr_tsc = rdtsc(); rec->mr_apic_id = PCPU_GET(apic_id); + rec->mr_mcg_cap = rdmsr(MSR_MCG_CAP); + rec->mr_mcg_status = rdmsr(MSR_MCG_STATUS); + rec->mr_cpu_id = cpu_id; + rec->mr_cpu_vendor_id = cpu_vendor_id; + rec->mr_cpu = PCPU_GET(cpuid); /* * Clear machine check. Don't do this for uncorrectable Modified: head/sys/amd64/include/mca.h ============================================================================== --- head/sys/amd64/include/mca.h Tue Mar 16 15:55:41 2010 (r205213) +++ head/sys/amd64/include/mca.h Tue Mar 16 16:01:19 2010 (r205214) @@ -37,6 +37,11 @@ struct mca_record { uint64_t mr_tsc; int mr_apic_id; int mr_bank; + uint64_t mr_mcg_cap; + uint64_t mr_mcg_status; + int mr_cpu_id; + int mr_cpu_vendor_id; + int mr_cpu; }; #ifdef _KERNEL Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Tue Mar 16 15:55:41 2010 (r205213) +++ head/sys/amd64/include/specialreg.h Tue Mar 16 16:01:19 2010 (r205214) @@ -267,6 +267,7 @@ #define MSR_MTRR16kBase 0x258 #define MSR_MTRR4kBase 0x268 #define MSR_PAT 0x277 +#define MSR_MC0_CTL2 0x280 #define MSR_MTRRdefType 0x2ff #define MSR_MC0_CTL 0x400 #define MSR_MC0_STATUS 0x401 @@ -352,8 +353,10 @@ #define MCG_CAP_COUNT 0x000000ff #define MCG_CAP_CTL_P 0x00000100 #define MCG_CAP_EXT_P 0x00000200 +#define MCG_CAP_CMCI_P 0x00000400 #define MCG_CAP_TES_P 0x00000800 #define MCG_CAP_EXT_CNT 0x00ff0000 +#define MCG_CAP_SER_P 0x01000000 #define MCG_STATUS_RIPV 0x00000001 #define MCG_STATUS_EIPV 0x00000002 #define MCG_STATUS_MCIP 0x00000004 @@ -363,9 +366,14 @@ #define MSR_MC_STATUS(x) (MSR_MC0_STATUS + (x) * 4) #define MSR_MC_ADDR(x) (MSR_MC0_ADDR + (x) * 4) #define MSR_MC_MISC(x) (MSR_MC0_MISC + (x) * 4) +#define MSR_MC_CTL2(x) (MSR_MC0_CTL2 + (x)) /* If MCG_CAP_CMCI_P */ #define MC_STATUS_MCA_ERROR 0x000000000000ffffUL #define MC_STATUS_MODEL_ERROR 0x00000000ffff0000UL #define MC_STATUS_OTHER_INFO 0x01ffffff00000000UL +#define MC_STATUS_COR_COUNT 0x001fffc000000000UL /* If MCG_CAP_TES_P */ +#define MC_STATUS_TES_STATUS 0x0060000000000000UL /* If MCG_CAP_TES_P */ +#define MC_STATUS_AR 0x0080000000000000UL /* If MCG_CAP_CMCI_P */ +#define MC_STATUS_S 0x0100000000000000UL /* If MCG_CAP_CMCI_P */ #define MC_STATUS_PCC 0x0200000000000000UL #define MC_STATUS_ADDRV 0x0400000000000000UL #define MC_STATUS_MISCV 0x0800000000000000UL @@ -373,6 +381,10 @@ #define MC_STATUS_UC 0x2000000000000000UL #define MC_STATUS_OVER 0x4000000000000000UL #define MC_STATUS_VAL 0x8000000000000000UL +#define MC_MISC_RA_LSB 0x000000000000003fUL /* If MCG_CAP_SER_P */ +#define MC_MISC_ADDRESS_MODE 0x00000000000001c0UL /* If MCG_CAP_SER_P */ +#define MC_CTL2_THRESHOLD 0x0000000000003fffUL +#define MC_CTL2_CMCI_EN 0x0000000040000000UL /* * The following four 3-byte registers control the non-cacheable regions. Modified: head/sys/i386/i386/mca.c ============================================================================== --- head/sys/i386/i386/mca.c Tue Mar 16 15:55:41 2010 (r205213) +++ head/sys/i386/i386/mca.c Tue Mar 16 16:01:19 2010 (r205214) @@ -177,19 +177,46 @@ mca_error_request(uint16_t mca_error) return ("???"); } +static const char * +mca_error_mmtype(uint16_t mca_error) +{ + + switch ((mca_error & 0x70) >> 4) { + case 0x0: + return ("GEN"); + case 0x1: + return ("RD"); + case 0x2: + return ("WR"); + case 0x3: + return ("AC"); + case 0x4: + return ("MS"); + } + return ("???"); +} + /* Dump details about a single machine check. */ static void __nonnull(1) mca_log(const struct mca_record *rec) { uint16_t mca_error; - printf("MCA: bank %d, status 0x%016llx\n", rec->mr_bank, + printf("MCA: Bank %d, Status 0x%016llx\n", rec->mr_bank, (long long)rec->mr_status); - printf("MCA: CPU %d ", rec->mr_apic_id); + printf("MCA: Global Cap 0x%016llx, Status 0x%016llx\n", + (long long)rec->mr_mcg_cap, (long long)rec->mr_mcg_status); + printf("MCA: Vendor \"%s\", ID 0x%x, APIC ID %d\n", cpu_vendor, + rec->mr_cpu_id, rec->mr_apic_id); + printf("MCA: CPU %d ", rec->mr_cpu); if (rec->mr_status & MC_STATUS_UC) printf("UNCOR "); - else + else { printf("COR "); + if (rec->mr_mcg_cap & MCG_CAP_TES_P) + printf("(%lld) ", ((long long)rec->mr_status & + MC_STATUS_COR_COUNT) >> 38); + } if (rec->mr_status & MC_STATUS_PCC) printf("PCC "); if (rec->mr_status & MC_STATUS_OVER) @@ -212,6 +239,9 @@ mca_log(const struct mca_record *rec) case 0x0004: printf("FRC error"); break; + case 0x0005: + printf("internal parity error"); + break; case 0x0400: printf("internal timer error"); break; @@ -236,6 +266,17 @@ mca_log(const struct mca_record *rec) break; } + /* Memory controller error. */ + if ((mca_error & 0xef80) == 0x0080) { + printf("%s channel ", mca_error_mmtype(mca_error)); + if ((mca_error & 0x000f) != 0x000f) + printf("%d", mca_error & 0x000f); + else + printf("??"); + printf(" memory error"); + break; + } + /* Cache error. */ if ((mca_error & 0xef00) == 0x0100) { printf("%sCACHE %s %s error", @@ -313,6 +354,11 @@ mca_check_status(int bank, struct mca_re rec->mr_misc = rdmsr(MSR_MC_MISC(bank)); rec->mr_tsc = rdtsc(); rec->mr_apic_id = PCPU_GET(apic_id); + rec->mr_mcg_cap = rdmsr(MSR_MCG_CAP); + rec->mr_mcg_status = rdmsr(MSR_MCG_STATUS); + rec->mr_cpu_id = cpu_id; + rec->mr_cpu_vendor_id = cpu_vendor_id; + rec->mr_cpu = PCPU_GET(cpuid); /* * Clear machine check. Don't do this for uncorrectable Modified: head/sys/i386/include/mca.h ============================================================================== --- head/sys/i386/include/mca.h Tue Mar 16 15:55:41 2010 (r205213) +++ head/sys/i386/include/mca.h Tue Mar 16 16:01:19 2010 (r205214) @@ -37,6 +37,11 @@ struct mca_record { uint64_t mr_tsc; int mr_apic_id; int mr_bank; + uint64_t mr_mcg_cap; + uint64_t mr_mcg_status; + int mr_cpu_id; + int mr_cpu_vendor_id; + int mr_cpu; }; #ifdef _KERNEL Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Tue Mar 16 15:55:41 2010 (r205213) +++ head/sys/i386/include/specialreg.h Tue Mar 16 16:01:19 2010 (r205214) @@ -273,6 +273,7 @@ #define MSR_MTRR16kBase 0x258 #define MSR_MTRR4kBase 0x268 #define MSR_PAT 0x277 +#define MSR_MC0_CTL2 0x280 #define MSR_MTRRdefType 0x2ff #define MSR_MC0_CTL 0x400 #define MSR_MC0_STATUS 0x401 @@ -421,8 +422,10 @@ #define MCG_CAP_COUNT 0x000000ff #define MCG_CAP_CTL_P 0x00000100 #define MCG_CAP_EXT_P 0x00000200 +#define MCG_CAP_CMCI_P 0x00000400 #define MCG_CAP_TES_P 0x00000800 #define MCG_CAP_EXT_CNT 0x00ff0000 +#define MCG_CAP_SER_P 0x01000000 #define MCG_STATUS_RIPV 0x00000001 #define MCG_STATUS_EIPV 0x00000002 #define MCG_STATUS_MCIP 0x00000004 @@ -432,9 +435,14 @@ #define MSR_MC_STATUS(x) (MSR_MC0_STATUS + (x) * 4) #define MSR_MC_ADDR(x) (MSR_MC0_ADDR + (x) * 4) #define MSR_MC_MISC(x) (MSR_MC0_MISC + (x) * 4) +#define MSR_MC_CTL2(x) (MSR_MC0_CTL2 + (x)) /* If MCG_CAP_CMCI_P */ #define MC_STATUS_MCA_ERROR 0x000000000000ffffULL #define MC_STATUS_MODEL_ERROR 0x00000000ffff0000ULL #define MC_STATUS_OTHER_INFO 0x01ffffff00000000ULL +#define MC_STATUS_COR_COUNT 0x001fffc000000000ULL /* If MCG_CAP_TES_P */ +#define MC_STATUS_TES_STATUS 0x0060000000000000ULL /* If MCG_CAP_TES_P */ +#define MC_STATUS_AR 0x0080000000000000ULL /* If MCG_CAP_CMCI_P */ +#define MC_STATUS_S 0x0100000000000000ULL /* If MCG_CAP_CMCI_P */ #define MC_STATUS_PCC 0x0200000000000000ULL #define MC_STATUS_ADDRV 0x0400000000000000ULL #define MC_STATUS_MISCV 0x0800000000000000ULL @@ -442,6 +450,10 @@ #define MC_STATUS_UC 0x2000000000000000ULL #define MC_STATUS_OVER 0x4000000000000000ULL #define MC_STATUS_VAL 0x8000000000000000ULL +#define MC_MISC_RA_LSB 0x000000000000003fULL /* If MCG_CAP_SER_P */ +#define MC_MISC_ADDRESS_MODE 0x00000000000001c0ULL /* If MCG_CAP_SER_P */ +#define MC_CTL2_THRESHOLD 0x0000000000003fffULL +#define MC_CTL2_CMCI_EN 0x0000000040000000ULL /* * The following four 3-byte registers control the non-cacheable regions. From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 16:08:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FF25106564A; Tue, 16 Mar 2010 16:08:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 62D318FC1A; Tue, 16 Mar 2010 16:08:59 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 02C8846B81; Tue, 16 Mar 2010 12:08:59 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id D43778A01F; Tue, 16 Mar 2010 12:08:57 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 16 Mar 2010 12:08:56 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003161601.o2GG1JmE028502@svn.freebsd.org> In-Reply-To: <201003161601.o2GG1JmE028502@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003161208.56952.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 16 Mar 2010 12:08:57 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205214 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 16:08:59 -0000 On Tuesday 16 March 2010 12:01:19 pm John Baldwin wrote: > Author: jhb > Date: Tue Mar 16 16:01:19 2010 > New Revision: 205214 > URL: http://svn.freebsd.org/changeset/base/205214 > > Log: > - Extend the machine check record structure to include several fields useful > for parsing model-specific and other fields in machine check events > including the global machine check capabilities and status registers, > CPU identification, and the FreeBSD CPU ID. > - Report these added fields in the console log of a machine check so that > a record structure can be reconstituted from the console messages. These changes were inspired by adding FreeBSD support to mcelog (a tool to monitor machine checks used on Linux). There is a partial port of mcelog available at //depot/projects/mcelog/... in p4. It supports reading records from a running machine via the hw.mca sysctls as well as parsing the console log messages via the --ascii flag. > - Parse new architectural errors including memory controller errors. Newer CPUs (e.g. i7) report correctable ECC errors as memory controller errors rather than memory hierarchy errors. I'm also currently testing some other patches to add support for CMCI which is a local APIC interrupt that can be enabled to fire when a correctable machine check occurs. The existing machine check exceptions only fire for uncorrectable events, so correctable events have to be discovered via polling. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 16:51:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE20106566C; Tue, 16 Mar 2010 16:51:39 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A12E8FC16; Tue, 16 Mar 2010 16:51:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GGpdc5039761; Tue, 16 Mar 2010 16:51:39 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GGpdPK039739; Tue, 16 Mar 2010 16:51:39 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201003161651.o2GGpdPK039739@svn.freebsd.org> From: Roman Divacky Date: Tue, 16 Mar 2010 16:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205218 - in vendor/llvm/dist: . autoconf cmake cmake/modules docs examples/OCaml-Kaleidoscope examples/OCaml-Kaleidoscope/Chapter2 examples/OCaml-Kaleidoscope/Chapter3 examples/OCaml-K... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 16:51:39 -0000 Author: rdivacky Date: Tue Mar 16 16:51:38 2010 New Revision: 205218 URL: http://svn.freebsd.org/changeset/base/205218 Log: Update LLVM to r98631. Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/Makefile vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/_tags vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/ast.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/lexer.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/parser.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/token.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/toplevel.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/toy.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/Makefile vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/_tags vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/ast.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/lexer.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/parser.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/token.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/toplevel.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/toy.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/Makefile vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/_tags vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/ast.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/bindings.c vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/lexer.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/parser.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/token.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/toplevel.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter4/toy.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/Makefile vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/_tags vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/ast.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/bindings.c vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/lexer.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/parser.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/token.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/toplevel.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter5/toy.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/Makefile vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/_tags vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/ast.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/bindings.c vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/lexer.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/parser.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/token.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/toplevel.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter6/toy.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/Makefile vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/_tags vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/ast.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/bindings.c vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/codegen.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/lexer.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/parser.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/token.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/toplevel.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter7/toy.ml vendor/llvm/dist/examples/OCaml-Kaleidoscope/Makefile vendor/llvm/dist/include/llvm/MC/MCAsmLayout.h vendor/llvm/dist/include/llvm/System/Valgrind.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/System/SearchForAddressOfSpecialSymbol.cpp vendor/llvm/dist/lib/System/Valgrind.cpp vendor/llvm/dist/test/CodeGen/ARM/fp16.ll vendor/llvm/dist/test/CodeGen/Generic/addr-label.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll vendor/llvm/dist/test/CodeGen/X86/2007-02-16-BranchFold.ll vendor/llvm/dist/test/CodeGen/X86/2007-05-05-Personality.ll vendor/llvm/dist/test/CodeGen/X86/GC/ vendor/llvm/dist/test/CodeGen/X86/GC/alloc_loop.ll vendor/llvm/dist/test/CodeGen/X86/GC/argpromotion.ll vendor/llvm/dist/test/CodeGen/X86/GC/badreadproto.ll vendor/llvm/dist/test/CodeGen/X86/GC/badrootproto.ll vendor/llvm/dist/test/CodeGen/X86/GC/badwriteproto.ll vendor/llvm/dist/test/CodeGen/X86/GC/deadargelim.ll vendor/llvm/dist/test/CodeGen/X86/GC/dg.exp vendor/llvm/dist/test/CodeGen/X86/GC/fat.ll vendor/llvm/dist/test/CodeGen/X86/GC/inline.ll vendor/llvm/dist/test/CodeGen/X86/GC/inline2.ll vendor/llvm/dist/test/CodeGen/X86/GC/lower_gcroot.ll vendor/llvm/dist/test/CodeGen/X86/GC/outside.ll vendor/llvm/dist/test/CodeGen/X86/GC/simple_ocaml.ll vendor/llvm/dist/test/CodeGen/X86/gather-addresses.ll vendor/llvm/dist/test/CodeGen/X86/ghc-cc.ll vendor/llvm/dist/test/CodeGen/X86/ghc-cc64.ll vendor/llvm/dist/test/CodeGen/X86/liveness-local-regalloc.ll vendor/llvm/dist/test/CodeGen/X86/phys_subreg_coalesce-3.ll vendor/llvm/dist/test/DebugInfo/2010-03-12-llc-crash.ll vendor/llvm/dist/test/FrontendC/2010-03-10-arm-asmreg.c vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-mismatched-add.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-operands.s vendor/llvm/dist/test/MC/MachO/absolutize.s vendor/llvm/dist/test/MC/MachO/relax-jumps.s vendor/llvm/dist/test/MC/MachO/relax-recompute-align.s vendor/llvm/dist/test/MC/MachO/reloc-pcrel-offset.s vendor/llvm/dist/test/MC/MachO/x86_32-sections.s vendor/llvm/dist/test/MC/MachO/x86_32-symbols.s vendor/llvm/dist/test/MC/MachO/x86_64-sections.s vendor/llvm/dist/test/MC/MachO/x86_64-symbols.s vendor/llvm/dist/test/Transforms/InstCombine/gepgep.ll vendor/llvm/dist/unittests/VMCore/InstructionsTest.cpp Deleted: vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDDbgValue.h vendor/llvm/dist/lib/Target/X86/X86MCTargetExpr.cpp vendor/llvm/dist/lib/Target/X86/X86MCTargetExpr.h vendor/llvm/dist/test/CodeGen/Generic/2007-02-16-BranchFold.ll vendor/llvm/dist/test/CodeGen/Generic/2007-05-05-Personality.ll vendor/llvm/dist/test/CodeGen/Generic/GC/ vendor/llvm/dist/test/MC/MachO/sections.s Modified: vendor/llvm/dist/Makefile.rules vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h vendor/llvm/dist/include/llvm/ADT/STLExtras.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/CallingConv.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadata.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineJumpTableInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineLocation.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfoImpls.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/ObjectCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSectionELF.h vendor/llvm/dist/include/llvm/MC/MCSectionMachO.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/OperandTraits.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Target/Mangler.h vendor/llvm/dist/include/llvm/Target/TargetAsmBackend.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetRegistry.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.h vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp vendor/llvm/dist/lib/CodeGen/GCMetadataPrinter.cpp vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfoImpls.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/System/CMakeLists.txt vendor/llvm/dist/lib/System/DynamicLibrary.cpp vendor/llvm/dist/lib/System/Memory.cpp vendor/llvm/dist/lib/System/Unix/Program.inc vendor/llvm/dist/lib/System/Win32/Path.inc vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.h vendor/llvm/dist/lib/Target/ARM/AsmParser/Makefile vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.td vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/CellSDKIntrinsics.td vendor/llvm/dist/lib/Target/CellSPU/SPU64InstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPUOperands.td vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Mangler.cpp vendor/llvm/dist/lib/Target/Mips/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/Makefile vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/Makefile vendor/llvm/dist/lib/Target/X86/TargetInfo/Makefile vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/X86COFFMachineModuleInfo.cpp vendor/llvm/dist/lib/Target/X86/X86COFFMachineModuleInfo.h vendor/llvm/dist/lib/Target/X86/X86CallingConv.td vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86JITInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.h vendor/llvm/dist/lib/Target/XCore/AsmPrinter/Makefile vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/README.txt vendor/llvm/dist/lib/Target/XCore/XCoreISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreMachineFunctionInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/VMCore/IntrinsicInst.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/Generic/2007-04-13-SwitchLowerBadPhi.ll vendor/llvm/dist/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll vendor/llvm/dist/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll vendor/llvm/dist/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll vendor/llvm/dist/test/CodeGen/Generic/2008-08-07-PtrToInt-SmallerInt.ll vendor/llvm/dist/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-10-31-PPCF128Libcalls.ll vendor/llvm/dist/test/CodeGen/PowerPC/indirectbr.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc-prologue.ll vendor/llvm/dist/test/CodeGen/X86/2004-03-30-Select-Max.ll vendor/llvm/dist/test/CodeGen/X86/2008-08-05-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-13-PHIElimBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll vendor/llvm/dist/test/CodeGen/X86/clz.ll vendor/llvm/dist/test/CodeGen/X86/crash.ll vendor/llvm/dist/test/CodeGen/X86/object-size.ll vendor/llvm/dist/test/CodeGen/X86/personality.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/tailcall-largecode.ll vendor/llvm/dist/test/CodeGen/X86/tailcallfp2.ll vendor/llvm/dist/test/CodeGen/XCore/addsub64.ll vendor/llvm/dist/test/CodeGen/XCore/indirectbr.ll vendor/llvm/dist/test/CodeGen/XCore/mul64.ll vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-bit.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-bit_cat.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-encoding.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_32-new-encoder.s vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-new-encoder.s vendor/llvm/dist/test/MC/MachO/Darwin/x86_32_diff_as.s vendor/llvm/dist/test/MC/MachO/symbols-1.s vendor/llvm/dist/test/Other/constant-fold-gep.ll vendor/llvm/dist/test/Scripts/macho-dump vendor/llvm/dist/test/Transforms/InstCombine/shift-sra.ll vendor/llvm/dist/tools/bugpoint/ExecutionDriver.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.h vendor/llvm/dist/tools/edis/EDDisassembler.cpp vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp vendor/llvm/dist/unittests/VMCore/MetadataTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/unittests/VMCore/VerifierTest.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.h vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherOpt.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/lit/lit/TestFormats.py vendor/llvm/dist/utils/mkpatch Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/Makefile.rules Tue Mar 16 16:51:38 2010 (r205218) @@ -1329,7 +1329,7 @@ uninstall-local:: # TOOLALIAS install. ifdef TOOLALIAS -DestToolAlias = $(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) +DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) install-local:: $(DestToolAlias) Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/autoconf/configure.ac Tue Mar 16 16:51:38 2010 (r205218) @@ -1210,6 +1210,7 @@ AC_CHECK_HEADERS([malloc.h setjmp.h sign AC_CHECK_HEADERS([utime.h windows.h]) AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h]) AC_CHECK_HEADERS([sys/types.h sys/ioctl.h malloc/malloc.h mach/mach.h]) +AC_CHECK_HEADERS([valgrind/valgrind.h]) if test "$ENABLE_THREADS" -eq 1 ; then AC_CHECK_HEADERS(pthread.h, AC_SUBST(HAVE_PTHREAD, 1), Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/cmake/config-ix.cmake Tue Mar 16 16:51:38 2010 (r205218) @@ -67,6 +67,7 @@ check_include_file(sys/wait.h HAVE_SYS_W check_include_file(termios.h HAVE_TERMIOS_H) check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(utime.h HAVE_UTIME_H) +check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H) check_include_file(windows.h HAVE_WINDOWS_H) # library checks Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Tue Mar 16 16:51:38 2010 (r205218) @@ -1,8 +1,8 @@ set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMCParser LLVMSupport) -set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget) @@ -11,12 +11,12 @@ set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport) set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem) -set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) @@ -29,41 +29,44 @@ set(MSVC_LIB_DEPS_LLVMInstrumentation LL set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMJIT LLVMAnalysis LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMCodeGen LLVMCore LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa) set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) -set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMSystem ) -set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMSystemZInfo LLVMTarget) +set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZInfo LLVMTarget) set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget) set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa) -set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMX86CodeGen LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport) set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) -set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo) +set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/configure Tue Mar 16 16:51:38 2010 (r205218) @@ -16177,6 +16177,175 @@ fi done + +for ac_header in valgrind/valgrind.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs@cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + if test "$ENABLE_THREADS" -eq 1 ; then for ac_header in pthread.h Modified: vendor/llvm/dist/docs/CodeGenerator.html ============================================================================== --- vendor/llvm/dist/docs/CodeGenerator.html Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/docs/CodeGenerator.html Tue Mar 16 16:51:38 2010 (r205218) @@ -1679,7 +1679,8 @@ $ llc -regalloc=linearscan file.bc -o ln supported on x86/x86-64 and PowerPC. It is performed if:

    -
  • Caller and callee have the calling convention fastcc.
  • +
  • Caller and callee have the calling convention fastcc or + cc 10 (GHC call convention).
  • The call is a tail call - in tail position (ret immediately follows call and ret uses value of call or is void).
  • @@ -2161,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-03-08 22:05:02 +0100 (Mon, 08 Mar 2010) $ + Last modified: $Date: 2010-03-11 01:22:57 +0100 (Thu, 11 Mar 2010) $ Modified: vendor/llvm/dist/docs/LangRef.html ============================================================================== --- vendor/llvm/dist/docs/LangRef.html Tue Mar 16 16:48:58 2010 (r205217) +++ vendor/llvm/dist/docs/LangRef.html Tue Mar 16 16:51:38 2010 (r205218) @@ -255,6 +255,12 @@
  • 'llvm.umul.with.overflow.* Intrinsics
  • +
  • Half Precision Floating Point Intrinsics +
      +
    1. 'llvm.convert.to.fp16' Intrinsic
    2. +
    3. 'llvm.convert.from.fp16' Intrinsic
    4. +
    +
  • Debugger intrinsics
  • Exception Handling intrinsics
  • Trampoline Intrinsic @@ -691,9 +697,9 @@ define i32 @main() { target, without having to conform to an externally specified ABI (Application Binary Interface). Tail calls can only be optimized - when this convention is used. This calling convention does not - support varargs and requires the prototype of all callees to exactly match - the prototype of the function definition. + when this or the GHC convention is used. This calling convention + does not support varargs and requires the prototype of all callees to + exactly match the prototype of the function definition.
    "coldcc" - The cold calling convention:
    This calling convention attempts to make code in the caller as efficient @@ -703,6 +709,26 @@ define i32 @main() { does not support varargs and requires the prototype of all callees to exactly match the prototype of the function definition.
    +
    "cc 10" - GHC convention:
    +
    This calling convention has been implemented specifically for use by the + Glasgow Haskell Compiler (GHC). + It passes everything in registers, going to extremes to achieve this by + disabling callee save registers. This calling convention should not be + used lightly but only for specific situations such as an alternative to + the register pinning performance technique often used when + implementing functional programming languages.At the moment only X86 + supports this convention and it has the following limitations: +
      +
    • On X86-32 only supports up to 4 bit type parameters. No + floating point types are supported.
    • +
    • On X86-64 only supports up to 10 bit type parameters and + 6 floating point parameters.
    • +
    + This calling convention supports + tail call optimization but + requires both the caller and callee are using it. +
    +
    "cc <n>" - Numbered convention:
    Any calling convention may be specified by number, allowing target-specific calling conventions to be used. Target specific calling @@ -6588,6 +6614,97 @@ LLVM.

    + +
    + +

    Half precision floating point is a storage-only format. This means that it is + a dense encoding (in memory) but does not support computation in the + format.

    + +

    This means that code must first load the half-precision floating point + value as an i16, then convert it to float with llvm.convert.from.fp16. + Computation can then be performed on the float value (including extending to + double etc). To store the value back to memory, it is first converted to + float if needed, then converted to i16 with + llvm.convert.to.fp16, then + storing as an i16 value.

    +
    + + + + +
    + +
    Syntax:
    +
    +  declare i16 @llvm.convert.to.fp16(f32 %a)
    +
    + +
    Overview:
    +

    The 'llvm.convert.to.fp16' intrinsic function performs + a conversion from single precision floating point format to half precision + floating point format.

    + +
    Arguments:
    +

    The intrinsic function contains single argument - the value to be + converted.

    + +
    Semantics:
    +

    The 'llvm.convert.to.fp16' intrinsic function performs + a conversion from single precision floating point format to half precision + floating point format. The return value is an i16 which + contains the converted number.

    + +
    Examples:
    +
    +  %res = call i16 @llvm.convert.to.fp16(f32 %a)
    +  store i16 %res, i16* @x, align 2
    +
    + +
    + + + + +
    + +
    Syntax:
    +
    +  declare f32 @llvm.convert.from.fp16(i16 %a)
    +
    + +
    Overview:
    +

    The 'llvm.convert.from.fp16' intrinsic function performs + a conversion from half precision floating point format to single precision + floating point format.

    + +
    Arguments:
    +

    The intrinsic function contains single argument - the value to be + converted.

    + +
    Semantics:
    +

    The 'llvm.convert.from.fp16' intrinsic function performs a + conversion from half single precision floating point format to single + precision floating point format. The input half-float value is represented by + an i16 value.

    + +
    Examples:
    +
    +  %a = load i16* @x, align 2
    +  %res = call f32 @llvm.convert.from.fp16(i16 %a)
    +
    + +
    + + + @@ -7473,7 +7590,7 @@ LLVM.

    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-03-08 22:05:02 +0100 (Mon, 08 Mar 2010) $ + Last modified: $Date: 2010-03-15 05:12:21 +0100 (Mon, 15 Mar 2010) $ Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/Makefile Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,22 @@ +##===- examples/OCaml-Kaleidoscope/Chapter2/Makefile -------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 2. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +TOOLNAME := OCaml-Kaleidoscope-Ch2 +EXAMPLE_TOOL := 1 +UsedComponents := core +UsedOcamLibs := llvm + +OCAMLCFLAGS += -pp camlp4of + +include $(LEVEL)/bindings/ocaml/Makefile.ocaml Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/_tags ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/_tags Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1 @@ +<{lexer,parser}.ml>: use_camlp4, pp(camlp4of) Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/ast.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/ast.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,25 @@ +(*===----------------------------------------------------------------------=== + * Abstract Syntax Tree (aka Parse Tree) + *===----------------------------------------------------------------------===*) + +(* expr - Base type for all expression nodes. *) +type expr = + (* variant for numeric literals like "1.0". *) + | Number of float + + (* variant for referencing a variable, like "a". *) + | Variable of string + + (* variant for a binary operator. *) + | Binary of char * expr * expr + + (* variant for function calls. *) + | Call of string * expr array + +(* proto - This type represents the "prototype" for a function, which captures + * its name, and its argument names (thus implicitly the number of arguments the + * function takes). *) +type proto = Prototype of string * string array + +(* func - This type represents a function definition itself. *) +type func = Function of proto * expr Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/lexer.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/lexer.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,52 @@ +(*===----------------------------------------------------------------------=== + * Lexer + *===----------------------------------------------------------------------===*) + +let rec lex = parser + (* Skip any whitespace. *) + | [< ' (' ' | '\n' | '\r' | '\t'); stream >] -> lex stream + + (* identifier: [a-zA-Z][a-zA-Z0-9] *) + | [< ' ('A' .. 'Z' | 'a' .. 'z' as c); stream >] -> + let buffer = Buffer.create 1 in + Buffer.add_char buffer c; + lex_ident buffer stream + + (* number: [0-9.]+ *) + | [< ' ('0' .. '9' as c); stream >] -> + let buffer = Buffer.create 1 in + Buffer.add_char buffer c; + lex_number buffer stream + + (* Comment until end of line. *) + | [< ' ('#'); stream >] -> + lex_comment stream + + (* Otherwise, just return the character as its ascii value. *) + | [< 'c; stream >] -> + [< 'Token.Kwd c; lex stream >] + + (* end of stream. *) + | [< >] -> [< >] + +and lex_number buffer = parser + | [< ' ('0' .. '9' | '.' as c); stream >] -> + Buffer.add_char buffer c; + lex_number buffer stream + | [< stream=lex >] -> + [< 'Token.Number (float_of_string (Buffer.contents buffer)); stream >] + +and lex_ident buffer = parser + | [< ' ('A' .. 'Z' | 'a' .. 'z' | '0' .. '9' as c); stream >] -> + Buffer.add_char buffer c; + lex_ident buffer stream + | [< stream=lex >] -> + match Buffer.contents buffer with + | "def" -> [< 'Token.Def; stream >] + | "extern" -> [< 'Token.Extern; stream >] + | id -> [< 'Token.Ident id; stream >] + +and lex_comment = parser + | [< ' ('\n'); stream=lex >] -> stream + | [< 'c; e=lex_comment >] -> e + | [< >] -> [< >] Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/parser.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/parser.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,122 @@ +(*===---------------------------------------------------------------------=== + * Parser + *===---------------------------------------------------------------------===*) + +(* binop_precedence - This holds the precedence for each binary operator that is + * defined *) +let binop_precedence:(char, int) Hashtbl.t = Hashtbl.create 10 + +(* precedence - Get the precedence of the pending binary operator token. *) +let precedence c = try Hashtbl.find binop_precedence c with Not_found -> -1 + +(* primary + * ::= identifier + * ::= numberexpr + * ::= parenexpr *) +let rec parse_primary = parser + (* numberexpr ::= number *) + | [< 'Token.Number n >] -> Ast.Number n + + (* parenexpr ::= '(' expression ')' *) + | [< 'Token.Kwd '('; e=parse_expr; 'Token.Kwd ')' ?? "expected ')'" >] -> e + + (* identifierexpr + * ::= identifier + * ::= identifier '(' argumentexpr ')' *) + | [< 'Token.Ident id; stream >] -> + let rec parse_args accumulator = parser + | [< e=parse_expr; stream >] -> + begin parser + | [< 'Token.Kwd ','; e=parse_args (e :: accumulator) >] -> e + | [< >] -> e :: accumulator + end stream + | [< >] -> accumulator + in + let rec parse_ident id = parser + (* Call. *) + | [< 'Token.Kwd '('; + args=parse_args []; + 'Token.Kwd ')' ?? "expected ')'">] -> + Ast.Call (id, Array.of_list (List.rev args)) + + (* Simple variable ref. *) + | [< >] -> Ast.Variable id + in + parse_ident id stream + + | [< >] -> raise (Stream.Error "unknown token when expecting an expression.") + +(* binoprhs + * ::= ('+' primary)* *) +and parse_bin_rhs expr_prec lhs stream = + match Stream.peek stream with + (* If this is a binop, find its precedence. *) + | Some (Token.Kwd c) when Hashtbl.mem binop_precedence c -> + let token_prec = precedence c in + + (* If this is a binop that binds at least as tightly as the current binop, + * consume it, otherwise we are done. *) + if token_prec < expr_prec then lhs else begin + (* Eat the binop. *) + Stream.junk stream; + + (* Parse the primary expression after the binary operator. *) + let rhs = parse_primary stream in + + (* Okay, we know this is a binop. *) + let rhs = + match Stream.peek stream with + | Some (Token.Kwd c2) -> + (* If BinOp binds less tightly with rhs than the operator after + * rhs, let the pending operator take rhs as its lhs. *) + let next_prec = precedence c2 in + if token_prec < next_prec + then parse_bin_rhs (token_prec + 1) rhs stream + else rhs + | _ -> rhs + in + + (* Merge lhs/rhs. *) + let lhs = Ast.Binary (c, lhs, rhs) in + parse_bin_rhs expr_prec lhs stream + end + | _ -> lhs + +(* expression + * ::= primary binoprhs *) +and parse_expr = parser + | [< lhs=parse_primary; stream >] -> parse_bin_rhs 0 lhs stream + +(* prototype + * ::= id '(' id* ')' *) +let parse_prototype = + let rec parse_args accumulator = parser + | [< 'Token.Ident id; e=parse_args (id::accumulator) >] -> e + | [< >] -> accumulator + in + + parser + | [< 'Token.Ident id; + 'Token.Kwd '(' ?? "expected '(' in prototype"; + args=parse_args []; + 'Token.Kwd ')' ?? "expected ')' in prototype" >] -> + (* success. *) + Ast.Prototype (id, Array.of_list (List.rev args)) + + | [< >] -> + raise (Stream.Error "expected function name in prototype") + +(* definition ::= 'def' prototype expression *) +let parse_definition = parser + | [< 'Token.Def; p=parse_prototype; e=parse_expr >] -> + Ast.Function (p, e) + +(* toplevelexpr ::= expression *) +let parse_toplevel = parser + | [< e=parse_expr >] -> + (* Make an anonymous proto. *) + Ast.Function (Ast.Prototype ("", [||]), e) + +(* external ::= 'extern' prototype *) +let parse_extern = parser + | [< 'Token.Extern; e=parse_prototype >] -> e Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/token.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/token.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,15 @@ +(*===----------------------------------------------------------------------=== + * Lexer Tokens + *===----------------------------------------------------------------------===*) + +(* The lexer returns these 'Kwd' if it is an unknown character, otherwise one of + * these others for known things. *) +type token = + (* commands *) + | Def | Extern + + (* primary *) + | Ident of string | Number of float + + (* unknown *) + | Kwd of char Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/toplevel.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/toplevel.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,34 @@ +(*===----------------------------------------------------------------------=== + * Top-Level parsing and JIT Driver + *===----------------------------------------------------------------------===*) + +(* top ::= definition | external | expression | ';' *) +let rec main_loop stream = + match Stream.peek stream with + | None -> () + + (* ignore top-level semicolons. *) + | Some (Token.Kwd ';') -> + Stream.junk stream; + main_loop stream + + | Some token -> + begin + try match token with + | Token.Def -> + ignore(Parser.parse_definition stream); + print_endline "parsed a function definition."; + | Token.Extern -> + ignore(Parser.parse_extern stream); + print_endline "parsed an extern."; + | _ -> + (* Evaluate a top-level expression into an anonymous function. *) + ignore(Parser.parse_toplevel stream); + print_endline "parsed a top-level expr"; + with Stream.Error s -> + (* Skip token for error recovery. *) + Stream.junk stream; + print_endline s; + end; + print_string "ready> "; flush stdout; + main_loop stream Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/toy.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter2/toy.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,21 @@ +(*===----------------------------------------------------------------------=== + * Main driver code. + *===----------------------------------------------------------------------===*) + +let main () = + (* Install standard binary operators. + * 1 is the lowest precedence. *) + Hashtbl.add Parser.binop_precedence '<' 10; + Hashtbl.add Parser.binop_precedence '+' 20; + Hashtbl.add Parser.binop_precedence '-' 20; + Hashtbl.add Parser.binop_precedence '*' 40; (* highest. *) + + (* Prime the first token. *) + print_string "ready> "; flush stdout; + let stream = Lexer.lex (Stream.of_channel stdin) in + + (* Run the main "interpreter loop" now. *) + Toplevel.main_loop stream; +;; + +main () Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/Makefile Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,24 @@ +##===- examples/OCaml-Kaleidoscope/Chapter3/Makefile -------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 3. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +TOOLNAME := OCaml-Kaleidoscope-Ch3 +EXAMPLE_TOOL := 1 +UsedComponents := core +UsedOcamLibs := llvm llvm_analysis + +OCAMLCFLAGS += -pp camlp4of + +ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml + +include $(LEVEL)/bindings/ocaml/Makefile.ocaml Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/_tags ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/_tags Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,2 @@ +<{lexer,parser}.ml>: use_camlp4, pp(camlp4of) +<*.{byte,native}>: g++, use_llvm, use_llvm_analysis Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/ast.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/ast.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,25 @@ +(*===----------------------------------------------------------------------=== + * Abstract Syntax Tree (aka Parse Tree) + *===----------------------------------------------------------------------===*) + +(* expr - Base type for all expression nodes. *) +type expr = + (* variant for numeric literals like "1.0". *) + | Number of float + + (* variant for referencing a variable, like "a". *) + | Variable of string + + (* variant for a binary operator. *) + | Binary of char * expr * expr + + (* variant for function calls. *) + | Call of string * expr array + +(* proto - This type represents the "prototype" for a function, which captures + * its name, and its argument names (thus implicitly the number of arguments the + * function takes). *) +type proto = Prototype of string * string array + +(* func - This type represents a function definition itself. *) +type func = Function of proto * expr Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/codegen.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/codegen.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,100 @@ +(*===----------------------------------------------------------------------=== + * Code Generation + *===----------------------------------------------------------------------===*) + +open Llvm + +exception Error of string + +let context = global_context () +let the_module = create_module context "my cool jit" +let builder = builder context +let named_values:(string, llvalue) Hashtbl.t = Hashtbl.create 10 +let double_type = double_type context + +let rec codegen_expr = function + | Ast.Number n -> const_float double_type n + | Ast.Variable name -> + (try Hashtbl.find named_values name with + | Not_found -> raise (Error "unknown variable name")) + | Ast.Binary (op, lhs, rhs) -> + let lhs_val = codegen_expr lhs in + let rhs_val = codegen_expr rhs in + begin + match op with + | '+' -> build_add lhs_val rhs_val "addtmp" builder + | '-' -> build_sub lhs_val rhs_val "subtmp" builder + | '*' -> build_mul lhs_val rhs_val "multmp" builder + | '<' -> + (* Convert bool 0/1 to double 0.0 or 1.0 *) + let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in + build_uitofp i double_type "booltmp" builder + | _ -> raise (Error "invalid binary operator") + end + | Ast.Call (callee, args) -> + (* Look up the name in the module table. *) + let callee = + match lookup_function callee the_module with + | Some callee -> callee + | None -> raise (Error "unknown function referenced") + in + let params = params callee in + + (* If argument mismatch error. *) + if Array.length params == Array.length args then () else + raise (Error "incorrect # arguments passed"); + let args = Array.map codegen_expr args in + build_call callee args "calltmp" builder + +let codegen_proto = function + | Ast.Prototype (name, args) -> + (* Make the function type: double(double,double) etc. *) + let doubles = Array.make (Array.length args) double_type in + let ft = function_type double_type doubles in + let f = + match lookup_function name the_module with + | None -> declare_function name ft the_module + + (* If 'f' conflicted, there was already something named 'name'. If it + * has a body, don't allow redefinition or reextern. *) + | Some f -> + (* If 'f' already has a body, reject this. *) + if block_begin f <> At_end f then + raise (Error "redefinition of function"); + + (* If 'f' took a different number of arguments, reject. *) + if element_type (type_of f) <> ft then + raise (Error "redefinition of function with different # args"); + f + in + + (* Set names for all arguments. *) + Array.iteri (fun i a -> + let n = args.(i) in + set_value_name n a; + Hashtbl.add named_values n a; + ) (params f); + f + +let codegen_func = function + | Ast.Function (proto, body) -> + Hashtbl.clear named_values; + let the_function = codegen_proto proto in + + (* Create a new basic block to start insertion into. *) + let bb = append_block context "entry" the_function in + position_at_end bb builder; + + try + let ret_val = codegen_expr body in + + (* Finish off the function. *) + let _ = build_ret ret_val builder in + + (* Validate the generated code, checking for consistency. *) + Llvm_analysis.assert_valid_function the_function; + + the_function + with e -> + delete_function the_function; + raise e Added: vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/lexer.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/examples/OCaml-Kaleidoscope/Chapter3/lexer.ml Tue Mar 16 16:51:38 2010 (r205218) @@ -0,0 +1,52 @@ +(*===----------------------------------------------------------------------=== + * Lexer + *===----------------------------------------------------------------------===*) + +let rec lex = parser + (* Skip any whitespace. *) + | [< ' (' ' | '\n' | '\r' | '\t'); stream >] -> lex stream + + (* identifier: [a-zA-Z][a-zA-Z0-9] *) + | [< ' ('A' .. 'Z' | 'a' .. 'z' as c); stream >] -> + let buffer = Buffer.create 1 in + Buffer.add_char buffer c; + lex_ident buffer stream + + (* number: [0-9.]+ *) + | [< ' ('0' .. '9' as c); stream >] -> + let buffer = Buffer.create 1 in + Buffer.add_char buffer c; + lex_number buffer stream + + (* Comment until end of line. *) + | [< ' ('#'); stream >] -> + lex_comment stream + + (* Otherwise, just return the character as its ascii value. *) + | [< 'c; stream >] -> + [< 'Token.Kwd c; lex stream >] + + (* end of stream. *) + | [< >] -> [< >] + +and lex_number buffer = parser + | [< ' ('0' .. '9' | '.' as c); stream >] -> + Buffer.add_char buffer c; + lex_number buffer stream + | [< stream=lex >] -> + [< 'Token.Number (float_of_string (Buffer.contents buffer)); stream >] + +and lex_ident buffer = parser + | [< ' ('A' .. 'Z' | 'a' .. 'z' | '0' .. '9' as c); stream >] -> + Buffer.add_char buffer c; + lex_ident buffer stream + | [< stream=lex >] -> + match Buffer.contents buffer with *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 16:52:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A46C1065670; Tue, 16 Mar 2010 16:52:16 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 254C58FC2A; Tue, 16 Mar 2010 16:52:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GGqGv9039949; Tue, 16 Mar 2010 16:52:16 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GGqFnb039936; Tue, 16 Mar 2010 16:52:15 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201003161652.o2GGqFnb039936@svn.freebsd.org> From: Roman Divacky Date: Tue, 16 Mar 2010 16:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205219 - in vendor/clang/dist: . clang.xcodeproj include/clang-c include/clang/AST include/clang/Analysis include/clang/Basic include/clang/Checker/PathSensitive include/clang/Driver i... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 16:52:16 -0000 Author: rdivacky Date: Tue Mar 16 16:52:15 2010 New Revision: 205219 URL: http://svn.freebsd.org/changeset/base/205219 Log: Update clang to r98631. Added: vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/lib/AST/DeclFriend.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p7.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p8.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.local/p9.cpp vendor/clang/dist/test/CodeGen/varargs.c vendor/clang/dist/test/PCH/changed-files.c vendor/clang/dist/test/Parser/missing-end.m vendor/clang/dist/test/Rewriter/rewrite-local-externs-in-block.mm vendor/clang/dist/test/Rewriter/rewrite-super-message.mm vendor/clang/dist/test/Sema/missing-field-initializers.c vendor/clang/dist/test/Sema/warn-unused-value.c vendor/clang/dist/test/Sema/warn-write-strings.c vendor/clang/dist/test/SemaCXX/PR6562.cpp vendor/clang/dist/test/SemaCXX/warn-unused-value.cpp vendor/clang/dist/test/SemaObjC/duplicate-property.m vendor/clang/dist/test/SemaObjC/warn-write-strings.m Modified: vendor/clang/dist/Makefile vendor/clang/dist/clang.xcodeproj/project.pbxproj vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclVisitor.h vendor/clang/dist/include/clang/AST/RecordLayout.h vendor/clang/dist/include/clang/Analysis/CFG.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/IdentifierTable.h vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Checker/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Driver/Action.h vendor/clang/dist/include/clang/Driver/ArgList.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Job.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Lex/PTHManager.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/Makefile vendor/clang/dist/lib/AST/RecordLayout.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.h vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/Makefile vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/SourceLocation.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Checker/GRExprEngine.cpp vendor/clang/dist/lib/Checker/Makefile vendor/clang/dist/lib/Checker/RegionStore.cpp vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGVtable.cpp vendor/clang/dist/lib/CodeGen/CGVtable.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/Makefile vendor/clang/dist/lib/CodeGen/Mangle.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Action.cpp vendor/clang/dist/lib/Driver/ArgList.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/Job.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CacheTokens.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/HTMLDiagnostics.cpp vendor/clang/dist/lib/Frontend/Makefile vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Frontend/PCHReaderDecl.cpp vendor/clang/dist/lib/Frontend/PCHWriter.cpp vendor/clang/dist/lib/Frontend/PCHWriterDecl.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/RewriteMacros.cpp vendor/clang/dist/lib/Frontend/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Index/Entity.cpp vendor/clang/dist/lib/Index/GlobalSelector.cpp vendor/clang/dist/lib/Index/Makefile vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/Makefile vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PTHLexer.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/TokenLexer.cpp vendor/clang/dist/lib/Parse/Makefile vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp vendor/clang/dist/lib/Rewrite/Makefile vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/Makefile vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/test/CXX/class.access/class.friend/p1.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp vendor/clang/dist/test/CodeGenCXX/PR6474.cpp vendor/clang/dist/test/CodeGenCXX/explicit-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp vendor/clang/dist/test/CodeGenCXX/mangle-template.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-templates.cpp vendor/clang/dist/test/CodeGenCXX/template-linkage.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp vendor/clang/dist/test/Sema/compare.c vendor/clang/dist/test/Sema/overloadable.c vendor/clang/dist/test/Sema/return.c vendor/clang/dist/test/SemaCXX/decl-expr-ambiguity.cpp vendor/clang/dist/test/SemaObjCXX/objc-pointer-conv.mm vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp vendor/clang/dist/test/SemaTemplate/virtual-member-functions.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndex.exports vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexUSRs.cpp vendor/clang/dist/tools/CIndex/Makefile vendor/clang/dist/tools/Makefile vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/www/analyzer/index.html vendor/clang/dist/www/analyzer/latest_checker.html.incl Modified: vendor/clang/dist/Makefile ============================================================================== --- vendor/clang/dist/Makefile Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/Makefile Tue Mar 16 16:52:15 2010 (r205219) @@ -39,19 +39,19 @@ cscope.files: install-local:: $(Echo) Installing include files - $(Verb) $(MKDIR) $(PROJ_includedir) + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir) $(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include" ; then \ cd $(PROJ_SRC_ROOT)/tools/clang/include && \ for hdr in `find . -type f '!' '(' -name '*~' \ -o -name '.#*' -o -name '*.in' -o -name '*.txt' \ -o -name 'Makefile' -o -name '*.td' ')' -print \ | grep -v CVS | grep -v .svn | grep -v .dir` ; do \ - instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \ + instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \ if test \! -d "$$instdir" ; then \ $(EchoCmd) Making install directory $$instdir ; \ $(MKDIR) $$instdir ;\ fi ; \ - $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \ + $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ done ; \ fi ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) @@ -59,7 +59,7 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT) cd $(PROJ_OBJ_ROOT)/tools/clang/include && \ for hdr in `find . -type f '!' '(' -name 'Makefile' ')' -print \ | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \ - $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \ + $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ done ; \ fi endif Modified: vendor/clang/dist/clang.xcodeproj/project.pbxproj ============================================================================== --- vendor/clang/dist/clang.xcodeproj/project.pbxproj Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/clang.xcodeproj/project.pbxproj Tue Mar 16 16:52:15 2010 (r205219) @@ -49,6 +49,7 @@ 1A81AA19108144F40094E50B /* CGVtable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A81AA18108144F40094E50B /* CGVtable.cpp */; }; 1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */; }; 1A869AA80BA21ABA008DA07A /* LiteralSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */; }; + 1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A96785111486FDC00F24372 /* RecordLayout.cpp */; }; 1A97825B1108BA18002B98FC /* CGVTT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A97825A1108BA18002B98FC /* CGVTT.cpp */; }; 1A986AB710D0746D00A8EA9E /* CGDeclCXX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */; }; 1AA1D91810125DE30078DEBC /* RecordLayoutBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */; }; @@ -420,6 +421,7 @@ 1A81AA5D108278A20094E50B /* CGVtable.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CGVtable.h; path = lib/CodeGen/CGVtable.h; sourceTree = ""; tabWidth = 2; }; 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiteralSupport.h; sourceTree = ""; }; 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralSupport.cpp; sourceTree = ""; }; + 1A96785111486FDC00F24372 /* RecordLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayout.cpp; path = lib/AST/RecordLayout.cpp; sourceTree = ""; tabWidth = 2; }; 1A97825A1108BA18002B98FC /* CGVTT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGVTT.cpp; path = lib/CodeGen/CGVTT.cpp; sourceTree = ""; tabWidth = 2; }; 1A986AB610D0746D00A8EA9E /* CGDeclCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CGDeclCXX.cpp; path = lib/CodeGen/CGDeclCXX.cpp; sourceTree = ""; tabWidth = 2; }; 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = RecordLayoutBuilder.cpp; path = lib/AST/RecordLayoutBuilder.cpp; sourceTree = ""; tabWidth = 2; }; @@ -1438,6 +1440,7 @@ 3557D1A80EB136B100C59739 /* InheritViz.cpp */, DEDFE5CE0F7206E40035BD10 /* NestedNameSpecifier.cpp */, 35EE48B00E0C4CCA00715C54 /* ParentMap.cpp */, + 1A96785111486FDC00F24372 /* RecordLayout.cpp */, 1AA1D91610125DE30078DEBC /* RecordLayoutBuilder.cpp */, 1AA1D91710125DE30078DEBC /* RecordLayoutBuilder.h */, DE3452400AEF1A2D00DBC861 /* Stmt.cpp */, @@ -1993,6 +1996,7 @@ 1A621C4411111D61009E6834 /* CIndexInclusionStack.cpp in Sources */, 1A621C4511111D61009E6834 /* CIndexUSRs.cpp in Sources */, 1A621C4611111D61009E6834 /* CXCursor.cpp in Sources */, + 1A96785211486FDC00F24372 /* RecordLayout.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang-c/Index.h Tue Mar 16 16:52:15 2010 (r205219) @@ -171,7 +171,7 @@ CINDEX_LINKAGE void clang_disposeString( */ CINDEX_LINKAGE CXIndex clang_createIndex(int excludeDeclarationsFromPCH, int displayDiagnostics); - + /** * \brief Destroy the given index. * @@ -297,7 +297,7 @@ CINDEX_LINKAGE CXSourceLocation clang_ge * \brief Retrieve a NULL (invalid) source range. */ CINDEX_LINKAGE CXSourceRange clang_getNullRange(); - + /** * \brief Retrieve a source range given the beginning and ending source * locations. @@ -357,11 +357,11 @@ CINDEX_LINKAGE CXSourceLocation clang_ge */ enum CXDiagnosticSeverity { /** - * \brief A diagnostic that has been suppressed, e.g., by a command-line + * \brief A diagnostic that has been suppressed, e.g., by a command-line * option. */ CXDiagnostic_Ignored = 0, - + /** * \brief This diagnostic is a note that should be attached to the * previous (non-note) diagnostic. @@ -451,7 +451,7 @@ enum CXDiagnosticDisplayOptions { * diagnostic, also include information about source ranges in a * machine-parsable format. * - * This option corresponds to the clang flag + * This option corresponds to the clang flag * \c -fdiagnostics-print-source-range-info. */ CXDiagnostic_DisplaySourceRanges = 0x04 @@ -461,13 +461,13 @@ enum CXDiagnosticDisplayOptions { * \brief Format the given diagnostic in a manner that is suitable for display. * * This routine will format the given diagnostic to a string, rendering - * the diagnostic according to the various options given. The - * \c clang_defaultDiagnosticDisplayOptions() function returns the set of + * the diagnostic according to the various options given. The + * \c clang_defaultDiagnosticDisplayOptions() function returns the set of * options that most closely mimics the behavior of the clang compiler. * * \param Diagnostic The diagnostic to print. * - * \param Options A set of options that control the diagnostic display, + * \param Options A set of options that control the diagnostic display, * created by combining \c CXDiagnosticDisplayOptions values. * * \returns A new string containing for formatted diagnostic. @@ -491,7 +491,7 @@ CINDEX_LINKAGE unsigned clang_defaultDia /** * \brief Determine the severity of the given diagnostic. */ -CINDEX_LINKAGE enum CXDiagnosticSeverity +CINDEX_LINKAGE enum CXDiagnosticSeverity clang_getDiagnosticSeverity(CXDiagnostic); /** @@ -512,21 +512,21 @@ CINDEX_LINKAGE CXString clang_getDiagnos * diagnostic. */ CINDEX_LINKAGE unsigned clang_getDiagnosticNumRanges(CXDiagnostic); - + /** * \brief Retrieve a source range associated with the diagnostic. * * A diagnostic's source ranges highlight important elements in the source * code. On the command line, Clang displays source ranges by - * underlining them with '~' characters. + * underlining them with '~' characters. * * \param Diagnostic the diagnostic whose range is being extracted. * - * \param Range the zero-based index specifying which range to + * \param Range the zero-based index specifying which range to * * \returns the requested source range. */ -CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic, +CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic, unsigned Range); /** @@ -560,7 +560,7 @@ CINDEX_LINKAGE unsigned clang_getDiagnos * \returns A string containing text that should be replace the source * code indicated by the \c ReplacementRange. */ -CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, +CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, unsigned FixIt, CXSourceRange *ReplacementRange); @@ -577,7 +577,7 @@ CINDEX_LINKAGE CXString clang_getDiagnos * * @{ */ - + /** * \brief Get the original translation unit source file name. */ @@ -625,22 +625,22 @@ CINDEX_LINKAGE CXTranslationUnit clang_c const char **clang_command_line_args, unsigned num_unsaved_files, struct CXUnsavedFile *unsaved_files); - + /** * \brief Create a translation unit from an AST file (-emit-ast). */ -CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(CXIndex, +CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(CXIndex, const char *ast_filename); /** * \brief Destroy the specified CXTranslationUnit object. */ CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit); - + /** * @} */ - + /** * \brief Describes the kind of entity that a cursor refers to. */ @@ -1083,6 +1083,47 @@ CINDEX_LINKAGE unsigned clang_visitChild CINDEX_LINKAGE CXString clang_getCursorUSR(CXCursor); /** + * \brief Construct a USR for a specified Objective-C class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCClass(const char *class_name); + +/** + * \brief Construct a USR for a specified Objective-C category. + */ +CINDEX_LINKAGE CXString + clang_constructUSR_ObjCCategory(const char *class_name, + const char *category_name); + +/** + * \brief Construct a USR for a specified Objective-C protocol. + */ +CINDEX_LINKAGE CXString + clang_constructUSR_ObjCProtocol(const char *protocol_name); + + +/** + * \brief Construct a USR for a specified Objective-C instance variable and + * the USR for its containing class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCIvar(const char *name, + CXString classUSR); + +/** + * \brief Construct a USR for a specified Objective-C method and + * the USR for its containing class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCMethod(const char *name, + unsigned isInstanceMethod, + CXString classUSR); + +/** + * \brief Construct a USR for a specified Objective-C property and the USR + * for its containing class. + */ +CINDEX_LINKAGE CXString clang_constructUSR_ObjCProperty(const char *property, + CXString classUSR); + +/** * \brief Retrieve a name for the entity referenced by this cursor. */ CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor); @@ -1157,22 +1198,22 @@ typedef enum CXTokenKind { * \brief A token that contains some kind of punctuation. */ CXToken_Punctuation, - + /** * \brief A language keyword. */ CXToken_Keyword, - + /** * \brief An identifier (that is not a keyword). */ CXToken_Identifier, - + /** * \brief A numeric, string, or character literal. */ CXToken_Literal, - + /** * \brief A comment. */ @@ -1191,7 +1232,7 @@ typedef struct { * \brief Determine the kind of the given token. */ CINDEX_LINKAGE CXTokenKind clang_getTokenKind(CXToken); - + /** * \brief Determine the spelling of the given token. * @@ -1199,13 +1240,13 @@ CINDEX_LINKAGE CXTokenKind clang_getToke * the text of an identifier or keyword. */ CINDEX_LINKAGE CXString clang_getTokenSpelling(CXTranslationUnit, CXToken); - + /** * \brief Retrieve the source location of the given token. */ -CINDEX_LINKAGE CXSourceLocation clang_getTokenLocation(CXTranslationUnit, +CINDEX_LINKAGE CXSourceLocation clang_getTokenLocation(CXTranslationUnit, CXToken); - + /** * \brief Retrieve a source range that covers the given token. */ @@ -1230,7 +1271,7 @@ CINDEX_LINKAGE CXSourceRange clang_getTo */ CINDEX_LINKAGE void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range, CXToken **Tokens, unsigned *NumTokens); - + /** * \brief Annotate the given set of tokens by providing cursors for each token * that can be mapped to a specific entity within the abstract syntax tree. @@ -1264,17 +1305,17 @@ CINDEX_LINKAGE void clang_tokenize(CXTra CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU, CXToken *Tokens, unsigned NumTokens, CXCursor *Cursors); - + /** * \brief Free the given set of tokens. */ -CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, +CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, CXToken *Tokens, unsigned NumTokens); - + /** * @} */ - + /** * \defgroup CINDEX_DEBUG Debugging facilities * @@ -1689,7 +1730,7 @@ void clang_disposeCodeCompleteResults(CX * \brief Determine the number of diagnostics produced prior to the * location where code completion was performed. */ -CINDEX_LINKAGE +CINDEX_LINKAGE unsigned clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults *Results); /** @@ -1701,7 +1742,7 @@ unsigned clang_codeCompleteGetNumDiagnos * \returns the requested diagnostic. This diagnostic must be freed * via a call to \c clang_disposeDiagnostic(). */ -CINDEX_LINKAGE +CINDEX_LINKAGE CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results, unsigned Index); @@ -1726,10 +1767,10 @@ CINDEX_LINKAGE CXString clang_getClangVe * \brief Return a version string, suitable for showing to a user, but not * intended to be parsed (the format is not guaranteed to be stable). */ - - + + /** - * \brief Visitor invoked for each file in a translation unit + * \brief Visitor invoked for each file in a translation unit * (used with clang_getInclusions()). * * This visitor function will be invoked by clang_getInclusions() for each Modified: vendor/clang/dist/include/clang/AST/ASTContext.h ============================================================================== --- vendor/clang/dist/include/clang/AST/ASTContext.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/ASTContext.h Tue Mar 16 16:52:15 2010 (r205219) @@ -40,6 +40,7 @@ namespace clang { class ASTRecordLayout; class BlockExpr; class CharUnits; + class Diagnostic; class Expr; class ExternalASTSource; class IdentifierTable; @@ -950,8 +951,6 @@ public: llvm::SmallVectorImpl &Ivars); void CollectNonClassIvars(const ObjCInterfaceDecl *OI, llvm::SmallVectorImpl &Ivars); - void CollectProtocolSynthesizedIvars(const ObjCProtocolDecl *PD, - llvm::SmallVectorImpl &Ivars); unsigned CountSynthesizedIvars(const ObjCInterfaceDecl *OI); unsigned CountProtocolSynthesizedIvars(const ObjCProtocolDecl *PD); void CollectInheritedProtocols(const Decl *CDecl, Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/Decl.h Tue Mar 16 16:52:15 2010 (r205219) @@ -319,7 +319,19 @@ public: /// \brief Represents a ValueDecl that came out of a declarator. /// Contains type source information through TypeSourceInfo. class DeclaratorDecl : public ValueDecl { - TypeSourceInfo *DeclInfo; + // A struct representing both a TInfo and a syntactic qualifier, + // to be used for the (uncommon) case of out-of-line declarations. + struct ExtInfo { + TypeSourceInfo *TInfo; + NestedNameSpecifier *NNS; + SourceRange NNSRange; + }; + + llvm::PointerUnion DeclInfo; + + bool hasExtInfo() const { return DeclInfo.is(); } + ExtInfo *getExtInfo() { return DeclInfo.get(); } + const ExtInfo *getExtInfo() const { return DeclInfo.get(); } protected: DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L, @@ -327,8 +339,29 @@ protected: : ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo) {} public: - TypeSourceInfo *getTypeSourceInfo() const { return DeclInfo; } - void setTypeSourceInfo(TypeSourceInfo *TInfo) { DeclInfo = TInfo; } + virtual ~DeclaratorDecl(); + virtual void Destroy(ASTContext &C); + + TypeSourceInfo *getTypeSourceInfo() const { + return hasExtInfo() + ? DeclInfo.get()->TInfo + : DeclInfo.get(); + } + void setTypeSourceInfo(TypeSourceInfo *TI) { + if (hasExtInfo()) + DeclInfo.get()->TInfo = TI; + else + DeclInfo = TI; + } + + NestedNameSpecifier *getQualifier() const { + return hasExtInfo() ? DeclInfo.get()->NNS : 0; + } + SourceRange getQualifierRange() const { + return hasExtInfo() ? DeclInfo.get()->NNSRange : SourceRange(); + } + void setQualifierInfo(NestedNameSpecifier *Qualifier, + SourceRange QualifierRange); SourceLocation getTypeSpecStartLoc() const; @@ -500,7 +533,8 @@ public: bool isExternC() const; /// isBlockVarDecl - Returns true for local variable declarations. Note that - /// this includes static variables inside of functions. + /// this includes static variables inside of functions. It also includes + /// variables inside blocks. /// /// void foo() { int x; static int y; extern int z; } /// @@ -512,6 +546,17 @@ public: return false; } + /// isFunctionOrMethodVarDecl - Similar to isBlockVarDecl, but excludes + /// variables declared in blocks. + bool isFunctionOrMethodVarDecl() const { + if (getKind() != Decl::Var) + return false; + if (const DeclContext *DC = getDeclContext()) + return DC->getLookupContext()->isFunctionOrMethod() && + DC->getLookupContext()->getDeclKind() != Decl::Block; + return false; + } + /// \brief Determines whether this is a static data member. /// /// This will only be true in C++, and applies to, e.g., the @@ -797,12 +842,14 @@ class ParmVarDecl : public VarDecl { /// FIXME: Also can be paced into the bitfields in Decl. /// in, inout, etc. unsigned objcDeclQualifier : 6; + bool HasInheritedDefaultArg : 1; protected: ParmVarDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, Expr *DefArg) - : VarDecl(DK, DC, L, Id, T, TInfo, S), objcDeclQualifier(OBJC_TQ_None) { + : VarDecl(DK, DC, L, Id, T, TInfo, S), + objcDeclQualifier(OBJC_TQ_None), HasInheritedDefaultArg(false) { setDefaultArg(DefArg); } @@ -881,6 +928,14 @@ public: Init = (UnparsedDefaultArgument *)0; } + bool hasInheritedDefaultArg() const { + return HasInheritedDefaultArg; + } + + void setHasInheritedDefaultArg(bool I = true) { + HasInheritedDefaultArg = I; + } + QualType getOriginalType() const { if (getTypeSourceInfo()) return getTypeSourceInfo()->getType(); @@ -1512,22 +1567,38 @@ private: /// IsEmbeddedInDeclarator - True if this tag declaration is /// "embedded" (i.e., defined or declared for the very first time) - /// in the syntax of a declarator, + /// in the syntax of a declarator. bool IsEmbeddedInDeclarator : 1; - /// TypedefForAnonDecl - If a TagDecl is anonymous and part of a typedef, - /// this points to the TypedefDecl. Used for mangling. - TypedefDecl *TypedefForAnonDecl; - SourceLocation TagKeywordLoc; SourceLocation RBraceLoc; + // A struct representing syntactic qualifier info, + // to be used for the (uncommon) case of out-of-line declarations. + struct ExtInfo { + NestedNameSpecifier *NNS; + SourceRange NNSRange; + }; + + /// TypedefDeclOrQualifier - If the (out-of-line) tag declaration name + /// is qualified, it points to the qualifier info (nns and range); + /// otherwise, if the tag declaration is anonymous and it is part of + /// a typedef, it points to the TypedefDecl (used for mangling); + /// otherwise, it is a null (TypedefDecl) pointer. + llvm::PointerUnion TypedefDeclOrQualifier; + + bool hasExtInfo() const { return TypedefDeclOrQualifier.is(); } + ExtInfo *getExtInfo() { return TypedefDeclOrQualifier.get(); } + const ExtInfo *getExtInfo() const { + return TypedefDeclOrQualifier.get(); + } + protected: - TagDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, TagDecl *PrevDecl, - SourceLocation TKL = SourceLocation()) - : TypeDecl(DK, DC, L, Id), DeclContext(DK), TypedefForAnonDecl(0), - TagKeywordLoc(TKL) { + TagDecl(Kind DK, TagKind TK, DeclContext *DC, + SourceLocation L, IdentifierInfo *Id, + TagDecl *PrevDecl, SourceLocation TKL = SourceLocation()) + : TypeDecl(DK, DC, L, Id), DeclContext(DK), TagKeywordLoc(TKL), + TypedefDeclOrQualifier((TypedefDecl*) 0) { assert((DK != Enum || TK == TK_enum) &&"EnumDecl not matched with TK_enum"); TagDeclKind = TK; IsDefinition = false; @@ -1539,6 +1610,8 @@ protected: virtual TagDecl *getNextRedeclaration() { return RedeclLink.getNext(); } public: + void Destroy(ASTContext &C); + typedef redeclarable_base::redecl_iterator redecl_iterator; redecl_iterator redecls_begin() const { return redeclarable_base::redecls_begin(); @@ -1618,8 +1691,21 @@ public: bool isUnion() const { return getTagKind() == TK_union; } bool isEnum() const { return getTagKind() == TK_enum; } - TypedefDecl *getTypedefForAnonDecl() const { return TypedefForAnonDecl; } - void setTypedefForAnonDecl(TypedefDecl *TDD) { TypedefForAnonDecl = TDD; } + TypedefDecl *getTypedefForAnonDecl() const { + return hasExtInfo() ? 0 : TypedefDeclOrQualifier.get(); + } + void setTypedefForAnonDecl(TypedefDecl *TDD) { TypedefDeclOrQualifier = TDD; } + + NestedNameSpecifier *getQualifier() const { + return hasExtInfo() ? TypedefDeclOrQualifier.get()->NNS : 0; + } + SourceRange getQualifierRange() const { + return hasExtInfo() + ? TypedefDeclOrQualifier.get()->NNSRange + : SourceRange(); + } + void setQualifierInfo(NestedNameSpecifier *Qualifier, + SourceRange QualifierRange); // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return classofKind(D->getKind()); } Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Tue Mar 16 16:52:15 2010 (r205219) @@ -660,7 +660,7 @@ public: /// \brief Determine whether this declaration context is equivalent /// to the declaration context DC. bool Equals(DeclContext *DC) { - return this->getPrimaryContext() == DC->getPrimaryContext(); + return DC && this->getPrimaryContext() == DC->getPrimaryContext(); } /// \brief Determine whether this declaration context encloses the Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Tue Mar 16 16:52:15 2010 (r205219) @@ -7,7 +7,8 @@ // //===----------------------------------------------------------------------===// // -// This file defines the C++ Decl subclasses. +// This file defines the C++ Decl subclasses, other than those for +// templates (in DeclTemplate.h) and friends (in DeclFriend.h). // //===----------------------------------------------------------------------===// @@ -32,6 +33,7 @@ class CXXDestructorDecl; class CXXMethodDecl; class CXXRecordDecl; class CXXMemberLookupCriteria; +class FriendDecl; /// \brief Represents any kind of function declaration, whether it is a /// concrete function or a function template. @@ -298,6 +300,11 @@ class CXXRecordDecl : public RecordDecl /// Definition - The declaration which defines this record. CXXRecordDecl *Definition; + /// FirstFriend - The first friend declaration in this class, or + /// null if there aren't any. This is actually currently stored + /// in reverse order. + FriendDecl *FirstFriend; + } *DefinitionData; struct DefinitionData &data() { @@ -322,12 +329,6 @@ class CXXRecordDecl : public RecordDecl llvm::PointerUnion TemplateOrInstantiation; - void getNestedVisibleConversionFunctions(CXXRecordDecl *RD, - const llvm::SmallPtrSet &TopConversionsTypeSet, - const llvm::SmallPtrSet &HiddenConversionTypes); - void collectConversionFunctions( - llvm::SmallPtrSet& ConversionsTypeSet) const; - protected: CXXRecordDecl(Kind K, TagKind TK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, @@ -458,6 +459,13 @@ public: return ctor_iterator(decls_end()); } + /// An iterator over friend declarations. All of these are defined + /// in DeclFriend.h. + class friend_iterator; + friend_iterator friend_begin() const; + friend_iterator friend_end() const; + void pushFriendDecl(FriendDecl *FD); + /// hasConstCopyConstructor - Determines whether this class has a /// copy constructor that accepts a const-qualified argument. bool hasConstCopyConstructor(ASTContext &Context) const; @@ -545,14 +553,6 @@ public: /// in current class; including conversion function templates. const UnresolvedSetImpl *getVisibleConversionFunctions(); - /// addVisibleConversionFunction - Add a new conversion function to the - /// list of visible conversion functions. - void addVisibleConversionFunction(CXXConversionDecl *ConvDecl); - - /// \brief Add a new conversion function template to the list of visible - /// conversion functions. - void addVisibleConversionFunction(FunctionTemplateDecl *ConvDecl); - /// addConversionFunction - Add a new conversion function to the /// list of conversion functions. void addConversionFunction(CXXConversionDecl *ConvDecl); @@ -1385,77 +1385,6 @@ public: static bool classofKind(Kind K) { return K == CXXConversion; } }; -/// FriendDecl - Represents the declaration of a friend entity, -/// which can be a function, a type, or a templated function or type. -// For example: -/// -/// @code -/// template class A { -/// friend int foo(T); -/// friend class B; -/// friend T; // only in C++0x -/// template friend class C; -/// template friend A& operator+=(A&, const U&) { ... } -/// }; -/// @endcode -/// -/// The semantic context of a friend decl is its declaring class. -class FriendDecl : public Decl { -public: - typedef llvm::PointerUnion FriendUnion; - -private: - // The declaration that's a friend of this class. - FriendUnion Friend; - - // Location of the 'friend' specifier. - SourceLocation FriendLoc; - - // FIXME: Hack to keep track of whether this was a friend function - // template specialization. - bool WasSpecialization; - - FriendDecl(DeclContext *DC, SourceLocation L, FriendUnion Friend, - SourceLocation FriendL) - : Decl(Decl::Friend, DC, L), - Friend(Friend), - FriendLoc(FriendL), - WasSpecialization(false) { - } - -public: - static FriendDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, FriendUnion Friend_, - SourceLocation FriendL); - - /// If this friend declaration names an (untemplated but - /// possibly dependent) type, return the type; otherwise - /// return null. This is used only for C++0x's unelaborated - /// friend type declarations. - Type *getFriendType() const { - return Friend.dyn_cast(); - } - - /// If this friend declaration doesn't name an unelaborated - /// type, return the inner declaration. - NamedDecl *getFriendDecl() const { - return Friend.dyn_cast(); - } - - /// Retrieves the location of the 'friend' keyword. - SourceLocation getFriendLoc() const { - return FriendLoc; - } - - bool wasSpecialization() const { return WasSpecialization; } - void setSpecialization(bool WS) { WasSpecialization = WS; } - - // Implement isa/cast/dyncast/etc. - static bool classof(const Decl *D) { return classofKind(D->getKind()); } - static bool classof(const FriendDecl *D) { return true; } - static bool classofKind(Kind K) { return K == Decl::Friend; } -}; - /// LinkageSpecDecl - This represents a linkage specification. For example: /// extern "C" void foo(); /// Added: vendor/clang/dist/include/clang/AST/DeclFriend.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/include/clang/AST/DeclFriend.h Tue Mar 16 16:52:15 2010 (r205219) @@ -0,0 +1,167 @@ +//===-- DeclFriend.h - Classes for C++ friend declarations -*- C++ -*------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the section of the AST representing C++ friend +// declarations. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_AST_DECLFRIEND_H +#define LLVM_CLANG_AST_DECLFRIEND_H + +#include "clang/AST/DeclCXX.h" + +namespace clang { + +/// FriendDecl - Represents the declaration of a friend entity, +/// which can be a function, a type, or a templated function or type. +// For example: +/// +/// @code +/// template class A { +/// friend int foo(T); +/// friend class B; +/// friend T; // only in C++0x +/// template friend class C; +/// template friend A& operator+=(A&, const U&) { ... } +/// }; +/// @endcode +/// +/// The semantic context of a friend decl is its declaring class. +class FriendDecl : public Decl { +public: + typedef llvm::PointerUnion FriendUnion; + +private: + // The declaration that's a friend of this class. + FriendUnion Friend; + + // A pointer to the next friend in the sequence. + FriendDecl *NextFriend; + + // Location of the 'friend' specifier. + SourceLocation FriendLoc; + + // FIXME: Hack to keep track of whether this was a friend function + // template specialization. + bool WasSpecialization; + + friend class CXXRecordDecl::friend_iterator; + friend class CXXRecordDecl; + + FriendDecl(DeclContext *DC, SourceLocation L, FriendUnion Friend, + SourceLocation FriendL) + : Decl(Decl::Friend, DC, L), + Friend(Friend), + NextFriend(0), + FriendLoc(FriendL), + WasSpecialization(false) { + } + +public: + static FriendDecl *Create(ASTContext &C, DeclContext *DC, + SourceLocation L, FriendUnion Friend_, + SourceLocation FriendL); + + /// If this friend declaration names an (untemplated but + /// possibly dependent) type, return the type; otherwise + /// return null. This is used only for C++0x's unelaborated + /// friend type declarations. + Type *getFriendType() const { + return Friend.dyn_cast(); + } + + /// If this friend declaration doesn't name an unelaborated + /// type, return the inner declaration. + NamedDecl *getFriendDecl() const { + return Friend.dyn_cast(); + } + + /// Retrieves the location of the 'friend' keyword. + SourceLocation getFriendLoc() const { + return FriendLoc; + } + + bool wasSpecialization() const { return WasSpecialization; } + void setSpecialization(bool WS) { WasSpecialization = WS; } + + // Implement isa/cast/dyncast/etc. + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classof(const FriendDecl *D) { return true; } + static bool classofKind(Kind K) { return K == Decl::Friend; } +}; + +/// An iterator over the friend declarations of a class. +class CXXRecordDecl::friend_iterator { + FriendDecl *Ptr; + + friend class CXXRecordDecl; + explicit friend_iterator(FriendDecl *Ptr) : Ptr(Ptr) {} +public: + friend_iterator() {} + + typedef FriendDecl *value_type; + typedef FriendDecl *reference; + typedef FriendDecl *pointer; + typedef int difference_type; + typedef std::forward_iterator_tag iterator_category; + + reference operator*() const { return Ptr; } + + friend_iterator &operator++() { + assert(Ptr && "attempt to increment past end of friend list"); + Ptr = Ptr->NextFriend; + return *this; + } + + friend_iterator operator++(int) { + friend_iterator tmp = *this; + ++*this; + return tmp; + } + + bool operator==(const friend_iterator &Other) const { + return Ptr == Other.Ptr; + } + + bool operator!=(const friend_iterator &Other) const { + return Ptr != Other.Ptr; + } + + friend_iterator &operator+=(difference_type N) { + assert(N >= 0 && "cannot rewind a CXXRecordDecl::friend_iterator"); + while (N--) + ++*this; + return *this; + } + + friend_iterator operator+(difference_type N) const { + friend_iterator tmp = *this; + tmp += N; + return tmp; + } +}; + +inline CXXRecordDecl::friend_iterator CXXRecordDecl::friend_begin() const { + return friend_iterator(data().FirstFriend); +} + +inline CXXRecordDecl::friend_iterator CXXRecordDecl::friend_end() const { + return friend_iterator(0); +} + +inline void CXXRecordDecl::pushFriendDecl(FriendDecl *FD) { + assert(FD->NextFriend == 0 && "friend already has next friend?"); + FD->NextFriend = data().FirstFriend; + data().FirstFriend = FD; +} + +} + +#endif Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclObjC.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/DeclObjC.h Tue Mar 16 16:52:15 2010 (r205219) @@ -381,8 +381,6 @@ public: ObjCIvarDecl *getIvarDecl(IdentifierInfo *Id) const; ObjCPropertyDecl *FindPropertyDeclaration(IdentifierInfo *PropertyId) const; - ObjCPropertyDecl *FindPropertyVisibleInPrimaryClass( - IdentifierInfo *PropertyId) const; // Marks the end of the container. SourceRange getAtEndRange() const { @@ -445,9 +443,6 @@ class ObjCInterfaceDecl : public ObjCCon /// Protocols referenced in interface header declaration ObjCProtocolList ReferencedProtocols; - /// Instance variables in the interface. This list is completely redundant. - ObjCList IVars; - /// List of categories defined for this class. /// FIXME: Why is this a linked list?? ObjCCategoryDecl *CategoryList; @@ -538,7 +533,10 @@ public: } ObjCCategoryDecl* getClassExtension() const; - + + ObjCPropertyDecl + *FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId) const; + /// isSuperClassOf - Return true if this class is the specified class or is a /// super class of the specified interface class. bool isSuperClassOf(const ObjCInterfaceDecl *I) const { @@ -1330,6 +1328,10 @@ public: return PropertyIvarDecl; } + /// Lookup a property by name in the specified DeclContext. + static ObjCPropertyDecl *findPropertyDecl(const DeclContext *DC, + IdentifierInfo *propertyID); + static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classof(const ObjCPropertyDecl *D) { return true; } static bool classofKind(Kind K) { return K == ObjCProperty; } Modified: vendor/clang/dist/include/clang/AST/DeclVisitor.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclVisitor.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/DeclVisitor.h Tue Mar 16 16:52:15 2010 (r205219) @@ -16,6 +16,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/DeclCXX.h" +#include "clang/AST/DeclFriend.h" #include "clang/AST/DeclTemplate.h" namespace clang { Modified: vendor/clang/dist/include/clang/AST/RecordLayout.h ============================================================================== --- vendor/clang/dist/include/clang/AST/RecordLayout.h Tue Mar 16 16:51:38 2010 (r205218) +++ vendor/clang/dist/include/clang/AST/RecordLayout.h Tue Mar 16 16:52:15 2010 (r205219) @@ -112,13 +112,14 @@ private: /// PrimaryBase - The primary base info for this record. PrimaryBaseInfo PrimaryBase; - /// BaseOffsets - Contains a map from base classes to their offset. /// FIXME: This should really use a SmallPtrMap, once we have one in LLVM :) - llvm::DenseMap BaseOffsets; + typedef llvm::DenseMap BaseOffsetsMapTy; + + /// BaseOffsets - Contains a map from base classes to their offset. + BaseOffsetsMapTy BaseOffsets; /// VBaseOffsets - Contains a map from vbase classes to their offset. - /// FIXME: This should really use a SmallPtrMap, once we have one in LLVM :) - llvm::DenseMap VBaseOffsets; + BaseOffsetsMapTy VBaseOffsets; }; /// CXXInfo - If the record layout is for a C++ record, this will have @@ -133,15 +134,14 @@ private: unsigned fieldcount); // Constructor for C++ records. + typedef CXXRecordLayoutInfo::BaseOffsetsMapTy BaseOffsetsMapTy; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 17:18:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CFCB106564A; Tue, 16 Mar 2010 17:18:37 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id ED68D8FC1D; Tue, 16 Mar 2010 17:18:35 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 19so17807fgg.13 for ; Tue, 16 Mar 2010 10:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=BMKKRsc7qgvqGvaK9zWndw0RP/nlZWUDJbtV8Y4+S5Q=; b=mXTvCM3xPX+pJsYoaEvcDKVdCH1tVR2JGlRYeS1PbekN6w/JODyLb5N0mPfoz+liYh kV9gJRGkHX2hMDUIL61v0xZ6s+RzgzWyODdA5PnI+UPCC8TiHHl/uk/M+OHsZ0tFeDAE 8tckFOlf+ISf1yn9hgmS9HAwxv3gxC5GrGXwE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=vixYTKSrpyhlpbhFo8y0F/9S7cRUW2euWVaXmziKxA0hibqk9yVg9s/oSiRf97dOX6 j2op8+mHadkCNhATwX4ttGT4FCorCoFaLQQyXMiNzJTu1tkHu6Y4TGLXR1MoFksws7qV jfU424iiruyJi2y7vFhvxlxl1YEdsnI/v7z5g= Received: by 10.87.68.15 with SMTP id v15mr11157399fgk.64.1268759914806; Tue, 16 Mar 2010 10:18:34 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id l19sm984499fgb.23.2010.03.16.10.18.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Mar 2010 10:18:32 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 16 Mar 2010 10:18:00 -0700 From: Pyun YongHyeon Date: Tue, 16 Mar 2010 10:18:00 -0700 To: Scott Long Message-ID: <20100316171800.GC2001@michelle.cdnetworks.com> References: <201003121818.o2CII4ri076014@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pyun YongHyeon Subject: Re: svn commit: r205090 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages 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, 16 Mar 2010 17:18:37 -0000 On Mon, Mar 15, 2010 at 09:31:52PM -0600, Scott Long wrote: > On Mar 12, 2010, at 11:18 AM, Pyun YongHyeon wrote: > > Author: yongari > > Date: Fri Mar 12 18:18:04 2010 > > New Revision: 205090 > > URL: http://svn.freebsd.org/changeset/base/205090 > > > > Log: > > Reorder interrupt handler a bit such that producer/consumer > > index of status block is read first before acknowledging the > > interrupts. Otherwise bge(4) may get stale status block as > > acknowledging an interrupt may yield another status block update. > > > > I'm starting a new sub-thread because it quickly became impossible to keep context straight in the conversation between you and Bruce. > > The previous rev did this: > > 1. Write an ACK word to the hardware > 2. perform the memory coherency protocol > 3 Cache the status descriptors > 4. Execute the interrupt handlers for the descriptors > > I think that your concern was that after performing step 1, the BGE hardware would be free to assert a new interrupt and/or update memory in a way that would interfere with steps 2-4, yes? I don't believe that this is a valid concern. By performing the ACK first, the driver is guaranteeing that any new updates done by the BGE hardware will generate a follow-on interrupt that will be seen and trigger a new run through the interrupt handle. No matter where an unexpected update happens from the hardware, a new interrupt will be generated and will be guaranteed to be serviced, ensuring that the update is seen. Also, the status descriptors are designed to be immune to interference of this nature; they can go stale, but that can't be corrupted. Again, going stale is not bad. > > The previous version affirms that a race exists, but guarantees that it won't be forgotten. There's nothing wrong with this, in my opinion. Whether you're using MSI or INTx (obviously assuming that there are no hardware bugs here), the race will be caught. > > I don't like your change because it leaves the ACK step incoherent. By deferring that write to be after the read, there's no guaranteed of when that write will actually get flushed to the hardware. It will eventually, but maybe not as soon as we'd like. > This is valid concern and I seem to missed this. I still think tagged status would be better way to handle interrupts but it still does not solve the issue you mentioned. I also can see a couple of complex code path in Linux which indicates needing of forced flush for mail box register. Old code was safe in this regard. I'll back out the change. From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 17:45:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12EFD106564A; Tue, 16 Mar 2010 17:45:17 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 024768FC12; Tue, 16 Mar 2010 17:45:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GHjGqQ051632; Tue, 16 Mar 2010 17:45:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GHjG3G051630; Tue, 16 Mar 2010 17:45:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003161745.o2GHjG3G051630@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 16 Mar 2010 17:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 17:45:17 -0000 Author: yongari Date: Tue Mar 16 17:45:16 2010 New Revision: 205221 URL: http://svn.freebsd.org/changeset/base/205221 Log: Revert r205090. It's hard to know when the mail box register write will get flushed to the hardware and it may take longer. Pointed out by: scottl Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Mar 16 16:55:12 2010 (r205220) +++ head/sys/dev/bge/if_bge.c Tue Mar 16 17:45:16 2010 (r205221) @@ -3654,22 +3654,6 @@ bge_intr(void *xsc) #endif /* - * Do the mandatory PCI flush as well as get the link status. - */ - statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; - - /* Make sure the descriptor ring indexes are coherent. */ - bus_dmamap_sync(sc->bge_cdata.bge_status_tag, - sc->bge_cdata.bge_status_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; - tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; - sc->bge_ldata.bge_status_block->bge_status = 0; - bus_dmamap_sync(sc->bge_cdata.bge_status_tag, - sc->bge_cdata.bge_status_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - - /* * Ack the interrupt by writing something to BGE_MBX_IRQ0_LO. Don't * disable interrupts by writing nonzero like we used to, since with * our current organization this just gives complications and @@ -3691,6 +3675,22 @@ bge_intr(void *xsc) */ bge_writembx(sc, BGE_MBX_IRQ0_LO, 0); + /* + * Do the mandatory PCI flush as well as get the link status. + */ + statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; + + /* Make sure the descriptor ring indexes are coherent. */ + bus_dmamap_sync(sc->bge_cdata.bge_status_tag, + sc->bge_cdata.bge_status_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; + tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; + sc->bge_ldata.bge_status_block->bge_status = 0; + bus_dmamap_sync(sc->bge_cdata.bge_status_tag, + sc->bge_cdata.bge_status_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 && sc->bge_chipid != BGE_CHIPID_BCM5700_B2) || statusword || sc->bge_link_evt) From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 17:55:07 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49276106564A; Tue, 16 Mar 2010 17:55:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id D74528FC19; Tue, 16 Mar 2010 17:55:06 +0000 (UTC) Received: from c122-106-169-91.carlnfd1.nsw.optusnet.com.au (c122-106-169-91.carlnfd1.nsw.optusnet.com.au [122.106.169.91]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2GHt0dM023702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Mar 2010 04:55:03 +1100 Date: Wed, 17 Mar 2010 04:55:01 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Poul-Henning Kamp In-Reply-To: <44640.1268676905@critter.freebsd.dk> Message-ID: <20100317041500.V26092@delplex.bde.org> References: <44640.1268676905@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 17:55:07 -0000 On Mon, 15 Mar 2010, Poul-Henning Kamp wrote: > In message <20100316024446.A24853@delplex.bde.org>, Bruce Evans writes: >> On Tue, 16 Mar 2010, Bruce Evans wrote: > >> Due to the way that daemon() works, it is really an error to have any >> open streams when it is called. This is also undocumented, except >> implicitly. The errors are: >> - unflushed output on stdout and stderr won't get flushed normally by ^^^^^^^^ >> the child. stdout and stderr are redirected so it will go there if >> the child erroneously (?) uses these streams or simply calls exit() >> which will give the default flush. > > The in-core FILE buffers are copied in the child process, so they > should most certainly not be flushed, but rather, as they correctly > are, discarded, so that when the child causes the flush, the content > is only output once. Nope. Even if the child causes the flush, the content of stdout and stderr is not flushed normally since it is redirected to /dev/null. Unflushed input in stdin is handled more brokenly: although stdin is redirected to /dev/null, input on it can still be read via stdin's buffer. Inheriting unflushed input on other streams is a feature (unless these streams are open on fd's 0-2; then these streams will have the same corruption as std* streams open on their normal fd's 0-2). As described in the unquoted part of my reply above, all streams should be flushed by the parent before the fork(), so that they are flushed normally. daemon(3) has a lot to say about problems with open fd's 0-2, but it says nothing about the extra problems with open streams on these descriptors. It documents as a feature that fd's above 2 are inherited normally. It also says too little about the implementation always using fork() (it cross-references fork() but doesn't say that the context is always a child context on successful completion). Bruce From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 17:59:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA08E1065677; Tue, 16 Mar 2010 17:59:12 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C95B68FC2B; Tue, 16 Mar 2010 17:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GHxCPu054733; Tue, 16 Mar 2010 17:59:12 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GHxCt6054727; Tue, 16 Mar 2010 17:59:12 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201003161759.o2GHxCt6054727@svn.freebsd.org> From: Qing Li Date: Tue, 16 Mar 2010 17:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205222 - in head: sbin/ifconfig sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 17:59:13 -0000 Author: qingli Date: Tue Mar 16 17:59:12 2010 New Revision: 205222 URL: http://svn.freebsd.org/changeset/base/205222 Log: Verify interface up status using its link state only if the interface has such capability. The interface capability flag indicates whether such capability exists. This approach is much more backward compatible. Physical device driver changes will be part of another commit. Also updated the ifconfig utility to show the LINKSTATE capability if present. Reviewed by: rwatson, imp, juli MFC after: 3 days Modified: head/sbin/ifconfig/ifconfig.c head/sys/net/if.h head/sys/net/if_tap.c head/sys/net/if_tun.c head/sys/net/route.h Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Tue Mar 16 17:45:16 2010 (r205221) +++ head/sbin/ifconfig/ifconfig.c Tue Mar 16 17:59:12 2010 (r205222) @@ -881,7 +881,7 @@ unsetifdescr(const char *val, int value, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ -"\21VLAN_HWFILTER\23VLAN_HWTSO" +"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE" /* * Print the status of the interface. If an address family was Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Tue Mar 16 17:45:16 2010 (r205221) +++ head/sys/net/if.h Tue Mar 16 17:59:12 2010 (r205222) @@ -219,6 +219,7 @@ struct if_data { #define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan tag */ #define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */ #define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ +#define IFCAP_LINKSTATE 0x80000 /* the runtime link state is dynamic */ #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Tue Mar 16 17:45:16 2010 (r205221) +++ head/sys/net/if_tap.c Tue Mar 16 17:59:12 2010 (r205222) @@ -443,6 +443,8 @@ tapcreate(struct cdev *dev) ifp->if_mtu = ETHERMTU; ifp->if_flags = (IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST); ifp->if_snd.ifq_maxlen = ifqmaxlen; + ifp->if_capabilities |= IFCAP_LINKSTATE; + ifp->if_capenable |= IFCAP_LINKSTATE; dev->si_drv1 = tp; tp->tap_dev = dev; Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Tue Mar 16 17:45:16 2010 (r205221) +++ head/sys/net/if_tun.c Tue Mar 16 17:59:12 2010 (r205222) @@ -386,6 +386,8 @@ tuncreate(const char *name, struct cdev ifp->if_snd.ifq_drv_maxlen = 0; IFQ_SET_READY(&ifp->if_snd); knlist_init_mtx(&sc->tun_rsel.si_note, NULL); + ifp->if_capabilities |= IFCAP_LINKSTATE; + ifp->if_capenable |= IFCAP_LINKSTATE; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Tue Mar 16 17:45:16 2010 (r205221) +++ head/sys/net/route.h Tue Mar 16 17:59:12 2010 (r205222) @@ -319,8 +319,7 @@ struct rt_addrinfo { #ifdef _KERNEL -#define RT_LINK_IS_UP(ifp) (((ifp)->if_flags & \ - (IFF_LOOPBACK | IFF_POINTOPOINT)) \ +#define RT_LINK_IS_UP(ifp) (!((ifp)->if_capabilities & IFCAP_LINKSTATE) \ || (ifp)->if_link_state == LINK_STATE_UP) #define RT_LOCK_INIT(_rt) \ From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 17:59:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83BD0106567C; Tue, 16 Mar 2010 17:59:51 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 43B0C8FC28; Tue, 16 Mar 2010 17:59:50 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2GHxo9U094888 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 16 Mar 2010 09:59:50 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4B9FC716.5010700@feral.com> Date: Tue, 16 Mar 2010 10:59:50 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3 MIME-Version: 1.0 To: Pyun YongHyeon References: <201003161745.o2GHjG3G051630@svn.freebsd.org> In-Reply-To: <201003161745.o2GHjG3G051630@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Tue, 16 Mar 2010 09:59:50 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: "SVN commit messages 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, 16 Mar 2010 17:59:51 -0000 > > Pointed out by: scottl > > 1st bde.... From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 18:10:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23BA91065673; Tue, 16 Mar 2010 18:10:38 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215]) by mx1.freebsd.org (Postfix) with ESMTP id 30C9E8FC13; Tue, 16 Mar 2010 18:10:36 +0000 (UTC) Received: by fxm7 with SMTP id 7so229490fxm.3 for ; Tue, 16 Mar 2010 11:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=aOKyP30NWsPGNmcOBfNghA6tgiXPkeu+ALGhtP5dINA=; b=lkxznlzSOVKOGI48MBHQzDdRNKa7sG+BJYgNea1yS2llSBSXwIEvbmBe9pmVLRl2uY MhH0KAH4gE0V8QAx5Lsn/hACyQHmZJfO8xuo2uXEfL5IGwn87XQwWGv8/3wKZ8lFtL3c cOKRJPFU7L46Nd39JQFvelT66oQN9y2akcJm8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=j4yh1XA2mds+60Dutexvr38uh+WIJ70YHCPiF8KaJbDVHWEO8gfiY3lW5xm/uGmtYa q5haJTYTgHNyGmIHpH8Xdi3uX8oaOPh2uijCVjfKHBbrRbDk2m92NgkPgHLGznIVW9Wm 8/lAU3zrcXTrh1V/H2rsO96JWc+mIqb2FDg68= Received: by 10.86.22.2 with SMTP id 2mr1119705fgv.17.1268762979708; Tue, 16 Mar 2010 11:09:39 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id d4sm1171786fga.11.2010.03.16.11.09.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Mar 2010 11:09:38 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 16 Mar 2010 11:09:06 -0700 From: Pyun YongHyeon Date: Tue, 16 Mar 2010 11:09:06 -0700 To: Matthew Jacob Message-ID: <20100316180906.GE2001@michelle.cdnetworks.com> References: <201003161745.o2GHjG3G051630@svn.freebsd.org> <4B9FC716.5010700@feral.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B9FC716.5010700@feral.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages 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, 16 Mar 2010 18:10:38 -0000 On Tue, Mar 16, 2010 at 10:59:50AM -0700, Matthew Jacob wrote: > > > > > Pointed out by: scottl > > > > > > 1st bde.... > Oops, forgot that. From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 19:59:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0463B1065670; Tue, 16 Mar 2010 19:59:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E83488FC19; Tue, 16 Mar 2010 19:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GJxEM5081132; Tue, 16 Mar 2010 19:59:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GJxESb081130; Tue, 16 Mar 2010 19:59:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003161959.o2GJxESb081130@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 16 Mar 2010 19:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205223 - head/sys/fs/fdescfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 19:59:15 -0000 Author: jkim Date: Tue Mar 16 19:59:14 2010 New Revision: 205223 URL: http://svn.freebsd.org/changeset/base/205223 Log: Fix a long standing regression of readdir(3) in fdescfs(5) introduced in r1.48. We were stopping at the first null pointer when multiple file descriptors were opened and one in the middle was closed. This restores traditional behaviour of fdescfs. MFC after: 3 days Modified: head/sys/fs/fdescfs/fdesc_vnops.c Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Tue Mar 16 17:59:12 2010 (r205222) +++ head/sys/fs/fdescfs/fdesc_vnops.c Tue Mar 16 19:59:14 2010 (r205223) @@ -522,11 +522,10 @@ fdesc_readdir(ap) FILEDESC_SLOCK(fdp); while (i < fdp->fd_nfiles + 2 && uio->uio_resid >= UIO_MX) { + bzero((caddr_t)dp, UIO_MX); switch (i) { case 0: /* `.' */ case 1: /* `..' */ - bzero((caddr_t)dp, UIO_MX); - dp->d_fileno = i + FD_ROOT; dp->d_namlen = i + 1; dp->d_reclen = UIO_MX; @@ -535,26 +534,24 @@ fdesc_readdir(ap) dp->d_type = DT_DIR; break; default: - if (fdp->fd_ofiles[fcnt] == NULL) { - FILEDESC_SUNLOCK(fdp); - goto done; - } - - bzero((caddr_t) dp, UIO_MX); + if (fdp->fd_ofiles[fcnt] == NULL) + break; dp->d_namlen = sprintf(dp->d_name, "%d", fcnt); dp->d_reclen = UIO_MX; dp->d_type = DT_UNKNOWN; dp->d_fileno = i + FD_DESC; break; } - /* - * And ship to userland - */ - FILEDESC_SUNLOCK(fdp); - error = uiomove(dp, UIO_MX, uio); - if (error) - goto done; - FILEDESC_SLOCK(fdp); + if (dp->d_namlen != 0) { + /* + * And ship to userland + */ + FILEDESC_SUNLOCK(fdp); + error = uiomove(dp, UIO_MX, uio); + if (error) + goto done; + FILEDESC_SLOCK(fdp); + } i++; fcnt++; } From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 20:21:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED925106566C; Tue, 16 Mar 2010 20:21:29 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from mx.egr.msu.edu (surfnturf.egr.msu.edu [35.9.37.164]) by mx1.freebsd.org (Postfix) with ESMTP id 52E628FC21; Tue, 16 Mar 2010 20:21:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.egr.msu.edu (Postfix) with ESMTP id B67991A9FEE; Tue, 16 Mar 2010 16:21:28 -0400 (EDT) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mx.egr.msu.edu ([127.0.0.1]) by localhost (surfnturf.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C+YhicRpLote; Tue, 16 Mar 2010 16:21:28 -0400 (EDT) Received: from localhost (daemon.egr.msu.edu [35.9.44.65]) by mx.egr.msu.edu (Postfix) with ESMTP id 8ED131A9FEA; Tue, 16 Mar 2010 16:21:28 -0400 (EDT) Received: by localhost (Postfix, from userid 21281) id 82F3954FE9; Tue, 16 Mar 2010 16:21:28 -0400 (EDT) Date: Tue, 16 Mar 2010 16:21:28 -0400 From: Adam McDougall To: Pawel Jakub Dawidek Message-ID: <20100316202128.GT7053@egr.msu.edu> References: <201002042111.o14LBixZ031726@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002042111.o14LBixZ031726@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r203504 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 20:21:30 -0000 I think I have probably encountered this issue on two systems now, one already has the zpool created with a workaround but the other we are installing fresh with 8.0-rel. Can it be MFC'ed now, hopefully before the March 2010 snapshot isos are built? Thanks. On Thu, Feb 04, 2010 at 09:11:44PM +0000, Pawel Jakub Dawidek wrote: Author: pjd Date: Thu Feb 4 21:11:44 2010 New Revision: 203504 URL: http://svn.freebsd.org/changeset/base/203504 Log: Open provider for writting when we find the right one. Opening too much providers for writing provokes huge traffic related to taste events send by GEOM on close. This can lead to various problems with opening GEOM providers that are created on top of other GEOM providers. Reorted by: Kurt Touet , mr Tested by: mr, Baginski Darren MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 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 Thu Feb 4 21:02:29 2010 (r203503) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Feb 4 21:11:44 2010 (r203504) @@ -102,7 +102,7 @@ vdev_geom_orphan(struct g_consumer *cp) } static struct g_consumer * -vdev_geom_attach(struct g_provider *pp, int write) +vdev_geom_attach(struct g_provider *pp) { struct g_geom *gp; struct g_consumer *cp; @@ -126,7 +126,7 @@ vdev_geom_attach(struct g_provider *pp, g_wither_geom(gp, ENXIO); return (NULL); } - if (g_access(cp, 1, write, 1) != 0) { + if (g_access(cp, 1, 0, 1) != 0) { g_wither_geom(gp, ENXIO); return (NULL); } @@ -145,14 +145,14 @@ vdev_geom_attach(struct g_provider *pp, g_destroy_consumer(cp); return (NULL); } - if (g_access(cp, 1, write, 1) != 0) { + if (g_access(cp, 1, 0, 1) != 0) { g_detach(cp); g_destroy_consumer(cp); return (NULL); } ZFS_LOG(1, "Created consumer for %s.", pp->name); } else { - if (g_access(cp, 1, cp->acw > 0 ? 0 : write, 1) != 0) + if (g_access(cp, 1, 0, 1) != 0) return (NULL); ZFS_LOG(1, "Used existing consumer for %s.", pp->name); } @@ -342,7 +342,6 @@ vdev_geom_read_guid(struct g_consumer *c struct vdev_geom_find { uint64_t guid; - int write; struct g_consumer *cp; }; @@ -394,10 +393,10 @@ vdev_geom_attach_by_guid_event(void *arg g_detach(zcp); if (guid != ap->guid) continue; - ap->cp = vdev_geom_attach(pp, ap->write); + ap->cp = vdev_geom_attach(pp); if (ap->cp == NULL) { - printf("ZFS WARNING: Cannot open %s " - "for writting.\n", pp->name); + printf("ZFS WARNING: Unable to attach to %s.", + pp->name); continue; } goto end; @@ -411,14 +410,13 @@ end: } static struct g_consumer * -vdev_geom_attach_by_guid(uint64_t guid, int write) +vdev_geom_attach_by_guid(uint64_t guid) { struct vdev_geom_find *ap; struct g_consumer *cp; ap = kmem_zalloc(sizeof(*ap), KM_SLEEP); ap->guid = guid; - ap->write = write; g_waitfor_event(vdev_geom_attach_by_guid_event, ap, M_WAITOK, NULL); cp = ap->cp; kmem_free(ap, sizeof(*ap)); @@ -433,7 +431,7 @@ vdev_geom_open_by_guid(vdev_t *vd) size_t len; ZFS_LOG(1, "Searching by guid [%ju].", (uintmax_t)vd->vdev_guid); - cp = vdev_geom_attach_by_guid(vd->vdev_guid, !!(spa_mode & FWRITE)); + cp = vdev_geom_attach_by_guid(vd->vdev_guid); if (cp != NULL) { len = strlen(cp->provider->name) + strlen("/dev/") + 1; buf = kmem_alloc(len, KM_SLEEP); @@ -464,7 +462,7 @@ vdev_geom_open_by_path(vdev_t *vd, int c pp = g_provider_by_name(vd->vdev_path + sizeof("/dev/") - 1); if (pp != NULL) { ZFS_LOG(1, "Found provider by name %s.", vd->vdev_path); - cp = vdev_geom_attach(pp, !!(spa_mode & FWRITE)); + cp = vdev_geom_attach(pp); if (cp != NULL && check_guid) { g_topology_unlock(); guid = vdev_geom_read_guid(cp); @@ -492,7 +490,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi vdev_geom_ctx_t *ctx; struct g_provider *pp; struct g_consumer *cp; - int owned; + int error, owned; /* * We must have a pathname, and it must be absolute. @@ -506,6 +504,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi if ((owned = mtx_owned(&Giant))) mtx_unlock(&Giant); + error = 0; cp = vdev_geom_open_by_path(vd, 1); if (cp == NULL) { /* @@ -519,13 +518,24 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi cp = vdev_geom_open_by_path(vd, 0); if (cp == NULL) { ZFS_LOG(1, "Provider %s not found.", vd->vdev_path); - vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; - if (owned) - mtx_lock(&Giant); - return (EACCES); + error = ENOENT; + } else if (cp->acw == 0 && (spa_mode & FWRITE) != 0) { + g_topology_lock(); + error = g_access(cp, 0, 1, 0); + if (error != 0) { + printf("ZFS WARNING: Unable to open %s for writing (error=%d).", + vd->vdev_path, error); + vdev_geom_detach(cp, 0); + cp = NULL; + } + g_topology_unlock(); } if (owned) mtx_lock(&Giant); + if (cp == NULL) { + vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; + return (error); + } cp->private = vd; _______________________________________________ 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 Mar 16 20:41:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BFBD106566C; Tue, 16 Mar 2010 20:41:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7ED8FC2B; Tue, 16 Mar 2010 20:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GKfkMR090584; Tue, 16 Mar 2010 20:41:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GKfk3v090582; Tue, 16 Mar 2010 20:41:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003162041.o2GKfk3v090582@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 16 Mar 2010 20:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205224 - head/tools/regression/aio/aiotest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 20:41:46 -0000 Author: kib Date: Tue Mar 16 20:41:45 2010 New Revision: 205224 URL: http://svn.freebsd.org/changeset/base/205224 Log: Add missing headers. MFC after: 3 days Modified: head/tools/regression/aio/aiotest/aiotest.c Modified: head/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- head/tools/regression/aio/aiotest/aiotest.c Tue Mar 16 19:59:14 2010 (r205223) +++ head/tools/regression/aio/aiotest/aiotest.c Tue Mar 16 20:41:45 2010 (r205224) @@ -40,14 +40,17 @@ #include #include +#include #include #include #include #include #include +#include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 20:42:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E7CF1065670; Tue, 16 Mar 2010 20:42:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CE4B8FC1E; Tue, 16 Mar 2010 20:42:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GKgtLp090889; Tue, 16 Mar 2010 20:42:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GKgsG1090883; Tue, 16 Mar 2010 20:42:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003162042.o2GKgsG1090883@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 16 Mar 2010 20:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205225 - in head/tools/regression/mqueue: mqtest1 mqtest2 mqtest3 mqtest4 mqtest5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 20:42:55 -0000 Author: kib Date: Tue Mar 16 20:42:54 2010 New Revision: 205225 URL: http://svn.freebsd.org/changeset/base/205225 Log: Add missing headers. While there, arrange headers alphabetically. MFC after: 3 days Modified: head/tools/regression/mqueue/mqtest1/mqtest1.c head/tools/regression/mqueue/mqtest2/mqtest2.c head/tools/regression/mqueue/mqtest3/mqtest3.c head/tools/regression/mqueue/mqtest4/mqtest4.c head/tools/regression/mqueue/mqtest5/mqtest5.c Modified: head/tools/regression/mqueue/mqtest1/mqtest1.c ============================================================================== --- head/tools/regression/mqueue/mqtest1/mqtest1.c Tue Mar 16 20:41:45 2010 (r205224) +++ head/tools/regression/mqueue/mqtest1/mqtest1.c Tue Mar 16 20:42:54 2010 (r205225) @@ -1,10 +1,11 @@ /* $FreeBSD$ */ -#include -#include +#include +#include #include +#include #include -#include +#include #define MQNAME "/mytstqueue1" Modified: head/tools/regression/mqueue/mqtest2/mqtest2.c ============================================================================== --- head/tools/regression/mqueue/mqtest2/mqtest2.c Tue Mar 16 20:41:45 2010 (r205224) +++ head/tools/regression/mqueue/mqtest2/mqtest2.c Tue Mar 16 20:42:54 2010 (r205225) @@ -1,8 +1,13 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include #include +#include #include +#include +#include #include #define MQNAME "/mytstqueue2" Modified: head/tools/regression/mqueue/mqtest3/mqtest3.c ============================================================================== --- head/tools/regression/mqueue/mqtest3/mqtest3.c Tue Mar 16 20:41:45 2010 (r205224) +++ head/tools/regression/mqueue/mqtest3/mqtest3.c Tue Mar 16 20:42:54 2010 (r205225) @@ -1,10 +1,15 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include #define MQNAME "/mytstqueue3" #define LOOPS 1000 Modified: head/tools/regression/mqueue/mqtest4/mqtest4.c ============================================================================== --- head/tools/regression/mqueue/mqtest4/mqtest4.c Tue Mar 16 20:41:45 2010 (r205224) +++ head/tools/regression/mqueue/mqtest4/mqtest4.c Tue Mar 16 20:42:54 2010 (r205225) @@ -1,11 +1,16 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include -#include #define MQNAME "/mytstqueue4" #define LOOPS 1000 Modified: head/tools/regression/mqueue/mqtest5/mqtest5.c ============================================================================== --- head/tools/regression/mqueue/mqtest5/mqtest5.c Tue Mar 16 20:41:45 2010 (r205224) +++ head/tools/regression/mqueue/mqtest5/mqtest5.c Tue Mar 16 20:42:54 2010 (r205225) @@ -1,12 +1,16 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include -#include -#include #define MQNAME "/mytstqueue5" #define LOOPS 1000 From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 22:17:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5437D10656F1; Tue, 16 Mar 2010 22:17:22 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B03A8FC12; Tue, 16 Mar 2010 22:17:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GMHMej012288; Tue, 16 Mar 2010 22:17:22 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GMHMjU012285; Tue, 16 Mar 2010 22:17:22 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003162217.o2GMHMjU012285@svn.freebsd.org> From: Kip Macy Date: Tue, 16 Mar 2010 22:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205231 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 22:17:22 -0000 Author: kmacy Date: Tue Mar 16 22:17:21 2010 New Revision: 205231 URL: http://svn.freebsd.org/changeset/base/205231 Log: - reduce contention by breaking up ARC state locks in to 16 for data and 16 for metadata - export L2ARC tunables as sysctls - add several kstats to track L2ARC state more precisely - avoid holding a contended lock when atomically incrementing a contended counter (no lock protection needed for atomics) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Mar 16 21:44:21 2010 (r205230) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Mar 16 22:17:21 2010 (r205231) @@ -131,6 +131,7 @@ #include #include +#include #include static kmutex_t arc_reclaim_thr_lock; @@ -186,6 +187,11 @@ SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN, &zfs_mdcomp_disable, 0, "Disable metadata compression"); +#ifdef ZIO_USE_UMA +extern kmem_cache_t *zio_buf_cache[]; +extern kmem_cache_t *zio_data_buf_cache[]; +#endif + /* * Note that buffers can be in one of 6 states: * ARC_anon - anonymous (discussed below) @@ -218,13 +224,31 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_di * second level ARC benefit from these fast lookups. */ +#define ARCS_LOCK_PAD 128 +struct arcs_lock { + kmutex_t arcs_lock; +#ifdef _KERNEL + unsigned char pad[(ARCS_LOCK_PAD - sizeof (kmutex_t))]; +#endif +}; + +/* + * must be power of two for mask use to work + * + */ +#define ARC_BUFC_NUMDATALISTS 16 +#define ARC_BUFC_NUMMETADATALISTS 16 +#define ARC_BUFC_NUMLISTS (ARC_BUFC_NUMMETADATALISTS+ARC_BUFC_NUMDATALISTS) + typedef struct arc_state { - list_t arcs_list[ARC_BUFC_NUMTYPES]; /* list of evictable buffers */ uint64_t arcs_lsize[ARC_BUFC_NUMTYPES]; /* amount of evictable data */ uint64_t arcs_size; /* total amount of data in this state */ - kmutex_t arcs_mtx; + list_t arcs_lists[ARC_BUFC_NUMLISTS]; /* list of evictable buffers */ + struct arcs_lock arcs_locks[ARC_BUFC_NUMLISTS] __aligned(128); } arc_state_t; +#define ARCS_LOCK(s, i) &((s)->arcs_locks[(i)].arcs_lock) + /* The 6 states: */ static arc_state_t ARC_anon; static arc_state_t ARC_mru; @@ -248,7 +272,9 @@ typedef struct arc_stats { kstat_named_t arcstat_mru_ghost_hits; kstat_named_t arcstat_mfu_hits; kstat_named_t arcstat_mfu_ghost_hits; + kstat_named_t arcstat_allocated; kstat_named_t arcstat_deleted; + kstat_named_t arcstat_stolen; kstat_named_t arcstat_recycle_miss; kstat_named_t arcstat_mutex_miss; kstat_named_t arcstat_evict_skip; @@ -280,6 +306,19 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_size; kstat_named_t arcstat_l2_hdr_size; kstat_named_t arcstat_memory_throttle_count; + kstat_named_t arcstat_l2_write_trylock_fail; + kstat_named_t arcstat_l2_write_in_l2; + kstat_named_t arcstat_l2_write_passed_headroom; + kstat_named_t arcstat_l2_write_spa_mismatch; + kstat_named_t arcstat_l2_write_hdr_io_in_progress; + kstat_named_t arcstat_l2_write_not_cacheable; + kstat_named_t arcstat_l2_write_full; + kstat_named_t arcstat_l2_write_buffer_iter; + kstat_named_t arcstat_l2_write_pios; + kstat_named_t arcstat_l2_write_bytes_written; + kstat_named_t arcstat_l2_write_buffer_bytes_scanned; + kstat_named_t arcstat_l2_write_buffer_list_iter; + kstat_named_t arcstat_l2_write_buffer_list_null_iter; } arc_stats_t; static arc_stats_t arc_stats = { @@ -297,7 +336,9 @@ static arc_stats_t arc_stats = { { "mru_ghost_hits", KSTAT_DATA_UINT64 }, { "mfu_hits", KSTAT_DATA_UINT64 }, { "mfu_ghost_hits", KSTAT_DATA_UINT64 }, + { "allocated", KSTAT_DATA_UINT64 }, { "deleted", KSTAT_DATA_UINT64 }, + { "stolen", KSTAT_DATA_UINT64 }, { "recycle_miss", KSTAT_DATA_UINT64 }, { "mutex_miss", KSTAT_DATA_UINT64 }, { "evict_skip", KSTAT_DATA_UINT64 }, @@ -328,7 +369,20 @@ static arc_stats_t arc_stats = { { "l2_io_error", KSTAT_DATA_UINT64 }, { "l2_size", KSTAT_DATA_UINT64 }, { "l2_hdr_size", KSTAT_DATA_UINT64 }, - { "memory_throttle_count", KSTAT_DATA_UINT64 } + { "memory_throttle_count", KSTAT_DATA_UINT64 }, + { "l2_write_trylock_fail", KSTAT_DATA_UINT64 }, + { "l2_write_in_l2", KSTAT_DATA_UINT64 }, + { "l2_write_passed_headroom", KSTAT_DATA_UINT64 }, + { "l2_write_spa_mismatch", KSTAT_DATA_UINT64 }, + { "l2_write_io_in_progress", KSTAT_DATA_UINT64 }, + { "l2_write_not_cacheable", KSTAT_DATA_UINT64 }, + { "l2_write_full", KSTAT_DATA_UINT64 }, + { "l2_write_buffer_iter", KSTAT_DATA_UINT64 }, + { "l2_write_pios", KSTAT_DATA_UINT64 }, + { "l2_write_bytes_written", KSTAT_DATA_UINT64 }, + { "l2_write_buffer_bytes_scanned", KSTAT_DATA_UINT64 }, + { "l2_write_buffer_list_iter", KSTAT_DATA_UINT64 }, + { "l2_write_buffer_list_null_iter", KSTAT_DATA_UINT64 } }; #define ARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -550,9 +604,10 @@ extern kmem_cache_t *zio_data_buf_cache[ * Level 2 ARC */ -#define L2ARC_WRITE_SIZE (8 * 1024 * 1024) /* initial write max */ -#define L2ARC_HEADROOM 4 /* num of writes */ +#define L2ARC_WRITE_SIZE (64 * 1024 * 1024) /* initial write max */ +#define L2ARC_HEADROOM 128 /* num of writes */ #define L2ARC_FEED_SECS 1 /* caching interval */ +#define L2ARC_FEED_SECS_SHIFT 1 /* caching interval shift */ #define l2arc_writes_sent ARCSTAT(arcstat_l2_writes_sent) #define l2arc_writes_done ARCSTAT(arcstat_l2_writes_done) @@ -564,7 +619,66 @@ uint64_t l2arc_write_max = L2ARC_WRITE_S uint64_t l2arc_write_boost = L2ARC_WRITE_SIZE; /* extra write during warmup */ uint64_t l2arc_headroom = L2ARC_HEADROOM; /* number of dev writes */ uint64_t l2arc_feed_secs = L2ARC_FEED_SECS; /* interval seconds */ -boolean_t l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */ +uint64_t l2arc_feed_secs_shift = L2ARC_FEED_SECS_SHIFT; /* interval seconds shift */ +boolean_t l2arc_noprefetch = B_FALSE; /* don't cache prefetch bufs */ + + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, + &l2arc_write_max, 0, "max write size"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, + &l2arc_write_boost, 0, "extra write during warmup"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, + &l2arc_headroom, 0, "number of dev writes"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, + &l2arc_feed_secs, 0, "interval seconds"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs_shift, CTLFLAG_RW, + &l2arc_feed_secs_shift, 0, "power of 2 division of feed seconds"); + +SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW, + &l2arc_noprefetch, 0, "don't cache prefetch bufs"); + + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, + &ARC_anon.arcs_size, 0, "size of anonymous state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, + &ARC_anon.arcs_lsize[ARC_BUFC_METADATA], 0, "size of anonymous state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, + &ARC_anon.arcs_lsize[ARC_BUFC_DATA], 0, "size of anonymous state"); + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, + &ARC_mru.arcs_size, 0, "size of mru state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD, + &ARC_mru.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mru state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD, + &ARC_mru.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mru state"); + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD, + &ARC_mru_ghost.arcs_size, 0, "size of mru ghost state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD, + &ARC_mru_ghost.arcs_lsize[ARC_BUFC_METADATA], 0, + "size of metadata in mru ghost state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD, + &ARC_mru_ghost.arcs_lsize[ARC_BUFC_DATA], 0, + "size of data in mru ghost state"); + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD, + &ARC_mfu.arcs_size, 0, "size of mfu state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD, + &ARC_mfu.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mfu state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD, + &ARC_mfu.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mfu state"); + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD, + &ARC_mfu_ghost.arcs_size, 0, "size of mfu ghost state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD, + &ARC_mfu_ghost.arcs_lsize[ARC_BUFC_METADATA], 0, + "size of metadata in mfu ghost state"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD, + &ARC_mfu_ghost.arcs_lsize[ARC_BUFC_DATA], 0, + "size of data in mfu ghost state"); + +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, + &ARC_l2c_only.arcs_size, 0, "size of mru state"); /* * L2ARC Internals @@ -958,20 +1072,42 @@ arc_buf_freeze(arc_buf_t *buf) } static void +get_buf_info(arc_buf_hdr_t *ab, arc_state_t *state, list_t **list, kmutex_t **lock) +{ + uint64_t buf_hashid = buf_hash(ab->b_spa, &ab->b_dva, ab->b_birth); + + if (ab->b_type == ARC_BUFC_METADATA) + buf_hashid &= (ARC_BUFC_NUMMETADATALISTS-1); + else { + buf_hashid &= (ARC_BUFC_NUMDATALISTS-1); + buf_hashid += ARC_BUFC_NUMMETADATALISTS; + } + + *list = &state->arcs_lists[buf_hashid]; + *lock = ARCS_LOCK(state, buf_hashid); +} + + +static void add_reference(arc_buf_hdr_t *ab, kmutex_t *hash_lock, void *tag) { + ASSERT(MUTEX_HELD(hash_lock)); if ((refcount_add(&ab->b_refcnt, tag) == 1) && (ab->b_state != arc_anon)) { + list_t *list; + kmutex_t *lock; uint64_t delta = ab->b_size * ab->b_datacnt; - list_t *list = &ab->b_state->arcs_list[ab->b_type]; uint64_t *size = &ab->b_state->arcs_lsize[ab->b_type]; - ASSERT(!MUTEX_HELD(&ab->b_state->arcs_mtx)); - mutex_enter(&ab->b_state->arcs_mtx); + get_buf_info(ab, ab->b_state, &list, &lock); + ASSERT(!MUTEX_HELD(lock)); + mutex_enter(lock); ASSERT(list_link_active(&ab->b_arc_node)); list_remove(list, ab); + mutex_exit(lock); + if (GHOST_STATE(ab->b_state)) { ASSERT3U(ab->b_datacnt, ==, 0); ASSERT3P(ab->b_buf, ==, NULL); @@ -980,7 +1116,6 @@ add_reference(arc_buf_hdr_t *ab, kmutex_ ASSERT(delta > 0); ASSERT3U(*size, >=, delta); atomic_add_64(size, -delta); - mutex_exit(&ab->b_state->arcs_mtx); /* remove the prefetch flag if we get a reference */ if (ab->b_flags & ARC_PREFETCH) ab->b_flags &= ~ARC_PREFETCH; @@ -999,14 +1134,19 @@ remove_reference(arc_buf_hdr_t *ab, kmut if (((cnt = refcount_remove(&ab->b_refcnt, tag)) == 0) && (state != arc_anon)) { uint64_t *size = &state->arcs_lsize[ab->b_type]; + list_t *list; + kmutex_t *lock; + + get_buf_info(ab, state, &list, &lock); - ASSERT(!MUTEX_HELD(&state->arcs_mtx)); - mutex_enter(&state->arcs_mtx); + ASSERT(!MUTEX_HELD(lock)); + mutex_enter(lock); ASSERT(!list_link_active(&ab->b_arc_node)); - list_insert_head(&state->arcs_list[ab->b_type], ab); + list_insert_head(list, ab); + mutex_exit(lock); + ASSERT(ab->b_datacnt > 0); atomic_add_64(size, ab->b_size * ab->b_datacnt); - mutex_exit(&state->arcs_mtx); } return (cnt); } @@ -1021,6 +1161,8 @@ arc_change_state(arc_state_t *new_state, arc_state_t *old_state = ab->b_state; int64_t refcnt = refcount_count(&ab->b_refcnt); uint64_t from_delta, to_delta; + list_t *list; + kmutex_t *lock; ASSERT(MUTEX_HELD(hash_lock)); ASSERT(new_state != old_state); @@ -1035,14 +1177,17 @@ arc_change_state(arc_state_t *new_state, */ if (refcnt == 0) { if (old_state != arc_anon) { - int use_mutex = !MUTEX_HELD(&old_state->arcs_mtx); + int use_mutex; uint64_t *size = &old_state->arcs_lsize[ab->b_type]; + get_buf_info(ab, old_state, &list, &lock); + use_mutex = !MUTEX_HELD(lock); + if (use_mutex) - mutex_enter(&old_state->arcs_mtx); + mutex_enter(lock); ASSERT(list_link_active(&ab->b_arc_node)); - list_remove(&old_state->arcs_list[ab->b_type], ab); + list_remove(list, ab); /* * If prefetching out of the ghost cache, @@ -1057,16 +1202,20 @@ arc_change_state(arc_state_t *new_state, atomic_add_64(size, -from_delta); if (use_mutex) - mutex_exit(&old_state->arcs_mtx); + mutex_exit(lock); } if (new_state != arc_anon) { - int use_mutex = !MUTEX_HELD(&new_state->arcs_mtx); + int use_mutex; uint64_t *size = &new_state->arcs_lsize[ab->b_type]; + get_buf_info(ab, new_state, &list, &lock); + use_mutex = !MUTEX_HELD(lock); + + if (use_mutex) - mutex_enter(&new_state->arcs_mtx); + mutex_enter(lock); - list_insert_head(&new_state->arcs_list[ab->b_type], ab); + list_insert_head(list, ab); /* ghost elements have a ghost size */ if (GHOST_STATE(new_state)) { @@ -1077,7 +1226,7 @@ arc_change_state(arc_state_t *new_state, atomic_add_64(size, to_delta); if (use_mutex) - mutex_exit(&new_state->arcs_mtx); + mutex_exit(lock); } } @@ -1467,21 +1616,49 @@ arc_evict(arc_state_t *state, spa_t *spa { arc_state_t *evicted_state; uint64_t bytes_evicted = 0, skipped = 0, missed = 0; + int64_t bytes_remaining; arc_buf_hdr_t *ab, *ab_prev = NULL; - list_t *list = &state->arcs_list[type]; + list_t *evicted_list, *list, *evicted_list_start, *list_start; + kmutex_t *lock, *evicted_lock; kmutex_t *hash_lock; boolean_t have_lock; void *stolen = NULL; + static int evict_metadata_offset, evict_data_offset; + int i, idx, offset, list_count, count; ASSERT(state == arc_mru || state == arc_mfu); evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; + + if (type == ARC_BUFC_METADATA) { + offset = 0; + list_count = ARC_BUFC_NUMMETADATALISTS; + list_start = &state->arcs_lists[0]; + evicted_list_start = &evicted_state->arcs_lists[0]; + idx = evict_metadata_offset; + } else { + offset = ARC_BUFC_NUMMETADATALISTS; + + list_start = &state->arcs_lists[offset]; + evicted_list_start = &evicted_state->arcs_lists[offset]; + list_count = ARC_BUFC_NUMDATALISTS; + idx = evict_data_offset; + } + bytes_remaining = evicted_state->arcs_lsize[type]; + count = 0; + +evict_start: + list = &list_start[idx]; + evicted_list = &evicted_list_start[idx]; + lock = ARCS_LOCK(state, (offset + idx)); + evicted_lock = ARCS_LOCK(evicted_state, (offset + idx)); - mutex_enter(&state->arcs_mtx); - mutex_enter(&evicted_state->arcs_mtx); + mutex_enter(lock); + mutex_enter(evicted_lock); for (ab = list_tail(list); ab; ab = ab_prev) { ab_prev = list_prev(list, ab); + bytes_remaining -= (ab->b_size * ab->b_datacnt); /* prefetch buffers have a minimum lifespan */ if (HDR_IO_IN_PROGRESS(ab) || (spa && ab->b_spa != spa) || @@ -1541,18 +1718,36 @@ arc_evict(arc_state_t *state, spa_t *spa mutex_exit(hash_lock); if (bytes >= 0 && bytes_evicted >= bytes) break; + if (bytes_remaining > 0) { + mutex_exit(evicted_lock); + mutex_exit(lock); + idx = ((idx + 1)&(list_count-1)); + count++; + goto evict_start; + } } else { missed += 1; } } - mutex_exit(&evicted_state->arcs_mtx); - mutex_exit(&state->arcs_mtx); - - if (bytes_evicted < bytes) - dprintf("only evicted %lld bytes from %x", - (longlong_t)bytes_evicted, state); + mutex_exit(evicted_lock); + mutex_exit(lock); + + idx = ((idx + 1)&(list_count-1)); + count++; + if (bytes_evicted < bytes) { + if (count < list_count) + goto evict_start; + else + dprintf("only evicted %lld bytes from %x", + (longlong_t)bytes_evicted, state); + } + if (type == ARC_BUFC_METADATA) + evict_metadata_offset = idx; + else + evict_data_offset = idx; + if (skipped) ARCSTAT_INCR(arcstat_evict_skip, skipped); @@ -1579,6 +1774,8 @@ arc_evict(arc_state_t *state, spa_t *spa arc_evict_ghost(arc_mfu_ghost, NULL, todelete); } } + if (stolen) + ARCSTAT_BUMP(arcstat_stolen); return (stolen); } @@ -1591,14 +1788,28 @@ static void arc_evict_ghost(arc_state_t *state, spa_t *spa, int64_t bytes) { arc_buf_hdr_t *ab, *ab_prev; - list_t *list = &state->arcs_list[ARC_BUFC_DATA]; - kmutex_t *hash_lock; + list_t *list, *list_start; + kmutex_t *hash_lock, *lock; uint64_t bytes_deleted = 0; uint64_t bufs_skipped = 0; + static int evict_offset; + int list_count, idx = evict_offset; + int offset, count = 0; ASSERT(GHOST_STATE(state)); -top: - mutex_enter(&state->arcs_mtx); + + /* + * data lists come after metadata lists + */ + list_start = &state->arcs_lists[ARC_BUFC_NUMMETADATALISTS]; + list_count = ARC_BUFC_NUMDATALISTS; + offset = ARC_BUFC_NUMMETADATALISTS; + +evict_start: + list = &list_start[idx]; + lock = ARCS_LOCK(state, idx + offset); + + mutex_enter(lock); for (ab = list_tail(list); ab; ab = ab_prev) { ab_prev = list_prev(list, ab); if (spa && ab->b_spa != spa) @@ -1628,20 +1839,31 @@ top: break; } else { if (bytes < 0) { - mutex_exit(&state->arcs_mtx); + /* + * we're draining the ARC, retry + */ + mutex_exit(lock); mutex_enter(hash_lock); mutex_exit(hash_lock); - goto top; + goto evict_start; } bufs_skipped += 1; } } - mutex_exit(&state->arcs_mtx); - - if (list == &state->arcs_list[ARC_BUFC_DATA] && + mutex_exit(lock); + idx = ((idx + 1)&(ARC_BUFC_NUMDATALISTS-1)); + count++; + + if (count < list_count) + goto evict_start; + + evict_offset = idx; + if ((uintptr_t)list > (uintptr_t)&state->arcs_lists[ARC_BUFC_NUMMETADATALISTS] && (bytes < 0 || bytes_deleted < bytes)) { - list = &state->arcs_list[ARC_BUFC_METADATA]; - goto top; + list_start = &state->arcs_lists[0]; + list_count = ARC_BUFC_NUMMETADATALISTS; + offset = count = 0; + goto evict_start; } if (bufs_skipped) { @@ -1755,22 +1977,22 @@ restart: void arc_flush(spa_t *spa) { - while (list_head(&arc_mru->arcs_list[ARC_BUFC_DATA])) { + while (arc_mru->arcs_lsize[ARC_BUFC_DATA]) { (void) arc_evict(arc_mru, spa, -1, FALSE, ARC_BUFC_DATA); if (spa) break; } - while (list_head(&arc_mru->arcs_list[ARC_BUFC_METADATA])) { + while (arc_mru->arcs_lsize[ARC_BUFC_METADATA]) { (void) arc_evict(arc_mru, spa, -1, FALSE, ARC_BUFC_METADATA); if (spa) break; } - while (list_head(&arc_mfu->arcs_list[ARC_BUFC_DATA])) { + while (arc_mfu->arcs_lsize[ARC_BUFC_DATA]) { (void) arc_evict(arc_mfu, spa, -1, FALSE, ARC_BUFC_DATA); if (spa) break; } - while (list_head(&arc_mfu->arcs_list[ARC_BUFC_METADATA])) { + while (arc_mfu->arcs_lsize[ARC_BUFC_METADATA]) { (void) arc_evict(arc_mfu, spa, -1, FALSE, ARC_BUFC_METADATA); if (spa) break; @@ -2206,6 +2428,7 @@ out: arc_anon->arcs_size + arc_mru->arcs_size > arc_p) arc_p = MIN(arc_c, arc_p + size); } + ARCSTAT_BUMP(arcstat_allocated); } /* @@ -2391,7 +2614,10 @@ arc_read_done(zio_t *zio) hdr->b_flags &= ~ARC_L2_EVICTED; if (l2arc_noprefetch && (hdr->b_flags & ARC_PREFETCH)) hdr->b_flags &= ~ARC_L2CACHE; - +#if 0 + else if ((hdr->b_flags & ARC_PREFETCH) == 0) + hdr->b_flags |= ARC_L2CACHE; +#endif /* byteswap if necessary */ callback_list = hdr->b_acb; ASSERT(callback_list != NULL); @@ -2505,6 +2731,7 @@ arc_read(zio_t *pio, spa_t *spa, blkptr_ uint32_t *arc_flags, const zbookmark_t *zb) { int err; + arc_buf_hdr_t *hdr = pbuf->b_hdr; ASSERT(!refcount_is_zero(&pbuf->b_hdr->b_refcnt)); ASSERT3U((char *)bp - (char *)pbuf->b_data, <, pbuf->b_hdr->b_size); @@ -2513,8 +2740,8 @@ arc_read(zio_t *pio, spa_t *spa, blkptr_ err = arc_read_nolock(pio, spa, bp, done, private, priority, zio_flags, arc_flags, zb); + ASSERT3P(hdr, ==, pbuf->b_hdr); rw_exit(&pbuf->b_lock); - return (err); } @@ -2825,7 +3052,9 @@ arc_buf_evict(arc_buf_t *buf) arc_buf_hdr_t *hdr; kmutex_t *hash_lock; arc_buf_t **bufp; - + list_t *list, *evicted_list; + kmutex_t *lock, *evicted_lock; + rw_enter(&buf->b_lock, RW_WRITER); hdr = buf->b_hdr; if (hdr == NULL) { @@ -2873,16 +3102,18 @@ arc_buf_evict(arc_buf_t *buf) evicted_state = (old_state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; - mutex_enter(&old_state->arcs_mtx); - mutex_enter(&evicted_state->arcs_mtx); + get_buf_info(hdr, old_state, &list, &lock); + get_buf_info(hdr, evicted_state, &evicted_list, &evicted_lock); + mutex_enter(lock); + mutex_enter(evicted_lock); arc_change_state(evicted_state, hdr, hash_lock); ASSERT(HDR_IN_HASH_TABLE(hdr)); hdr->b_flags |= ARC_IN_HASH_TABLE; hdr->b_flags &= ~ARC_BUF_AVAILABLE; - mutex_exit(&evicted_state->arcs_mtx); - mutex_exit(&old_state->arcs_mtx); + mutex_exit(evicted_lock); + mutex_exit(lock); } mutex_exit(hash_lock); rw_exit(&buf->b_lock); @@ -3428,7 +3659,8 @@ void arc_init(void) { int prefetch_tunable_set = 0; - + int i; + mutex_init(&arc_reclaim_thr_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_reclaim_thr_cv, NULL, CV_DEFAULT, NULL); mutex_init(&arc_lowmem_lock, NULL, MUTEX_DEFAULT, NULL); @@ -3496,33 +3728,34 @@ arc_init(void) arc_l2c_only = &ARC_l2c_only; arc_size = 0; - mutex_init(&arc_anon->arcs_mtx, NULL, MUTEX_DEFAULT, NULL); - mutex_init(&arc_mru->arcs_mtx, NULL, MUTEX_DEFAULT, NULL); - mutex_init(&arc_mru_ghost->arcs_mtx, NULL, MUTEX_DEFAULT, NULL); - mutex_init(&arc_mfu->arcs_mtx, NULL, MUTEX_DEFAULT, NULL); - mutex_init(&arc_mfu_ghost->arcs_mtx, NULL, MUTEX_DEFAULT, NULL); - mutex_init(&arc_l2c_only->arcs_mtx, NULL, MUTEX_DEFAULT, NULL); - - list_create(&arc_mru->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mru->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mfu->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mfu->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); - list_create(&arc_l2c_only->arcs_list[ARC_BUFC_DATA], - sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + for (i = 0; i < ARC_BUFC_NUMLISTS; i++) { + + mutex_init(&arc_anon->arcs_locks[i].arcs_lock, + NULL, MUTEX_DEFAULT, NULL); + mutex_init(&arc_mru->arcs_locks[i].arcs_lock, + NULL, MUTEX_DEFAULT, NULL); + mutex_init(&arc_mru_ghost->arcs_locks[i].arcs_lock, + NULL, MUTEX_DEFAULT, NULL); + mutex_init(&arc_mfu->arcs_locks[i].arcs_lock, + NULL, MUTEX_DEFAULT, NULL); + mutex_init(&arc_mfu_ghost->arcs_locks[i].arcs_lock, + NULL, MUTEX_DEFAULT, NULL); + mutex_init(&arc_l2c_only->arcs_locks[i].arcs_lock, + NULL, MUTEX_DEFAULT, NULL); + + list_create(&arc_mru->arcs_lists[i], + sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + list_create(&arc_mru_ghost->arcs_lists[i], + sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + list_create(&arc_mfu->arcs_lists[i], + sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + list_create(&arc_mfu_ghost->arcs_lists[i], + sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + list_create(&arc_mfu_ghost->arcs_lists[i], + sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + list_create(&arc_l2c_only->arcs_lists[i], + sizeof (arc_buf_hdr_t), offsetof(arc_buf_hdr_t, b_arc_node)); + } buf_init(); @@ -3596,7 +3829,8 @@ arc_init(void) void arc_fini(void) { - + int i; + mutex_enter(&arc_reclaim_thr_lock); arc_thread_exit = 1; cv_signal(&arc_reclaim_thr_cv); @@ -3617,21 +3851,19 @@ arc_fini(void) mutex_destroy(&arc_reclaim_thr_lock); cv_destroy(&arc_reclaim_thr_cv); - list_destroy(&arc_mru->arcs_list[ARC_BUFC_METADATA]); - list_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_METADATA]); - list_destroy(&arc_mfu->arcs_list[ARC_BUFC_METADATA]); - list_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_METADATA]); - list_destroy(&arc_mru->arcs_list[ARC_BUFC_DATA]); - list_destroy(&arc_mru_ghost->arcs_list[ARC_BUFC_DATA]); - list_destroy(&arc_mfu->arcs_list[ARC_BUFC_DATA]); - list_destroy(&arc_mfu_ghost->arcs_list[ARC_BUFC_DATA]); - - mutex_destroy(&arc_anon->arcs_mtx); - mutex_destroy(&arc_mru->arcs_mtx); - mutex_destroy(&arc_mru_ghost->arcs_mtx); - mutex_destroy(&arc_mfu->arcs_mtx); - mutex_destroy(&arc_mfu_ghost->arcs_mtx); - + for (i = 0; i < ARC_BUFC_NUMLISTS; i++) { + list_destroy(&arc_mru->arcs_lists[i]); + list_destroy(&arc_mru_ghost->arcs_lists[i]); + list_destroy(&arc_mfu->arcs_lists[i]); + list_destroy(&arc_mfu_ghost->arcs_lists[i]); + + mutex_destroy(&arc_anon->arcs_locks[i].arcs_lock); + mutex_destroy(&arc_mru->arcs_locks[i].arcs_lock); + mutex_destroy(&arc_mru_ghost->arcs_locks[i].arcs_lock); + mutex_destroy(&arc_mfu->arcs_locks[i].arcs_lock); + mutex_destroy(&arc_mfu_ghost->arcs_locks[i].arcs_lock); + } + mutex_destroy(&zfs_write_limit_lock); buf_fini(); @@ -4026,28 +4258,31 @@ static list_t * l2arc_list_locked(int list_num, kmutex_t **lock) { list_t *list; + int idx; + + ASSERT(list_num >= 0 && list_num < 2*ARC_BUFC_NUMLISTS); - ASSERT(list_num >= 0 && list_num <= 3); - - switch (list_num) { - case 0: - list = &arc_mfu->arcs_list[ARC_BUFC_METADATA]; - *lock = &arc_mfu->arcs_mtx; - break; - case 1: - list = &arc_mru->arcs_list[ARC_BUFC_METADATA]; - *lock = &arc_mru->arcs_mtx; - break; - case 2: - list = &arc_mfu->arcs_list[ARC_BUFC_DATA]; - *lock = &arc_mfu->arcs_mtx; - break; - case 3: - list = &arc_mru->arcs_list[ARC_BUFC_DATA]; - *lock = &arc_mru->arcs_mtx; - break; + if (list_num < ARC_BUFC_NUMMETADATALISTS) { + idx = list_num; + list = &arc_mfu->arcs_lists[idx]; + *lock = ARCS_LOCK(arc_mfu, idx); + } else if (list_num < ARC_BUFC_NUMMETADATALISTS*2) { + idx = list_num - ARC_BUFC_NUMMETADATALISTS; + list = &arc_mru->arcs_lists[idx]; + *lock = ARCS_LOCK(arc_mru, idx); + } else if (list_num < (ARC_BUFC_NUMMETADATALISTS*2 + + ARC_BUFC_NUMDATALISTS)) { + idx = list_num - ARC_BUFC_NUMMETADATALISTS; + list = &arc_mfu->arcs_lists[idx]; + *lock = ARCS_LOCK(arc_mfu, idx); + } else { + idx = list_num - ARC_BUFC_NUMLISTS; + list = &arc_mru->arcs_lists[idx]; + *lock = ARCS_LOCK(arc_mru, idx); } + CTR3(KTR_SPARE2, "list=%p list_num=%d idx=%d", + list, list_num, idx); ASSERT(!(MUTEX_HELD(*lock))); mutex_enter(*lock); return (list); @@ -4212,13 +4447,15 @@ l2arc_write_buffers(spa_t *spa, l2arc_de head = kmem_cache_alloc(hdr_cache, KM_PUSHPAGE); head->b_flags |= ARC_L2_WRITE_HEAD; + ARCSTAT_BUMP(arcstat_l2_write_buffer_iter); /* * Copy buffers for L2ARC writing. */ mutex_enter(&l2arc_buflist_mtx); - for (try = 0; try <= 3; try++) { + for (try = 0; try < 2*ARC_BUFC_NUMLISTS; try++) { list = l2arc_list_locked(try, &list_lock); passed_sz = 0; + ARCSTAT_BUMP(arcstat_l2_write_buffer_list_iter); /* * L2ARC fast warmup. @@ -4231,52 +4468,66 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ab = list_head(list); else ab = list_tail(list); + if (ab == NULL) { + ARCSTAT_BUMP(arcstat_l2_write_buffer_list_null_iter); + } for (; ab; ab = ab_prev) { if (arc_warm == B_FALSE) ab_prev = list_next(list, ab); else ab_prev = list_prev(list, ab); - + ARCSTAT_INCR(arcstat_l2_write_buffer_bytes_scanned, ab->b_size); + hash_lock = HDR_LOCK(ab); have_lock = MUTEX_HELD(hash_lock); if (!have_lock && !mutex_tryenter(hash_lock)) { + ARCSTAT_BUMP(arcstat_l2_write_trylock_fail); /* * Skip this buffer rather than waiting. */ continue; } + if (ab->b_l2hdr != NULL) { + /* + * Already in L2ARC. + */ + mutex_exit(hash_lock); + ARCSTAT_BUMP(arcstat_l2_write_in_l2); + continue; + } + passed_sz += ab->b_size; if (passed_sz > headroom) { /* * Searched too far. */ mutex_exit(hash_lock); + ARCSTAT_BUMP(arcstat_l2_write_passed_headroom); break; } if (ab->b_spa != spa) { mutex_exit(hash_lock); + ARCSTAT_BUMP(arcstat_l2_write_spa_mismatch); continue; } - if (ab->b_l2hdr != NULL) { - /* - * Already in L2ARC. - */ + if (HDR_IO_IN_PROGRESS(ab)) { mutex_exit(hash_lock); + ARCSTAT_BUMP(arcstat_l2_write_hdr_io_in_progress); continue; } - - if (HDR_IO_IN_PROGRESS(ab) || !HDR_L2CACHE(ab)) { + if (!HDR_L2CACHE(ab)) { mutex_exit(hash_lock); + ARCSTAT_BUMP(arcstat_l2_write_not_cacheable); continue; } - if ((write_sz + ab->b_size) > target_sz) { full = B_TRUE; mutex_exit(hash_lock); + ARCSTAT_BUMP(arcstat_l2_write_full); break; } @@ -4300,8 +4551,10 @@ l2arc_write_buffers(spa_t *spa, l2arc_de cb->l2wcb_head = head; pio = zio_root(spa, l2arc_write_done, cb, ZIO_FLAG_CANFAIL); + ARCSTAT_BUMP(arcstat_l2_write_pios); } + ARCSTAT_INCR(arcstat_l2_write_bytes_written, ab->b_size); /* * Create and add a new L2ARC header. */ @@ -4309,7 +4562,6 @@ l2arc_write_buffers(spa_t *spa, l2arc_de hdrl2->b_dev = dev; hdrl2->b_daddr = dev->l2ad_hand; - ab->b_flags |= ARC_L2_WRITING; ab->b_l2hdr = hdrl2; list_insert_head(dev->l2ad_buflist, ab); buf_data = ab->b_buf->b_data; @@ -4397,7 +4649,7 @@ l2arc_feed_thread(void *dummy __unused) */ CALLB_CPR_SAFE_BEGIN(&cpr); (void) cv_timedwait(&l2arc_feed_thr_cv, &l2arc_feed_thr_lock, - hz * l2arc_feed_secs); + hz * l2arc_feed_secs >> l2arc_feed_secs_shift); CALLB_CPR_SAFE_END(&cpr, &l2arc_feed_thr_lock); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Tue Mar 16 21:44:21 2010 (r205230) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Tue Mar 16 22:17:21 2010 (r205231) @@ -55,8 +55,8 @@ struct arc_buf { }; typedef enum arc_buf_contents { - ARC_BUFC_DATA, /* buffer contains data */ ARC_BUFC_METADATA, /* buffer contains metadata */ + ARC_BUFC_DATA, /* buffer contains data */ ARC_BUFC_NUMTYPES } arc_buf_contents_t; /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 16 23:19:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD39E106564A; Tue, 16 Mar 2010 23:19:55 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C0178FC08; Tue, 16 Mar 2010 23:19:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GNJtXa026066; Tue, 16 Mar 2010 23:19:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GNJtBf026064; Tue, 16 Mar 2010 23:19:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201003162319.o2GNJtBf026064@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 16 Mar 2010 23:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205233 - head/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 16 Mar 2010 23:19:55 -0000 Author: pjd Date: Tue Mar 16 23:19:55 2010 New Revision: 205233 URL: http://svn.freebsd.org/changeset/base/205233 Log: Better way to find out available file system types is to use lsvfs(1). Using 'sysctl vfs' is not only ugly, but is also not reliable - not all file system types create entries in vfs sysctl tree. Reviewed by: imp MFC after: 1 week Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Tue Mar 16 22:28:07 2010 (r205232) +++ head/usr.bin/find/find.1 Tue Mar 16 23:19:55 2010 (r205233) @@ -35,7 +35,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd February 24, 2008 +.Dd March 17, 2010 .Dt FIND 1 .Os .Sh NAME @@ -429,12 +429,9 @@ bits match those of True if the file is contained in a file system of type .Ar type . The -.Xr sysctl 8 +.Xr lsvfs 1 command can be used to find out the types of file systems -that are available on the system: -.Pp -.Dl "sysctl vfs" -.Pp +that are available on the system. In addition, there are two pseudo-types, .Dq Li local and @@ -947,6 +944,7 @@ section below for details. .Xr chmod 1 , .Xr cvs 1 , .Xr locate 1 , +.Xr lsvfs 1 , .Xr whereis 1 , .Xr which 1 , .Xr xargs 1 , From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 00:37:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32AE9106564A; Wed, 17 Mar 2010 00:37:16 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1CD8FC0A; Wed, 17 Mar 2010 00:37:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H0bGRu043457; Wed, 17 Mar 2010 00:37:16 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H0bGc5043447; Wed, 17 Mar 2010 00:37:16 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003170037.o2H0bGc5043447@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 17 Mar 2010 00:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205234 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 00:37:16 -0000 Author: marcel Date: Wed Mar 17 00:37:15 2010 New Revision: 205234 URL: http://svn.freebsd.org/changeset/base/205234 Log: Revamp the interrupt code based on the previous commit: o Introduce XIV, eXternal Interrupt Vector, to differentiate from the interrupts vectors that are offsets in the IVT (Interrupt Vector Table). There's a vector for external interrupts, which are based on the XIVs. o Keep track of allocated and reserved XIVs so that we can assign XIVs without hardcoding anything. When XIVs are allocated, an interrupt handler and a class is specified for the XIV. Classes are: 1. architecture-defined: XIV 15 is returned when no external interrupt are pending, 2. platform-defined: SAL reports which XIV is used to wakeup an AP (typically 0xFF, but it's 0x12 for the Altix 350). 3. inter-processor interrupts: allocated for SMP support and non-redirectable. 4. device interrupts (i.e. IRQs): allocated when devices are discovered and are redirectable. o Rewrite the central interrupt handler to call the per-XIV interrupt handler and rename it to ia64_handle_intr(). Move the per-XIV handler implementation to the file where we have the XIV allocation/reservation. Clock interrupt handling is moved to clock.c. IPI handling is moved to mp_machdep.c. o Drop support for the Intel 8259A because it was broken. When XIV 0 is received, the CPU should initiate an INTA cycle to obtain the interrupt vector of the 8259-based interrupt. In these cases the interrupt controller we should be talking to WRT to masking on signalling EOI is the 8259 and not the I/O SAPIC. This requires adriver for the Intel 8259A which isn't available for ia64. Thus stop pretending to support ExtINTs and instead panic() so that if we come across hardware that has an Intel 8259A, so have something real to work with. o With XIVs for IPIs dynamically allocatedi and also based on priority, define the IPI_* symbols as variables rather than constants. The variable holds the XIV allocated for the IPI. o IPI_STOP_HARD delivers a NMI if possible. Otherwise the XIV assigned to IPI_STOP is delivered. Modified: head/sys/ia64/ia64/clock.c head/sys/ia64/ia64/exception.S head/sys/ia64/ia64/highfp.c head/sys/ia64/ia64/interrupt.c head/sys/ia64/ia64/locore.S head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/mp_machdep.c head/sys/ia64/ia64/nexus.c head/sys/ia64/ia64/sal.c head/sys/ia64/include/clock.h head/sys/ia64/include/intr.h head/sys/ia64/include/intrcnt.h head/sys/ia64/include/smp.h Modified: head/sys/ia64/ia64/clock.c ============================================================================== --- head/sys/ia64/ia64/clock.c Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/clock.c Wed Mar 17 00:37:15 2010 (r205234) @@ -29,19 +29,41 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include #include -#include #include #include -#include #include #include +#include +#include #include -uint64_t ia64_clock_reload; +SYSCTL_NODE(_debug, OID_AUTO, clock, CTLFLAG_RW, 0, "clock statistics"); + +static int adjust_edges = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_edges, CTLFLAG_RD, + &adjust_edges, 0, "Number of times ITC got more than 12.5% behind"); + +static int adjust_excess = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_excess, CTLFLAG_RD, + &adjust_excess, 0, "Total number of ignored ITC interrupts"); + +static int adjust_lost = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_lost, CTLFLAG_RD, + &adjust_lost, 0, "Total number of lost ITC interrupts"); + +static int adjust_ticks = 0; +SYSCTL_INT(_debug_clock, OID_AUTO, adjust_ticks, CTLFLAG_RD, + &adjust_ticks, 0, "Total number of ITC interrupts with adjustment"); + +static u_int ia64_clock_xiv; +static uint64_t ia64_clock_reload; #ifndef SMP static timecounter_get_t ia64_get_timecount; @@ -54,13 +76,68 @@ static struct timecounter ia64_timecount "ITC" /* name */ }; -static unsigned +static u_int ia64_get_timecount(struct timecounter* tc) { return ia64_get_itc(); } #endif +static u_int +ia64_ih_clock(struct thread *td, u_int xiv, struct trapframe *tf) +{ + uint64_t adj, clk, itc; + int64_t delta; + int count; + + ia64_set_eoi(0); + + PCPU_INC(md.stats.pcs_nclks); + intrcnt[INTRCNT_CLOCK]++; + + ia64_srlz_d(); + + itc = ia64_get_itc(); + + adj = PCPU_GET(md.clockadj); + clk = PCPU_GET(md.clock); + + delta = itc - clk; + count = 0; + while (delta >= ia64_clock_reload) { + /* Only the BSP runs the real clock */ + if (PCPU_GET(cpuid) == 0) + hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); + else + hardclock_cpu(TRAPF_USERMODE(tf)); + if (profprocs != 0) + profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); + statclock(TRAPF_USERMODE(tf)); + delta -= ia64_clock_reload; + clk += ia64_clock_reload; + if (adj != 0) + adjust_ticks++; + count++; + } + ia64_set_itm(ia64_get_itc() + ia64_clock_reload - adj); + if (count > 0) { + adjust_lost += count - 1; + if (delta > (ia64_clock_reload >> 3)) { + if (adj == 0) + adjust_edges++; + adj = ia64_clock_reload >> 4; + } else + adj = 0; + } else { + adj = 0; + adjust_excess++; + } + PCPU_SET(md.clock, clk); + PCPU_SET(md.clockadj, adj); + ia64_srlz_d(); + return (0); +} + void pcpu_initclock(void) { @@ -68,7 +145,7 @@ pcpu_initclock(void) PCPU_SET(md.clockadj, 0); PCPU_SET(md.clock, ia64_get_itc()); ia64_set_itm(PCPU_GET(md.clock) + ia64_clock_reload); - ia64_set_itv(CLOCK_VECTOR); /* highest priority class */ + ia64_set_itv(ia64_clock_xiv); ia64_srlz_d(); } @@ -81,6 +158,11 @@ cpu_initclocks() { u_long itc_freq; + ia64_clock_xiv = ia64_xiv_alloc(PI_REALTIME, IA64_XIV_IRQ, + ia64_ih_clock); + if (ia64_clock_xiv == 0) + panic("No XIV for clock interrupts"); + itc_freq = (u_long)ia64_itc_freq() * 1000000ul; stathz = hz; Modified: head/sys/ia64/ia64/exception.S ============================================================================== --- head/sys/ia64/ia64/exception.S Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/exception.S Wed Mar 17 00:37:15 2010 (r205234) @@ -1303,7 +1303,7 @@ IVT_END(Break_Instruction) IVT_ENTRY(External_Interrupt, 0x3000) { .mib - mov r17=cr.ivr // Put the vector in the trap frame. + mov r17=cr.ivr // Put the XIV in the trapframe. mov r16=ip br.sptk exception_save ;; @@ -1317,7 +1317,7 @@ IVT_ENTRY(External_Interrupt, 0x3000) { .mib add out0=16,sp nop 0 - br.call.sptk rp=interrupt + br.call.sptk rp=ia64_handle_intr ;; } { .mib Modified: head/sys/ia64/ia64/highfp.c ============================================================================== --- head/sys/ia64/ia64/highfp.c Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/highfp.c Wed Mar 17 00:37:15 2010 (r205234) @@ -53,7 +53,7 @@ ia64_highfp_ipi(struct pcpu *cpu) { int error; - ipi_send(cpu, IPI_HIGH_FP); + ipi_send(cpu, ia64_ipi_highfp); error = msleep_spin(&cpu->pc_fpcurthread, &ia64_highfp_mtx, "High FP", 0); return (error); Modified: head/sys/ia64/ia64/interrupt.c ============================================================================== --- head/sys/ia64/ia64/interrupt.c Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/interrupt.c Wed Mar 17 00:37:15 2010 (r205234) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -52,46 +53,20 @@ #include #include -#include #include #include #include #include +#include #include #include #include #include -#ifdef EVCNT_COUNTERS -struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */ -#else -#include -#include -#endif - #ifdef DDB #include #endif -SYSCTL_NODE(_debug, OID_AUTO, clock, CTLFLAG_RW, 0, "clock statistics"); - -static int adjust_edges = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_edges, CTLFLAG_RD, - &adjust_edges, 0, "Number of times ITC got more than 12.5% behind"); - -static int adjust_excess = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_excess, CTLFLAG_RD, - &adjust_excess, 0, "Total number of ignored ITC interrupts"); - -static int adjust_lost = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_lost, CTLFLAG_RD, - &adjust_lost, 0, "Total number of lost ITC interrupts"); - -static int adjust_ticks = 0; -SYSCTL_INT(_debug_clock, OID_AUTO, adjust_ticks, CTLFLAG_RD, - &adjust_ticks, 0, "Total number of ITC interrupts with adjustment"); - - struct ia64_intr { struct intr_event *event; /* interrupt event */ volatile long *cntp; /* interrupt counter */ @@ -99,190 +74,120 @@ struct ia64_intr { u_int irq; }; -static struct ia64_intr *ia64_intrs[256]; +ia64_ihtype *ia64_handler[IA64_NXIVS]; +static enum ia64_xiv_use ia64_xiv[IA64_NXIVS]; +static struct ia64_intr *ia64_intrs[IA64_NXIVS]; -static void ia64_dispatch_intr(void *, u_int); +static ia64_ihtype ia64_ih_invalid; +static ia64_ihtype ia64_ih_irq; void -interrupt(struct trapframe *tf) +ia64_xiv_init(void) { - struct thread *td; - uint64_t adj, clk, itc; - int64_t delta; - u_int vector; - int count; - uint8_t inta; + u_int xiv; - ia64_set_fpsr(IA64_FPSR_DEFAULT); + for (xiv = 0; xiv < IA64_NXIVS; xiv++) { + ia64_handler[xiv] = ia64_ih_invalid; + ia64_xiv[xiv] = IA64_XIV_FREE; + ia64_intrs[xiv] = NULL; + } + (void)ia64_xiv_reserve(15, IA64_XIV_ARCH, NULL); +} - td = curthread; +int +ia64_xiv_free(u_int xiv, enum ia64_xiv_use what) +{ - PCPU_INC(cnt.v_intr); + if (xiv >= IA64_NXIVS) + return (EINVAL); + if (what == IA64_XIV_FREE || what == IA64_XIV_ARCH) + return (EINVAL); + if (ia64_xiv[xiv] != what) + return (ENXIO); + ia64_xiv[xiv] = IA64_XIV_FREE; + ia64_handler[xiv] = ia64_ih_invalid; + return (0); +} - vector = tf->tf_special.ifa; +int +ia64_xiv_reserve(u_int xiv, enum ia64_xiv_use what, ia64_ihtype ih) +{ - next: - /* - * Handle ExtINT interrupts by generating an INTA cycle to - * read the vector. - */ - if (vector == 0) { - PCPU_INC(md.stats.pcs_nextints); - inta = ia64_ld1(&ia64_pib->ib_inta); - if (inta == 15) { - PCPU_INC(md.stats.pcs_nstrays); - __asm __volatile("mov cr.eoi = r0;; srlz.d"); - goto stray; - } - vector = (int)inta; - } else if (vector == 15) { - PCPU_INC(md.stats.pcs_nstrays); - goto stray; - } + if (xiv >= IA64_NXIVS) + return (EINVAL); + if (what == IA64_XIV_FREE) + return (EINVAL); + if (ia64_xiv[xiv] != IA64_XIV_FREE) + return (EBUSY); + ia64_xiv[xiv] = what; + ia64_handler[xiv] = (ih == NULL) ? ia64_ih_invalid: ih; + if (1 || bootverbose) + printf("XIV %u: use=%u, IH=%p\n", xiv, what, ih); + return (0); +} - if (vector == CLOCK_VECTOR) {/* clock interrupt */ - /* CTR0(KTR_INTR, "clock interrupt"); */ +u_int +ia64_xiv_alloc(u_int prio, enum ia64_xiv_use what, ia64_ihtype ih) +{ + u_int hwprio; + u_int xiv0, xiv; - itc = ia64_get_itc(); + hwprio = prio >> 2; + if (hwprio > IA64_MAX_HWPRIO) + hwprio = IA64_MAX_HWPRIO; - PCPU_INC(md.stats.pcs_nclks); -#ifdef EVCNT_COUNTERS - clock_intr_evcnt.ev_count++; -#else - intrcnt[INTRCNT_CLOCK]++; -#endif + xiv0 = IA64_NXIVS - (hwprio + 1) * 16; - critical_enter(); + KASSERT(xiv0 > IA64_MIN_XIV, ("%s: min XIV", __func__)); + KASSERT(xiv0 < IA64_NXIVS, ("%s: max XIV", __func__)); - adj = PCPU_GET(md.clockadj); - clk = PCPU_GET(md.clock); - delta = itc - clk; - count = 0; - while (delta >= ia64_clock_reload) { - /* Only the BSP runs the real clock */ - if (PCPU_GET(cpuid) == 0) - hardclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - else - hardclock_cpu(TRAPF_USERMODE(tf)); - if (profprocs != 0) - profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); - statclock(TRAPF_USERMODE(tf)); - delta -= ia64_clock_reload; - clk += ia64_clock_reload; - if (adj != 0) - adjust_ticks++; - count++; - } - ia64_set_itm(ia64_get_itc() + ia64_clock_reload - adj); - if (count > 0) { - adjust_lost += count - 1; - if (delta > (ia64_clock_reload >> 3)) { - if (adj == 0) - adjust_edges++; - adj = ia64_clock_reload >> 4; - } else - adj = 0; - } else { - adj = 0; - adjust_excess++; - } - PCPU_SET(md.clock, clk); - PCPU_SET(md.clockadj, adj); - critical_exit(); - ia64_srlz_d(); + xiv = xiv0; + while (xiv < IA64_NXIVS && ia64_xiv_reserve(xiv, what, ih)) + xiv++; -#ifdef SMP - } else if (vector == ipi_vector[IPI_AST]) { - PCPU_INC(md.stats.pcs_nasts); - CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid)); - } else if (vector == ipi_vector[IPI_HIGH_FP]) { - PCPU_INC(md.stats.pcs_nhighfps); - ia64_highfp_save_ipi(); - } else if (vector == ipi_vector[IPI_RENDEZVOUS]) { - PCPU_INC(md.stats.pcs_nrdvs); - CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid)); - enable_intr(); - smp_rendezvous_action(); - disable_intr(); - } else if (vector == ipi_vector[IPI_STOP]) { - PCPU_INC(md.stats.pcs_nstops); - cpumask_t mybit = PCPU_GET(cpumask); - - /* Make sure IPI_STOP_HARD is mapped to IPI_STOP. */ - KASSERT(IPI_STOP == IPI_STOP_HARD, - ("%s: IPI_STOP_HARD not handled.", __func__)); - - savectx(PCPU_PTR(md.pcb)); - atomic_set_int(&stopped_cpus, mybit); - while ((started_cpus & mybit) == 0) - cpu_spinwait(); - atomic_clear_int(&started_cpus, mybit); - atomic_clear_int(&stopped_cpus, mybit); - } else if (vector == ipi_vector[IPI_PREEMPT]) { - PCPU_INC(md.stats.pcs_npreempts); - CTR1(KTR_SMP, "IPI_PREEMPT, cpuid=%d", PCPU_GET(cpuid)); - __asm __volatile("mov cr.eoi = r0;; srlz.d"); - enable_intr(); - sched_preempt(curthread); - disable_intr(); - goto stray; -#endif - } else { - PCPU_INC(md.stats.pcs_nhwints); - atomic_add_int(&td->td_intr_nesting_level, 1); - ia64_dispatch_intr(tf, vector); - atomic_subtract_int(&td->td_intr_nesting_level, 1); - } + if (xiv < IA64_NXIVS) + return (xiv); - __asm __volatile("mov cr.eoi = r0;; srlz.d"); - vector = ia64_get_ivr(); - if (vector != 15) - goto next; + xiv = xiv0; + while (xiv >= IA64_MIN_XIV && ia64_xiv_reserve(xiv, what, ih)) + xiv--; -stray: - if (TRAPF_USERMODE(tf)) { - enable_intr(); - userret(td, tf); - mtx_assert(&Giant, MA_NOTOWNED); - do_ast(tf); - } + return ((xiv >= IA64_MIN_XIV) ? xiv : 0); } - static void ia64_intr_eoi(void *arg) { - u_int vector = (uintptr_t)arg; + u_int xiv = (uintptr_t)arg; struct ia64_intr *i; - i = ia64_intrs[vector]; - if (i != NULL) - sapic_eoi(i->sapic, vector); + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s", __func__)); + sapic_eoi(i->sapic, xiv); } static void ia64_intr_mask(void *arg) { - u_int vector = (uintptr_t)arg; + u_int xiv = (uintptr_t)arg; struct ia64_intr *i; - i = ia64_intrs[vector]; - if (i != NULL) { - sapic_mask(i->sapic, i->irq); - sapic_eoi(i->sapic, vector); - } + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s", __func__)); + sapic_mask(i->sapic, i->irq); + sapic_eoi(i->sapic, xiv); } static void ia64_intr_unmask(void *arg) { - u_int vector = (uintptr_t)arg; + u_int xiv = (uintptr_t)arg; struct ia64_intr *i; - i = ia64_intrs[vector]; - if (i != NULL) - sapic_unmask(i->sapic, i->irq); + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s", __func__)); + sapic_unmask(i->sapic, i->irq); } int @@ -292,7 +197,7 @@ ia64_setup_intr(const char *name, int ir struct ia64_intr *i; struct sapic *sa; char *intrname; - u_int prio, vector; + u_int prio, xiv; int error; prio = intr_priority(flags); @@ -301,37 +206,41 @@ ia64_setup_intr(const char *name, int ir /* XXX lock */ - /* Get the I/O SAPIC and vector that corresponds to the IRQ. */ - sa = sapic_lookup(irq, &vector); + /* Get the I/O SAPIC and XIV that corresponds to the IRQ. */ + sa = sapic_lookup(irq, &xiv); if (sa == NULL) { /* XXX unlock */ return (EINVAL); } - if (vector == 0) { + if (xiv == 0) { /* XXX unlock */ i = malloc(sizeof(struct ia64_intr), M_DEVBUF, M_ZERO | M_WAITOK); /* XXX lock */ - sa = sapic_lookup(irq, &vector); + sa = sapic_lookup(irq, &xiv); KASSERT(sa != NULL, ("sapic_lookup")); - if (vector != 0) + if (xiv != 0) free(i, M_DEVBUF); } /* - * If the IRQ has no vector assigned to it yet, assign one based + * If the IRQ has no XIV assigned to it yet, assign one based * on the priority. */ - if (vector == 0) { - vector = (256 - 64) - (prio << 1); - while (vector < 256 && ia64_intrs[vector] != NULL) - vector++; + if (xiv == 0) { + xiv = ia64_xiv_alloc(prio, IA64_XIV_IRQ, ia64_ih_irq); + if (xiv == 0) { + /* XXX unlock */ + free(i, M_DEVBUF); + return (ENOSPC); + } - error = intr_event_create(&i->event, (void *)(uintptr_t)vector, + error = intr_event_create(&i->event, (void *)(uintptr_t)xiv, 0, irq, ia64_intr_mask, ia64_intr_unmask, ia64_intr_eoi, NULL, "irq%u:", irq); if (error) { + ia64_xiv_free(xiv, IA64_XIV_IRQ); /* XXX unlock */ free(i, M_DEVBUF); return (error); @@ -339,25 +248,25 @@ ia64_setup_intr(const char *name, int ir i->sapic = sa; i->irq = irq; - i->cntp = intrcnt + irq + INTRCNT_ISA_IRQ; - ia64_intrs[vector] = i; - sapic_enable(sa, irq, vector); + i->cntp = intrcnt + xiv; + ia64_intrs[xiv] = i; /* XXX unlock */ + sapic_enable(sa, irq, xiv); + if (name != NULL && *name != '\0') { /* XXX needs abstraction. Too error prone. */ - intrname = intrnames + - (irq + INTRCNT_ISA_IRQ) * INTRNAME_LEN; + intrname = intrnames + xiv * INTRNAME_LEN; memset(intrname, ' ', INTRNAME_LEN - 1); bcopy(name, intrname, strlen(name)); } } else { - i = ia64_intrs[vector]; + i = ia64_intrs[xiv]; /* XXX unlock */ } - KASSERT(i != NULL, ("vector mapping bug")); + KASSERT(i != NULL, ("XIV mapping bug")); error = intr_event_add_handler(i->event, name, filter, handler, arg, prio, flags, cookiep); @@ -371,62 +280,114 @@ ia64_teardown_intr(void *cookie) return (intr_event_remove_handler(cookie)); } -static void -ia64_dispatch_intr(void *frame, u_int vector) +/* + * Interrupt handlers. + */ + +void +ia64_handle_intr(struct trapframe *tf) +{ + struct thread *td; + u_int rfi, xiv; + + td = curthread; + ia64_set_fpsr(IA64_FPSR_DEFAULT); + PCPU_INC(cnt.v_intr); + + xiv = tf->tf_special.ifa; + if (xiv == 15) { + PCPU_INC(md.stats.pcs_nstrays); + goto out; + } + + while (xiv != 15) { + CTR1(KTR_INTR, "INTR: XIV=%u", xiv); + critical_enter(); + rfi = (ia64_handler[xiv])(td, xiv, tf); + if (rfi) { + critical_exit(); + return; + } + xiv = ia64_get_ivr(); + critical_exit(); + ia64_srlz_d(); + } + + out: + if (TRAPF_USERMODE(tf)) { + while (td->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { + enable_intr(); + ast(tf); + disable_intr(); + } + } +} + +static u_int +ia64_ih_invalid(struct thread *td, u_int xiv, struct trapframe *tf) +{ + + ia64_set_eoi(0); + ia64_srlz_d(); + panic("invalid XIV: %u", xiv); + return (1); +} + +static u_int +ia64_ih_irq(struct thread *td, u_int xiv, struct trapframe *tf) { struct ia64_intr *i; struct intr_event *ie; /* our interrupt event */ - /* - * Find the interrupt thread for this vector. - */ - i = ia64_intrs[vector]; - KASSERT(i != NULL, ("%s: unassigned vector", __func__)); + PCPU_INC(md.stats.pcs_nhwints); + + /* Find the interrupt thread for this XIV. */ + i = ia64_intrs[xiv]; + KASSERT(i != NULL, ("%s: unassigned XIV", __func__)); (*i->cntp)++; ie = i->event; KASSERT(ie != NULL, ("%s: interrupt without event", __func__)); - if (intr_event_handle(ie, frame) != 0) { - /* - * XXX: The pre-INTR_FILTER code didn't mask stray - * interrupts. - */ - ia64_intr_mask((void *)(uintptr_t)vector); + if (intr_event_handle(ie, tf) != 0) { + ia64_intr_mask((void *)(uintptr_t)xiv); log(LOG_ERR, "stray irq%u\n", i->irq); } + ia64_set_eoi(0); + ia64_srlz_d(); + return (0); } #ifdef DDB static void -db_print_vector(u_int vector, int always) +db_print_xiv(u_int xiv, int always) { struct ia64_intr *i; - i = ia64_intrs[vector]; + i = ia64_intrs[xiv]; if (i != NULL) { - db_printf("vector %u (%p): ", vector, i); + db_printf("XIV %u (%p): ", xiv, i); sapic_print(i->sapic, i->irq); } else if (always) - db_printf("vector %u: unassigned\n", vector); + db_printf("XIV %u: unassigned\n", xiv); } -DB_SHOW_COMMAND(vector, db_show_vector) +DB_SHOW_COMMAND(xiv, db_show_xiv) { - u_int vector; + u_int xiv; if (have_addr) { - vector = ((addr >> 4) % 16) * 10 + (addr % 16); - if (vector >= 256) - db_printf("error: vector %u not in range [0..255]\n", - vector); + xiv = ((addr >> 4) % 16) * 10 + (addr % 16); + if (xiv >= IA64_NXIVS) + db_printf("error: XIV %u not in range [0..%u]\n", + xiv, IA64_NXIVS - 1); else - db_print_vector(vector, 1); + db_print_xiv(xiv, 1); } else { - for (vector = 0; vector < 256; vector++) - db_print_vector(vector, 0); + for (xiv = 0; xiv < IA64_NXIVS; xiv++) + db_print_xiv(xiv, 0); } } Modified: head/sys/ia64/ia64/locore.S ============================================================================== --- head/sys/ia64/ia64/locore.S Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/locore.S Wed Mar 17 00:37:15 2010 (r205234) @@ -26,16 +26,13 @@ * $FreeBSD$ */ +#include #include #include +#include #include -#include -#include - -#ifndef EVCNT_COUNTERS -#define _LOCORE #include -#endif +#include .section .data.proc0,"aw" .global kstack @@ -310,7 +307,7 @@ EXPORT(intrnames) .ascii "clock" .fill INTRNAME_LEN - 5 - 1, 1, ' ' .byte 0 -intr_n = 0 +intr_n = 1 .rept INTRCNT_COUNT - 1 .ascii "#" .byte intr_n / 100 + '0' Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/machdep.c Wed Mar 17 00:37:15 2010 (r205234) @@ -371,7 +371,7 @@ cpu_startup(void *dummy) SYSCTL_ADD_ULONG(&pc->pc_md.sysctl_ctx, SYSCTL_CHILDREN(pc->pc_md.sysctl_tree), OID_AUTO, "nstrays", CTLFLAG_RD, &pcs->pcs_nstrays, - "Number of stray vectors"); + "Number of stray interrupts"); } } SYSINIT(cpu_startup, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); @@ -781,6 +781,7 @@ ia64_init(void) */ map_pal_code(); efi_boot_minimal(bootinfo.bi_systab); + ia64_xiv_init(); ia64_sal_init(); calculate_frequencies(); Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/mp_machdep.c Wed Mar 17 00:37:15 2010 (r205234) @@ -46,11 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include - #include #include #include @@ -59,10 +54,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include -#include + +#include +#include +#include +#include MALLOC_DEFINE(M_SMP, "SMP", "SMP related allocations"); @@ -81,7 +79,78 @@ volatile int ap_delay; volatile int ap_awake; volatile int ap_spin; -static void cpu_mp_unleash(void *); +int ia64_ipi_ast; +int ia64_ipi_highfp; +int ia64_ipi_nmi; +int ia64_ipi_preempt; +int ia64_ipi_rndzvs; +int ia64_ipi_stop; + +static u_int +ia64_ih_ast(struct thread *td, u_int xiv, struct trapframe *tf) +{ + + ia64_set_eoi(0); + PCPU_INC(md.stats.pcs_nasts); + CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid)); + ia64_srlz_d(); + return (0); +} + +static u_int +ia64_ih_highfp(struct thread *td, u_int xiv, struct trapframe *tf) +{ + + ia64_set_eoi(0); + PCPU_INC(md.stats.pcs_nhighfps); + ia64_highfp_save_ipi(); + ia64_srlz_d(); + return (0); +} + +static u_int +ia64_ih_preempt(struct thread *td, u_int xiv, struct trapframe *tf) +{ + + ia64_set_eoi(0); + PCPU_INC(md.stats.pcs_npreempts); + CTR1(KTR_SMP, "IPI_PREEMPT, cpuid=%d", PCPU_GET(cpuid)); + sched_preempt(curthread); + ia64_srlz_d(); + return (0); +} + +static u_int +ia64_ih_rndzvs(struct thread *td, u_int xiv, struct trapframe *tf) +{ + + ia64_set_eoi(0); + PCPU_INC(md.stats.pcs_nrdvs); + CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid)); + smp_rendezvous_action(); + ia64_srlz_d(); + return (0); +} + +static u_int +ia64_ih_stop(struct thread *td, u_int xiv, struct trapframe *tf) +{ + cpumask_t mybit; + + ia64_set_eoi(0); + PCPU_INC(md.stats.pcs_nstops); + mybit = PCPU_GET(cpumask); + ia64_srlz_d(); + + savectx(PCPU_PTR(md.pcb)); + + atomic_set_int(&stopped_cpus, mybit); + while ((started_cpus & mybit) == 0) + cpu_spinwait(); + atomic_clear_int(&started_cpus, mybit); + atomic_clear_int(&stopped_cpus, mybit); + return (0); +} struct cpu_group * cpu_topo(void) @@ -116,7 +185,6 @@ void ia64_ap_startup(void) { uint64_t vhpt; - int vector; pcpup = ap_pcpu; ia64_set_k4((intptr_t)pcpup); @@ -148,18 +216,6 @@ ia64_ap_startup(void) CTR1(KTR_SMP, "SMP: cpu%d launched", PCPU_GET(cpuid)); - /* Acknowledge and EOI all interrupts. */ - vector = ia64_get_ivr(); - while (vector != 15) { - ia64_srlz_d(); - if (vector == 0) - vector = (int)ia64_ld1(&ia64_pib->ib_inta); - ia64_set_eoi(0); - ia64_srlz_d(); - vector = ia64_get_ivr(); - } - ia64_srlz_d(); - /* kick off the clock on this AP */ pcpu_initclock(); @@ -200,7 +256,7 @@ cpu_mp_probe(void) * case we can have multiple processors, but we simply can't wake * them up... */ - return (mp_ncpus > 1 && ipi_vector[IPI_AP_WAKEUP] != 0); + return (mp_ncpus > 1 && ia64_ipi_wakeup != 0); } void @@ -276,7 +332,7 @@ cpu_mp_start() if (bootverbose) printf("SMP: waking up cpu%d\n", pc->pc_cpuid); - ipi_send(pc, IPI_AP_WAKEUP); + ipi_send(pc, ia64_ipi_wakeup); do { DELAY(1000); @@ -300,6 +356,18 @@ cpu_mp_unleash(void *dummy) if (mp_ncpus <= 1) return; + /* Allocate XIVs for IPIs */ + ia64_ipi_ast = ia64_xiv_alloc(PI_DULL, IA64_XIV_IPI, ia64_ih_ast); + ia64_ipi_highfp = ia64_xiv_alloc(PI_AV, IA64_XIV_IPI, ia64_ih_highfp); + ia64_ipi_preempt = ia64_xiv_alloc(PI_SOFT, IA64_XIV_IPI, + ia64_ih_preempt); + ia64_ipi_rndzvs = ia64_xiv_alloc(PI_AV, IA64_XIV_IPI, ia64_ih_rndzvs); + ia64_ipi_stop = ia64_xiv_alloc(PI_REALTIME, IA64_XIV_IPI, ia64_ih_stop); + + /* Reserve the NMI vector for IPI_STOP_HARD if possible */ + ia64_ipi_nmi = (ia64_xiv_reserve(2, IA64_XIV_IPI, ia64_ih_stop) != 0) + ? ia64_ipi_stop : 0x400; /* DM=NMI, Vector=n/a */ + cpus = 0; smp_cpus = 0; SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { @@ -361,20 +429,18 @@ ipi_all_but_self(int ipi) * fields are used here. */ void -ipi_send(struct pcpu *cpu, int ipi) +ipi_send(struct pcpu *cpu, int xiv) { u_int lid; - uint8_t vector; + + KASSERT(xiv != 0, ("ipi_send")); lid = LID_SAPIC(cpu->pc_md.lid); - vector = ipi_vector[ipi]; - KASSERT(vector != 0, ("IPI %d is not assigned a vector", ipi)); ia64_mf(); - ia64_st8(&(ia64_pib->ib_ipi[lid][0]), vector); + ia64_st8(&(ia64_pib->ib_ipi[lid][0]), xiv); ia64_mf_a(); - CTR4(KTR_SMP, "ipi_send(%p, %ld): cpuid=%d, vector=%u", cpu, ipi, - PCPU_GET(cpuid), vector); + CTR3(KTR_SMP, "ipi_send(%p, %d): cpuid=%d", cpu, xiv, PCPU_GET(cpuid)); } SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, cpu_mp_unleash, NULL); Modified: head/sys/ia64/ia64/nexus.c ============================================================================== --- head/sys/ia64/ia64/nexus.c Tue Mar 16 23:19:55 2010 (r205233) +++ head/sys/ia64/ia64/nexus.c Wed Mar 17 00:37:15 2010 (r205234) @@ -159,41 +159,15 @@ nexus_probe(device_t dev) device_quiet(dev); /* suppress attach message for neatness */ - /* - * XXX working notes: - * - * - IRQ resource creation should be moved to the PIC/APIC driver. - * - DRQ resource creation should be moved to the DMAC driver. - * - The above should be sorted to probe earlier than any child busses. - * - * - Leave I/O and memory creation here, as child probes may need them. - * (especially eg. ACPI) - */ - - /* - * IRQ's are on the mainboard on old systems, but on the ISA part - * of PCI->ISA bridges. There would be multiple sets of IRQs on - * multi-ISA-bus systems. PCI interrupts are routed to the ISA *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 02:48:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56FF1106566C; Wed, 17 Mar 2010 02:48:15 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45C708FC13; Wed, 17 Mar 2010 02:48:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H2mFke072344; Wed, 17 Mar 2010 02:48:15 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H2mFR1072339; Wed, 17 Mar 2010 02:48:15 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003170248.o2H2mFR1072339@svn.freebsd.org> From: Matt Jacob Date: Wed, 17 Mar 2010 02:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205236 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 02:48:15 -0000 Author: mjacob Date: Wed Mar 17 02:48:14 2010 New Revision: 205236 URL: http://svn.freebsd.org/changeset/base/205236 Log: Put gone device timer into a structure tag that can hold more than 32 seconds. Oops. Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've turned off autologin and find them, or rather don't, via camcontrol rescan. MFC after: 1 month Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Mar 17 00:53:58 2010 (r205235) +++ head/sys/dev/isp/isp_freebsd.c Wed Mar 17 02:48:14 2010 (r205236) @@ -3950,11 +3950,15 @@ isp_gdt(void *arg) if (lp->dev_map_idx == 0 || lp->target_mode) { continue; } - if (lp->new_reserved == 0) { + /* + * We can use new_portid here because it is untouched + * while the state is ZOMBIE + */ + if (lp->new_portid == 0) { continue; } - lp->new_reserved -= 1; - if (lp->new_reserved != 0) { + lp->new_portid -= 1; + if (lp->new_portid != 0) { more_to_do++; continue; } @@ -4064,7 +4068,7 @@ isp_kthread(void *arg) * * If not, we simply just wait for loop to come up. */ - if (lb && (fc->role & ISP_ROLE_INITIATOR)) { + if (lb && (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR)) { /* * Increment loop down time by the last sleep interval */ @@ -4932,7 +4936,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm /* * We don't do any simq freezing if we are only in target mode */ - if (fc->role & ISP_ROLE_INITIATOR) { + if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) { if (fc->path) { isp_freeze_loopdown(isp, bus, msg); } @@ -4968,7 +4972,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm va_end(ap); fc = ISP_FC_PC(isp, bus); lp->reserved = 0; - if ((fc->role & ISP_ROLE_INITIATOR) && (lp->roles & (SVC3_TGT_ROLE >> SVC3_ROLE_SHIFT))) { + if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->roles & (SVC3_TGT_ROLE >> SVC3_ROLE_SHIFT))) { int dbidx = lp - FCPARAM(isp, bus)->portdb; int i; @@ -5056,10 +5060,13 @@ isp_async(ispsoftc_t *isp, ispasync_t cm * * If it isn't marked that isp_gdt is going to get rid of it, * announce that it's gone. + * + * We can use new_portid for the gone timer because it's + * undefined while the state is ZOMBIE. */ if (lp->dev_map_idx && lp->reserved == 0) { lp->reserved = 1; - lp->new_reserved = ISP_FC_PC(isp, bus)->gone_device_time; + lp->new_portid = ISP_FC_PC(isp, bus)->gone_device_time; lp->state = FC_PORTDB_STATE_ZOMBIE; if (fc->ready && !callout_active(&fc->gdt)) { isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d starting Gone Device Timer", bus); @@ -5106,7 +5113,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm callout_stop(&fc->ldt); } isp_prt(isp, ISP_LOGINFO, msg, bus); - if (fc->role & ISP_ROLE_INITIATOR) { + if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) { isp_freeze_loopdown(isp, bus, msg); } wakeup(fc); Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Wed Mar 17 00:53:58 2010 (r205235) +++ head/sys/dev/isp/isp_freebsd.h Wed Mar 17 02:48:14 2010 (r205236) @@ -175,7 +175,7 @@ struct isp_fc { simqfrozen : 3, default_id : 8, hysteresis : 8, - role : 2, + def_role : 2, /* default role */ gdt_running : 1, loop_dead : 1, fcbsy : 1, @@ -203,7 +203,7 @@ struct isp_spi { tm_enabled : 1, #endif simqfrozen : 3, - role : 3, + def_role : 2, iid : 4; #ifdef ISP_TARGET_MODE struct tslist lun_hash[LUN_HASH_SIZE]; @@ -467,12 +467,12 @@ default: \ #define DEFAULT_EXEC_THROTTLE(isp) isp->isp_osinfo.exec_throttle #define GET_DEFAULT_ROLE(isp, chan) \ - (IS_FC(isp)? ISP_FC_PC(isp, chan)->role : ISP_SPI_PC(isp, chan)->role) + (IS_FC(isp)? ISP_FC_PC(isp, chan)->def_role : ISP_SPI_PC(isp, chan)->def_role) #define SET_DEFAULT_ROLE(isp, chan, val) \ if (IS_FC(isp)) { \ - ISP_FC_PC(isp, chan)->role = val; \ + ISP_FC_PC(isp, chan)->def_role = val; \ } else { \ - ISP_SPI_PC(isp, chan)->role = val; \ + ISP_SPI_PC(isp, chan)->def_role = val; \ } #define DEFAULT_IID(isp, chan) isp->isp_osinfo.pc.spi[chan].iid Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Wed Mar 17 00:53:58 2010 (r205235) +++ head/sys/dev/isp/isp_pci.c Wed Mar 17 02:48:14 2010 (r205236) @@ -547,10 +547,10 @@ isp_get_specific_options(device_t dev, i } if (IS_SCSI(isp)) { - ISP_SPI_PC(isp, chan)->role = tval; + ISP_SPI_PC(isp, chan)->def_role = tval; return; } - ISP_FC_PC(isp, chan)->role = tval; + ISP_FC_PC(isp, chan)->def_role = tval; tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "fullduplex", &tval) == 0 && tval != 0) { @@ -833,7 +833,7 @@ isp_pci_attach(device_t dev) * The 'it' suffix really only matters for SCSI cards in target mode. */ isp->isp_osinfo.fw = NULL; - if (IS_SCSI(isp) && (ISP_SPI_PC(isp, 0)->role & ISP_ROLE_TARGET)) { + if (IS_SCSI(isp) && (ISP_SPI_PC(isp, 0)->def_role & ISP_ROLE_TARGET)) { snprintf(fwname, sizeof (fwname), "isp_%04x_it", did); isp->isp_osinfo.fw = firmware_get(fwname); } else if (IS_24XX(isp) && (isp->isp_nchan > 1 || isp->isp_osinfo.forcemulti)) { Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Wed Mar 17 00:53:58 2010 (r205235) +++ head/sys/dev/isp/isp_sbus.c Wed Mar 17 02:48:14 2010 (r205236) @@ -195,7 +195,7 @@ isp_sbus_attach(device_t dev) isp->isp_revision = 0; /* XXX */ isp->isp_dev = dev; isp->isp_nchan = 1; - ISP_SET_PC(isp, 0, role, role); + ISP_SET_PC(isp, 0, def_role, role); /* * Get the clock frequency and convert it from HZ to MHz, From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 05:53:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EB68106568D; Wed, 17 Mar 2010 05:53:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AFFD8FC0C; Wed, 17 Mar 2010 05:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H5r5Xk013089; Wed, 17 Mar 2010 05:53:05 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H5r5jO013077; Wed, 17 Mar 2010 05:53:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003170553.o2H5r5jO013077@svn.freebsd.org> From: Doug Barton Date: Wed, 17 Mar 2010 05:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205238 - in vendor/bind9/dist: . bin/named doc/arm lib/dns lib/dns/include/dns lib/lwres/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 05:53:05 -0000 Author: dougb Date: Wed Mar 17 05:53:04 2010 New Revision: 205238 URL: http://svn.freebsd.org/changeset/base/205238 Log: Vendor import of BIND 9.6.2-P1 Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/bin/named/server.c vendor/bind9/dist/doc/arm/Bv9ARM-book.xml vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist/doc/arm/Bv9ARM.html vendor/bind9/dist/doc/arm/Bv9ARM.pdf vendor/bind9/dist/doc/arm/man.dig.html vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html vendor/bind9/dist/doc/arm/man.dnssec-keygen.html vendor/bind9/dist/doc/arm/man.dnssec-signzone.html vendor/bind9/dist/doc/arm/man.host.html vendor/bind9/dist/doc/arm/man.named-checkconf.html vendor/bind9/dist/doc/arm/man.named-checkzone.html vendor/bind9/dist/doc/arm/man.named.html vendor/bind9/dist/doc/arm/man.nsupdate.html vendor/bind9/dist/doc/arm/man.rndc-confgen.html vendor/bind9/dist/doc/arm/man.rndc.conf.html vendor/bind9/dist/doc/arm/man.rndc.html vendor/bind9/dist/lib/dns/api vendor/bind9/dist/lib/dns/include/dns/rdataset.h vendor/bind9/dist/lib/dns/include/dns/resolver.h vendor/bind9/dist/lib/dns/include/dns/result.h vendor/bind9/dist/lib/dns/include/dns/validator.h vendor/bind9/dist/lib/dns/ncache.c vendor/bind9/dist/lib/dns/rbtdb.c vendor/bind9/dist/lib/dns/rdatalist.c vendor/bind9/dist/lib/dns/rdataset.c vendor/bind9/dist/lib/dns/rdataslab.c vendor/bind9/dist/lib/dns/resolver.c vendor/bind9/dist/lib/dns/result.c vendor/bind9/dist/lib/dns/sdb.c vendor/bind9/dist/lib/dns/sdlz.c vendor/bind9/dist/lib/dns/validator.c vendor/bind9/dist/lib/dns/view.c vendor/bind9/dist/lib/lwres/man/lwres.html vendor/bind9/dist/lib/lwres/man/lwres_buffer.html vendor/bind9/dist/lib/lwres/man/lwres_config.html vendor/bind9/dist/lib/lwres/man/lwres_context.html vendor/bind9/dist/lib/lwres/man/lwres_gabn.html vendor/bind9/dist/lib/lwres/man/lwres_gai_strerror.html vendor/bind9/dist/lib/lwres/man/lwres_getaddrinfo.html vendor/bind9/dist/lib/lwres/man/lwres_gethostent.html vendor/bind9/dist/lib/lwres/man/lwres_getipnode.html vendor/bind9/dist/lib/lwres/man/lwres_getnameinfo.html vendor/bind9/dist/lib/lwres/man/lwres_getrrsetbyname.html vendor/bind9/dist/lib/lwres/man/lwres_gnba.html vendor/bind9/dist/lib/lwres/man/lwres_hstrerror.html vendor/bind9/dist/lib/lwres/man/lwres_inetntop.html vendor/bind9/dist/lib/lwres/man/lwres_noop.html vendor/bind9/dist/lib/lwres/man/lwres_packet.html vendor/bind9/dist/lib/lwres/man/lwres_resutil.html vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/CHANGES Wed Mar 17 05:53:04 2010 (r205238) @@ -1,3 +1,6 @@ + --- 9.6.2-P1 released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] --- 9.6.2 released --- Modified: vendor/bind9/dist/bin/named/server.c ============================================================================== --- vendor/bind9/dist/bin/named/server.c Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/bin/named/server.c Wed Mar 17 05:53:04 2010 (r205238) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.520.12.11 2009/12/24 00:17:47 each Exp $ */ +/* $Id: server.c,v 1.520.12.11.8.2 2010/02/25 10:57:11 tbox Exp $ */ /*! \file */ @@ -4726,6 +4726,8 @@ dumpdone(void *arg, isc_result_t result) } if (dctx->cache != NULL) { dns_adb_dump(dctx->view->view->adb, dctx->fp); + dns_resolver_printbadcache(dctx->view->view->resolver, + dctx->fp); dns_db_detach(&dctx->cache); } if (dctx->dumpzones) { Modified: vendor/bind9/dist/doc/arm/Bv9ARM-book.xml ============================================================================== --- vendor/bind9/dist/doc/arm/Bv9ARM-book.xml Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/doc/arm/Bv9ARM-book.xml Wed Mar 17 05:53:04 2010 (r205238) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + BIND 9 Administrator Reference Manual @@ -7705,6 +7705,13 @@ avoid-v6-udp-ports { 40000; range 50000 1800 (30 minutes). + + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. + + Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html ============================================================================== --- vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html Wed Mar 17 05:53:04 2010 (r205238) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -78,25 +78,25 @@
    server Statement Definition and Usage
    statistics-channels Statement Grammar
    -
    statistics-channels Statement Definition and +
    statistics-channels Statement Definition and Usage
    -
    trusted-keys Statement Grammar
    -
    trusted-keys Statement Definition +
    trusted-keys Statement Grammar
    +
    trusted-keys Statement Definition and Usage
    view Statement Grammar
    -
    view Statement Definition and Usage
    +
    view Statement Definition and Usage
    zone Statement Grammar
    -
    zone Statement Definition and Usage
    +
    zone Statement Definition and Usage
    -
    Zone File
    +
    Zone File
    Types of Resource Records and When to Use Them
    -
    Discussion of MX Records
    +
    Discussion of MX Records
    Setting TTLs
    -
    Inverse Mapping in IPv4
    -
    Other Zone File Directives
    -
    BIND Master File Extension: the $GENERATE Directive
    +
    Inverse Mapping in IPv4
    +
    Other Zone File Directives
    +
    BIND Master File Extension: the $GENERATE Directive
    Additional File Formats
    BIND9 Statistics
    @@ -4397,14 +4397,22 @@ avoid-v6-udp-ports { 40000; range 50000 Tuning
    lame-ttl
    -

    +

    +

    Sets the number of seconds to cache a lame server indication. 0 disables caching. (This is NOT recommended.) The default is 600 (10 minutes) and the maximum value is 1800 (30 minutes). -

    +

    +

    + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. +

    +
    max-ncache-ttl

    To reduce network traffic and increase performance, @@ -5060,7 +5068,7 @@ avoid-v6-udp-ports { 40000; range 50000

    -statistics-channels Statement Definition and +statistics-channels Statement Definition and Usage

    The statistics-channels statement @@ -5111,7 +5119,7 @@ avoid-v6-udp-ports { 40000; range 50000

    -trusted-keys Statement Grammar

    +trusted-keys Statement Grammar
    trusted-keys {
         string number number number string ;
         [ string number number number string ; [...]]
    @@ -5120,7 +5128,7 @@ avoid-v6-udp-ports { 40000; range 50000 
     
     

    -trusted-keys Statement Definition +trusted-keys Statement Definition and Usage

    The trusted-keys statement defines @@ -5166,7 +5174,7 @@ avoid-v6-udp-ports { 40000; range 50000

    -view Statement Definition and Usage

    +view Statement Definition and Usage

    The view statement is a powerful feature @@ -5432,10 +5440,10 @@ zone zone_

    -zone Statement Definition and Usage

    +zone Statement Definition and Usage

    -Zone Types

    +Zone Types
    @@ -5646,7 +5654,7 @@ zone zone_

    -Class

    +Class

    The zone's name may optionally be followed by a class. If a class is not specified, class IN (for Internet), @@ -5668,7 +5676,7 @@ zone zone_

    -Zone Options

    +Zone Options
    allow-notify

    @@ -6247,7 +6255,7 @@ zone zone_

    -Zone File

    +Zone File

    Types of Resource Records and When to Use Them

    @@ -6260,7 +6268,7 @@ zone zone_

    -Resource Records

    +Resource Records

    A domain name identifies a node. Each node has a set of resource information, which may be empty. The set of resource @@ -6997,7 +7005,7 @@ zone zone_

    -Textual expression of RRs

    +Textual expression of RRs

    RRs are represented in binary form in the packets of the DNS protocol, and are usually represented in highly encoded form @@ -7200,7 +7208,7 @@ zone zone_

    -Discussion of MX Records

    +Discussion of MX Records

    As described above, domain servers store information as a series of resource records, each of which contains a particular @@ -7456,7 +7464,7 @@ zone zone_

    -Inverse Mapping in IPv4

    +Inverse Mapping in IPv4

    Reverse name resolution (that is, translation from IP address to name) is achieved by means of the in-addr.arpa domain @@ -7517,7 +7525,7 @@ zone zone_

    -Other Zone File Directives

    +Other Zone File Directives

    The Master File Format was initially defined in RFC 1035 and has subsequently been extended. While the Master File Format @@ -7532,7 +7540,7 @@ zone zone_

    -The @ (at-sign)

    +The @ (at-sign)

    When used in the label (or name) field, the asperand or at-sign (@) symbol represents the current origin. @@ -7543,7 +7551,7 @@ zone zone_

    -The $ORIGIN Directive

    +The $ORIGIN Directive

    Syntax: $ORIGIN domain-name @@ -7572,7 +7580,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMP

    -The $INCLUDE Directive

    +The $INCLUDE Directive

    Syntax: $INCLUDE filename @@ -7608,7 +7616,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMP

    -The $TTL Directive

    +The $TTL Directive

    Syntax: $TTL default-ttl @@ -7627,7 +7635,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMP

    -BIND Master File Extension: the $GENERATE Directive

    +BIND Master File Extension: the $GENERATE Directive

    Syntax: $GENERATE range @@ -8018,7 +8026,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Name Server Statistics Counters

    +Name Server Statistics Counters
    @@ -8575,7 +8583,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Zone Maintenance Statistics Counters

    +Zone Maintenance Statistics Counters
    @@ -8729,7 +8737,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Resolver Statistics Counters

    +Resolver Statistics Counters
    @@ -9105,7 +9113,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Socket I/O Statistics Counters

    +Socket I/O Statistics Counters

    Socket I/O statistics counters are defined per socket types, which are @@ -9260,7 +9268,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Compatibility with BIND 8 Counters

    +Compatibility with BIND 8 Counters

    Most statistics counters that were available in BIND 8 are also supported in Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html ============================================================================== --- vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html Wed Mar 17 05:53:04 2010 (r205238) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -46,10 +46,10 @@

    Table of Contents

    Access Control Lists
    -
    Chroot and Setuid
    +
    Chroot and Setuid
    -
    The chroot Environment
    -
    Using the setuid Function
    +
    The chroot Environment
    +
    Using the setuid Function
    Dynamic Update Security
    @@ -119,7 +119,7 @@ zone "example.com" {

    -Chroot and Setuid +Chroot and Setuid

    On UNIX servers, it is possible to run BIND @@ -145,7 +145,7 @@ zone "example.com" {

    -The chroot Environment

    +The chroot Environment

    In order for a chroot environment to @@ -173,7 +173,7 @@ zone "example.com" {

    -Using the setuid Function

    +Using the setuid Function

    Prior to running the named daemon, use Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html ============================================================================== --- vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html Wed Mar 17 05:53:04 2010 (r205238) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -45,18 +45,18 @@

    -Common Problems

    +Common Problems

    -It's not working; how can I figure out what's wrong?

    +It's not working; how can I figure out what's wrong?

    The best solution to solving installation and configuration issues is to take preventative measures by setting @@ -68,7 +68,7 @@

    -Incrementing and Changing the Serial Number

    +Incrementing and Changing the Serial Number

    Zone serial numbers are just numbers — they aren't date related. A lot of people set them to a number that @@ -95,7 +95,7 @@

    -Where Can I Get Help?

    +Where Can I Get Help?

    The Internet Systems Consortium (ISC) offers a wide range Modified: vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html ============================================================================== --- vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html Wed Mar 17 05:53:04 2010 (r205238) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -45,21 +45,21 @@

    -Acknowledgments

    +Acknowledgments

    A Brief History of the DNS and BIND @@ -162,7 +162,7 @@

    -General DNS Reference Information

    +General DNS Reference Information

    IPv6 addresses (AAAA)

    @@ -250,17 +250,17 @@

    -Bibliography

    +Bibliography

    Standards

    -

    [RFC974] C. Partridge. Mail Routing and the Domain System. January 1986.

    +

    [RFC974] C. Partridge. Mail Routing and the Domain System. January 1986.

    -

    [RFC1034] P.V. Mockapetris. Domain Names — Concepts and Facilities. November 1987.

    +

    [RFC1034] P.V. Mockapetris. Domain Names — Concepts and Facilities. November 1987.

    -

    [RFC1035] P. V. Mockapetris. Domain Names — Implementation and +

    [RFC1035] P. V. Mockapetris. Domain Names — Implementation and Specification. November 1987.

    @@ -268,42 +268,42 @@

    Proposed Standards

    -

    [RFC2181] R., R. Bush Elz. Clarifications to the DNS +

    [RFC2181] R., R. Bush Elz. Clarifications to the DNS Specification. July 1997.

    -

    [RFC2308] M. Andrews. Negative Caching of DNS +

    [RFC2308] M. Andrews. Negative Caching of DNS Queries. March 1998.

    -

    [RFC1995] M. Ohta. Incremental Zone Transfer in DNS. August 1996.

    +

    [RFC1995] M. Ohta. Incremental Zone Transfer in DNS. August 1996.

    -

    [RFC1996] P. Vixie. A Mechanism for Prompt Notification of Zone Changes. August 1996.

    +

    [RFC1996] P. Vixie. A Mechanism for Prompt Notification of Zone Changes. August 1996.

    -

    [RFC2136] P. Vixie, S. Thomson, Y. Rekhter, and J. Bound. Dynamic Updates in the Domain Name System. April 1997.

    +

    [RFC2136] P. Vixie, S. Thomson, Y. Rekhter, and J. Bound. Dynamic Updates in the Domain Name System. April 1997.

    -

    [RFC2671] P. Vixie. Extension Mechanisms for DNS (EDNS0). August 1997.

    +

    [RFC2671] P. Vixie. Extension Mechanisms for DNS (EDNS0). August 1997.

    -

    [RFC2672] M. Crawford. Non-Terminal DNS Name Redirection. August 1999.

    +

    [RFC2672] M. Crawford. Non-Terminal DNS Name Redirection. August 1999.

    -

    [RFC2845] P. Vixie, O. Gudmundsson, D. Eastlake, 3rd, and B. Wellington. Secret Key Transaction Authentication for DNS (TSIG). May 2000.

    +

    [RFC2845] P. Vixie, O. Gudmundsson, D. Eastlake, 3rd, and B. Wellington. Secret Key Transaction Authentication for DNS (TSIG). May 2000.

    -

    [RFC2930] D. Eastlake, 3rd. Secret Key Establishment for DNS (TKEY RR). September 2000.

    +

    [RFC2930] D. Eastlake, 3rd. Secret Key Establishment for DNS (TKEY RR). September 2000.

    -

    [RFC2931] D. Eastlake, 3rd. DNS Request and Transaction Signatures (SIG(0)s). September 2000.

    +

    [RFC2931] D. Eastlake, 3rd. DNS Request and Transaction Signatures (SIG(0)s). September 2000.

    -

    [RFC3007] B. Wellington. Secure Domain Name System (DNS) Dynamic Update. November 2000.

    +

    [RFC3007] B. Wellington. Secure Domain Name System (DNS) Dynamic Update. November 2000.

    -

    [RFC3645] S. Kwan, P. Garg, J. Gilroy, L. Esibov, J. Westhead, and R. Hall. Generic Security Service Algorithm for Secret +

    [RFC3645] S. Kwan, P. Garg, J. Gilroy, L. Esibov, J. Westhead, and R. Hall. Generic Security Service Algorithm for Secret Key Transaction Authentication for DNS (GSS-TSIG). October 2003.

    @@ -312,19 +312,19 @@

    DNS Security Proposed Standards

    -

    [RFC3225] D. Conrad. Indicating Resolver Support of DNSSEC. December 2001.

    +

    [RFC3225] D. Conrad. Indicating Resolver Support of DNSSEC. December 2001.

    -

    [RFC3833] D. Atkins and R. Austein. Threat Analysis of the Domain Name System (DNS). August 2004.

    +

    [RFC3833] D. Atkins and R. Austein. Threat Analysis of the Domain Name System (DNS). August 2004.

    -

    [RFC4033] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. DNS Security Introduction and Requirements. March 2005.

    +

    [RFC4033] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. DNS Security Introduction and Requirements. March 2005.

    -

    [RFC4034] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Resource Records for the DNS Security Extensions. March 2005.

    +

    [RFC4034] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Resource Records for the DNS Security Extensions. March 2005.

    -

    [RFC4035] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Protocol Modifications for the DNS +

    [RFC4035] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Protocol Modifications for the DNS Security Extensions. March 2005.

    @@ -332,146 +332,146 @@

    Other Important RFCs About DNS Implementation

    -

    [RFC1535] E. Gavron. A Security Problem and Proposed Correction With Widely +

    [RFC1535] E. Gavron. A Security Problem and Proposed Correction With Widely Deployed DNS Software.. October 1993.

    -

    [RFC1536] A. Kumar, J. Postel, C. Neuman, P. Danzig, and S. Miller. Common DNS Implementation +

    [RFC1536] A. Kumar, J. Postel, C. Neuman, P. Danzig, and S. Miller. Common DNS Implementation Errors and Suggested Fixes. October 1993.

    -

    [RFC1982] R. Elz and R. Bush. Serial Number Arithmetic. August 1996.

    +

    [RFC1982] R. Elz and R. Bush. Serial Number Arithmetic. August 1996.

    -

    [RFC4074] Y. Morishita and T. Jinmei. Common Misbehaviour Against DNS +

    [RFC4074] Y. Morishita and T. Jinmei. Common Misbehaviour Against DNS Queries for IPv6 Addresses. May 2005.

    Resource Record Types

    -

    [RFC1183] C.F. Everhart, L. A. Mamakos, R. Ullmann, and P. Mockapetris. New DNS RR Definitions. October 1990.

    +

    [RFC1183] C.F. Everhart, L. A. Mamakos, R. Ullmann, and P. Mockapetris. New DNS RR Definitions. October 1990.

    -

    [RFC1706] B. Manning and R. Colella. DNS NSAP Resource Records. October 1994.

    +

    [RFC1706] B. Manning and R. Colella. DNS NSAP Resource Records. October 1994.

    -

    [RFC2168] R. Daniel and M. Mealling. Resolution of Uniform Resource Identifiers using +

    [RFC2168] R. Daniel and M. Mealling. Resolution of Uniform Resource Identifiers using the Domain Name System. June 1997.

    -

    [RFC1876] C. Davis, P. Vixie, T., and I. Dickinson. A Means for Expressing Location Information in the +

    [RFC1876] C. Davis, P. Vixie, T., and I. Dickinson. A Means for Expressing Location Information in the Domain Name System. January 1996.

    -

    [RFC2052] A. Gulbrandsen and P. Vixie. A DNS RR for Specifying the +

    [RFC2052] A. Gulbrandsen and P. Vixie. A DNS RR for Specifying the Location of Services.. October 1996.

    -

    [RFC2163] A. Allocchio. Using the Internet DNS to +

    [RFC2163] A. Allocchio. Using the Internet DNS to Distribute MIXER Conformant Global Address Mapping. January 1998.

    -

    [RFC2230] R. Atkinson. Key Exchange Delegation Record for the DNS. October 1997.

    +

    [RFC2230] R. Atkinson. Key Exchange Delegation Record for the DNS. October 1997.

    -

    [RFC2536] D. Eastlake, 3rd. DSA KEYs and SIGs in the Domain Name System (DNS). March 1999.

    +

    [RFC2536] D. Eastlake, 3rd. DSA KEYs and SIGs in the Domain Name System (DNS). March 1999.

    -

    [RFC2537] D. Eastlake, 3rd. RSA/MD5 KEYs and SIGs in the Domain Name System (DNS). March 1999.

    +

    [RFC2537] D. Eastlake, 3rd. RSA/MD5 KEYs and SIGs in the Domain Name System (DNS). March 1999.

    -

    [RFC2538] D. Eastlake, 3rd and O. Gudmundsson. Storing Certificates in the Domain Name System (DNS). March 1999.

    +

    [RFC2538] D. Eastlake, 3rd and O. Gudmundsson. Storing Certificates in the Domain Name System (DNS). March 1999.

    -

    [RFC2539] D. Eastlake, 3rd. Storage of Diffie-Hellman Keys in the Domain Name System (DNS). March 1999.

    +

    [RFC2539] D. Eastlake, 3rd. Storage of Diffie-Hellman Keys in the Domain Name System (DNS). March 1999.

    -

    [RFC2540] D. Eastlake, 3rd. Detached Domain Name System (DNS) Information. March 1999.

    +

    [RFC2540] D. Eastlake, 3rd. Detached Domain Name System (DNS) Information. March 1999.

    -

    [RFC2782] A. Gulbrandsen. P. Vixie. L. Esibov. A DNS RR for specifying the location of services (DNS SRV). February 2000.

    +

    [RFC2782] A. Gulbrandsen. P. Vixie. L. Esibov. A DNS RR for specifying the location of services (DNS SRV). February 2000.

    -

    [RFC2915] M. Mealling. R. Daniel. The Naming Authority Pointer (NAPTR) DNS Resource Record. September 2000.

    +

    [RFC2915] M. Mealling. R. Daniel. The Naming Authority Pointer (NAPTR) DNS Resource Record. September 2000.

    -

    [RFC3110] D. Eastlake, 3rd. RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS). May 2001.

    +

    [RFC3110] D. Eastlake, 3rd. RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS). May 2001.

    -

    [RFC3123] P. Koch. A DNS RR Type for Lists of Address Prefixes (APL RR). June 2001.

    +

    [RFC3123] P. Koch. A DNS RR Type for Lists of Address Prefixes (APL RR). June 2001.

    -

    [RFC3596] S. Thomson, C. Huitema, V. Ksinant, and M. Souissi. DNS Extensions to support IP +

    [RFC3596] S. Thomson, C. Huitema, V. Ksinant, and M. Souissi. DNS Extensions to support IP version 6. October 2003.

    -

    [RFC3597] A. Gustafsson. Handling of Unknown DNS Resource Record (RR) Types. September 2003.

    +

    [RFC3597] A. Gustafsson. Handling of Unknown DNS Resource Record (RR) Types. September 2003.

    DNS and the Internet

    -

    [RFC1101] P. V. Mockapetris. DNS Encoding of Network Names +

    [RFC1101] P. V. Mockapetris. DNS Encoding of Network Names and Other Types. April 1989.

    -

    [RFC1123] Braden. Requirements for Internet Hosts - Application and +

    [RFC1123] Braden. Requirements for Internet Hosts - Application and Support. October 1989.

    -

    [RFC1591] J. Postel. Domain Name System Structure and Delegation. March 1994.

    +

    [RFC1591] J. Postel. Domain Name System Structure and Delegation. March 1994.

    -

    [RFC2317] H. Eidnes, G. de Groot, and P. Vixie. Classless IN-ADDR.ARPA Delegation. March 1998.

    +

    [RFC2317] H. Eidnes, G. de Groot, and P. Vixie. Classless IN-ADDR.ARPA Delegation. March 1998.

    -

    [RFC2826] Internet Architecture Board. IAB Technical Comment on the Unique DNS Root. May 2000.

    +

    [RFC2826] Internet Architecture Board. IAB Technical Comment on the Unique DNS Root. May 2000.

    -

    [RFC2929] D. Eastlake, 3rd, E. Brunner-Williams, and B. Manning. Domain Name System (DNS) IANA Considerations. September 2000.

    +

    [RFC2929] D. Eastlake, 3rd, E. Brunner-Williams, and B. Manning. Domain Name System (DNS) IANA Considerations. September 2000.

    DNS Operations

    -

    [RFC1033] M. Lottor. Domain administrators operations guide.. November 1987.

    +

    [RFC1033] M. Lottor. Domain administrators operations guide.. November 1987.

    -

    [RFC1537] P. Beertema. Common DNS Data File +

    [RFC1537] P. Beertema. Common DNS Data File Configuration Errors. October 1993.

    -

    [RFC1912] D. Barr. Common DNS Operational and +

    [RFC1912] D. Barr. Common DNS Operational and Configuration Errors. February 1996.

    -

    [RFC2010] B. Manning and P. Vixie. Operational Criteria for Root Name Servers.. October 1996.

    +

    [RFC2010] B. Manning and P. Vixie. Operational Criteria for Root Name Servers.. October 1996.

    -

    [RFC2219] M. Hamilton and R. Wright. Use of DNS Aliases for +

    [RFC2219] M. Hamilton and R. Wright. Use of DNS Aliases for Network Services.. October 1997.

    Internationalized Domain Names

    -

    [RFC2825] IAB and R. Daigle. A Tangled Web: Issues of I18N, Domain Names, +

    [RFC2825] IAB and R. Daigle. A Tangled Web: Issues of I18N, Domain Names, and the Other Internet protocols. May 2000.

    -

    [RFC3490] P. Faltstrom, P. Hoffman, and A. Costello. Internationalizing Domain Names in Applications (IDNA). March 2003.

    +

    [RFC3490] P. Faltstrom, P. Hoffman, and A. Costello. Internationalizing Domain Names in Applications (IDNA). March 2003.

    -

    [RFC3491] P. Hoffman and M. Blanchet. Nameprep: A Stringprep Profile for Internationalized Domain Names. March 2003.

    +

    [RFC3491] P. Hoffman and M. Blanchet. Nameprep: A Stringprep Profile for Internationalized Domain Names. March 2003.

    -

    [RFC3492] A. Costello. Punycode: A Bootstring encoding of Unicode +

    [RFC3492] A. Costello. Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA). March 2003.

    @@ -487,47 +487,47 @@

    -

    [RFC1464] R. Rosenbaum. Using the Domain Name System To Store Arbitrary String +

    [RFC1464] R. Rosenbaum. Using the Domain Name System To Store Arbitrary String Attributes. May 1993.

    -

    [RFC1713] A. Romao. Tools for DNS Debugging. November 1994.

    +

    [RFC1713] A. Romao. Tools for DNS Debugging. November 1994.

    -

    [RFC1794] T. Brisco. DNS Support for Load +

    [RFC1794] T. Brisco. DNS Support for Load Balancing. April 1995.

    -

    [RFC2240] O. Vaughan. A Legal Basis for Domain Name Allocation. November 1997.

    +

    [RFC2240] O. Vaughan. A Legal Basis for Domain Name Allocation. November 1997.

    -

    [RFC2345] J. Klensin, T. Wolf, and G. Oglesby. Domain Names and Company Name Retrieval. May 1998.

    +

    [RFC2345] J. Klensin, T. Wolf, and G. Oglesby. Domain Names and Company Name Retrieval. May 1998.

    -

    [RFC2352] O. Vaughan. A Convention For Using Legal Names as Domain Names. May 1998.

    +

    [RFC2352] O. Vaughan. A Convention For Using Legal Names as Domain Names. May 1998.

    -

    [RFC3071] J. Klensin. Reflections on the DNS, RFC 1591, and Categories of Domains. February 2001.

    +

    [RFC3071] J. Klensin. Reflections on the DNS, RFC 1591, and Categories of Domains. February 2001.

    -

    [RFC3258] T. Hardie. Distributing Authoritative Name Servers via +

    [RFC3258] T. Hardie. Distributing Authoritative Name Servers via Shared Unicast Addresses. April 2002.

    -

    [RFC3901] A. Durand and J. Ihren. DNS IPv6 Transport Operational Guidelines. September 2004.

    +

    [RFC3901] A. Durand and J. Ihren. DNS IPv6 Transport Operational Guidelines. September 2004.

    Obsolete and Unimplemented Experimental RFC

    -

    [RFC1712] C. Farrell, M. Schulze, S. Pleitner, and D. Baldoni. DNS Encoding of Geographical +

    [RFC1712] C. Farrell, M. Schulze, S. Pleitner, and D. Baldoni. DNS Encoding of Geographical Location. November 1994.

    -

    [RFC2673] M. Crawford. Binary Labels in the Domain Name System. August 1999.

    +

    [RFC2673] M. Crawford. Binary Labels in the Domain Name System. August 1999.

    -

    [RFC2874] M. Crawford and C. Huitema. DNS Extensions to Support IPv6 Address Aggregation +

    [RFC2874] M. Crawford and C. Huitema. DNS Extensions to Support IPv6 Address Aggregation and Renumbering. July 2000.

    @@ -541,39 +541,39 @@

    -

    [RFC2065] D. Eastlake, 3rd and C. Kaufman. Domain Name System Security Extensions. January 1997.

    +

    [RFC2065] D. Eastlake, 3rd and C. Kaufman. Domain Name System Security Extensions. January 1997.

    -

    [RFC2137] D. Eastlake, 3rd. Secure Domain Name System Dynamic Update. April 1997.

    +

    [RFC2137] D. Eastlake, 3rd. Secure Domain Name System Dynamic Update. April 1997.

    -

    [RFC2535] D. Eastlake, 3rd. Domain Name System Security Extensions. March 1999.

    +

    [RFC2535] D. Eastlake, 3rd. Domain Name System Security Extensions. March 1999.

    -

    [RFC3008] B. Wellington. Domain Name System Security (DNSSEC) +

    [RFC3008] B. Wellington. Domain Name System Security (DNSSEC) Signing Authority. November 2000.

    -

    [RFC3090] E. Lewis. DNS Security Extension Clarification on Zone Status. March 2001.

    +

    [RFC3090] E. Lewis. DNS Security Extension Clarification on Zone Status. March 2001.

    -

    [RFC3445] D. Massey and S. Rose. Limiting the Scope of the KEY Resource Record (RR). December 2002.

    +

    [RFC3445] D. Massey and S. Rose. Limiting the Scope of the KEY Resource Record (RR). December 2002.

    -

    [RFC3655] B. Wellington and O. Gudmundsson. Redefinition of DNS Authenticated Data (AD) bit. November 2003.

    +

    [RFC3655] B. Wellington and O. Gudmundsson. Redefinition of DNS Authenticated Data (AD) bit. November 2003.

    -

    [RFC3658] O. Gudmundsson. Delegation Signer (DS) Resource Record (RR). December 2003.

    +

    [RFC3658] O. Gudmundsson. Delegation Signer (DS) Resource Record (RR). December 2003.

    -

    [RFC3755] S. Weiler. Legacy Resolver Compatibility for Delegation Signer (DS). May 2004.

    +

    [RFC3755] S. Weiler. Legacy Resolver Compatibility for Delegation Signer (DS). May 2004.

    -

    [RFC3757] O. Kolkman, J. Schlyter, and E. Lewis. Domain Name System KEY (DNSKEY) Resource Record +

    [RFC3757] O. Kolkman, J. Schlyter, and E. Lewis. Domain Name System KEY (DNSKEY) Resource Record (RR) Secure Entry Point (SEP) Flag. April 2004.

    -

    [RFC3845] J. Schlyter. DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format. August 2004.

    +

    [RFC3845] J. Schlyter. DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format. August 2004.

    @@ -594,14 +594,14 @@

    -Other Documents About BIND +Other Documents About BIND

    -Bibliography

    +Bibliography
    -

    Paul Albitz and Cricket Liu. DNS and BIND. Copyright © 1998 Sebastopol, CA: O'Reilly and Associates.

    +

    Paul Albitz and Cricket Liu. DNS and BIND. Copyright © 1998 Sebastopol, CA: O'Reilly and Associates.

    Modified: vendor/bind9/dist/doc/arm/Bv9ARM.html ============================================================================== --- vendor/bind9/dist/doc/arm/Bv9ARM.html Wed Mar 17 03:02:48 2010 (r205237) +++ vendor/bind9/dist/doc/arm/Bv9ARM.html Wed Mar 17 05:53:04 2010 (r205238) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -157,25 +157,25 @@
    server Statement Definition and Usage
    statistics-channels Statement Grammar
    -
    statistics-channels Statement Definition and +
    statistics-channels Statement Definition and Usage
    -
    trusted-keys Statement Grammar
    -
    trusted-keys Statement Definition +
    trusted-keys Statement Grammar
    +
    trusted-keys Statement Definition and Usage
    view Statement Grammar
    -
    view Statement Definition and Usage
    +
    view Statement Definition and Usage
    zone Statement Grammar
    -
    zone Statement Definition and Usage
    +
    zone Statement Definition and Usage
    -
    Zone File
    +
    Zone File
    Types of Resource Records and When to Use Them
    -
    Discussion of MX Records
    +
    Discussion of MX Records
    Setting TTLs
    -
    Inverse Mapping in IPv4
    -
    Other Zone File Directives
    -
    BIND Master File Extension: the $GENERATE Directive
    +
    Inverse Mapping in IPv4
    +
    Other Zone File Directives
    +
    BIND Master File Extension: the $GENERATE Directive
    Additional File Formats
    BIND9 Statistics
    @@ -184,31 +184,31 @@
    7. BIND 9 Security Considerations
    Access Control Lists
    -
    Chroot and Setuid
    +
    Chroot and Setuid
    -
    The chroot Environment
    -
    Using the setuid Function
    +
    The chroot Environment
    +
    Using the setuid Function
    Dynamic Update Security
    8. Troubleshooting
    -
    Common Problems
    -
    It's not working; how can I figure out what's wrong?
    -
    Incrementing and Changing the Serial Number
    -
    Where Can I Get Help?
    +
    Common Problems
    +
    It's not working; how can I figure out what's wrong?
    +
    Incrementing and Changing the Serial Number
    +
    Where Can I Get Help?
    A. Appendices
    -
    Acknowledgments
    +
    Acknowledgments
    A Brief History of the DNS and BIND
    -
    General DNS Reference Information
    +
    General DNS Reference Information
    IPv6 addresses (AAAA)
    Bibliography (and Suggested Reading)
    Request for Comments (RFCs)
    Internet Drafts
    -
    Other Documents About BIND
    +
    Other Documents About BIND
    I. Manual pages
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 05:54:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01BA3106566C; Wed, 17 Mar 2010 05:54:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAF5E8FC22; Wed, 17 Mar 2010 05:54:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H5skvZ013490; Wed, 17 Mar 2010 05:54:46 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H5skP6013489; Wed, 17 Mar 2010 05:54:46 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003170554.o2H5skP6013489@svn.freebsd.org> From: Doug Barton Date: Wed, 17 Mar 2010 05:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205239 - vendor/bind9/9.6.2-P1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 05:54:47 -0000 Author: dougb Date: Wed Mar 17 05:54:46 2010 New Revision: 205239 URL: http://svn.freebsd.org/changeset/base/205239 Log: Tag the 9.6.2-P1 release Added: vendor/bind9/9.6.2-P1/ - copied from r205238, vendor/bind9/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 07:26:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DFDD106564A; Wed, 17 Mar 2010 07:26:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8184D8FC15; Wed, 17 Mar 2010 07:26:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H7Q0lA033702; Wed, 17 Mar 2010 07:26:00 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H7Q013033699; Wed, 17 Mar 2010 07:26:00 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003170726.o2H7Q013033699@svn.freebsd.org> From: Doug Barton Date: Wed, 17 Mar 2010 07:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205245 - stable/8/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 07:26:00 -0000 Author: dougb Date: Wed Mar 17 07:26:00 2010 New Revision: 205245 URL: http://svn.freebsd.org/changeset/base/205245 Log: MFC r205145: Make it more clear in the docs that -a is not compatible with -iFU, and enforce this in the code. Apparently a lot of users mistakenly combine -a with these flags and are then mystified that no changes were made. While I'm here, fix a trailing space in mergemaster.8 Modified: stable/8/usr.sbin/mergemaster/mergemaster.8 stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.8 Wed Mar 17 07:16:27 2010 (r205244) +++ stable/8/usr.sbin/mergemaster/mergemaster.8 Wed Mar 17 07:26:00 2010 (r205245) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd March 13, 2010 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,7 +32,8 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipFCPU +.Op Fl scrvhpCP +.Op Fl a|iFU .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d @@ -168,7 +169,7 @@ and therefore can override both files. When the comparison is done if there are any files remaining in the temproot directory they will be listed, and if the .Fl a -option is not in use the user will be given the option of +option is not in use the user will be given the option of deleting the temproot directory. If there are no files remaining in the temproot directory it will be deleted. @@ -206,9 +207,11 @@ If the directory exists, it creates a new one in a previously non-existent directory. This option unsets the verbose flag, -but other than -.Fl U -it is compatible with all other options. +and is not compatible with +.Fl i , +.Fl F , +or +.Fl U . Setting .Fl a makes Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Wed Mar 17 07:16:27 2010 (r205244) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Wed Mar 17 07:26:00 2010 (r205245) @@ -15,7 +15,7 @@ PATH=/bin:/usr/bin:/usr/sbin display_usage () { VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` echo "mergemaster version ${VERSION_NUMBER}" - echo 'Usage: mergemaster [-scrvahipFCPU]' + echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]]' echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]' echo "Options:" echo " -s Strict comparison (diff every pair of files)" @@ -337,6 +337,18 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F esac done +if [ -n "$AUTO_RUN" ]; then + if [ -n "$FREEBSD_ID" -o -n "$AUTO_UPGRADE" -o -n "$AUTO_INSTALL" ]; then + echo '' + echo "*** You have included the -a option along with one or more options" + echo ' that indicate that you wish mergemaster to actually make updates' + echo ' (-F, -U, or -i), however these options are not compatible.' + echo ' Please read mergemaster(8) for more information.' + echo '' + exit 1 + fi +fi + # Assign the location of the mtree database # MTREEDB=${MTREEDB:-${DESTDIR}/var/db} From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 07:27:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53168106566B; Wed, 17 Mar 2010 07:27:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25F7B8FC14; Wed, 17 Mar 2010 07:27:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H7R01e033978; Wed, 17 Mar 2010 07:27:00 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H7R0k4033975; Wed, 17 Mar 2010 07:27:00 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003170727.o2H7R0k4033975@svn.freebsd.org> From: Doug Barton Date: Wed, 17 Mar 2010 07:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205246 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 07:27:00 -0000 Author: dougb Date: Wed Mar 17 07:26:59 2010 New Revision: 205246 URL: http://svn.freebsd.org/changeset/base/205246 Log: MFC r205145: Make it more clear in the docs that -a is not compatible with -iFU, and enforce this in the code. Apparently a lot of users mistakenly combine -a with these flags and are then mystified that no changes were made. While I'm here, fix a trailing space in mergemaster.8 Modified: stable/7/usr.sbin/mergemaster/mergemaster.8 stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.8 Wed Mar 17 07:26:00 2010 (r205245) +++ stable/7/usr.sbin/mergemaster/mergemaster.8 Wed Mar 17 07:26:59 2010 (r205246) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd March 13, 2010 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,7 +32,8 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipFCPU +.Op Fl scrvhpCP +.Op Fl a|iFU .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d @@ -168,7 +169,7 @@ and therefore can override both files. When the comparison is done if there are any files remaining in the temproot directory they will be listed, and if the .Fl a -option is not in use the user will be given the option of +option is not in use the user will be given the option of deleting the temproot directory. If there are no files remaining in the temproot directory it will be deleted. @@ -206,9 +207,11 @@ If the directory exists, it creates a new one in a previously non-existent directory. This option unsets the verbose flag, -but other than -.Fl U -it is compatible with all other options. +and is not compatible with +.Fl i , +.Fl F , +or +.Fl U . Setting .Fl a makes Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Wed Mar 17 07:26:00 2010 (r205245) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Wed Mar 17 07:26:59 2010 (r205246) @@ -15,7 +15,7 @@ PATH=/bin:/usr/bin:/usr/sbin display_usage () { VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` echo "mergemaster version ${VERSION_NUMBER}" - echo 'Usage: mergemaster [-scrvahipFCPU]' + echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]]' echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]' echo "Options:" echo " -s Strict comparison (diff every pair of files)" @@ -337,6 +337,18 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F esac done +if [ -n "$AUTO_RUN" ]; then + if [ -n "$FREEBSD_ID" -o -n "$AUTO_UPGRADE" -o -n "$AUTO_INSTALL" ]; then + echo '' + echo "*** You have included the -a option along with one or more options" + echo ' that indicate that you wish mergemaster to actually make updates' + echo ' (-F, -U, or -i), however these options are not compatible.' + echo ' Please read mergemaster(8) for more information.' + echo '' + exit 1 + fi +fi + # Assign the location of the mtree database # MTREEDB=${MTREEDB:-${DESTDIR}/var/db} From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 09:05:50 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3DC1065670; Wed, 17 Mar 2010 09:05:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [188.40.72.107]) by mx1.freebsd.org (Postfix) with ESMTP id 267298FC24; Wed, 17 Mar 2010 09:05:49 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 455901B5D18A; Wed, 17 Mar 2010 09:50:04 +0100 (CET) Date: Wed, 17 Mar 2010 09:50:04 +0100 From: Ed Schouten To: "M. Warner Losh" Message-ID: <20100317085004.GB7307@hoeg.nl> References: <20100313090844.GV8200@hoeg.nl> <20100313.090709.407454645627448944.imp@bsdimp.com> <20100313170725.GW8200@hoeg.nl> <20100313.121932.997044077387131740.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20100313.121932.997044077387131740.imp@bsdimp.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: unixmania@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, nwhitehorn@FreeBSD.org Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 09:05:50 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * M. Warner Losh wrote: > Under your plan, which __FreeBSD_version would we use here? Well, the idea is that it's monotone. The lower you set the value, the more rubbish you get. --=20 Ed Schouten WWW: http://80386.nl/ --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkugl7sACgkQ52SDGA2eCwWuswCfXiDnXlRkGz+eXNDWyHroC6x9 kl0Anj4ZxwsRIbF359ieOrOF/JWvK9/0 =P+Vl -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA-- From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 09:52:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB944106567A; Wed, 17 Mar 2010 09:52:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA0308FC13; Wed, 17 Mar 2010 09:52:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H9qQwv066028; Wed, 17 Mar 2010 09:52:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H9qQVS066026; Wed, 17 Mar 2010 09:52:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003170952.o2H9qQVS066026@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Mar 2010 09:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205249 - stable/8/tools/regression/posixsem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 09:52:27 -0000 Author: kib Date: Wed Mar 17 09:52:26 2010 New Revision: 205249 URL: http://svn.freebsd.org/changeset/base/205249 Log: MFC r205148: Make it compile on LP64 arches. Modified: stable/8/tools/regression/posixsem/posixsem.c Directory Properties: stable/8/tools/regression/posixsem/ (props changed) Modified: stable/8/tools/regression/posixsem/posixsem.c ============================================================================== --- stable/8/tools/regression/posixsem/posixsem.c Wed Mar 17 08:56:13 2010 (r205248) +++ stable/8/tools/regression/posixsem/posixsem.c Wed Mar 17 09:52:26 2010 (r205249) @@ -1239,7 +1239,8 @@ exhaust_unnamed_sems(void) return; } - if (child_worker(exhaust_unnamed_child, (void *)nsems_max, &stat)) + if (child_worker(exhaust_unnamed_child, (void *)(uintptr_t)nsems_max, + &stat)) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1293,7 +1294,8 @@ exhaust_named_sems(void) return; } - if (child_worker(exhaust_named_child, (void *)nsems_max, &stat) < 0) + if (child_worker(exhaust_named_child, (void *)(uintptr_t)nsems_max, + &stat) < 0) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1351,7 +1353,8 @@ fdlimit_unnamed_sems(void) int nsems_max, stat; nsems_max = 10; - if (child_worker(fdlimit_unnamed_child, (void *)nsems_max, &stat)) + if (child_worker(fdlimit_unnamed_child, (void *)(uintptr_t)nsems_max, + &stat)) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { @@ -1395,7 +1398,8 @@ fdlimit_named_sems(void) int i, nsems_max, stat; nsems_max = 10; - if (child_worker(fdlimit_named_child, (void *)nsems_max, &stat) < 0) + if (child_worker(fdlimit_named_child, (void *)(uintptr_t)nsems_max, + &stat) < 0) return; errno = CSTAT_ERROR(stat); switch (CSTAT_CLASS(stat)) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 10:47:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDCDE106566B; Wed, 17 Mar 2010 10:47:57 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 9062C8FC0C; Wed, 17 Mar 2010 10:47:57 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id BF4411FFC22; Wed, 17 Mar 2010 10:47:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9F0DE8449F; Wed, 17 Mar 2010 11:47:54 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Doug Barton References: <201003100217.o2A2HvrL099296@svn.freebsd.org> <861vfs5s5u.fsf@ds4.des.no> <4B9C3581.2010302@FreeBSD.org> Date: Wed, 17 Mar 2010 11:47:54 +0100 In-Reply-To: <4B9C3581.2010302@FreeBSD.org> (Doug Barton's message of "Sat, 13 Mar 2010 17:01:53 -0800") Message-ID: <86tysf8bs5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (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 Subject: Re: svn commit: r204939 - head/secure/libexec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 10:47:58 -0000 Doug Barton writes: > Dag-Erling Sm=C3=B8rgrav writes: > > The proper way to handle this would have been to send me an email > > asking if perhaps I had forgotten to commit the Makefile. > 1. Broken needs to be fixed, sooner rather than later. > 2. The change I made didn't affect any functionality because there was > nothing there to break. > 3. I actually meant to drop you a note that I made the change, but given > that I know you follow the lists with regularity the priority for doing > this in my own mind wasn't high enough, and it slipped my mind, > apologies for that. Well, no harm done. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 12:46:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B29C106564A; Wed, 17 Mar 2010 12:46:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC9D8FC12; Wed, 17 Mar 2010 12:46:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id F256646B52; Wed, 17 Mar 2010 08:46:05 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id AD8BA8A021; Wed, 17 Mar 2010 08:46:04 -0400 (EDT) From: John Baldwin To: Kip Macy Date: Wed, 17 Mar 2010 08:43:19 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003162217.o2GMHMjU012285@svn.freebsd.org> In-Reply-To: <201003162217.o2GMHMjU012285@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003170843.19713.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 17 Mar 2010 08:46:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205231 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 12:46:06 -0000 On Tuesday 16 March 2010 6:17:22 pm Kip Macy wrote: > Author: kmacy > Date: Tue Mar 16 22:17:21 2010 > New Revision: 205231 > URL: http://svn.freebsd.org/changeset/base/205231 > > Log: > - reduce contention by breaking up ARC state locks in to 16 for data > and 16 for metadata > - export L2ARC tunables as sysctls > - add several kstats to track L2ARC state more precisely > - avoid holding a contended lock when atomically incrementing a > contended counter (no lock protection needed for atomics) > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Mar 16 21:44:21 2010 (r205230) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Mar 16 22:17:21 2010 (r205231) > @@ -131,6 +131,7 @@ > #include > #include > > +#include > #include > > static kmutex_t arc_reclaim_thr_lock; > @@ -186,6 +187,11 @@ SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, > SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN, > &zfs_mdcomp_disable, 0, "Disable metadata compression"); > > +#ifdef ZIO_USE_UMA > +extern kmem_cache_t *zio_buf_cache[]; > +extern kmem_cache_t *zio_data_buf_cache[]; > +#endif > + > /* > * Note that buffers can be in one of 6 states: > * ARC_anon - anonymous (discussed below) > @@ -218,13 +224,31 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_di > * second level ARC benefit from these fast lookups. > */ > > +#define ARCS_LOCK_PAD 128 Please use CACHE_LINE_SIZE instead of hardcoding 128. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 12:46:55 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFD71065675; Wed, 17 Mar 2010 12:46:55 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id D025F8FC1B; Wed, 17 Mar 2010 12:46:54 +0000 (UTC) Received: from [172.31.193.10] (rrcs-98-101-145-84.midsouth.biz.rr.com [98.101.145.84]) (authenticated bits=0) by duke.cs.duke.edu (8.14.2/8.14.2) with ESMTP id o2HCkruX020492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Mar 2010 08:46:54 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu o2HCkruX020492 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1268830014; bh=wAGgeERjexT3wiRsXgv0MaEK0Bwoez1YUZ8N6fWCXI4=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nR2/OXavg6gfEH52jZ977y0yD3BPIxF6nTVH6/UIyYinLgKlfgA8PvnaEm1yJcz+6 db7/5Tkt00so25ejOWMzBxz57el7Y9PTK+HLy+F8yZUQTp6oZPvhhH4yd3iq1+SG/N WShdQ3PwVEqUKf/HMLXCzIhL1EhXZCh4SAN1ms2Y= Message-ID: <4BA0CF37.2010903@cs.duke.edu> Date: Wed, 17 Mar 2010 08:46:47 -0400 From: Andrew Gallatin User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Pyun YongHyeon References: <201003161745.o2GHjG3G051630@svn.freebsd.org> In-Reply-To: <201003161745.o2GHjG3G051630@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 12:46:55 -0000 Pyun YongHyeon wrote: > Revert r205090. > It's hard to know when the mail box register write will get flushed to > the hardware and it may take longer. > > Pointed out by: scottl I may be mis-reading the code, but it looks like the mailbox register is in memory space, which should be flushed immediately unless write-combining is enabled on the region. The bge driver does not seem to be setting up write combining. Is the concern that something may enable write combining behind your back? In that case, a wmb() could act as a serializing instruction and flush the WC buffers. Or is it something completely different? Eg, maybe the chip polls the mailboxes at some regular interval, and it doesn't notice a write immediately. So writing earlier gives a better chance that it will see the new value sooner. Drew From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 15:16:15 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA071065679; Wed, 17 Mar 2010 15:16:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 384FC8FC14; Wed, 17 Mar 2010 15:16:14 +0000 (UTC) Received: from c122-106-169-91.carlnfd1.nsw.optusnet.com.au (c122-106-169-91.carlnfd1.nsw.optusnet.com.au [122.106.169.91]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2HFG0uv025354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Mar 2010 02:16:02 +1100 Date: Thu, 18 Mar 2010 02:16:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Andrew Gallatin In-Reply-To: <4BA0CF37.2010903@cs.duke.edu> Message-ID: <20100318015744.B26867@delplex.bde.org> References: <201003161745.o2GHjG3G051630@svn.freebsd.org> <4BA0CF37.2010903@cs.duke.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pyun YongHyeon Subject: Re: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 15:16:15 -0000 On Wed, 17 Mar 2010, Andrew Gallatin wrote: > Pyun YongHyeon wrote: > >> Revert r205090. >> It's hard to know when the mail box register write will get flushed to >> the hardware and it may take longer. >> Pointed out by: scottl > > I may be mis-reading the code, but it looks like the mailbox > register is in memory space, which should be flushed immediately > unless write-combining is enabled on the region. The bge > driver does not seem to be setting up write combining. > Is the concern that something may enable write combining > behind your back? In that case, a wmb() could act as a > serializing instruction and flush the WC buffers. We want writes to the PCI bus to be efficient. Normally (?) writes to bge registers appear to be several times faster than reads. I don't know if this depends on write combining but think it depends on write buffering which can delay the write to the hardware by about the difference between the read time and the time to write to the bufer. Any forcing of serialization or timing would presumably lose the benefits of the buffer. > Or is it something completely different? Eg, maybe the chip > polls the mailboxes at some regular interval, and it doesn't > notice a write immediately. So writing earlier gives a better chance > that it will see the new value sooner. The old and restored strategy is to write early and then read. The read forces the write to the hardware, so it gives a 100% chance that the hardware sees the write before the read (and before everything that follows the read; accesses to the status block in fact follow the read). Probably these reads take even longer than most PCI reads since they have to wait for the write that was just done, but not much can be done about that except moving the write even earlier and/or moving stuff that doesn't need to be serialized in between the write and the read. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 15:24:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 995751065675; Wed, 17 Mar 2010 15:24:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 569228FC1D; Wed, 17 Mar 2010 15:24:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2HFLo9i045438; Wed, 17 Mar 2010 09:21:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 17 Mar 2010 09:22:05 -0600 (MDT) Message-Id: <20100317.092205.1068292109300099051.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20100317085004.GB7307@hoeg.nl> References: <20100313170725.GW8200@hoeg.nl> <20100313.121932.997044077387131740.imp@bsdimp.com> <20100317085004.GB7307@hoeg.nl> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: unixmania@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nwhitehorn@freebsd.org Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 15:24:18 -0000 In message: <20100317085004.GB7307@hoeg.nl> Ed Schouten writes: : * M. Warner Losh wrote: : > Under your plan, which __FreeBSD_version would we use here? : : Well, the idea is that it's monotone. The lower you set the value, the : more rubbish you get. I agree with John this is too fine grained. We don't currently have this data for the removals, just when we did. And it isn't clear that our users could easily find this data either, even if we dumpster-dived the repo for it. Warner From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 15:31:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E70141065670; Wed, 17 Mar 2010 15:31:06 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC4A78FC16; Wed, 17 Mar 2010 15:31:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HFV6u8042597; Wed, 17 Mar 2010 15:31:06 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HFV65t042595; Wed, 17 Mar 2010 15:31:06 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201003171531.o2HFV65t042595@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 17 Mar 2010 15:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205250 - head/share/dict X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 15:31:07 -0000 Author: obrien Date: Wed Mar 17 15:31:06 2010 New Revision: 205250 URL: http://svn.freebsd.org/changeset/base/205250 Log: Add "Massachusetts". Modified: head/share/dict/web2 Modified: head/share/dict/web2 ============================================================================== --- head/share/dict/web2 Wed Mar 17 09:52:26 2010 (r205249) +++ head/share/dict/web2 Wed Mar 17 15:31:06 2010 (r205250) @@ -112025,6 +112025,7 @@ masquerader Mass mass massa +Massachusetts massacre massacrer massage From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 15:52:30 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4B26106564A; Wed, 17 Mar 2010 15:52:30 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id 74C8D8FC12; Wed, 17 Mar 2010 15:52:30 +0000 (UTC) Received: from [172.31.193.10] (rrcs-98-101-145-84.midsouth.biz.rr.com [98.101.145.84]) (authenticated bits=0) by duke.cs.duke.edu (8.14.2/8.14.2) with ESMTP id o2HFqSss002412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Mar 2010 11:52:29 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu o2HFqSss002412 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1268841149; bh=4bX8m5mZT2Aa+Q/QHRkZVKgui/PRKzlKH1nHf5ZR2UA=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=XO+bGOR1KrnoobMTnVFccVmOIVK9gPBHqbaYaKvicChGTMHlBOtcBp1Ut1exOE5YZ LefStztkdccBcKudUNhTzquMmHHS/3kXR+5gh21XRm5BYMuKc6yS0ML/ZcFdhs/Cwi egVOKkSGRYElaoIPbX53WR1xLesXK3MWuh5Ixva4= Message-ID: <4BA0FAB7.7060101@cs.duke.edu> Date: Wed, 17 Mar 2010 11:52:23 -0400 From: Andrew Gallatin User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Bruce Evans References: <201003161745.o2GHjG3G051630@svn.freebsd.org> <4BA0CF37.2010903@cs.duke.edu> <20100318015744.B26867@delplex.bde.org> In-Reply-To: <20100318015744.B26867@delplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pyun YongHyeon Subject: Re: svn commit: r205221 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 15:52:30 -0000 Bruce Evans wrote: > On Wed, 17 Mar 2010, Andrew Gallatin wrote: > >> Pyun YongHyeon wrote: >> >>> Revert r205090. >>> It's hard to know when the mail box register write will get flushed to >>> the hardware and it may take longer. >>> Pointed out by: scottl >> >> I may be mis-reading the code, but it looks like the mailbox >> register is in memory space, which should be flushed immediately >> unless write-combining is enabled on the region. The bge >> driver does not seem to be setting up write combining. >> Is the concern that something may enable write combining >> behind your back? In that case, a wmb() could act as a >> serializing instruction and flush the WC buffers. > > We want writes to the PCI bus to be efficient. Normally (?) writes > to bge registers appear to be several times faster than reads. I don't > know if this depends on write combining but think it depends on write > buffering which can delay the write to the hardware by about the > difference between the read time and the time to write to the bufer. > Any forcing of serialization or timing would presumably lose the > benefits of the buffer. What buffer? On the host side of the PCI{e} bus or the NIC side?? For i386/amd64, only write-combining (MTRR or PAT) pio mappings are buffered on the host side. Every other PIO behaves as if implicitly surrounded by a serializing instruction before and after for legacy reasons. On non i386/amd64, there may be buffering; it depends on the platform. Or are you talking about buffering on the bge side of the PCI{e} bus? The point I was trying to make is that PIO reads are very (hopelessly?) slow because the CPU stalls while waiting for the device to return some data, and you're at the mercy of the device. In general, when you're given a choice as to what to use to force a write across the PCI{e} bus (in the case of WC being enabled, or working on a non-x86/amd64 arch), the best choice by far is a serializing instruction (wmb()) and not a PIO read. Unfortunately, it looks like a PIO read is intimately entwined with correct operation of this device, so doing it the old way is probably safest/best. Sorry for the noise.. Drew From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 16:33:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E771065672; Wed, 17 Mar 2010 16:33:11 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 525D08FC08; Wed, 17 Mar 2010 16:33:11 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5FD3F1FFC22; Wed, 17 Mar 2010 16:33:10 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 3DA7A844F2; Wed, 17 Mar 2010 17:33:10 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans References: <44640.1268676905@critter.freebsd.dk> <20100317041500.V26092@delplex.bde.org> Date: Wed, 17 Mar 2010 17:33:10 +0100 In-Reply-To: <20100317041500.V26092@delplex.bde.org> (Bruce Evans's message of "Wed, 17 Mar 2010 04:55:01 +1100 (EST)") Message-ID: <86ljdq6h89.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, Poul-Henning Kamp , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 16:33:11 -0000 Bruce Evans writes: > Even if the child causes the flush, the content of stdout and stderr > is not flushed normally since it is redirected to /dev/null. Unflushed > input in stdin is handled more brokenly: although stdin is redirected > to /dev/null, input on it can still be read via stdin's buffer. > Inheriting unflushed input on other streams is a feature (unless these > streams are open on fd's 0-2; then these streams will have the same > corruption as std* streams open on their normal fd's 0-2). how about Index: gen/daemon.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 --- gen/daemon.c (revision 204870) +++ gen/daemon.c (working copy) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -81,6 +82,9 @@ (void)chdir("/"); =20 if (!noclose && (fd =3D _open(_PATH_DEVNULL, O_RDWR, 0)) !=3D -1) { + fpurge(stdin); + fflush(stdout); + fflush(stderr); (void)_dup2(fd, STDIN_FILENO); (void)_dup2(fd, STDOUT_FILENO); (void)_dup2(fd, STDERR_FILENO); ? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 17:16:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBF08106566C; Wed, 17 Mar 2010 17:16:48 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [188.40.72.107]) by mx1.freebsd.org (Postfix) with ESMTP id A68DE8FC30; Wed, 17 Mar 2010 17:16:48 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 6EB891B5D18A; Wed, 17 Mar 2010 18:16:48 +0100 (CET) Date: Wed, 17 Mar 2010 18:16:48 +0100 From: Ed Schouten To: "M. Warner Losh" Message-ID: <20100317171648.GD7307@hoeg.nl> References: <20100313170725.GW8200@hoeg.nl> <20100313.121932.997044077387131740.imp@bsdimp.com> <20100317085004.GB7307@hoeg.nl> <20100317.092205.1068292109300099051.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kfjH4zxOES6UT95V" Content-Disposition: inline In-Reply-To: <20100317.092205.1068292109300099051.imp@bsdimp.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: unixmania@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nwhitehorn@freebsd.org Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 17:16:49 -0000 --kfjH4zxOES6UT95V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * M. Warner Losh wrote: > I agree with John this is too fine grained. We don't currently have > this data for the removals, just when we did. And it isn't clear that > our users could easily find this data either, even if we > dumpster-dived the repo for it. I do think the same, but maybe in the future we should annotate compat bits like these in source by specific __FreeBSD_version? --=20 Ed Schouten WWW: http://80386.nl/ --kfjH4zxOES6UT95V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuhDn8ACgkQ52SDGA2eCwVhjwCdEqETz667A6khpKojLTt2CxZ+ 6e8AnR+D/zkHdD7qAaEz4JtbLcrpGUte =dyna -----END PGP SIGNATURE----- --kfjH4zxOES6UT95V-- From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 17:39:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BB4A1065750; Wed, 17 Mar 2010 17:39:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E70218FC0C; Wed, 17 Mar 2010 17:39:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2HHUS32046898; Wed, 17 Mar 2010 11:30:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 17 Mar 2010 11:30:43 -0600 (MDT) Message-Id: <20100317.113043.728716717866986514.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20100317171648.GD7307@hoeg.nl> References: <20100317085004.GB7307@hoeg.nl> <20100317.092205.1068292109300099051.imp@bsdimp.com> <20100317171648.GD7307@hoeg.nl> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: unixmania@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, nwhitehorn@freebsd.org Subject: Re: svn commit: r205014 - in head: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/ia64/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 17:39:35 -0000 In message: <20100317171648.GD7307@hoeg.nl> Ed Schouten writes: : * M. Warner Losh wrote: : > I agree with John this is too fine grained. We don't currently have : > this data for the removals, just when we did. And it isn't clear that : > our users could easily find this data either, even if we : > dumpster-dived the repo for it. : : I do think the same, but maybe in the future we should annotate compat : bits like these in source by specific __FreeBSD_version? Such annotations might be useful. However, most (all?) of them will be in the X00yyy, since we usually only demote code to compat status on -head. Users would likely almost always set this value to X00000. Furthermore, you can't pick which of the things removed in release X are omitted arbitrarily, just a point in a list. This suggests, to my mind at least, that we're adding extra complexity in selecting compatibility bits, but not really providing much value add for that complexity. Am I missing something? Warner From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 18:28:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F31E2106572C; Wed, 17 Mar 2010 18:28:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E25568FC25; Wed, 17 Mar 2010 18:28:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HISRL2081518; Wed, 17 Mar 2010 18:28:27 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HISR0o081513; Wed, 17 Mar 2010 18:28:27 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003171828.o2HISR0o081513@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 17 Mar 2010 18:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205251 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 18:28:28 -0000 Author: bz Date: Wed Mar 17 18:28:27 2010 New Revision: 205251 URL: http://svn.freebsd.org/changeset/base/205251 Log: Add pcb reference counting to the pcblist sysctl handler functions to ensure type stability while caching the pcb pointers for the copyout. Reviewed by: rwatson MFC after: 7 days Modified: head/sys/netinet/ip_divert.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Wed Mar 17 15:31:06 2010 (r205250) +++ head/sys/netinet/ip_divert.c Wed Mar 17 18:28:27 2010 (r205251) @@ -628,11 +628,13 @@ div_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RLOCK(&V_divcbinfo); for (inp = LIST_FIRST(V_divcbinfo.ipi_listhead), i = 0; inp && i < n; inp = LIST_NEXT(inp, inp_list)) { - INP_RLOCK(inp); + INP_WLOCK(inp); if (inp->inp_gencnt <= gencnt && - cr_canseeinpcb(req->td->td_ucred, inp) == 0) + cr_canseeinpcb(req->td->td_ucred, inp) == 0) { + in_pcbref(inp); inp_list[i++] = inp; - INP_RUNLOCK(inp); + } + INP_WUNLOCK(inp); } INP_INFO_RUNLOCK(&V_divcbinfo); n = i; @@ -654,6 +656,15 @@ div_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } + INP_INFO_WLOCK(&V_divcbinfo); + for (i = 0; i < n; i++) { + inp = inp_list[i]; + INP_WLOCK(inp); + if (!in_pcbrele(inp)) + INP_WUNLOCK(inp); + } + INP_INFO_WUNLOCK(&V_divcbinfo); + if (!error) { /* * Give the user an updated idea of our state. Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed Mar 17 15:31:06 2010 (r205250) +++ head/sys/netinet/raw_ip.c Wed Mar 17 18:28:27 2010 (r205251) @@ -1011,13 +1011,13 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RLOCK(&V_ripcbinfo); for (inp = LIST_FIRST(V_ripcbinfo.ipi_listhead), i = 0; inp && i < n; inp = LIST_NEXT(inp, inp_list)) { - INP_RLOCK(inp); + INP_WLOCK(inp); if (inp->inp_gencnt <= gencnt && cr_canseeinpcb(req->td->td_ucred, inp) == 0) { - /* XXX held references? */ + in_pcbref(inp); inp_list[i++] = inp; } - INP_RUNLOCK(inp); + INP_WUNLOCK(inp); } INP_INFO_RUNLOCK(&V_ripcbinfo); n = i; @@ -1040,6 +1040,15 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } + INP_INFO_WLOCK(&V_ripcbinfo); + for (i = 0; i < n; i++) { + inp = inp_list[i]; + INP_WLOCK(inp); + if (!in_pcbrele(inp)) + INP_WUNLOCK(inp); + } + INP_INFO_WUNLOCK(&V_ripcbinfo); + if (!error) { /* * Give the user an updated idea of our state. If the Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Mar 17 15:31:06 2010 (r205250) +++ head/sys/netinet/tcp_subr.c Wed Mar 17 18:28:27 2010 (r205251) @@ -1108,7 +1108,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RLOCK(&V_tcbinfo); for (inp = LIST_FIRST(V_tcbinfo.ipi_listhead), i = 0; inp != NULL && i < n; inp = LIST_NEXT(inp, inp_list)) { - INP_RLOCK(inp); + INP_WLOCK(inp); if (inp->inp_gencnt <= gencnt) { /* * XXX: This use of cr_cansee(), introduced with @@ -1123,10 +1123,12 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) error = EINVAL; /* Skip this inp. */ } else error = cr_canseeinpcb(req->td->td_ucred, inp); - if (error == 0) + if (error == 0) { + in_pcbref(inp); inp_list[i++] = inp; + } } - INP_RUNLOCK(inp); + INP_WUNLOCK(inp); } INP_INFO_RUNLOCK(&V_tcbinfo); n = i; @@ -1165,8 +1167,16 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) error = SYSCTL_OUT(req, &xt, sizeof xt); } else INP_RUNLOCK(inp); - } + INP_INFO_WLOCK(&V_tcbinfo); + for (i = 0; i < n; i++) { + inp = inp_list[i]; + INP_WLOCK(inp); + if (!in_pcbrele(inp)) + INP_WUNLOCK(inp); + } + INP_INFO_WUNLOCK(&V_tcbinfo); + if (!error) { /* * Give the user an updated idea of our state. Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed Mar 17 15:31:06 2010 (r205250) +++ head/sys/netinet/udp_usrreq.c Wed Mar 17 18:28:27 2010 (r205251) @@ -746,11 +746,13 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RLOCK(&V_udbinfo); for (inp = LIST_FIRST(V_udbinfo.ipi_listhead), i = 0; inp && i < n; inp = LIST_NEXT(inp, inp_list)) { - INP_RLOCK(inp); + INP_WLOCK(inp); if (inp->inp_gencnt <= gencnt && - cr_canseeinpcb(req->td->td_ucred, inp) == 0) + cr_canseeinpcb(req->td->td_ucred, inp) == 0) { + in_pcbref(inp); inp_list[i++] = inp; - INP_RUNLOCK(inp); + } + INP_WUNLOCK(inp); } INP_INFO_RUNLOCK(&V_udbinfo); n = i; @@ -761,6 +763,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) INP_RLOCK(inp); if (inp->inp_gencnt <= gencnt) { struct xinpcb xi; + bzero(&xi, sizeof(xi)); xi.xi_len = sizeof xi; /* XXX should avoid extra copy */ @@ -773,6 +776,15 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) } else INP_RUNLOCK(inp); } + INP_INFO_WLOCK(&V_udbinfo); + for (i = 0; i < n; i++) { + inp = inp_list[i]; + INP_WLOCK(inp); + if (!in_pcbrele(inp)) + INP_WUNLOCK(inp); + } + INP_INFO_WUNLOCK(&V_udbinfo); + if (!error) { /* * Give the user an updated idea of our state. If the From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 18:53:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F440106566C; Wed, 17 Mar 2010 18:53:58 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EFB48FC0A; Wed, 17 Mar 2010 18:53:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HIrwDi087136; Wed, 17 Mar 2010 18:53:58 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HIrwtC087134; Wed, 17 Mar 2010 18:53:58 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201003171853.o2HIrwtC087134@svn.freebsd.org> From: Matt Jacob Date: Wed, 17 Mar 2010 18:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205252 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 18:53:58 -0000 Author: mjacob Date: Wed Mar 17 18:53:58 2010 New Revision: 205252 URL: http://svn.freebsd.org/changeset/base/205252 Log: We actually can generate a host number. MFC after: 1 month Modified: head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Wed Mar 17 18:28:27 2010 (r205251) +++ head/sys/cam/scsi/scsi_sg.c Wed Mar 17 18:53:58 2010 (r205252) @@ -586,7 +586,7 @@ sgioctl(struct cdev *dev, u_long cmd, ca { struct sg_scsi_id id; - id.host_no = 0; /* XXX */ + id.host_no = cam_sim_path(xpt_path_sim(periph->path)); id.channel = xpt_path_path_id(periph->path); id.scsi_id = xpt_path_target_id(periph->path); id.lun = xpt_path_lun_id(periph->path); From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:00:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CFC31065670; Wed, 17 Mar 2010 20:00:23 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BF9A8FC1B; Wed, 17 Mar 2010 20:00:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HK0N3p001909; Wed, 17 Mar 2010 20:00:23 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HK0NHI001907; Wed, 17 Mar 2010 20:00:23 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003172000.o2HK0NHI001907@svn.freebsd.org> From: Kip Macy Date: Wed, 17 Mar 2010 20:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205253 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 20:00:23 -0000 Author: kmacy Date: Wed Mar 17 20:00:22 2010 New Revision: 205253 URL: http://svn.freebsd.org/changeset/base/205253 Log: use CACHE_LINE_SIZE instead of hardcoding 128 for lock pad pointed out by Marius Nuennerich and jhb@ 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 Wed Mar 17 18:53:58 2010 (r205252) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Mar 17 20:00:22 2010 (r205253) @@ -568,7 +568,7 @@ static void arc_evict_ghost(arc_state_t * Hash table routines */ -#define HT_LOCK_PAD 128 +#define HT_LOCK_PAD CACHE_LINE_SIZE struct ht_lock { kmutex_t ht_lock; From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:01:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1821106564A; Wed, 17 Mar 2010 20:01:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0F448FC18; Wed, 17 Mar 2010 20:01:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HK113Q002085; Wed, 17 Mar 2010 20:01:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HK11OZ002082; Wed, 17 Mar 2010 20:01:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003172001.o2HK11OZ002082@svn.freebsd.org> From: Marius Strobl Date: Wed, 17 Mar 2010 20:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205254 - head/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 20:01:01 -0000 Author: marius Date: Wed Mar 17 20:01:01 2010 New Revision: 205254 URL: http://svn.freebsd.org/changeset/base/205254 Log: - Add quirk handling for Sun Fire V1280. The firmware of these machines provides no ino-bitmap properties so forge them using the default set of controller interrupts and let schizo_setup_intr() take care of the children, hoping for non-fancy routing. - Add quirk handling for Sun Fire V890. When booting these machines from disk a Schizo comes up with PCI error residing which triggers as soon as we register schizo_pci_bus() even when clearing it from all involved registers (it's no longer indicated once we're in schizo_pci_bus() though). Thus make PCI bus errors non-fatal until we actually touch the bus. With this change schizo_pci_bus() typically triggers once during attach in this case. Obviously this approach isn't exactly race free but it's about the best we can do about this problem as we're not guaranteed that the interrupt will actually trigger on V890 either, as it certainly doesn't when for example netbooting them. Modified: head/sys/sparc64/pci/schizo.c head/sys/sparc64/pci/schizovar.h Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Wed Mar 17 20:00:22 2010 (r205253) +++ head/sys/sparc64/pci/schizo.c Wed Mar 17 20:01:01 2010 (r205254) @@ -402,9 +402,22 @@ schizo_attach(device_t dev) */ i = OF_getprop(node, "ino-bitmap", (void *)prop_array, sizeof(prop_array)); - if (i == -1) - panic("%s: could not get ino-bitmap", __func__); - ino_bitmap = ((uint64_t)prop_array[1] << 32) | prop_array[0]; + if (i != -1) + ino_bitmap = ((uint64_t)prop_array[1] << 32) | prop_array[0]; + else { + /* + * If the ino-bitmap property is missing, just provide the + * default set of interrupts for this controller and let + * schizo_setup_intr() take care of child interrupts. + */ + if (sc->sc_half == 0) + ino_bitmap = (1ULL << STX_UE_INO) | + (1ULL << STX_CE_INO) | + (1ULL << STX_PCIERR_A_INO) | + (1ULL << STX_BUS_INO); + else + ino_bitmap = 1ULL << STX_PCIERR_B_INO; + } for (i = 0; i <= STX_MAX_INO; i++) { if ((ino_bitmap & (1ULL << i)) == 0) continue; @@ -684,6 +697,14 @@ schizo_attach(device_t dev) ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(ofw_pci_intr_t)); + /* + * At least when booting Fire V890 from disk a Schizo comes up with + * a PCI bus error residing which triggers as soon as we register + * schizo_pci_bus() even when clearing it from all involved registers + * beforehand (but is quiet once it has fired). Thus we make PCI bus + * errors non-fatal until we actually touch the bus. + */ + sc->sc_flags |= SCHIZO_FLAGS_ARMED; device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } @@ -787,6 +808,8 @@ schizo_pci_bus(void *arg) iommu = SCHIZO_PCI_READ_8(sc, STX_PCI_IOMMU); status = PCIB_READ_CONFIG(sc->sc_dev, sc->sc_pci_secbus, STX_CS_DEVICE, STX_CS_FUNC, PCIR_STATUS, 2); + if ((sc->sc_flags & SCHIZO_FLAGS_ARMED) == 0) + goto clear_error; if ((csr & STX_PCI_CTRL_MMU_ERR) != 0) { if ((iommu & TOM_PCI_IOMMU_ERR) == 0) goto clear_error; Modified: head/sys/sparc64/pci/schizovar.h ============================================================================== --- head/sys/sparc64/pci/schizovar.h Wed Mar 17 20:00:22 2010 (r205253) +++ head/sys/sparc64/pci/schizovar.h Wed Mar 17 20:01:01 2010 (r205254) @@ -44,8 +44,9 @@ struct schizo_softc { #define SCHIZO_MODE_XMS 2 u_int sc_flags; -#define SCHIZO_FLAGS_BSWAR (1 << 0) -#define SCHIZO_FLAGS_CDMA (1 << 1) +#define SCHIZO_FLAGS_ARMED (1 << 0) +#define SCHIZO_FLAGS_BSWAR (1 << 1) +#define SCHIZO_FLAGS_CDMA (1 << 2) bus_addr_t sc_cdma_clr; uint32_t sc_cdma_state; From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:13:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61F021065670; Wed, 17 Mar 2010 20:13:09 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 512B38FC17; Wed, 17 Mar 2010 20:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKD9PF004955; Wed, 17 Mar 2010 20:13:09 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKD9MC004953; Wed, 17 Mar 2010 20:13:09 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201003172013.o2HKD9MC004953@svn.freebsd.org> From: Andrew Gallatin Date: Wed, 17 Mar 2010 20:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205255 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:13:09 -0000 Author: gallatin Date: Wed Mar 17 20:13:09 2010 New Revision: 205255 URL: http://svn.freebsd.org/changeset/base/205255 Log: Fix 2 bugs in mxge_attach() - Don't leak slice resources when mxge_alloc_rings() fails - Start taskq threads only after we know attach will succeed. At boot time, taskqueue_terminate() will loop infinately, waiting for the threads to exit, and hang the system. Submitted by: Panasas MFC After: 3 days Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Wed Mar 17 20:01:01 2010 (r205254) +++ head/sys/dev/mxge/if_mxge.c Wed Mar 17 20:13:09 2010 (r205255) @@ -4616,8 +4616,6 @@ mxge_attach(device_t dev) err = ENOMEM; goto abort_with_nothing; } - taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", - device_get_nameunit(sc->dev)); err = bus_dma_tag_create(NULL, /* parent */ 1, /* alignment */ @@ -4723,7 +4721,7 @@ mxge_attach(device_t dev) err = mxge_alloc_rings(sc); if (err != 0) { device_printf(sc->dev, "failed to allocate rings\n"); - goto abort_with_dmabench; + goto abort_with_slices; } err = mxge_add_irq(sc); @@ -4781,6 +4779,8 @@ mxge_attach(device_t dev) ifp->if_transmit = mxge_transmit; ifp->if_qflush = mxge_qflush; #endif + taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", + device_get_nameunit(sc->dev)); callout_reset(&sc->co_hdl, mxge_ticks, mxge_tick, sc); return 0; From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:16:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 615D4106566B; Wed, 17 Mar 2010 20:16:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502598FC16; Wed, 17 Mar 2010 20:16:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKGSRp005749; Wed, 17 Mar 2010 20:16:28 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKGSt1005747; Wed, 17 Mar 2010 20:16:28 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172016.o2HKGSt1005747@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 20:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205256 - stable/8/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:16:28 -0000 Author: gavin Date: Wed Mar 17 20:16:28 2010 New Revision: 205256 URL: http://svn.freebsd.org/changeset/base/205256 Log: Merge r203865 from head: The -newerXB option was being interpreted the same as the -newerXm option as a check for F_TIME2_B was missing. Fix this. PR: bin/138245 Submitted by: "David E. Cross" Modified: stable/8/usr.bin/find/function.c Directory Properties: stable/8/usr.bin/find/ (props changed) Modified: stable/8/usr.bin/find/function.c ============================================================================== --- stable/8/usr.bin/find/function.c Wed Mar 17 20:13:09 2010 (r205255) +++ stable/8/usr.bin/find/function.c Wed Mar 17 20:16:28 2010 (r205256) @@ -1165,6 +1165,8 @@ c_newer(OPTION *option, char ***argvp) new->t_data = sb.st_ctime; else if (option->flags & F_TIME2_A) new->t_data = sb.st_atime; + else if (option->flags & F_TIME2_B) + new->t_data = sb.st_birthtime; else new->t_data = sb.st_mtime; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:17:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 825DD1065677; Wed, 17 Mar 2010 20:17:25 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70F9A8FC0C; Wed, 17 Mar 2010 20:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKHPLS006002; Wed, 17 Mar 2010 20:17:25 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKHPZs006000; Wed, 17 Mar 2010 20:17:25 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172017.o2HKHPZs006000@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 20:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205257 - stable/7/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:17:25 -0000 Author: gavin Date: Wed Mar 17 20:17:25 2010 New Revision: 205257 URL: http://svn.freebsd.org/changeset/base/205257 Log: Merge r203865 from head: The -newerXB option was being interpreted the same as the -newerXm option as a check for F_TIME2_B was missing. Fix this. PR: bin/138245 Submitted by: "David E. Cross" Modified: stable/7/usr.bin/find/function.c Directory Properties: stable/7/usr.bin/find/ (props changed) Modified: stable/7/usr.bin/find/function.c ============================================================================== --- stable/7/usr.bin/find/function.c Wed Mar 17 20:16:28 2010 (r205256) +++ stable/7/usr.bin/find/function.c Wed Mar 17 20:17:25 2010 (r205257) @@ -1122,6 +1122,8 @@ c_newer(OPTION *option, char ***argvp) new->t_data = sb.st_ctime; else if (option->flags & F_TIME2_A) new->t_data = sb.st_atime; + else if (option->flags & F_TIME2_B) + new->t_data = sb.st_birthtime; else new->t_data = sb.st_mtime; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:23:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B72D106566C; Wed, 17 Mar 2010 20:23:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 399D38FC18; Wed, 17 Mar 2010 20:23:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKNFSp007356; Wed, 17 Mar 2010 20:23:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKNFhi007350; Wed, 17 Mar 2010 20:23:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003172023.o2HKNFhi007350@svn.freebsd.org> From: Marius Strobl Date: Wed, 17 Mar 2010 20:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205258 - in head/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 20:23:15 -0000 Author: marius Date: Wed Mar 17 20:23:14 2010 New Revision: 205258 URL: http://svn.freebsd.org/changeset/base/205258 Log: - Add TTE and context register bits for the additional page sizes supported by UltraSparc-IV and -IV+ as well as SPARC64 V, VI, VII and VIIIfx CPUs. - Replace TLB_PCXR_PGSZ_MASK and TLB_SCXR_PGSZ_MASK with TLB_CXR_PGSZ_MASK which just is the complement of TLB_CXR_CTX_MASK instead of trying to assemble it from the page size bits which vary across CPUs. - Add macros for the remainder of the SFSR bits, which are useful for at least debugging purposes. Modified: head/sys/sparc64/include/tlb.h head/sys/sparc64/include/tte.h head/sys/sparc64/sparc64/genassym.c head/sys/sparc64/sparc64/pmap.c head/sys/sparc64/sparc64/swtch.S Modified: head/sys/sparc64/include/tlb.h ============================================================================== --- head/sys/sparc64/include/tlb.h Wed Mar 17 20:17:25 2010 (r205257) +++ head/sys/sparc64/include/tlb.h Wed Mar 17 20:23:14 2010 (r205258) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001 Jake Burkholder. + * Copyright (c) 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,11 +36,11 @@ #define TLB_DIRECT_ADDRESS_MASK ((1UL << TLB_DIRECT_ADDRESS_BITS) - 1) #define TLB_DIRECT_PAGE_MASK ((1UL << TLB_DIRECT_PAGE_BITS) - 1) -#define TLB_PHYS_TO_DIRECT(pa) \ +#define TLB_PHYS_TO_DIRECT(pa) \ ((pa) | VM_MIN_DIRECT_ADDRESS) -#define TLB_DIRECT_TO_PHYS(va) \ +#define TLB_DIRECT_TO_PHYS(va) \ ((va) & TLB_DIRECT_ADDRESS_MASK) -#define TLB_DIRECT_TO_TTE_MASK \ +#define TLB_DIRECT_TO_TTE_MASK \ (TD_V | TD_4M | (TLB_DIRECT_ADDRESS_MASK - TLB_DIRECT_PAGE_MASK)) #define TLB_DAR_SLOT_SHIFT (3) @@ -56,18 +57,21 @@ (((1UL << TLB_CXR_CTX_BITS) - 1) << TLB_CXR_CTX_SHIFT) #define TLB_CXR_CTX_SHIFT (0) #define TLB_CXR_PGSZ_BITS (3) -#define TLB_PCXR_PGSZ_MASK \ - ((((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_N_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_N_PGSZ1_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_P_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_PCXR_P_PGSZ1_SHIFT)) +#define TLB_CXR_PGSZ_MASK (~TLB_CXR_CTX_MASK) +#define TLB_PCXR_N_IPGSZ0_SHIFT (53) /* SPARC64 VI, VII, VIIIfx */ +#define TLB_PCXR_N_IPGSZ1_SHIFT (50) /* SPARC64 VI, VII, VIIIfx */ #define TLB_PCXR_N_PGSZ0_SHIFT (61) #define TLB_PCXR_N_PGSZ1_SHIFT (58) +#define TLB_PCXR_N_PGSZ_I_SHIFT (55) /* US-IV+ */ +#define TLB_PCXR_P_IPGSZ0_SHIFT (24) /* SPARC64 VI, VII, VIIIfx */ +#define TLB_PCXR_P_IPGSZ1_SHIFT (27) /* SPARC64 VI, VII, VIIIfx */ #define TLB_PCXR_P_PGSZ0_SHIFT (16) #define TLB_PCXR_P_PGSZ1_SHIFT (19) -#define TLB_SCXR_PGSZ_MASK \ - ((((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_SCXR_S_PGSZ0_SHIFT) | \ - (((1UL << TLB_CXR_PGSZ_BITS) - 1) << TLB_SCXR_S_PGSZ1_SHIFT)) +/* + * Note that the US-IV+ documentation appears to have TLB_PCXR_P_PGSZ_I_SHIFT + * and TLB_PCXR_P_PGSZ0_SHIFT erroneously inverted. + */ +#define TLB_PCXR_P_PGSZ_I_SHIFT (22) /* US-IV+ */ #define TLB_SCXR_S_PGSZ1_SHIFT (19) #define TLB_SCXR_S_PGSZ0_SHIFT (16) @@ -87,7 +91,7 @@ #define TLB_DEMAP_TYPE_SHIFT (6) #define TLB_DEMAP_TYPE_PAGE (0) #define TLB_DEMAP_TYPE_CONTEXT (1) -#define TLB_DEMAP_TYPE_ALL (2) /* USIII and beyond only */ +#define TLB_DEMAP_TYPE_ALL (2) /* US-III and beyond only */ #define TLB_DEMAP_VA(va) ((va) & ~PAGE_MASK) #define TLB_DEMAP_ID(id) ((id) << TLB_DEMAP_ID_SHIFT) @@ -118,9 +122,17 @@ #define MMU_SFSR_FT_SIZE (6) #define MMU_SFSR_CT_SIZE (2) -#define MMU_SFSR_GET_ASI(sfsr) \ +#define MMU_SFSR_GET_ASI(sfsr) \ (((sfsr) >> MMU_SFSR_ASI_SHIFT) & ((1UL << MMU_SFSR_ASI_SIZE) - 1)) +#define MMU_SFSR_GET_FT(sfsr) \ + (((sfsr) >> MMU_SFSR_FT_SHIFT) & ((1UL << MMU_SFSR_FT_SIZE) - 1)) +#define MMU_SFSR_GET_CT(sfsr) \ + (((sfsr) >> MMU_SFSR_CT_SHIFT) & ((1UL << MMU_SFSR_CT_SIZE) - 1)) + +#define MMU_SFSR_E (1UL << MMU_SFSR_E_SHIFT) +#define MMU_SFSR_PR (1UL << MMU_SFSR_PR_SHIFT) #define MMU_SFSR_W (1UL << MMU_SFSR_W_SHIFT) +#define MMU_SFSR_OW (1UL << MMU_SFSR_OW_SHIFT) #define MMU_SFSR_FV (1UL << MMU_SFSR_FV_SHIFT) typedef void tlb_flush_nonlocked_t(void); Modified: head/sys/sparc64/include/tte.h ============================================================================== --- head/sys/sparc64/include/tte.h Wed Mar 17 20:17:25 2010 (r205257) +++ head/sys/sparc64/include/tte.h Wed Mar 17 20:23:14 2010 (r205258) @@ -36,25 +36,42 @@ #define TD_SIZE_SHIFT (61) #define TD_SOFT2_SHIFT (50) +#define TD_RSVD2_SHIFT (49) +#define TD_SIZE2_SHIFT (48) #define TD_DIAG_SF_SHIFT (41) #define TD_RSVD_CH_SHIFT (43) +#define TD_RSVD_OC_SHIFT (47) +#define TD_RSVD_PT_SHIFT TD_RSVD_CH_SHIFT +#define TD_RSVD_VE_SHIFT (41) #define TD_PA_SHIFT (13) #define TD_SOFT_SHIFT (7) #define TD_SIZE_BITS (2) #define TD_SOFT2_BITS (9) -#define TD_DIAG_SF_BITS (9) -#define TD_RSVD_CH_BITS (7) -#define TD_PA_CH_BITS (30) -#define TD_PA_SF_BITS (28) +#define TD_RSVD2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */ +#define TD_SIZE2_BITS (1) /* US-IV+, SPARC64 VI, VII, VIIIfx */ +#define TD_DIAG_SF_BITS (9) /* US-I, II{,e,i} */ +#define TD_RSVD_CH_BITS (7) /* US-III{,i,+}, US-IV, SPARC64 V */ +#define TD_RSVD_OC_BITS (1) /* SPARC64 VI, VII */ +#define TD_RSVD_PT_BITS (5) /* US-IV+, SPARC64 VI, VII */ +#define TD_RSVD_VE_BITS (7) /* SPARC64 VIIIfx */ +#define TD_PA_CH_BITS (30) /* US-III{,i,+}, US-IV{,+}, SPARC64 V */ +#define TD_PA_OC_BITS (34) /* SPARC64 VI, VII */ +#define TD_PA_SF_BITS (28) /* US-I, II{,e,i}, SPARC64 VIIIfx */ #define TD_PA_BITS TD_PA_CH_BITS #define TD_SOFT_BITS (6) #define TD_SIZE_MASK ((1UL << TD_SIZE_BITS) - 1) #define TD_SOFT2_MASK ((1UL << TD_SOFT2_BITS) - 1) +#define TD_RSVD2_MASK ((1UL << TD_RSVD2_BITS) - 1) +#define TD_SIZE2_MASK ((1UL << TD_SIZE2_BITS) - 1) #define TD_DIAG_SF_MASK ((1UL << TD_DIAG_SF_BITS) - 1) #define TD_RSVD_CH_MASK ((1UL << TD_RSVD_CH_BITS) - 1) +#define TD_RSVD_OC_MASK ((1UL << TD_RSVD_OC_BITS) - 1) +#define TD_RSVD_PT_MASK ((1UL << TD_RSVD_PT_BITS) - 1) +#define TD_RSVD_VE_MASK ((1UL << TD_RSVD_VE_BITS) - 1) #define TD_PA_CH_MASK ((1UL << TD_PA_CH_BITS) - 1) +#define TD_PA_OC_MASK ((1UL << TD_PA_OC_BITS) - 1) #define TD_PA_SF_MASK ((1UL << TD_PA_SF_BITS) - 1) #define TD_PA_MASK ((1UL << TD_PA_BITS) - 1) #define TD_SOFT_MASK ((1UL << TD_SOFT_BITS) - 1) @@ -63,6 +80,9 @@ #define TS_64K (1UL) #define TS_512K (2UL) #define TS_4M (3UL) +#define TS_32M (4UL) /* US-IV+, SPARC64 VI, VII only */ +#define TS_256M (5UL) /* US-IV+, SPARC64 VI, VII only */ +#define TS_2G (6UL) /* SPARC64 VIIIfx only */ #define TS_MIN TS_8K #define TS_MAX TS_4M @@ -72,6 +92,15 @@ #define TD_64K (TS_64K << TD_SIZE_SHIFT) #define TD_512K (TS_512K << TD_SIZE_SHIFT) #define TD_4M (TS_4M << TD_SIZE_SHIFT) +#define TD_32M \ + (((TS_32M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) +#define TD_256M \ + (((TS_256M & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) +#define TD_2G \ + (((TS_2G & TD_SIZE_MASK) << TD_SIZE_SHIFT) | \ + (TD_SIZE2_MASK << TD_SIZE2_SHIFT)) #define TD_NFO (1UL << 60) #define TD_IE (1UL << 59) #define TD_PA(pa) ((pa) & (TD_PA_MASK << TD_PA_SHIFT)) @@ -94,29 +123,28 @@ #define TV_VPN(va, sz) ((((va) >> TTE_PAGE_SHIFT(sz)) << TV_SIZE_BITS) | sz) #define TTE_SIZE_SPREAD (3) -#define TTE_PAGE_SHIFT(sz) \ +#define TTE_PAGE_SHIFT(sz) \ (PAGE_SHIFT + ((sz) * TTE_SIZE_SPREAD)) -#define TTE_GET_SIZE(tp) \ +#define TTE_GET_SIZE(tp) \ (((tp)->tte_data >> TD_SIZE_SHIFT) & TD_SIZE_MASK) -#define TTE_GET_PAGE_SHIFT(tp) \ +#define TTE_GET_PAGE_SHIFT(tp) \ TTE_PAGE_SHIFT(TTE_GET_SIZE(tp)) -#define TTE_GET_PAGE_SIZE(tp) \ +#define TTE_GET_PAGE_SIZE(tp) \ (1 << TTE_GET_PAGE_SHIFT(tp)) -#define TTE_GET_PAGE_MASK(tp) \ +#define TTE_GET_PAGE_MASK(tp) \ (TTE_GET_PAGE_SIZE(tp) - 1) -#define TTE_GET_PA(tp) \ +#define TTE_GET_PA(tp) \ ((tp)->tte_data & (TD_PA_MASK << TD_PA_SHIFT)) -#define TTE_GET_VPN(tp) \ +#define TTE_GET_VPN(tp) \ ((tp)->tte_vpn >> TV_SIZE_BITS) -#define TTE_GET_VA(tp) \ +#define TTE_GET_VA(tp) \ (TTE_GET_VPN(tp) << TTE_GET_PAGE_SHIFT(tp)) -#define TTE_GET_PMAP(tp) \ - (((tp)->tte_data & TD_P) != 0 ? \ - (kernel_pmap) : \ - (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap)) -#define TTE_ZERO(tp) \ +#define TTE_GET_PMAP(tp) \ + (((tp)->tte_data & TD_P) != 0 ? (kernel_pmap) : \ + (PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)(tp)))->md.pmap)) +#define TTE_ZERO(tp) \ memset(tp, 0, sizeof(*tp)) struct pmap; @@ -130,6 +158,7 @@ struct tte { static __inline int tte_match(struct tte *tp, vm_offset_t va) { + return (((tp->tte_data & TD_V) != 0) && (tp->tte_vpn == TV_VPN(va, TTE_GET_SIZE(tp)))); } Modified: head/sys/sparc64/sparc64/genassym.c ============================================================================== --- head/sys/sparc64/sparc64/genassym.c Wed Mar 17 20:17:25 2010 (r205257) +++ head/sys/sparc64/sparc64/genassym.c Wed Mar 17 20:23:14 2010 (r205258) @@ -139,7 +139,7 @@ ASSYM(TD_W, TD_W); ASSYM(TS_MIN, TS_MIN); ASSYM(TS_MAX, TS_MAX); ASSYM(TLB_DAR_SLOT_SHIFT, TLB_DAR_SLOT_SHIFT); -ASSYM(TLB_PCXR_PGSZ_MASK, TLB_PCXR_PGSZ_MASK); +ASSYM(TLB_CXR_PGSZ_MASK, TLB_CXR_PGSZ_MASK); ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK); ASSYM(TV_SIZE_BITS, TV_SIZE_BITS); #endif Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Wed Mar 17 20:17:25 2010 (r205257) +++ head/sys/sparc64/sparc64/pmap.c Wed Mar 17 20:23:14 2010 (r205258) @@ -572,7 +572,7 @@ pmap_map_tsb(void) * FP block operations in the kernel). */ stxa(AA_DMMU_SCXR, ASI_DMMU, (ldxa(AA_DMMU_SCXR, ASI_DMMU) & - TLB_SCXR_PGSZ_MASK) | TLB_CTX_KERNEL); + TLB_CXR_PGSZ_MASK) | TLB_CTX_KERNEL); flush(KERNBASE); intr_restore(s); @@ -1989,7 +1989,7 @@ pmap_activate(struct thread *td) stxa(AA_DMMU_TSB, ASI_DMMU, pm->pm_tsb); stxa(AA_IMMU_TSB, ASI_IMMU, pm->pm_tsb); stxa(AA_DMMU_PCXR, ASI_DMMU, (ldxa(AA_DMMU_PCXR, ASI_DMMU) & - TLB_PCXR_PGSZ_MASK) | context); + TLB_CXR_PGSZ_MASK) | context); flush(KERNBASE); mtx_unlock_spin(&sched_lock); Modified: head/sys/sparc64/sparc64/swtch.S ============================================================================== --- head/sys/sparc64/sparc64/swtch.S Wed Mar 17 20:17:25 2010 (r205257) +++ head/sys/sparc64/sparc64/swtch.S Wed Mar 17 20:23:14 2010 (r205258) @@ -237,7 +237,7 @@ ENTRY(cpu_switch) stxa %i4, [%i5] ASI_DMMU mov AA_IMMU_TSB, %i5 stxa %i4, [%i5] ASI_IMMU - setx TLB_PCXR_PGSZ_MASK, %i5, %i4 + setx TLB_CXR_PGSZ_MASK, %i5, %i4 mov AA_DMMU_PCXR, %i5 ldxa [%i5] ASI_DMMU, %l1 and %l1, %i4, %l1 From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:27:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39F471065672; Wed, 17 Mar 2010 20:27:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E5138FC20; Wed, 17 Mar 2010 20:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKRZ8a008356; Wed, 17 Mar 2010 20:27:35 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKRZhj008354; Wed, 17 Mar 2010 20:27:35 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172027.o2HKRZhj008354@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 20:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205259 - stable/8/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:27:36 -0000 Author: gavin Date: Wed Mar 17 20:27:35 2010 New Revision: 205259 URL: http://svn.freebsd.org/changeset/base/205259 Log: Merge r203835 from head: When growing a UFS1 filesystem, we need to initialise all inodes in any new cylinder groups that are created. When the filesystem is first created, newfs always initialises the first two blocks of inodes, and then in the UFS1 case will also initialise the remaining inode blocks. The changes in growfs.c 1.23 broke the initialisation of all inodes, seemingly based on this implementation detail in newfs(8). The result was that instead of initialising all inodes, we would actually end up initialising all but the first two blocks of inodes. If the filesystem was grown into empty (all-zeros) space then the resulting filesystem was fine, however when grown onto non-zeroed space the filesystem produced would appear to have massive corruption on the first fsck after growing. A test case for this problem can be found in the PR audit trail. Fix this by once again initialising all inodes in the UFS1 case. PR: bin/115174 Submitted by: "Nate Eldredge" Reviewed by: mjacob Modified: stable/8/sbin/growfs/growfs.c Directory Properties: stable/8/sbin/growfs/ (props changed) Modified: stable/8/sbin/growfs/growfs.c ============================================================================== --- stable/8/sbin/growfs/growfs.c Wed Mar 17 20:23:14 2010 (r205258) +++ stable/8/sbin/growfs/growfs.c Wed Mar 17 20:27:35 2010 (r205259) @@ -445,13 +445,11 @@ initcg(int cylno, time_t utime, int fso, acg.cg_cs.cs_nifree--; } /* - * XXX Newfs writes out two blocks of initialized inodes - * unconditionally. Should we check here to make sure that they - * were actually written? + * For the old file system, we have to initialize all the inodes. */ if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(iobuf, sblock.fs_bsize); - for (i = 2 * sblock.fs_frag; i < sblock.fs_ipg / INOPF(&sblock); + for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { dp1 = (struct ufs1_dinode *)iobuf; #ifdef FSIRAND From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:30:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FFD8106566B; Wed, 17 Mar 2010 20:30:38 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D82A78FC16; Wed, 17 Mar 2010 20:30:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKUbxK009057; Wed, 17 Mar 2010 20:30:37 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKUbcD009055; Wed, 17 Mar 2010 20:30:37 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172030.o2HKUbcD009055@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 20:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205260 - stable/7/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:30:38 -0000 Author: gavin Date: Wed Mar 17 20:30:37 2010 New Revision: 205260 URL: http://svn.freebsd.org/changeset/base/205260 Log: Merge r201401 from head: Remove dead code. This section of code is only run in the (sblock.fs_magic == FS_UFS1_MAGIC) case, so the check within the loop is redundant. Merge 203835 from head: When growing a UFS1 filesystem, we need to initialise all inodes in any new cylinder groups that are created. When the filesystem is first created, newfs always initialises the first two blocks of inodes, and then in the UFS1 case will also initialise the remaining inode blocks. The changes in growfs.c 1.23 broke the initialisation of all inodes, seemingly based on this implementation detail in newfs(8). The result was that instead of initialising all inodes, we would actually end up initialising all but the first two blocks of inodes. If the filesystem was grown into empty (all-zeros) space then the resulting filesystem was fine, however when grown onto non-zeroed space the filesystem produced would appear to have massive corruption on the first fsck after growing. A test case for this problem can be found in the PR audit trail. Fix this by once again initialising all inodes in the UFS1 case. PR: bin/115174 Submitted by: "Nate Eldredge" Reviewed by: mjacob Modified: stable/7/sbin/growfs/growfs.c Directory Properties: stable/7/sbin/growfs/ (props changed) Modified: stable/7/sbin/growfs/growfs.c ============================================================================== --- stable/7/sbin/growfs/growfs.c Wed Mar 17 20:27:35 2010 (r205259) +++ stable/7/sbin/growfs/growfs.c Wed Mar 17 20:30:37 2010 (r205260) @@ -375,7 +375,6 @@ initcg(int cylno, time_t utime, int fso, long blkno, start; ufs2_daddr_t i, cbase, dmax; struct ufs1_dinode *dp1; - struct ufs2_dinode *dp2; struct csum *cs; uint d, dupper, dlower; @@ -446,25 +445,18 @@ initcg(int cylno, time_t utime, int fso, acg.cg_cs.cs_nifree--; } /* - * XXX Newfs writes out two blocks of initialized inodes - * unconditionally. Should we check here to make sure that they - * were actually written? + * For the old file system, we have to initialize all the inodes. */ if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(iobuf, sblock.fs_bsize); - for (i = 2 * sblock.fs_frag; i < sblock.fs_ipg / INOPF(&sblock); + for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { dp1 = (struct ufs1_dinode *)iobuf; - dp2 = (struct ufs2_dinode *)iobuf; #ifdef FSIRAND - for (j = 0; j < INOPB(&sblock); j++) - if (sblock.fs_magic == FS_UFS1_MAGIC) { - dp1->di_gen = random(); - dp1++; - } else { - dp2->di_gen = random(); - dp2++; - } + for (j = 0; j < INOPB(&sblock); j++) { + dp1->di_gen = random(); + dp1++; + } #endif wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i), sblock.fs_bsize, iobuf, fso, Nflag); From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:32:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3999D106566C; Wed, 17 Mar 2010 20:32:14 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D5508FC18; Wed, 17 Mar 2010 20:32:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKWE2R009461; Wed, 17 Mar 2010 20:32:14 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKWDbL009459; Wed, 17 Mar 2010 20:32:13 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172032.o2HKWDbL009459@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 20:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205261 - stable/6/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:32:14 -0000 Author: gavin Date: Wed Mar 17 20:32:13 2010 New Revision: 205261 URL: http://svn.freebsd.org/changeset/base/205261 Log: Merge r201401 from head: Remove dead code. This section of code is only run in the (sblock.fs_magic == FS_UFS1_MAGIC) case, so the check within the loop is redundant. Merge 203835 from head: When growing a UFS1 filesystem, we need to initialise all inodes in any new cylinder groups that are created. When the filesystem is first created, newfs always initialises the first two blocks of inodes, and then in the UFS1 case will also initialise the remaining inode blocks. The changes in growfs.c 1.23 broke the initialisation of all inodes, seemingly based on this implementation detail in newfs(8). The result was that instead of initialising all inodes, we would actually end up initialising all but the first two blocks of inodes. If the filesystem was grown into empty (all-zeros) space then the resulting filesystem was fine, however when grown onto non-zeroed space the filesystem produced would appear to have massive corruption on the first fsck after growing. A test case for this problem can be found in the PR audit trail. Fix this by once again initialising all inodes in the UFS1 case. PR: bin/115174 Submitted by: "Nate Eldredge" Reviewed by: mjacob Modified: stable/6/sbin/growfs/growfs.c Directory Properties: stable/6/sbin/growfs/ (props changed) Modified: stable/6/sbin/growfs/growfs.c ============================================================================== --- stable/6/sbin/growfs/growfs.c Wed Mar 17 20:30:37 2010 (r205260) +++ stable/6/sbin/growfs/growfs.c Wed Mar 17 20:32:13 2010 (r205261) @@ -376,7 +376,6 @@ initcg(int cylno, time_t utime, int fso, long d, dlower, dupper, blkno, start; ufs2_daddr_t i, cbase, dmax; struct ufs1_dinode *dp1; - struct ufs2_dinode *dp2; struct csum *cs; if (iobuf == NULL && (iobuf = malloc(sblock.fs_bsize)) == NULL) { @@ -446,25 +445,18 @@ initcg(int cylno, time_t utime, int fso, acg.cg_cs.cs_nifree--; } /* - * XXX Newfs writes out two blocks of initialized inodes - * unconditionally. Should we check here to make sure that they - * were actually written? + * For the old file system, we have to initialize all the inodes. */ if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(iobuf, sblock.fs_bsize); - for (i = 2 * sblock.fs_frag; i < sblock.fs_ipg / INOPF(&sblock); + for (i = 0; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { dp1 = (struct ufs1_dinode *)iobuf; - dp2 = (struct ufs2_dinode *)iobuf; #ifdef FSIRAND - for (j = 0; j < INOPB(&sblock); j++) - if (sblock.fs_magic == FS_UFS1_MAGIC) { - dp1->di_gen = random(); - dp1++; - } else { - dp2->di_gen = random(); - dp2++; - } + for (j = 0; j < INOPB(&sblock); j++) { + dp1->di_gen = random(); + dp1++; + } #endif wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i), sblock.fs_bsize, iobuf, fso, Nflag); From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 20:39:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9792106566B; Wed, 17 Mar 2010 20:39:21 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 971E78FC0A; Wed, 17 Mar 2010 20:39:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HKdLMO011118; Wed, 17 Mar 2010 20:39:21 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HKdL5i011115; Wed, 17 Mar 2010 20:39:21 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172039.o2HKdL5i011115@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 20:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205262 - in stable/8: share/man/man4 sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 20:39:21 -0000 Author: gavin Date: Wed Mar 17 20:39:21 2010 New Revision: 205262 URL: http://svn.freebsd.org/changeset/base/205262 Log: Merge r203622 from head: Add support for a few more Sony-specific ACPI features (default display brightness, wired LAN power and bass gain), and update the description of one previously unknown feature (display contrast). While here, expand on a comment and remove two defines left over from an old version of the code. Also update man page to document the above changes, and correct grammar. PR: kern/127581 Modified: stable/8/share/man/man4/acpi_sony.4 stable/8/sys/dev/acpi_support/acpi_sony.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/acpi_sony.4 ============================================================================== --- stable/8/share/man/man4/acpi_sony.4 Wed Mar 17 20:32:13 2010 (r205261) +++ stable/8/share/man/man4/acpi_sony.4 Wed Mar 17 20:39:21 2010 (r205262) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2005 +.Dd February 7, 2010 .Dt ACPI_SONY 4 i386 .Os .Sh NAME @@ -48,15 +48,24 @@ acpi_sony_load="YES" The .Nm driver provides support for the notebook controller in Sony laptops. +Note that not all features will work on all laptop models. .Sh SYSCTLS -The following sysctl is currently implemented: +The following sysctl nodes are currently implemented: .Bl -tag -width indent .It Va dev.acpi_sony.0.brightness Current brightness level of the display. +.It Va dev.acpi_sony.0.brightness_default +Default brightness level of the display (survives reboot). +.It Va dev.acpi_sony.0.contrast +Current contrast level of the display. +.It Va dev.acpi_sony.0.bass_gain +Enable or disable the Bass Gain feature. .It Va dev.acpi_sony.0.cdp Turns the CD power on or off. .It Va dev.acpi_sony.0.azp Turns the audio power on or off. +.It Va dev.acpi_sony.0.lnp +Turns the wired network interface power on or off. .El .Sh SEE ALSO .Xr acpi 4 , Modified: stable/8/sys/dev/acpi_support/acpi_sony.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_sony.c Wed Mar 17 20:32:13 2010 (r205261) +++ stable/8/sys/dev/acpi_support/acpi_sony.c Wed Mar 17 20:39:21 2010 (r205262) @@ -42,14 +42,21 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("Sony") -#define ACPI_SONY_GET_BRIGHTNESS "GBRT" -#define ACPI_SONY_SET_BRIGHTNESS "SBRT" #define ACPI_SONY_GET_PID "GPID" /* * SNY5001 + * This is the ACPI handle for the "Sony Notebook Control" driver under + * Windows. + * It provides several methods within the ACPI namespace, including: * [GS]BRT [GS]PBR [GS]CTR [GS]PCR [GS]CMI [CDPW GCDP]? GWDP PWAK PWRN * + * SNY6001 + * This is the ACPI handle for the "Sony Programmable I/O" driver under + * Windows. + * It is not yet supported by this driver, but provides control over the + * power to the bluetooth, built-in camera and HSDPA modem devices in some + * laptops, and also allows some control of the fan speed. */ struct acpi_sony_softc { @@ -63,14 +70,17 @@ static struct acpi_sony_name_list char *comment; } acpi_sony_oids[] = { { "brightness", "GBRT", "SBRT", "Display Brightness"}, - { "ctr", "GCTR", "SCTR", "??"}, + { "brightness_default", "GPBR", "SPBR", "Default Display Brightness"}, + { "contrast", "GCTR", "SCTR", "Display Contrast"}, + { "bass_gain", "GMGB", "SMGB", "Multimedia Bass Gain"}, { "pcr", "GPCR", "SPCR", "???"}, #if 0 - { "cmi", "GCMI", "SCMI", "????"}, + { "cmi", "GCMI", "SCMI", "???"}, #endif - { "wdp", "GWDP", NULL, "?????"}, + { "wdp", "GWDP", NULL, "???"}, { "cdp", "GCDP", "CDPW", "CD Power"}, /*shares [\GL03]&0x8 flag*/ { "azp", "GAZP", "AZPW", "Audio Power"}, + { "lnp", "GLNP", "LNPW", "LAN Power"}, { NULL, NULL, NULL } }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 21:00:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61A371065675; Wed, 17 Mar 2010 21:00:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50DB68FC19; Wed, 17 Mar 2010 21:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HL0dDf015955; Wed, 17 Mar 2010 21:00:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HL0dZd015953; Wed, 17 Mar 2010 21:00:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003172100.o2HL0dZd015953@svn.freebsd.org> From: Marius Strobl Date: Wed, 17 Mar 2010 21:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205263 - head/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 21:00:39 -0000 Author: marius Date: Wed Mar 17 21:00:39 2010 New Revision: 205263 URL: http://svn.freebsd.org/changeset/base/205263 Log: Add macros for the VER.impl of SPARC64 II to VIIIfx. Modified: head/sys/sparc64/include/ver.h Modified: head/sys/sparc64/include/ver.h ============================================================================== --- head/sys/sparc64/include/ver.h Wed Mar 17 20:39:21 2010 (r205262) +++ head/sys/sparc64/include/ver.h Wed Mar 17 21:00:39 2010 (r205263) @@ -69,8 +69,15 @@ extern char sparc64_model[]; #endif /* !LOCORE */ -/* Known implementations. */ +/* Known implementations */ #define CPU_IMPL_SPARC64 0x01 +#define CPU_IMPL_SPARC64II 0x02 +#define CPU_IMPL_SPARC64III 0x03 +#define CPU_IMPL_SPARC64IV 0x04 +#define CPU_IMPL_SPARC64V 0x05 +#define CPU_IMPL_SPARC64VI 0x06 +#define CPU_IMPL_SPARC64VII 0x07 +#define CPU_IMPL_SPARC64VIIIfx 0x08 #define CPU_IMPL_ULTRASPARCI 0x10 #define CPU_IMPL_ULTRASPARCII 0x11 #define CPU_IMPL_ULTRASPARCIIi 0x12 From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 21:10:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91904106566B; Wed, 17 Mar 2010 21:10:09 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80A0C8FC1D; Wed, 17 Mar 2010 21:10:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HLA9Yx018089; Wed, 17 Mar 2010 21:10:09 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HLA9S9018087; Wed, 17 Mar 2010 21:10:09 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003172110.o2HLA9S9018087@svn.freebsd.org> From: Kip Macy Date: Wed, 17 Mar 2010 21:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205264 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 21:10:09 -0000 Author: kmacy Date: Wed Mar 17 21:10:09 2010 New Revision: 205264 URL: http://svn.freebsd.org/changeset/base/205264 Log: - cache line align arcs_lock array (h/t Marius Nuennerich) - fix ARCS_LOCK_PAD to use architecture defined CACHE_LINE_SIZE - cache line align buf_hash_table ht_locks array MFC after: 7 days 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 Wed Mar 17 21:00:39 2010 (r205263) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Mar 17 21:10:09 2010 (r205264) @@ -224,7 +224,7 @@ extern kmem_cache_t *zio_data_buf_cache[ * second level ARC benefit from these fast lookups. */ -#define ARCS_LOCK_PAD 128 +#define ARCS_LOCK_PAD CACHE_LINE_SIZE struct arcs_lock { kmutex_t arcs_lock; #ifdef _KERNEL @@ -244,7 +244,7 @@ typedef struct arc_state { uint64_t arcs_lsize[ARC_BUFC_NUMTYPES]; /* amount of evictable data */ uint64_t arcs_size; /* total amount of data in this state */ list_t arcs_lists[ARC_BUFC_NUMLISTS]; /* list of evictable buffers */ - struct arcs_lock arcs_locks[ARC_BUFC_NUMLISTS] __aligned(128); + struct arcs_lock arcs_locks[ARC_BUFC_NUMLISTS] __aligned(CACHE_LINE_SIZE); } arc_state_t; #define ARCS_LOCK(s, i) &((s)->arcs_locks[(i)].arcs_lock) @@ -581,7 +581,7 @@ struct ht_lock { typedef struct buf_hash_table { uint64_t ht_mask; arc_buf_hdr_t **ht_table; - struct ht_lock ht_locks[BUF_LOCKS]; + struct ht_lock ht_locks[BUF_LOCKS] __aligned(CACHE_LINE_SIZE); } buf_hash_table_t; static buf_hash_table_t buf_hash_table; From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 21:11:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0B84106564A; Wed, 17 Mar 2010 21:11:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6848FC28; Wed, 17 Mar 2010 21:11:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HLBmnL018536; Wed, 17 Mar 2010 21:11:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HLBmNZ018534; Wed, 17 Mar 2010 21:11:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003172111.o2HLBmNZ018534@svn.freebsd.org> From: Xin LI Date: Wed, 17 Mar 2010 21:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205265 - stable/7/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 21:11:48 -0000 Author: delphij Date: Wed Mar 17 21:11:48 2010 New Revision: 205265 URL: http://svn.freebsd.org/changeset/base/205265 Log: MFC 178256: Add prototype for fdopendir(). Requested by: naddy Modified: stable/7/include/dirent.h Directory Properties: stable/7/include/ (props changed) Modified: stable/7/include/dirent.h ============================================================================== --- stable/7/include/dirent.h Wed Mar 17 21:10:09 2010 (r205264) +++ stable/7/include/dirent.h Wed Mar 17 21:11:48 2010 (r205265) @@ -100,6 +100,7 @@ int getdents(int, char *, int); int getdirentries(int, char *, int, long *); #endif DIR *opendir(const char *); +DIR *fdopendir(int); struct dirent * readdir(DIR *); #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 21:18:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A19961065678; Wed, 17 Mar 2010 21:18:28 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77AE98FC0A; Wed, 17 Mar 2010 21:18:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HLIS4g020101; Wed, 17 Mar 2010 21:18:28 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HLIS4X020099; Wed, 17 Mar 2010 21:18:28 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003172118.o2HLIS4X020099@svn.freebsd.org> From: Kip Macy Date: Wed, 17 Mar 2010 21:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205266 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 21:18:28 -0000 Author: kmacy Date: Wed Mar 17 21:18:28 2010 New Revision: 205266 URL: http://svn.freebsd.org/changeset/base/205266 Log: Cache line align various structures and move volatile counters to not share a cache line with (mostly) immutable state Reviewed by: jeff@ MFC after: 7 days Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Wed Mar 17 21:11:48 2010 (r205265) +++ head/sys/vm/uma_int.h Wed Mar 17 21:18:28 2010 (r205266) @@ -160,6 +160,11 @@ struct uma_hash { }; /* + * align field or structure to cache line + */ +#define UMA_ALIGN __aligned(CACHE_LINE_SIZE) + +/* * Structures for per cpu queues. */ @@ -168,7 +173,7 @@ struct uma_bucket { int16_t ub_cnt; /* Count of free items. */ int16_t ub_entries; /* Max items. */ void *ub_bucket[]; /* actual allocation storage */ -}; +} UMA_ALIGN; typedef struct uma_bucket * uma_bucket_t; @@ -177,7 +182,7 @@ struct uma_cache { uma_bucket_t uc_allocbucket; /* Bucket to allocate from */ u_int64_t uc_allocs; /* Count of allocations */ u_int64_t uc_frees; /* Count of frees */ -}; +} UMA_ALIGN; typedef struct uma_cache * uma_cache_t; @@ -312,11 +317,12 @@ struct uma_zone { uma_init uz_init; /* Initializer for each item */ uma_fini uz_fini; /* Discards memory */ - u_int64_t uz_allocs; /* Total number of allocations */ - u_int64_t uz_frees; /* Total number of frees */ - u_int64_t uz_fails; /* Total number of alloc failures */ u_int32_t uz_flags; /* Flags inherited from kegs */ u_int32_t uz_size; /* Size inherited from kegs */ + + u_int64_t uz_allocs UMA_ALIGN; /* Total number of allocations */ + u_int64_t uz_frees; /* Total number of frees */ + u_int64_t uz_fails; /* Total number of alloc failures */ uint16_t uz_fills; /* Outstanding bucket fills */ uint16_t uz_count; /* Highest value ub_ptr can have */ @@ -324,7 +330,7 @@ struct uma_zone { * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. */ - struct uma_cache uz_cpu[1]; /* Per cpu caches */ + struct uma_cache uz_cpu[1] UMA_ALIGN; /* Per cpu caches */ }; /* @@ -341,6 +347,8 @@ struct uma_zone { #define UMA_ZFLAG_INHERIT (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | \ UMA_ZFLAG_BUCKET) +#undef UMA_ALIGN + #ifdef _KERNEL /* Internal prototypes */ static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data); From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 21:19:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1DB81065679; Wed, 17 Mar 2010 21:19:30 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFD738FC15; Wed, 17 Mar 2010 21:19:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HLJUnW020368; Wed, 17 Mar 2010 21:19:30 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HLJURW020365; Wed, 17 Mar 2010 21:19:30 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003172119.o2HLJURW020365@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 17 Mar 2010 21:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205267 - in stable/7: share/man/man4/man4.i386 sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 21:19:31 -0000 Author: gavin Date: Wed Mar 17 21:19:30 2010 New Revision: 205267 URL: http://svn.freebsd.org/changeset/base/205267 Log: Merge r203622 from head: Add support for a few more Sony-specific ACPI features (default display brightness, wired LAN power and bass gain), and update the description of one previously unknown feature (display contrast). While here, expand on a comment and remove two defines left over from an old version of the code. Also update man page to document the above changes, and correct grammar. PR: kern/127581 Modified: stable/7/share/man/man4/man4.i386/acpi_sony.4 stable/7/sys/dev/acpi_support/acpi_sony.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/share/man/man4/man4.i386/acpi_sony.4 ============================================================================== --- stable/7/share/man/man4/man4.i386/acpi_sony.4 Wed Mar 17 21:18:28 2010 (r205266) +++ stable/7/share/man/man4/man4.i386/acpi_sony.4 Wed Mar 17 21:19:30 2010 (r205267) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2005 +.Dd February 7, 2010 .Dt ACPI_SONY 4 i386 .Os .Sh NAME @@ -48,13 +48,22 @@ acpi_sony_load="YES" The .Nm driver provides support for the notebook controller in Sony laptops. +Note that not all features will work on all laptop models. .Sh SYSCTLS -The following sysctl is currently implemented: +The following sysctl nodes are currently implemented: .Bl -tag -width indent .It Va dev.acpi_sony.0.brightness Current brightness level of the display. +.It Va dev.acpi_sony.0.brightness_default +Default brightness level of the display (survives reboot). +.It Va dev.acpi_sony.0.contrast +Current contrast level of the display. +.It Va dev.acpi_sony.0.bass_gain +Enable or disable the Bass Gain feature. .It Va dev.acpi_sony.0.cdp Turns the CD power on or off. +.It Va dev.acpi_sony.0.lnp +Turns the wired network interface power on or off. .El .Sh SEE ALSO .Xr acpi 4 , Modified: stable/7/sys/dev/acpi_support/acpi_sony.c ============================================================================== --- stable/7/sys/dev/acpi_support/acpi_sony.c Wed Mar 17 21:18:28 2010 (r205266) +++ stable/7/sys/dev/acpi_support/acpi_sony.c Wed Mar 17 21:19:30 2010 (r205267) @@ -40,14 +40,21 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("Sony") -#define ACPI_SONY_GET_BRIGHTNESS "GBRT" -#define ACPI_SONY_SET_BRIGHTNESS "SBRT" #define ACPI_SONY_GET_PID "GPID" /* * SNY5001 + * This is the ACPI handle for the "Sony Notebook Control" driver under + * Windows. + * It provides several methods within the ACPI namespace, including: * [GS]BRT [GS]PBR [GS]CTR [GS]PCR [GS]CMI [CDPW GCDP]? GWDP PWAK PWRN * + * SNY6001 + * This is the ACPI handle for the "Sony Programmable I/O" driver under + * Windows. + * It is not yet supported by this driver, but provides control over the + * power to the bluetooth, built-in camera and HSDPA modem devices in some + * laptops, and also allows some control of the fan speed. */ struct acpi_sony_softc { @@ -61,13 +68,16 @@ static struct acpi_sony_name_list char *comment; } acpi_sony_oids[] = { { "brightness", "GBRT", "SBRT", "Display Brightness"}, - { "ctr", "GCTR", "SCTR", "??"}, + { "brightness_default", "GPBR", "SPBR", "Default Display Brightness"}, + { "contrast", "GCTR", "SCTR", "Display Contrast"}, + { "bass_gain", "GMGB", "SMGB", "Multimedia Bass Gain"}, { "pcr", "GPCR", "SPCR", "???"}, #if 0 - { "cmi", "GCMI", "SCMI", "????"}, + { "cmi", "GCMI", "SCMI", "???"}, #endif - { "wdp", "GWDP", NULL, "?????"}, + { "wdp", "GWDP", NULL, "???"}, { "cdp", "GCDP", "CDPW", "CD Power"}, /*shares [\GL03]&0x8 flag*/ + { "lnp", "GLNP", "LNPW", "LAN Power"}, { NULL, NULL, NULL } }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 22:12:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26E4E106567C; Wed, 17 Mar 2010 22:12:13 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 167A48FC2A; Wed, 17 Mar 2010 22:12:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HMCCN7032078; Wed, 17 Mar 2010 22:12:12 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HMCCB1032076; Wed, 17 Mar 2010 22:12:12 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201003172212.o2HMCCB1032076@svn.freebsd.org> From: Qing Li Date: Wed, 17 Mar 2010 22:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205268 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 22:12:13 -0000 Author: qingli Date: Wed Mar 17 22:12:12 2010 New Revision: 205268 URL: http://svn.freebsd.org/changeset/base/205268 Log: Set the device capabilities to include dynamic link-state for those modern drivers. Reviewed by: imp (and suggested by imp) MFC after: 3 days Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Mar 17 21:19:30 2010 (r205267) +++ head/sys/dev/mii/mii.c Wed Mar 17 22:12:12 2010 (r205268) @@ -173,6 +173,8 @@ miibus_attach(device_t dev) * XXX: EVIL HACK! */ mii->mii_ifp = *(struct ifnet**)device_get_softc(device_get_parent(dev)); + mii->mii_ifp->if_capabilities |= IFCAP_LINKSTATE; + mii->mii_ifp->if_capenable |= IFCAP_LINKSTATE; ivars = device_get_ivars(dev); ifmedia_init(&mii->mii_media, IFM_IMASK, ivars->ifmedia_upd, ivars->ifmedia_sts); From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 22:45:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E57F106564A; Wed, 17 Mar 2010 22:45:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3B08FC0A; Wed, 17 Mar 2010 22:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HMj92H039419; Wed, 17 Mar 2010 22:45:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HMj9Nr039416; Wed, 17 Mar 2010 22:45:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003172245.o2HMj9Nr039416@svn.freebsd.org> From: Marius Strobl Date: Wed, 17 Mar 2010 22:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205269 - in head/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 22:45:09 -0000 Author: marius Date: Wed Mar 17 22:45:09 2010 New Revision: 205269 URL: http://svn.freebsd.org/changeset/base/205269 Log: o Add support for UltraSparc-IV+: - Swap the configuration of the first and second large dTLB as with US-IV+ these can only hold entries of certain page sizes each, which we happened to chose the non-working way around. - Additionally ensure that the large iTLB is set up to hold 8k pages (currently this happens to be a NOP though). - Add a workaround for US-IV+ erratum #2. - Turn off dTLB parity error reporting as otherwise we get seemingly false positives when copying in the user window by simulating a fill trap on return to usermode. Given that these parity errors can be avoided by disabling multi issue mode and the problem could be reproduced with a second machine this appears to be a silicon bug of some sort. - Add a membar #Sync also before the stores to ASI_DCACHE_TAG. While at it, turn of interrupts across the whole cheetah_cache_flush() for simplicity instead of around every flush. This should have next to no impact as for cheetah-class machines we typically only need to flush the caches a few times during boot when recovering from peeking/poking non-existent PCI devices, if at all. - Just use KERNBASE for FLUSH as we also do elsewhere as the US-IV+ documentation doesn't seem to mention that these CPUs also ignore the address like previous cheetah-class CPUs do. Again the code changing LSU_IC is executed seldom enough that the negligible optimization of using %g0 instead should have no real impact. With these changes FreeBSD runs stable on V890 equipped with US-IV+ and -j128 buildworlds in a loop for days are no problem. Unfortunately, the performance isn't were it should be as a buildworld on a 4x1.5GHz US-IV+ V890 takes nearly 3h while on a V440 with (theoretically) less powerfull 4x1.5GHz US-IIIi it takes just over 1h. It's unclear whether this is related to the supposed silicon bug mentioned above or due to another issue. The documentation (which contains a sever bug in the description of the bits added to the context registers though) at least doesn't mention any requirements for changes in the CPU handling besides those implemented and the cache as well as the TLB configurations and handling look fine. o Re-arrange cheetah_init() so it's easier to add support for SPARC64 V up to VIIIfx CPUs, which only require parts of this initialization. Modified: head/sys/sparc64/include/dcr.h head/sys/sparc64/sparc64/cheetah.c Modified: head/sys/sparc64/include/dcr.h ============================================================================== --- head/sys/sparc64/include/dcr.h Wed Mar 17 22:12:12 2010 (r205268) +++ head/sys/sparc64/include/dcr.h Wed Mar 17 22:45:09 2010 (r205269) @@ -57,6 +57,10 @@ #define DCR_BPM_BITS 2 #define DCR_BPM_MASK \ (((1UL << DCR_BPM_BITS) - 1) << DCR_BPM_SHIFT) +#define DCR_BPM_1HIST_GSHARE (0UL << DCR_BPM_SHIFT) +#define DCR_BPM_2HIST_GSHARE (1UL << DCR_BPM_SHIFT) +#define DCR_BPM_PC (2UL << DCR_BPM_SHIFT) +#define DCR_BPM_2HIST_MIXED (3UL << DCR_BPM_SHIFT) #define DCR_JPE (1UL << 15) #define DCR_ITPE (1UL << 16) Modified: head/sys/sparc64/sparc64/cheetah.c ============================================================================== --- head/sys/sparc64/sparc64/cheetah.c Wed Mar 17 22:12:12 2010 (r205268) +++ head/sys/sparc64/sparc64/cheetah.c Wed Mar 17 22:45:09 2010 (r205269) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003 Jake Burkholder. - * Copyright (c) 2005, 2008 Marius Strobl + * Copyright (c) 2005, 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,9 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* A FLUSH is required after changing LSU_IC (the address is ignored). */ -#define CHEETAH_FLUSH_LSU_IC() __asm __volatile("flush %%g0" : :) - #define CHEETAH_ICACHE_TAG_LOWER 0x30 /* @@ -60,6 +57,7 @@ __FBSDID("$FreeBSD$"); void cheetah_init(u_int cpu_impl) { + u_long val; register_t s; /* @@ -68,14 +66,6 @@ cheetah_init(u_int cpu_impl) */ s = intr_disable(); - /* - * Ensure DCR_IFPOE is disabled as long as we haven't implemented - * support for it (if ever) as most if not all firmware versions - * apparently turn it on. Not making use of DCR_IFPOE should also - * avoid Cheetah erratum #109. - */ - wr(asr18, rd(asr18) & ~DCR_IFPOE, 0); - /* Ensure the TSB Extension Registers hold 0 as TSB_Base. */ stxa(AA_DMMU_TSB_PEXT_REG, ASI_DMMU, 0); @@ -93,25 +83,58 @@ cheetah_init(u_int cpu_impl) membar(Sync); /* - * Ensure that the dt512_0 is set to hold 8k pages for all three - * contexts and configure the dt512_1 to hold 4MB pages for them - * (e.g. for direct mappings). - * NB: according to documentation, this requires a contex demap - * _before_ changing the corresponding page size, but we hardly - * can flush our locked pages here, so we use a demap all instead. + * Configure the first large dTLB to hold 4MB pages (e.g. for direct + * mappings) for all three contexts and ensure the second one is set + * up to hold 8k pages for them. Note that this is constraint by + * US-IV+, whose large dTLBs can only hold entries of certain page + * sizes each. + * For US-IV+, additionally ensure that the large iTLB is set up to + * hold 8k pages for nucleus and primary context (still no secondary + * iMMU context. + * NB: according to documentation, changing the page size of the same + * context requires a context demap before changing the corresponding + * page size, but we hardly can flush our locked pages here, so we use + * a demap all instead. */ stxa(TLB_DEMAP_ALL, ASI_DMMU_DEMAP, 0); membar(Sync); - stxa(AA_DMMU_PCXR, ASI_DMMU, - (TS_8K << TLB_PCXR_N_PGSZ0_SHIFT) | - (TS_4M << TLB_PCXR_N_PGSZ1_SHIFT) | - (TS_8K << TLB_PCXR_P_PGSZ0_SHIFT) | - (TS_4M << TLB_PCXR_P_PGSZ1_SHIFT)); - stxa(AA_DMMU_SCXR, ASI_DMMU, - (TS_8K << TLB_SCXR_S_PGSZ0_SHIFT) | - (TS_4M << TLB_SCXR_S_PGSZ1_SHIFT)); + val = (TS_4M << TLB_PCXR_N_PGSZ0_SHIFT) | + (TS_8K << TLB_PCXR_N_PGSZ1_SHIFT) | + (TS_4M << TLB_PCXR_P_PGSZ0_SHIFT) | + (TS_8K << TLB_PCXR_P_PGSZ1_SHIFT); + if (cpu_impl == CPU_IMPL_ULTRASPARCIVp) + val |= (TS_8K << TLB_PCXR_N_PGSZ_I_SHIFT) | + (TS_8K << TLB_PCXR_P_PGSZ_I_SHIFT); + stxa(AA_DMMU_PCXR, ASI_DMMU, val); + val = (TS_4M << TLB_SCXR_S_PGSZ0_SHIFT) | + (TS_8K << TLB_SCXR_S_PGSZ1_SHIFT); + stxa(AA_DMMU_SCXR, ASI_DMMU, val); flush(KERNBASE); + /* + * Ensure DCR_IFPOE is disabled as long as we haven't implemented + * support for it (if ever) as most if not all firmware versions + * apparently turn it on. Not making use of DCR_IFPOE should also + * avoid Cheetah erratum #109. + */ + val = rd(asr18) & ~DCR_IFPOE; + if (cpu_impl == CPU_IMPL_ULTRASPARCIVp) { + /* + * Ensure the branch prediction mode is set to PC indexing + * in order to work around US-IV+ erratum #2. + */ + val = (val & ~DCR_BPM_MASK) | DCR_BPM_PC; + /* + * XXX disable dTLB parity error reporting as otherwise we + * get seemingly false positives when copying in the user + * window by simulating a fill trap on return to usermode in + * case single issue is disabled, which thus appears to be + * a CPU bug. + */ + val &= ~DCR_DTPE; + } + wr(asr18, val, 0); + intr_restore(s); } @@ -125,11 +148,11 @@ cheetah_cache_enable(u_int cpu_impl) lsu = ldxa(0, ASI_LSU_CTL_REG); if (cpu_impl == CPU_IMPL_ULTRASPARCIII) { - /* Disable P$ due to Cheetah erratum #18. */ + /* Disable P$ due to US-III erratum #18. */ lsu &= ~LSU_PE; } stxa(0, ASI_LSU_CTL_REG, lsu | LSU_IC | LSU_DC); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); } /* @@ -139,21 +162,35 @@ void cheetah_cache_flush(void) { u_long addr, lsu; + register_t s; + s = intr_disable(); for (addr = 0; addr < PCPU_GET(cache.dc_size); addr += PCPU_GET(cache.dc_linesize)) - stxa_sync(addr, ASI_DCACHE_TAG, 0); + /* + * Note that US-IV+ additionally require a membar #Sync before + * a load or store to ASI_DCACHE_TAG. + */ + __asm __volatile( + "membar #Sync;" + "stxa %%g0, [%0] %1;" + "membar #Sync" + : : "r" (addr), "n" (ASI_DCACHE_TAG)); /* The I$ must be disabled when flushing it so ensure it's off. */ lsu = ldxa(0, ASI_LSU_CTL_REG); stxa(0, ASI_LSU_CTL_REG, lsu & ~(LSU_IC)); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); for (addr = CHEETAH_ICACHE_TAG_LOWER; addr < PCPU_GET(cache.ic_size) * 2; addr += PCPU_GET(cache.ic_linesize) * 2) - stxa_sync(addr, ASI_ICACHE_TAG, 0); + __asm __volatile( + "stxa %%g0, [%0] %1;" + "membar #Sync" + : : "r" (addr), "n" (ASI_ICACHE_TAG)); stxa(0, ASI_LSU_CTL_REG, lsu); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); + intr_restore(s); } /* @@ -165,9 +202,11 @@ cheetah_dcache_page_inval(vm_paddr_t spa vm_paddr_t pa; void *cookie; - KASSERT((spa & PAGE_MASK) == 0, ("%s: pa not page aligned", __func__)); + KASSERT((spa & PAGE_MASK) == 0, + ("%s: pa not page aligned", __func__)); cookie = ipi_dcache_page_inval(tl_ipi_cheetah_dcache_page_inval, spa); - for (pa = spa; pa < spa + PAGE_SIZE; pa += PCPU_GET(cache.dc_linesize)) + for (pa = spa; pa < spa + PAGE_SIZE; + pa += PCPU_GET(cache.dc_linesize)) stxa_sync(pa, ASI_DCACHE_INVALIDATE, 0); ipi_wait(cookie); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 22:45:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 343601065675; Wed, 17 Mar 2010 22:45:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23F768FC15; Wed, 17 Mar 2010 22:45:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HMjs5B039615; Wed, 17 Mar 2010 22:45:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HMjsoD039613; Wed, 17 Mar 2010 22:45:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003172245.o2HMjsoD039613@svn.freebsd.org> From: Warner Losh Date: Wed, 17 Mar 2010 22:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205270 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 22:45:54 -0000 Author: imp Date: Wed Mar 17 22:45:53 2010 New Revision: 205270 URL: http://svn.freebsd.org/changeset/base/205270 Log: Remove two instances of the evil hack to get the ifnet. mii_ifp is set early enough that we don't need to do these hacks anymore. Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Mar 17 22:45:09 2010 (r205269) +++ head/sys/dev/mii/mii.c Wed Mar 17 22:45:53 2010 (r205270) @@ -259,13 +259,7 @@ miibus_statchg(device_t dev) MIIBUS_STATCHG(parent); mii = device_get_softc(dev); - - /* - * Note that each NIC's softc must start with an ifnet pointer. - * XXX: EVIL HACK! - */ - ifp = *(struct ifnet **)device_get_softc(parent); - ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); + mii->mii_ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); return; } @@ -288,11 +282,7 @@ miibus_linkchg(device_t dev) link_state = LINK_STATE_DOWN; } else link_state = LINK_STATE_UNKNOWN; - /* - * Note that each NIC's softc must start with an ifnet pointer. - * XXX: EVIL HACK! - */ - if_link_state_change(*(struct ifnet**)device_get_softc(parent), link_state); + if_link_state_change(mii->mii_ifp, link_state); } static void From owner-svn-src-all@FreeBSD.ORG Wed Mar 17 22:57:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769E4106566B; Wed, 17 Mar 2010 22:57:58 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A6138FC13; Wed, 17 Mar 2010 22:57:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2HMvw6m042278; Wed, 17 Mar 2010 22:57:58 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2HMvwiZ042273; Wed, 17 Mar 2010 22:57:58 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003172257.o2HMvwiZ042273@svn.freebsd.org> From: Juli Mallett Date: Wed, 17 Mar 2010 22:57:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205271 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 17 Mar 2010 22:57:58 -0000 Author: jmallett Date: Wed Mar 17 22:57:58 2010 New Revision: 205271 URL: http://svn.freebsd.org/changeset/base/205271 Log: o) Add a keyword to displaying elapsed time in integer seconds, "etimes". o) Give slightly better (i.e. any) documentation of the format of "etime". Reviewed by: jilles Modified: head/bin/ps/extern.h head/bin/ps/keyword.c head/bin/ps/print.c head/bin/ps/ps.1 Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Wed Mar 17 22:45:53 2010 (r205270) +++ head/bin/ps/extern.h Wed Mar 17 22:57:58 2010 (r205271) @@ -48,6 +48,7 @@ void command(KINFO *, VARENT *); void cputime(KINFO *, VARENT *); int donlist(void); void elapsed(KINFO *, VARENT *); +void elapseds(KINFO *, VARENT *); void emulname(KINFO *, VARENT *); VARENT *find_varentry(VAR *); const char *fmt_argv(char **, char *, size_t); Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Wed Mar 17 22:45:53 2010 (r205270) +++ head/bin/ps/keyword.c Wed Mar 17 22:57:58 2010 (r205271) @@ -89,6 +89,7 @@ static VAR var[] = { {"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR, NULL, 0}, {"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0}, + {"etimes", "ELAPSED", NULL, USER, elapseds, NULL, 12, 0, CHAR, NULL, 0}, {"f", "F", NULL, 0, kvar, NULL, 7, KOFF(ki_flag), INT, "x", 0}, {"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Wed Mar 17 22:45:53 2010 (r205270) +++ head/bin/ps/print.c Wed Mar 17 22:57:58 2010 (r205271) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -618,6 +619,21 @@ elapsed(KINFO *k, VARENT *ve) (void)printf("%*s", v->width, obuff); } +void +elapseds(KINFO *k, VARENT *ve) +{ + VAR *v; + time_t val; + + v = ve->var; + if (!k->ki_valid) { + (void)printf("%-*s", v->width, "-"); + return; + } + val = now - k->ki_p->ki_start.tv_sec; + (void)printf("%*jd", v->width, (intmax_t)val); +} + double getpcpu(const KINFO *k) { Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Wed Mar 17 22:45:53 2010 (r205270) +++ head/bin/ps/ps.1 Wed Mar 17 22:57:58 2010 (r205271) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 5, 2010 +.Dd March 17, 2010 .Dt PS 1 .Os .Sh NAME @@ -479,7 +479,12 @@ command and arguments .It Cm cpu short-term CPU usage factor (for scheduling) .It Cm etime -elapsed running time +elapsed running time, format +.Op days- Ns +.Op hours: Ns +minutes:seconds. +.It Cm etimes +elapsed running time, in decimal integer seconds .It Cm flags the process flags, in hexadecimal (alias .Cm f ) From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 00:23:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D25B106566B; Thu, 18 Mar 2010 00:23:39 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C9AB8FC16; Thu, 18 Mar 2010 00:23:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2I0Ndef061117; Thu, 18 Mar 2010 00:23:39 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2I0NdKt061115; Thu, 18 Mar 2010 00:23:39 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201003180023.o2I0NdKt061115@svn.freebsd.org> From: Qing Li Date: Thu, 18 Mar 2010 00:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205272 - head/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 00:23:39 -0000 Author: qingli Date: Thu Mar 18 00:23:39 2010 New Revision: 205272 URL: http://svn.freebsd.org/changeset/base/205272 Log: Need to set the proper flag bit when inserting ARP entries into the kernel. MFC after: 3 days Modified: head/usr.sbin/ppp/arp.c Modified: head/usr.sbin/ppp/arp.c ============================================================================== --- head/usr.sbin/ppp/arp.c Wed Mar 17 22:57:58 2010 (r205271) +++ head/usr.sbin/ppp/arp.c Thu Mar 18 00:23:39 2010 (r205272) @@ -119,7 +119,7 @@ arp_ProxySub(struct bundle *bundle, stru return 0; } arpmsg.hdr.rtm_type = add ? RTM_ADD : RTM_DELETE; - arpmsg.hdr.rtm_flags = RTF_ANNOUNCE | RTF_HOST | RTF_STATIC; + arpmsg.hdr.rtm_flags = RTF_ANNOUNCE | RTF_HOST | RTF_STATIC | RTF_LLDATA; arpmsg.hdr.rtm_version = RTM_VERSION; arpmsg.hdr.rtm_seq = ++bundle->routing_seq; arpmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY; From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 00:27:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DC771065670; Thu, 18 Mar 2010 00:27:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D1F38FC0A; Thu, 18 Mar 2010 00:27:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2I0RICw061988; Thu, 18 Mar 2010 00:27:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2I0RHEu061985; Thu, 18 Mar 2010 00:27:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003180027.o2I0RHEu061985@svn.freebsd.org> From: Xin LI Date: Thu, 18 Mar 2010 00:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205273 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 00:27:18 -0000 Author: delphij Date: Thu Mar 18 00:27:17 2010 New Revision: 205273 URL: http://svn.freebsd.org/changeset/base/205273 Log: Remove two pieces of code (one disabled in revision 39665 and another derived from the first one) that is not used for the last 12 years. Modified: head/lib/libstand/bzipfs.c head/lib/libstand/gzipfs.c Modified: head/lib/libstand/bzipfs.c ============================================================================== --- head/lib/libstand/bzipfs.c Thu Mar 18 00:23:39 2010 (r205272) +++ head/lib/libstand/bzipfs.c Thu Mar 18 00:27:17 2010 (r205273) @@ -81,14 +81,6 @@ struct fs_ops bzipfs_fsops = { }; #endif -#if 0 -void * -calloc(int items, size_t size) -{ - return(malloc(items * size)); -} -#endif - static int bzf_fill(struct bz_file *bzf) { Modified: head/lib/libstand/gzipfs.c ============================================================================== --- head/lib/libstand/gzipfs.c Thu Mar 18 00:23:39 2010 (r205272) +++ head/lib/libstand/gzipfs.c Thu Mar 18 00:27:17 2010 (r205273) @@ -62,14 +62,6 @@ struct fs_ops gzipfs_fsops = { null_readdir }; -#if 0 -void * -calloc(int items, size_t size) -{ - return(malloc(items * size)); -} -#endif - static int zf_fill(struct z_file *zf) { From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 07:28:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20599106566C; Thu, 18 Mar 2010 07:28:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03DEE8FC23; Thu, 18 Mar 2010 07:28:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2I7S2Ec054758; Thu, 18 Mar 2010 07:28:02 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2I7S2wv054756; Thu, 18 Mar 2010 07:28:02 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003180728.o2I7S2wv054756@svn.freebsd.org> From: Hiroki Sato Date: Thu, 18 Mar 2010 07:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205274 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 07:28:03 -0000 Author: hrs Date: Thu Mar 18 07:28:02 2010 New Revision: 205274 URL: http://svn.freebsd.org/changeset/base/205274 Log: Update relnotes for 7.3R (first round): ddb(8) pager support for show_geom*, deadlock involving malloc(3) and fork(2) fixed, gptzfsboot added, zfsboot # of fd increased, hwpmc added, s/k8temp/amdtemp/, pci(4) improvement, bge(4) panic on shutdown fixed, cxgb upgraded, fxp(4)+TSO IP length issue fixed, nfe(4) improved, nge(4) improved, net.inet.ip.fw.default_to_accept added, NFS client negative pathname lookup cache added, vfs.flushbufqtarget added, Bluetooth(3) HCI API support, btpand(8) -d device name support, chflags(1) -h bugfix, cpuset -x option, dhclient NUL-terminated text bugfix, fdisk(8) size qualifiers support, fetch(1) *_TIMEOUT and HTTPS parameters bugfix, find(1) -L + -delete bugfix, ktrace(1) new record for sysctl, fdopendir(3) added, feature_present(3) added, man(1) UTF-8 support, mergemaster now passes -L to mtree(8), newfs_msdos(8) non-CHS media support, pkill now ignores itself and ancestors, -a option added, ps -p option added, pwd_mkdb -C now checks MAXLOGNAME, rtld(1) LD_ELF_HINTS_PATH support, sysinstall(8) comma-separated list of interfaces in netDev, tzdata2009i, sendmail 8.14.4, and pkg_info(1) segfault fix. Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Mar 18 00:27:17 2010 (r205273) +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Mar 18 07:28:02 2010 (r205274) @@ -115,23 +115,95 @@ Security Advisories - + Problems described in the following security advisories have + been fixed. For more information, consult the individual + advisories available from + . + + Kernel Changes - + The &man.ddb.8; subcommands for &man.geom.8; now supports + pagination. + + &os; Linux emulation layer now supports robust futex, and + futex has been reimplemented by using &man.sx.9; lock. + Initial support of &man.ktr.4; tracing has also been + added. + + A lock handling error has been fixed in interaction + between &man.malloc.3; implementation and threading library. + When a multi-threaded process calls the &man.fork.2; system + call in a thread and the &man.malloc.3; function in another + thread, it caused a deadlock in the child process. Boot Loader Changes - + A new boot loader gptzfsboot, which + support GPT and ZFS has been added. + + The boot loader zfsboot now supports + more than sevevn drives in the ZFS pools. Hardware Support + The &man.hwpmc.4; driver for Hardware + Performance Monitoring Counter support has been added. This + consists of the kernel driver, &man.pmc.3; interface + library, and userland utilities &man.pmcannotate.8;, + pmccontrol.8;, and &man.pmcstat.8;, and allows applications + to use hardware performance counters to gather performance + data about specific processes or for the system as a + whole. + + The &man.k8temp.4; driver has been renamed with + &man.amdtemp.4;. The new driver supports AMD K10 and K11 as + well as K8. + + The &man.pci.4; subsystem now supports proxying of PCI + Express MSI/MSI-X (Message Signaled Interrupt) requests and + bus interrupt requests for child devices. This allows child + devices to use MSI/MSI-X interrupts. + + PCI Express memory-mapped configuration space access, + ACPI MCFG table support, and BAR (Base Address Register) + handling in the &man.pci.4; subsystem has been improved. + This is disabled by default and can be enabled by setting a + loader tunable hw.pci.mcfg to + 1. This value can be queried via a + sysctl variable of the same name. + Multimedia Support @@ -141,16 +213,46 @@ Network Interface Support - - + A bug in the &man.bge.4; driver has been fixed. It + caused a panic when a lot of traffic is being handled on + the interface while the system is shutting down. + + The &man.cxgb.4; driver has been upgraded to the + latest version. The firmware version is 7.1.0. + + A bug in the &man.fxp.4; driver has been fixed. It + caused incorrect IP packet length in the header when TSO + (TCP segmentation offloading) is enabled. + + A bug in the &man.nfe.4; driver has been fixed. It + caused buffer allocation failure for jumbo frames. + + The &man.nge.4; driver has been improved and now works + on all supported platforms. It now supports &man.altq.4;, + hardware checksum offloading for &man.vlan.4; tagged + frames, WoL (Wake-on-Lan), jumbo frames, and PCI MWI + (Memory Write and Invalidate) commands. Hardware MAC + statistics can be obtained via a new sysctl variable + dev.nge.N.stats. + Another new sysctl variable + dev.nge.N.int_holdoff + has been added to control interrupt moderation. The valid + ranges are 1 (100us) to + 255, and the actual delivery of + interrupt would be delayed based on this value. The + default is 1. Network Protocols - - + A kernel option + IPFW_DEFAULT_TO_ACCEPT has been replaced + with a new loader tunable + net.inet.ip.fw.default_to_accept. The + value can be queried via a sysctl variable of the same + name. @@ -163,6 +265,21 @@ File Systems + &os; Network File System now supports caching of + negative pathname lookup in the NFS client, and uses 3 + seconds timeout (30 seconds in the prior releases) for + caching attributes of a directory in the client. + + A new sysctl variable for the &man.VFS.9; subsystem + vfs.flushbufqtarget has been added. This + fixes issues in bufdaemon, a kernel + process responsible for flushing dirty buffers, which can + cause the process to deadlock in a certain workload. The + value of the variable determines the number of buffers will + be flushed before allocating a new buffer. The default + value of the variable is -1 + (disabled). + ZFS has been updated from version 6 to version 13. This update includes numerous new ZFS features, such as permitting non-root users to perform @@ -178,7 +295,98 @@ Userland Changes - + The &man.bluetooth.3; library now supports Bluetooth HCI + API. + + The &man.btpand.8; daemon now supports Bluetooth device + node names in a option. + + A bug in the &man.chflags.1; option + has been fixed. It used link target's flags as the original + one. + + The &man.cpuset.1; command now supports interrupt binding + by a new option . + + A bug in the &man.dhclient.8; utility when appending a + NUL-terminated text provided by a DHCP server, has been + fixed. + + The &man.fdisk.8; utility now supports size qualifiers (K, + M, and G) and * for automatic calculation + in the p command. + + A bug in the &man.fetch.1; command that + FTP_TIMEOUT and + HTTP_TIMEOUT environment variables were + ignored, has been fixed. + + A bug in the &man.fetch.1; command that default parameters + such as connection timeout were not set for HTTPS protocol, + has been fixed. It now uses the same parameters as + HTTP. + + A bug in the &man.find.1; command has been fixed. It + ignored an option when + is specified. + The following command can be safely used to remove broken links: + + find -L . -type l -print0 | xargs rm -0 + + The &man.ktrace.1; utility now supports a new + KTRACE record for &man.sysctl.3; + invocations. + + &os; libc library now includes + &man.fdopendir.3; function. + + &os; libc library now includes + &man.feature.present.3; function which checks to see if a + named kernel feature is present by checking the + kern.features sysctl MIB. + + The &man.man.1; command now supports manual pages in UTF-8. + + The &man.mergemaster.8; utility now uses an + option when it invokes &man.mtree.8; + command to follow symbolic links. + + The &man.newfs.msdos.8; command now supports media which + have no CHS parameter. + + The &man.pkill.1; command now ignores itself and the + ancestors when finding processes. An + option has been added for backward compatible behavior. + + The &man.ps.1; command now supports a new flag + . This displays descendant info with the + output similar to Linux's (or + ). + + The &man.pwd.mkdb.8; now verifies login name length is + shorter than MAXLOGNAME when a + option is specified. Note that entries + with oversized login names are still allowed in the passwd + database, and getpwent*() and + getpwuid*() functions return them + correctly. The getpwnam*() truncates + them to MAXLOGNAME - 1 when reading the + database. The &man.su.1; utility fails for the long + names. + + The &os; runtime linker, &man.rtld.1; now supports a new + environment variable LD_ELF_HINTS_PATH for + overriding the rtld hints file. This feature gives a + convenient way of using a custom set of shared library that is + not located in the default location and switch back. This + environment variable is automatically unset if the process is + tainted with setuid/setgid. + + The &man.sysinstall.8; utility now supports a + comma-separated list of network interfaces in + netDev option in + install.cfg. <filename>/etc/rc.d</filename> Scripts @@ -192,13 +400,17 @@ sendmail has been updated from version 8.14.3 to version 8.14.4. + + The timezone database has been updated + to the tzdata2009i release. Ports/Packages Collection Infrastructure - - + A bug in the &man.pkg.info.1; command which caused a + segmentation fault when an invalid long option is specified, + has been fixed. From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 07:35:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99B2B106566C; Thu, 18 Mar 2010 07:35:20 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE4F8FC15; Thu, 18 Mar 2010 07:35:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2I7ZKse056375; Thu, 18 Mar 2010 07:35:20 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2I7ZK6O056373; Thu, 18 Mar 2010 07:35:20 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003180735.o2I7ZK6O056373@svn.freebsd.org> From: Ed Schouten Date: Thu, 18 Mar 2010 07:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205275 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 07:35:20 -0000 Author: ed Date: Thu Mar 18 07:35:20 2010 New Revision: 205275 URL: http://svn.freebsd.org/changeset/base/205275 Log: Remove an unneeded variable. Reported by: tinderbox Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Thu Mar 18 07:28:02 2010 (r205274) +++ head/sys/dev/mii/mii.c Thu Mar 18 07:35:20 2010 (r205275) @@ -253,7 +253,6 @@ miibus_statchg(device_t dev) { device_t parent; struct mii_data *mii; - struct ifnet *ifp; parent = device_get_parent(dev); MIIBUS_STATCHG(parent); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 09:10:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24A96106566C; Thu, 18 Mar 2010 09:10:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 133B38FC08; Thu, 18 Mar 2010 09:10:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2I99xw3077242; Thu, 18 Mar 2010 09:09:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2I99xGO077240; Thu, 18 Mar 2010 09:09:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003180909.o2I99xGO077240@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 18 Mar 2010 09:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205276 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 09:10:00 -0000 Author: bz Date: Thu Mar 18 09:09:59 2010 New Revision: 205276 URL: http://svn.freebsd.org/changeset/base/205276 Log: Add ddb support to the "new" link layer code ("new-arp"): - show all lltables [1] (optional flag to also show the llentries as well) - show lltable - show llentry MFC after: 6 days Modified: head/sys/net/if_llatbl.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Thu Mar 18 07:35:20 2010 (r205275) +++ head/sys/net/if_llatbl.c Thu Mar 18 09:09:59 2010 (r205276) @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -42,6 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DDB +#include +#endif + #include #include @@ -382,3 +387,134 @@ vnet_lltable_init() VNET_SYSINIT(vnet_lltable_init, SI_SUB_PSEUDO, SI_ORDER_FIRST, vnet_lltable_init, NULL); +#ifdef DDB +struct llentry_sa { + struct llentry base; + struct sockaddr l3_addr; +}; + +static void +llatbl_lle_show(struct llentry_sa *la) +{ + struct llentry *lle; + uint8_t octet[6]; + + lle = &la->base; + db_printf("lle=%p\n", lle); + db_printf(" lle_next=%p\n", lle->lle_next.le_next); + db_printf(" lle_lock=%p\n", &lle->lle_lock); + db_printf(" lle_tbl=%p\n", lle->lle_tbl); + db_printf(" lle_head=%p\n", lle->lle_head); + db_printf(" la_hold=%p\n", lle->la_hold); + db_printf(" la_expire=%ju\n", (uintmax_t)lle->la_expire); + db_printf(" la_flags=0x%04x\n", lle->la_flags); + db_printf(" la_asked=%u\n", lle->la_asked); + db_printf(" la_preempt=%u\n", lle->la_preempt); + db_printf(" ln_byhint=%u\n", lle->ln_byhint); + db_printf(" ln_state=%d\n", lle->ln_state); + db_printf(" ln_router=%u\n", lle->ln_router); + db_printf(" ln_ntick=%ju\n", (uintmax_t)lle->ln_ntick); + db_printf(" lle_refcnt=%d\n", lle->lle_refcnt); + bcopy(&lle->ll_addr.mac16, octet, sizeof(octet)); + db_printf(" ll_addr=%02x:%02x:%02x:%02x:%02x:%02x\n", + octet[0], octet[1], octet[2], octet[3], octet[4], octet[5]); + db_printf(" la_timer=%p\n", &lle->la_timer); + + switch (la->l3_addr.sa_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin; + char l3s[INET_ADDRSTRLEN]; + + sin = (struct sockaddr_in *)&la->l3_addr; + inet_ntoa_r(sin->sin_addr, l3s); + db_printf(" l3_addr=%s\n", l3s); + break; + } +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6; + char l3s[INET6_ADDRSTRLEN]; + + sin6 = (struct sockaddr_in6 *)&la->l3_addr; + ip6_sprintf(l3s, &sin6->sin6_addr); + db_printf(" l3_addr=%s\n", l3s); + break; + } +#endif + default: + db_printf(" l3_addr=N/A (af=%d)\n", la->l3_addr.sa_family); + break; + } +} + +DB_SHOW_COMMAND(llentry, db_show_llentry) +{ + + if (!have_addr) { + db_printf("usage: show llentry \n"); + return; + } + + llatbl_lle_show((struct llentry_sa *)addr); +} + +static void +llatbl_llt_show(struct lltable *llt) +{ + int i; + struct llentry *lle; + + db_printf("llt=%p llt_af=%d llt_ifp=%p\n", + llt, llt->llt_af, llt->llt_ifp); + + for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) { + LIST_FOREACH(lle, &llt->lle_head[i], lle_next) { + + llatbl_lle_show((struct llentry_sa *)lle); + if (db_pager_quit) + return; + } + } +} + +DB_SHOW_COMMAND(lltable, db_show_lltable) +{ + + if (!have_addr) { + db_printf("usage: show lltable \n"); + return; + } + + llatbl_llt_show((struct lltable *)addr); +} + +DB_SHOW_ALL_COMMAND(lltables, db_show_all_lltables) +{ + VNET_ITERATOR_DECL(vnet_iter); + struct lltable *llt; + + VNET_FOREACH(vnet_iter) { + CURVNET_SET_QUIET(vnet_iter); +#ifdef VIMAGE + db_printf("vnet=%p\n", curvnet); +#endif + SLIST_FOREACH(llt, &V_lltables, llt_link) { + db_printf("llt=%p llt_af=%d llt_ifp=%p(%s)\n", + llt, llt->llt_af, llt->llt_ifp, + (llt->llt_ifp != NULL) ? + llt->llt_ifp->if_xname : "?"); + if (have_addr && addr != 0) /* verbose */ + llatbl_llt_show(llt); + if (db_pager_quit) { + CURVNET_RESTORE(); + return; + } + } + CURVNET_RESTORE(); + } +} +#endif From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 09:35:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0CCF106564A; Thu, 18 Mar 2010 09:35:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 55A0B8FC19; Thu, 18 Mar 2010 09:35:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id CD61A41C712; Thu, 18 Mar 2010 10:35:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id l6PCXk+0wifL; Thu, 18 Mar 2010 10:35:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 5FEFD41C707; Thu, 18 Mar 2010 10:35:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id F18AA4448EC; Thu, 18 Mar 2010 09:32:13 +0000 (UTC) Date: Thu, 18 Mar 2010 09:32:13 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Kip Macy In-Reply-To: <201003172118.o2HLIS4X020099@svn.freebsd.org> Message-ID: <20100318092936.J33454@maildrop.int.zabbadoz.net> References: <201003172118.o2HLIS4X020099@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205266 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 09:35:07 -0000 On Wed, 17 Mar 2010, Kip Macy wrote: > Author: kmacy > Date: Wed Mar 17 21:18:28 2010 > New Revision: 205266 > URL: http://svn.freebsd.org/changeset/base/205266 > > Log: > Cache line align various structures and move volatile counters to > not share a cache line with (mostly) immutable state > > Reviewed by: jeff@ > MFC after: 7 days I think that this would require a rebuild of some user space parts query uma statistics and in general, though we try to hide everything with accessor functions, there might be modules directly accessing uma_zone_t * fileds. I think this at least needs an entry in UPDATING, if not a __FreeBSD_version bump. > Modified: > head/sys/vm/uma_int.h > > Modified: head/sys/vm/uma_int.h > ============================================================================== > --- head/sys/vm/uma_int.h Wed Mar 17 21:11:48 2010 (r205265) > +++ head/sys/vm/uma_int.h Wed Mar 17 21:18:28 2010 (r205266) > @@ -160,6 +160,11 @@ struct uma_hash { > }; > > /* > + * align field or structure to cache line > + */ > +#define UMA_ALIGN __aligned(CACHE_LINE_SIZE) > + > +/* > * Structures for per cpu queues. > */ > > @@ -168,7 +173,7 @@ struct uma_bucket { > int16_t ub_cnt; /* Count of free items. */ > int16_t ub_entries; /* Max items. */ > void *ub_bucket[]; /* actual allocation storage */ > -}; > +} UMA_ALIGN; > > typedef struct uma_bucket * uma_bucket_t; > > @@ -177,7 +182,7 @@ struct uma_cache { > uma_bucket_t uc_allocbucket; /* Bucket to allocate from */ > u_int64_t uc_allocs; /* Count of allocations */ > u_int64_t uc_frees; /* Count of frees */ > -}; > +} UMA_ALIGN; > > typedef struct uma_cache * uma_cache_t; > > @@ -312,11 +317,12 @@ struct uma_zone { > uma_init uz_init; /* Initializer for each item */ > uma_fini uz_fini; /* Discards memory */ > > - u_int64_t uz_allocs; /* Total number of allocations */ > - u_int64_t uz_frees; /* Total number of frees */ > - u_int64_t uz_fails; /* Total number of alloc failures */ > u_int32_t uz_flags; /* Flags inherited from kegs */ > u_int32_t uz_size; /* Size inherited from kegs */ > + > + u_int64_t uz_allocs UMA_ALIGN; /* Total number of allocations */ > + u_int64_t uz_frees; /* Total number of frees */ > + u_int64_t uz_fails; /* Total number of alloc failures */ > uint16_t uz_fills; /* Outstanding bucket fills */ > uint16_t uz_count; /* Highest value ub_ptr can have */ > > @@ -324,7 +330,7 @@ struct uma_zone { > * This HAS to be the last item because we adjust the zone size > * based on NCPU and then allocate the space for the zones. > */ > - struct uma_cache uz_cpu[1]; /* Per cpu caches */ > + struct uma_cache uz_cpu[1] UMA_ALIGN; /* Per cpu caches */ > }; > > /* > @@ -341,6 +347,8 @@ struct uma_zone { > #define UMA_ZFLAG_INHERIT (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | \ > UMA_ZFLAG_BUCKET) > > +#undef UMA_ALIGN > + > #ifdef _KERNEL > /* Internal prototypes */ > static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data); > -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 11:06:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 984D41065672; Thu, 18 Mar 2010 11:06:38 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 865E78FC16; Thu, 18 Mar 2010 11:06:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IB6c05004024; Thu, 18 Mar 2010 11:06:38 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IB6cUd004019; Thu, 18 Mar 2010 11:06:38 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003181106.o2IB6cUd004019@svn.freebsd.org> From: Rui Paulo Date: Thu, 18 Mar 2010 11:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205277 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 11:06:38 -0000 Author: rpaulo Date: Thu Mar 18 11:06:38 2010 New Revision: 205277 URL: http://svn.freebsd.org/changeset/base/205277 Log: Fix a couple of bugs with 802.11n: o Process the BAR frame on the adhoc, mesh and sta modes o Fix the format of the ADDBA reply frame o Fix references to the spec section numbers Also, print the all the MCS rates in bootverbose. Sponsored by: iXsystems, Inc. Obtained from: //depot/user/rpaulo/80211n/... Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Thu Mar 18 09:09:59 2010 (r205276) +++ head/sys/net80211/ieee80211_adhoc.c Thu Mar 18 11:06:38 2010 (r205277) @@ -922,6 +922,12 @@ ahdemo_recv_mgmt(struct ieee80211_node * } static void -adhoc_recv_ctl(struct ieee80211_node *ni, struct mbuf *m0, int subtype) +adhoc_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) { + + switch (subtype) { + case IEEE80211_FC0_SUBTYPE_BAR: + ieee80211_recv_bar(ni, m); + break; + } } Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Thu Mar 18 09:09:59 2010 (r205276) +++ head/sys/net80211/ieee80211_ht.c Thu Mar 18 11:06:38 2010 (r205277) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #define SM(_v, _f) (((_v) << _f##_S) & _f) const struct ieee80211_mcs_rates ieee80211_htrates[16] = { + /* 20Mhz SGI 40Mhz SGI */ { 13, 14, 27, 30 }, /* MCS 0 */ { 26, 29, 54, 60 }, /* MCS 1 */ { 39, 43, 81, 90 }, /* MCS 2 */ @@ -248,25 +249,60 @@ ieee80211_ht_vdetach(struct ieee80211vap } static void -ht_announce(struct ieee80211com *ic, int mode, - const struct ieee80211_htrateset *rs) +ht_rateprint(struct ieee80211com *ic, int mode, + const struct ieee80211_htrateset *rs, int maxmcs, int ratetype) { - struct ifnet *ifp = ic->ic_ifp; int i, rate, mword; - if_printf(ifp, "%s MCS: ", ieee80211_phymode_name[mode]); - for (i = 0; i < rs->rs_nrates; i++) { + for (i = 0; i < rs->rs_nrates && i < maxmcs; i++) { mword = ieee80211_rate2media(ic, rs->rs_rates[i] | IEEE80211_RATE_MCS, mode); if (IFM_SUBTYPE(mword) != IFM_IEEE80211_MCS) continue; - rate = ieee80211_htrates[rs->rs_rates[i]].ht40_rate_400ns; + switch (ratetype) { + case 0: + rate = ieee80211_htrates[ + rs->rs_rates[i]].ht20_rate_800ns; + break; + case 1: + rate = ieee80211_htrates[ + rs->rs_rates[i]].ht20_rate_400ns; + break; + case 2: + rate = ieee80211_htrates[ + rs->rs_rates[i]].ht40_rate_800ns; + break; + default: + rate = ieee80211_htrates[ + rs->rs_rates[i]].ht40_rate_400ns; + break; + } printf("%s%d%sMbps", (i != 0 ? " " : ""), rate / 2, ((rate & 0x1) != 0 ? ".5" : "")); } printf("\n"); } +static void +ht_announce(struct ieee80211com *ic, int mode, + const struct ieee80211_htrateset *rs) +{ + struct ifnet *ifp = ic->ic_ifp; + int maxmcs = ic->ic_rxstream * 8; + const char *modestr = ieee80211_phymode_name[mode]; + + KASSERT(maxmcs <= 16, ("maxmcs > 16")); + if_printf(ifp, "%d MCS rates\n", maxmcs); + if_printf(ifp, "%s MCS 20Mhz: ", modestr); + ht_rateprint(ic, mode, rs, maxmcs, 0); + if_printf(ifp, "%s MCS 20Mhz SGI: ", modestr); + ht_rateprint(ic, mode, rs, maxmcs, 1); + if_printf(ifp, "%s MCS 40Mhz: ", modestr); + ht_rateprint(ic, mode, rs, maxmcs, 2); + if_printf(ifp, "%s MCS 40Mhz SGI: ", modestr); + ht_rateprint(ic, mode, rs, maxmcs, 3); +} + void ieee80211_ht_announce(struct ieee80211com *ic) { @@ -396,6 +432,7 @@ ampdu_rx_start(struct ieee80211_node *ni static void ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap) { + ampdu_rx_purge(rap); rap->rxa_flags &= ~(IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND); } @@ -656,7 +693,7 @@ again: if (off < rap->rxa_wnd) { /* * Common case (hopefully): in the BA window. - * Sec 9.10.7.6 a) (D2.04 p.118 line 47) + * Sec 9.10.7.6.2 a) (p.137) */ #ifdef IEEE80211_AMPDU_AGE /* @@ -721,7 +758,7 @@ again: /* * Outside the BA window, but within range; * flush the reorder q and move the window. - * Sec 9.10.7.6 b) (D2.04 p.118 line 60) + * Sec 9.10.7.6.2 b) (p.138) */ IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni, "move BA win <%u:%u> (%u frames) rxseq %u tid %u", @@ -745,7 +782,7 @@ again: } else { /* * Outside the BA window and out of range; toss. - * Sec 9.10.7.6 c) (D2.04 p.119 line 16) + * Sec 9.10.7.6.2 c) (p.138) */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_11N, ni->ni_macaddr, @@ -809,7 +846,7 @@ ieee80211_recv_bar(struct ieee80211_node if (off < IEEE80211_SEQ_BA_RANGE) { /* * Flush the reorder q up to rxseq and move the window. - * Sec 9.10.7.6 a) (D2.04 p.119 line 22) + * Sec 9.10.7.6.3 a) (p.138) */ IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni, "BAR moves BA win <%u:%u> (%u frames) rxseq %u tid %u", @@ -830,7 +867,7 @@ ieee80211_recv_bar(struct ieee80211_node } else { /* * Out of range; toss. - * Sec 9.10.7.6 b) (D2.04 p.119 line 41) + * Sec 9.10.7.6.3 b) (p.138) */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_11N, ni->ni_macaddr, @@ -1621,7 +1658,7 @@ ht_recv_action_ba_addba_request(struct i struct ieee80211_rx_ampdu *rap; uint8_t dialogtoken; uint16_t baparamset, batimeout, baseqctl; - uint16_t args[4]; + uint16_t args[5]; int tid; dialogtoken = frm[2]; @@ -1671,6 +1708,7 @@ ht_recv_action_ba_addba_request(struct i | SM(rap->rxa_wnd, IEEE80211_BAPS_BUFSIZ) ; args[3] = 0; + args[4] = 0; ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, IEEE80211_ACTION_BA_ADDBA_RESPONSE, args); return 0; @@ -1874,7 +1912,7 @@ ieee80211_ampdu_request(struct ieee80211 struct ieee80211_tx_ampdu *tap) { struct ieee80211com *ic = ni->ni_ic; - uint16_t args[4]; + uint16_t args[5]; int tid, dialogtoken; static int tokens = 0; /* XXX */ @@ -1891,13 +1929,14 @@ ieee80211_ampdu_request(struct ieee80211 tap->txa_start = ni->ni_txseqs[tid]; args[0] = dialogtoken; - args[1] = IEEE80211_BAPS_POLICY_IMMEDIATE + args[1] = 0; /* NB: status code not used */ + args[2] = IEEE80211_BAPS_POLICY_IMMEDIATE | SM(tid, IEEE80211_BAPS_TID) | SM(IEEE80211_AGGR_BAWMAX, IEEE80211_BAPS_BUFSIZ) ; - args[2] = 0; /* batimeout */ + args[3] = 0; /* batimeout */ /* NB: do first so there's no race against reply */ - if (!ic->ic_addba_request(ni, tap, dialogtoken, args[1], args[2])) { + if (!ic->ic_addba_request(ni, tap, dialogtoken, args[2], args[3])) { /* unable to setup state, don't make request */ IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, "%s: could not setup BA stream for AC %d", @@ -1911,7 +1950,7 @@ ieee80211_ampdu_request(struct ieee80211 } tokens = dialogtoken; /* allocate token */ /* NB: after calling ic_addba_request so driver can set txa_start */ - args[3] = SM(tap->txa_start, IEEE80211_BASEQ_START) + args[4] = SM(tap->txa_start, IEEE80211_BASEQ_START) | SM(0, IEEE80211_BASEQ_FRAG) ; return ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, @@ -2157,12 +2196,12 @@ ht_send_action_ba_addba(struct ieee80211 uint8_t *frm; IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_11N, ni, - "send ADDBA %s: dialogtoken %d " + "send ADDBA %s: dialogtoken %d status %d " "baparamset 0x%x (tid %d) batimeout 0x%x baseqctl 0x%x", (action == IEEE80211_ACTION_BA_ADDBA_REQUEST) ? "request" : "response", - args[0], args[1], MS(args[1], IEEE80211_BAPS_TID), - args[2], args[3]); + args[0], args[1], args[2], MS(args[2], IEEE80211_BAPS_TID), + args[3], args[4]); IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, "ieee80211_ref_node (%s:%u) %p<%s> refcnt %d\n", __func__, __LINE__, @@ -2179,10 +2218,12 @@ ht_send_action_ba_addba(struct ieee80211 *frm++ = category; *frm++ = action; *frm++ = args[0]; /* dialog token */ - ADDSHORT(frm, args[1]); /* baparamset */ - ADDSHORT(frm, args[2]); /* batimeout */ + if (action == IEEE80211_ACTION_BA_ADDBA_RESPONSE) + ADDSHORT(frm, args[1]); /* status code */ + ADDSHORT(frm, args[2]); /* baparamset */ + ADDSHORT(frm, args[3]); /* batimeout */ if (action == IEEE80211_ACTION_BA_ADDBA_REQUEST) - ADDSHORT(frm, args[3]); /* baseqctl */ + ADDSHORT(frm, args[4]); /* baseqctl */ m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); return ht_action_output(ni, m); } else { Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Thu Mar 18 09:09:59 2010 (r205276) +++ head/sys/net80211/ieee80211_mesh.c Thu Mar 18 11:06:38 2010 (r205277) @@ -82,6 +82,7 @@ static void mesh_forward(struct ieee8021 static int mesh_input(struct ieee80211_node *, struct mbuf *, int, int); static void mesh_recv_mgmt(struct ieee80211_node *, struct mbuf *, int, int, int); +static void mesh_recv_ctl(struct ieee80211_node *, struct mbuf *, int); static void mesh_peer_timeout_setup(struct ieee80211_node *); static void mesh_peer_timeout_backoff(struct ieee80211_node *); static void mesh_peer_timeout_cb(void *); @@ -520,6 +521,7 @@ mesh_vattach(struct ieee80211vap *vap) vap->iv_input = mesh_input; vap->iv_opdetach = mesh_vdetach; vap->iv_recv_mgmt = mesh_recv_mgmt; + vap->iv_recv_ctl = mesh_recv_ctl; ms = malloc(sizeof(struct ieee80211_mesh_state), M_80211_VAP, M_NOWAIT | M_ZERO); if (ms == NULL) { @@ -1535,6 +1537,17 @@ mesh_recv_mgmt(struct ieee80211_node *ni } } +static void +mesh_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) +{ + + switch (subtype) { + case IEEE80211_FC0_SUBTYPE_BAR: + ieee80211_recv_bar(ni, m); + break; + } +} + /* * Parse meshpeering action ie's for open+confirm frames; the * important bits are returned in the supplied structure. Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Mar 18 09:09:59 2010 (r205276) +++ head/sys/net80211/ieee80211_sta.c Thu Mar 18 11:06:38 2010 (r205277) @@ -1739,6 +1739,11 @@ sta_recv_mgmt(struct ieee80211_node *ni, } static void -sta_recv_ctl(struct ieee80211_node *ni, struct mbuf *m0, int subtype) +sta_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) { + switch (subtype) { + case IEEE80211_FC0_SUBTYPE_BAR: + ieee80211_recv_bar(ni, m); + break; + } } From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 11:53:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A327E1065677; Thu, 18 Mar 2010 11:53:32 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91ED28FC0C; Thu, 18 Mar 2010 11:53:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IBrWe3014474; Thu, 18 Mar 2010 11:53:32 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IBrWUq014472; Thu, 18 Mar 2010 11:53:32 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201003181153.o2IBrWUq014472@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 18 Mar 2010 11:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205278 - stable/8/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 11:53:32 -0000 Author: raj Date: Thu Mar 18 11:53:32 2010 New Revision: 205278 URL: http://svn.freebsd.org/changeset/base/205278 Log: MFC r205027 Let detailed info about CPU features print on Marvell Sheeva CPU as well. Provide missing entry in the cpu_classes[]. Reported by: Maks Verver Modified: stable/8/sys/arm/arm/identcpu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/arm/identcpu.c ============================================================================== --- stable/8/sys/arm/arm/identcpu.c Thu Mar 18 11:06:38 2010 (r205277) +++ stable/8/sys/arm/arm/identcpu.c Thu Mar 18 11:53:32 2010 (r205278) @@ -343,6 +343,7 @@ const struct cpu_classtab cpu_classes[] { "SA-1", "CPU_SA110" }, /* CPU_CLASS_SA1 */ { "XScale", "CPU_XSCALE_..." }, /* CPU_CLASS_XSCALE */ { "ARM11J", "CPU_ARM11" }, /* CPU_CLASS_ARM11J */ + { "Marvell", "CPU_MARVELL" }, /* CPU_CLASS_MARVELL */ }; /* @@ -418,6 +419,7 @@ identify_arm_cpu(void) case CPU_CLASS_SA1: case CPU_CLASS_XSCALE: case CPU_CLASS_ARM11J: + case CPU_CLASS_MARVELL: if ((ctrl & CPU_CONTROL_DC_ENABLE) == 0) printf(" DC disabled"); else From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 13:11:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 978391065670; Thu, 18 Mar 2010 13:11:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 875A38FC0A; Thu, 18 Mar 2010 13:11:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IDBhKT031862; Thu, 18 Mar 2010 13:11:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IDBhcw031860; Thu, 18 Mar 2010 13:11:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201003181311.o2IDBhcw031860@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 18 Mar 2010 13:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205279 - head/sys/geom/gate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 13:11:43 -0000 Author: pjd Date: Thu Mar 18 13:11:43 2010 New Revision: 205279 URL: http://svn.freebsd.org/changeset/base/205279 Log: Simplify loops. Modified: head/sys/geom/gate/g_gate.c Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Thu Mar 18 11:53:32 2010 (r205278) +++ head/sys/geom/gate/g_gate.c Thu Mar 18 13:11:43 2010 (r205279) @@ -109,27 +109,17 @@ g_gate_destroy(struct g_gate_softc *sc, g_orphan_provider(pp, ENXIO); callout_drain(&sc->sc_callout); mtx_lock(&sc->sc_queue_mtx); - for (;;) { - bp = bioq_first(&sc->sc_inqueue); - if (bp != NULL) { - bioq_remove(&sc->sc_inqueue, bp); - sc->sc_queue_count--; - G_GATE_LOGREQ(1, bp, "Request canceled."); - g_io_deliver(bp, ENXIO); - } else { - break; - } + while ((bp = bioq_first(&sc->sc_inqueue)) != NULL) { + bioq_remove(&sc->sc_inqueue, bp); + sc->sc_queue_count--; + G_GATE_LOGREQ(1, bp, "Request canceled."); + g_io_deliver(bp, ENXIO); } - for (;;) { - bp = bioq_first(&sc->sc_outqueue); - if (bp != NULL) { - bioq_remove(&sc->sc_outqueue, bp); - sc->sc_queue_count--; - G_GATE_LOGREQ(1, bp, "Request canceled."); - g_io_deliver(bp, ENXIO); - } else { - break; - } + while ((bp = bioq_first(&sc->sc_outqueue)) != NULL) { + bioq_remove(&sc->sc_outqueue, bp); + sc->sc_queue_count--; + G_GATE_LOGREQ(1, bp, "Request canceled."); + g_io_deliver(bp, ENXIO); } mtx_unlock(&sc->sc_queue_mtx); g_topology_unlock(); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 13:19:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B68DD106566B; Thu, 18 Mar 2010 13:19:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4958FC18; Thu, 18 Mar 2010 13:19:44 +0000 (UTC) Received: from c122-106-146-195.carlnfd1.nsw.optusnet.com.au (c122-106-146-195.carlnfd1.nsw.optusnet.com.au [122.106.146.195]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2IDJZi8024302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Mar 2010 00:19:38 +1100 Date: Fri, 19 Mar 2010 00:19:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86ljdq6h89.fsf@ds4.des.no> Message-ID: <20100319000301.D27813@delplex.bde.org> References: <44640.1268676905@critter.freebsd.dk> <20100317041500.V26092@delplex.bde.org> <86ljdq6h89.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-323523359-1268918376=:27813" Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, svn-src-all@freebsd.org, Bruce Evans Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 13:19:45 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-323523359-1268918376=:27813 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 17 Mar 2010, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote: > Bruce Evans writes: >> Even if the child causes the flush, the content of stdout and stderr >> is not flushed normally since it is redirected to /dev/null. Unflushed >> input in stdin is handled more brokenly: although stdin is redirected >> to /dev/null, input on it can still be read via stdin's buffer. >> Inheriting unflushed input on other streams is a feature (unless these >> streams are open on fd's 0-2; then these streams will have the same >> corruption as std* streams open on their normal fd's 0-2). > > how about > > Index: gen/daemon.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 > --- gen/daemon.c=09(revision 204870) > +++ gen/daemon.c=09(working copy) > @@ -37,6 +37,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -81,6 +82,9 @@ > =09=09(void)chdir("/"); > > =09if (!noclose && (fd =3D _open(_PATH_DEVNULL, O_RDWR, 0)) !=3D -1) { > +=09=09fpurge(stdin); > +=09=09fflush(stdout); > +=09=09fflush(stderr); > =09=09(void)_dup2(fd, STDIN_FILENO); > =09=09(void)_dup2(fd, STDOUT_FILENO); > =09=09(void)_dup2(fd, STDERR_FILENO); > > ? That seems like a reasonable start. I wanted to flush/purge all streams but that is more dangerous of course. I misread the man page about fflush(NULL) purging anything. It is only fpurge() that purges, but I didn't notice that fflush()'s man page is also about fpurge(). fpurge() hasn't caught up with the 1980's developments that made fflush(NULL) operate on all streams, so there is no way to purge all streams without using stdio internals (_fwalk()). The above is missing purging of stdout and stderr. Someone may have freopen()ed these in "rw" mode. Callers of daemon() shouldn't do this, but if fpurge(NULL) worked right then it would be easy to purge stdout and stderr when purging stdin and all other streams (if this is what we want to do). Bruce --0-323523359-1268918376=:27813-- From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 14:09:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B156106564A; Thu, 18 Mar 2010 14:09:54 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE258FC08; Thu, 18 Mar 2010 14:09:53 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 1D02D1FFC53; Thu, 18 Mar 2010 14:09:53 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E4F82844DF; Thu, 18 Mar 2010 15:09:52 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans References: <44640.1268676905@critter.freebsd.dk> <20100317041500.V26092@delplex.bde.org> <86ljdq6h89.fsf@ds4.des.no> <20100319000301.D27813@delplex.bde.org> Date: Thu, 18 Mar 2010 15:09:52 +0100 In-Reply-To: <20100319000301.D27813@delplex.bde.org> (Bruce Evans's message of "Fri, 19 Mar 2010 00:19:36 +1100 (EST)") Message-ID: <86eijhiuvj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 14:09:54 -0000 Bruce Evans writes: > The above is missing purging of stdout and stderr. Someone may have > freopen()ed these in "rw" mode. If you did that, you're on your own... :) I didn't notice that fpurge() is actually a superset of fflush(). > Callers of daemon() shouldn't do this, > but if fpurge(NULL) worked right then it would be easy to purge stdout > and stderr when purging stdin and all other streams (if this is what > we want to do). I agree that fpurge(NULL) would be nice, but nothing outside the base system would use it, since it wouldn't work on older or non-FreeBSD systems - and I don't mean "wouldn't work" as in "would have no effect whatsoever", I mean "wouldn't work" as in "immediate SIGSEGV" since our fpurge() does not check for fp =3D=3D NULL. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 14:54:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87D07106564A; Thu, 18 Mar 2010 14:54:31 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7613D8FC1C; Thu, 18 Mar 2010 14:54:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IEsVxf054457; Thu, 18 Mar 2010 14:54:31 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IEsVi0054453; Thu, 18 Mar 2010 14:54:31 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201003181454.o2IEsVi0054453@svn.freebsd.org> From: Shteryana Shopova Date: Thu, 18 Mar 2010 14:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205280 - head/usr.sbin/bsnmpd/modules/snmp_pf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 14:54:31 -0000 Author: syrinx Date: Thu Mar 18 14:54:31 2010 New Revision: 205280 URL: http://svn.freebsd.org/changeset/base/205280 Log: Add support for retrieving labeled pf filter rule counters. PR: bin/132847 Submitted by: Szalai Andras Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt Thu Mar 18 13:11:43 2010 (r205279) +++ head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt Thu Mar 18 14:54:31 2010 (r205280) @@ -21,7 +21,7 @@ IMPORTS FROM BEGEMOT-MIB; begemotPf MODULE-IDENTITY - LAST-UPDATED "200501240000Z" + LAST-UPDATED "201003170000Z" ORGANIZATION "NixSys BVBA" CONTACT-INFO " Philip Paeps @@ -34,6 +34,13 @@ begemotPf MODULE-IDENTITY E-Mail: philip@FreeBSD.org" DESCRIPTION "The Begemot MIB for the pf packet filter." + REVISION "200912050000Z" + DESCRIPTION + "Added support for retrieving counters of labeled + pf filter rules via pfLabelspfLabels subtree." + REVISION "200501240000Z" + DESCRIPTION + "Initial revision." ::= { begemot 200 } @@ -51,6 +58,7 @@ pfLogInterface OBJECT IDENTIFIER ::= { pfInterfaces OBJECT IDENTIFIER ::= { begemotPfObjects 8 } pfTables OBJECT IDENTIFIER ::= { begemotPfObjects 9 } pfAltq OBJECT IDENTIFIER ::= { begemotPfObjects 10 } +pfLabels OBJECT IDENTIFIER ::= { begemotPfObjects 11 } -- -------------------------------------------------------------------------- @@ -1227,4 +1235,96 @@ pfAltqQueueLimit OBJECT-TYPE "Maximum number of packets in the queue." ::= { pfAltqQueueEntry 7 } +pfLabelsLblNumber OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of labeled filter rules on this system." + ::= { pfLabels 1 } + +pfLabelsLblTable OBJECT-TYPE + SYNTAX SEQUENCE OF PfLabelsLblEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table of filter rules, index on pfLabelsLblIndex." + ::= { pfLabels 2 } + +pfLabelsLblEntry OBJECT-TYPE + SYNTAX PfLabelsLblEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Any entry in the pfLabelsLblTable containing information + about a particular filter rule on the system." + INDEX { pfLabelsLblIndex } + ::= { pfLabelsLblTable 1 } + +PfLabelsLblEntry ::= SEQUENCE { + pfLabelsLblIndex Integer32, + pfLabelsLblName OCTET STRING, + pfLabelsLblEvals Counter64, + pfLabelsLblBytesIn Counter64, + pfLabelsLblBytesOut Counter64, + pfLabelsLblPktsIn Counter64, + pfLabelsLblPktsOut Counter64 +} + +pfLabelsLblIndex OBJECT-TYPE + SYNTAX Integer32 (1..2147483647) + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A unique value, greater than zero, for each label." + ::= { pfLabelsLblEntry 1 } + +pfLabelsLblName OBJECT-TYPE + SYNTAX OCTET STRING + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The name of the rule label." + ::= { pfLabelsLblEntry 2 } + +pfLabelsLblEvals OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of rule evaluations." + ::= { pfLabelsLblEntry 3 } + +pfLabelsLblBytesIn OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of incoming bytes matched by the rule." + ::= { pfLabelsLblEntry 4 } + +pfLabelsLblBytesOut OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of outgoing bytes matched by the rule." + ::= { pfLabelsLblEntry 5 } + +pfLabelsLblPktsIn OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of incoming packets matched by the rule." + ::= { pfLabelsLblEntry 6 } + +pfLabelsLblPktsOut OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of outgoing packets matched by the rule." + ::= { pfLabelsLblEntry 7 } + END Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Thu Mar 18 13:11:43 2010 (r205279) +++ head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Thu Mar 18 14:54:31 2010 (r205280) @@ -100,14 +100,32 @@ static int altq_enabled = 0; #define PFQ_TABLE_MAXAGE 5 +struct pfl_entry { + char name[MAXPATHLEN + PF_RULE_LABEL_SIZE]; + u_int64_t evals; + u_int64_t bytes[2]; + u_int64_t pkts[2]; + u_int index; + TAILQ_ENTRY(pfl_entry) link; +}; +TAILQ_HEAD(pfl_table, pfl_entry); + +static struct pfl_table pfl_table; +static time_t pfl_table_age; +static int pfl_table_count; + +#define PFL_TABLE_MAXAGE 5 + /* Forward declarations */ static int pfi_refresh(void); static int pfq_refresh(void); static int pfs_refresh(void); static int pft_refresh(void); +static int pfl_refresh(void); static struct pfi_entry * pfi_table_find(u_int idx); static struct pfq_entry * pfq_table_find(u_int idx); static struct pft_entry * pft_table_find(u_int idx); +static struct pfl_entry * pfl_table_find(u_int idx); static int altq_is_enabled(int pfdevice); @@ -873,7 +891,95 @@ pf_altqq(struct snmp_context __unused *c } return (SNMP_ERR_NOERROR); -} +} + +int +pf_labels(struct snmp_context __unused *ctx, struct snmp_value *val, + u_int sub, u_int __unused vindex, enum snmp_op op) +{ + asn_subid_t which = val->var.subs[sub - 1]; + + if (op == SNMP_OP_SET) + return (SNMP_ERR_NOT_WRITEABLE); + + if (op == SNMP_OP_GET) { + if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) + if (pfl_refresh() == -1) + return (SNMP_ERR_GENERR); + + switch (which) { + case LEAF_pfLabelsLblNumber: + val->v.uint32 = pfl_table_count; + break; + + default: + return (SNMP_ERR_NOSUCHNAME); + } + + return (SNMP_ERR_NOERROR); + } + + abort(); + return (SNMP_ERR_GENERR); +} + +int +pf_lbltable(struct snmp_context __unused *ctx, struct snmp_value *val, + u_int sub, u_int __unused vindex, enum snmp_op op) +{ + asn_subid_t which = val->var.subs[sub - 1]; + struct pfl_entry *e = NULL; + + switch (op) { + case SNMP_OP_SET: + return (SNMP_ERR_NOT_WRITEABLE); + case SNMP_OP_GETNEXT: + if ((e = NEXT_OBJECT_INT(&pfl_table, + &val->var, sub)) == NULL) + return (SNMP_ERR_NOSUCHNAME); + val->var.len = sub + 1; + val->var.subs[sub] = e->index; + break; + case SNMP_OP_GET: + if (val->var.len - sub != 1) + return (SNMP_ERR_NOSUCHNAME); + if ((e = pfl_table_find(val->var.subs[sub])) == NULL) + return (SNMP_ERR_NOSUCHNAME); + break; + + case SNMP_OP_COMMIT: + case SNMP_OP_ROLLBACK: + default: + abort(); + } + + if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) + pfl_refresh(); + + switch (which) { + case LEAF_pfLabelsLblName: + return (string_get(val, e->name, -1)); + case LEAF_pfLabelsLblEvals: + val->v.counter64 = e->evals; + break; + case LEAF_pfLabelsLblBytesIn: + val->v.counter64 = e->bytes[IN]; + break; + case LEAF_pfLabelsLblBytesOut: + val->v.counter64 = e->bytes[OUT]; + break; + case LEAF_pfLabelsLblPktsIn: + val->v.counter64 = e->pkts[IN]; + break; + case LEAF_pfLabelsLblPktsOut: + val->v.counter64 = e->pkts[OUT]; + break; + default: + return (SNMP_ERR_NOSUCHNAME); + } + + return (SNMP_ERR_NOERROR); +} static struct pfi_entry * pfi_table_find(u_int idx) @@ -890,6 +996,7 @@ static struct pfq_entry * pfq_table_find(u_int idx) { struct pfq_entry *e; + TAILQ_FOREACH(e, &pfq_table, link) if (e->index == idx) return (e); @@ -907,6 +1014,18 @@ pft_table_find(u_int idx) return (NULL); } +static struct pfl_entry * +pfl_table_find(u_int idx) +{ + struct pfl_entry *e; + + TAILQ_FOREACH(e, &pfl_table, link) + if (e->index == idx) + return (e); + + return (NULL); +} + static int pfi_refresh(void) { @@ -1129,6 +1248,135 @@ err2: return(-1); } +static int +pfl_scan_ruleset(const char *path) +{ + struct pfioc_rule pr; + struct pfl_entry *e; + u_int32_t nr, i; + + bzero(&pr, sizeof(pr)); + strlcpy(pr.anchor, path, sizeof(pr.anchor)); + pr.rule.action = PF_PASS; + if (ioctl(dev, DIOCGETRULES, &pr)) { + syslog(LOG_ERR, "pfl_scan_ruleset: ioctl(DIOCGETRULES): %s", + strerror(errno)); + goto err; + } + + for (nr = pr.nr, i = 0; i < nr; i++) { + pr.nr = i; + if (ioctl(dev, DIOCGETRULE, &pr)) { + syslog(LOG_ERR, "pfl_scan_ruleset: ioctl(DIOCGETRULE):" + " %s", strerror(errno)); + goto err; + } + + if (pr.rule.label[0]) { + e = (struct pfl_entry *)malloc(sizeof(*e)); + if (e == NULL) + goto err; + + strlcpy(e->name, path, sizeof(e->name)); + if (path[0]) + strlcat(e->name, "/", sizeof(e->name)); + strlcat(e->name, pr.rule.label, sizeof(e->name)); + + e->evals = pr.rule.evaluations; + e->bytes[IN] = pr.rule.bytes[IN]; + e->bytes[OUT] = pr.rule.bytes[OUT]; + e->pkts[IN] = pr.rule.packets[IN]; + e->pkts[OUT] = pr.rule.packets[OUT]; + e->index = ++pfl_table_count; + + TAILQ_INSERT_TAIL(&pfl_table, e, link); + } + } + + return (0); + +err: + return (-1); +} + +static int +pfl_walk_rulesets(const char *path) +{ + struct pfioc_ruleset prs; + char newpath[MAXPATHLEN]; + u_int32_t nr, i; + + if (pfl_scan_ruleset(path)) + goto err; + + bzero(&prs, sizeof(prs)); + strlcpy(prs.path, path, sizeof(prs.path)); + if (ioctl(dev, DIOCGETRULESETS, &prs)) { + syslog(LOG_ERR, "pfl_walk_rulesets: ioctl(DIOCGETRULESETS): %s", + strerror(errno)); + goto err; + } + + for (nr = prs.nr, i = 0; i < nr; i++) { + prs.nr = i; + if (ioctl(dev, DIOCGETRULESET, &prs)) { + syslog(LOG_ERR, "pfl_walk_rulesets: ioctl(DIOCGETRULESET):" + " %s", strerror(errno)); + goto err; + } + + if (strcmp(prs.name, PF_RESERVED_ANCHOR) == 0) + continue; + + strlcpy(newpath, path, sizeof(newpath)); + if (path[0]) + strlcat(newpath, "/", sizeof(newpath)); + + strlcat(newpath, prs.name, sizeof(newpath)); + if (pfl_walk_rulesets(newpath)) + goto err; + } + + return (0); + +err: + return (-1); +} + +static int +pfl_refresh(void) +{ + struct pfl_entry *e; + + if (started && this_tick <= pf_tick) + return (0); + + while (!TAILQ_EMPTY(&pfl_table)) { + e = TAILQ_FIRST(&pfl_table); + TAILQ_REMOVE(&pfl_table, e, link); + free(e); + } + pfl_table_count = 0; + + if (pfl_walk_rulesets("")) + goto err; + + pfl_table_age = time(NULL); + pf_tick = this_tick; + + return (0); + +err: + while (!TAILQ_EMPTY(&pfl_table)) { + e = TAILQ_FIRST(&pfl_table); + TAILQ_REMOVE(&pfl_table, e, link); + free(e); + } + pfl_table_count = 0; + + return (-1); +} + /* * check whether altq support is enabled in kernel */ @@ -1175,6 +1423,7 @@ pf_init(struct lmodule *mod, int __unuse TAILQ_INIT(&pfi_table); TAILQ_INIT(&pfq_table); TAILQ_INIT(&pft_table); + TAILQ_INIT(&pfl_table); pfi_refresh(); if (altq_enabled) { @@ -1183,6 +1432,7 @@ pf_init(struct lmodule *mod, int __unuse pfs_refresh(); pft_refresh(); + pfl_refresh(); started = 1; @@ -1195,6 +1445,7 @@ pf_fini(void) struct pfi_entry *i1, *i2; struct pfq_entry *q1, *q2; struct pft_entry *t1, *t2; + struct pfl_entry *l1, *l2; /* Empty the list of interfaces */ i1 = TAILQ_FIRST(&pfi_table); @@ -1212,7 +1463,7 @@ pf_fini(void) q1 = q2; } - /* And the list of tables */ + /* List of tables */ t1 = TAILQ_FIRST(&pft_table); while (t1 != NULL) { t2 = TAILQ_NEXT(t1, link); @@ -1220,6 +1471,14 @@ pf_fini(void) t1 = t2; } + /* And the list of labeled filter rules */ + l1 = TAILQ_FIRST(&pfl_table); + while (l1 != NULL) { + l2 = TAILQ_NEXT(l1, link); + free(l1); + l1 = l2; + } + close(dev); return (0); } @@ -1232,6 +1491,7 @@ pf_dump(void) pfq_refresh(); } pft_refresh(); + pfl_refresh(); syslog(LOG_ERR, "Dump: pfi_table_age = %jd", (intmax_t)pfi_table_age); @@ -1245,9 +1505,13 @@ pf_dump(void) syslog(LOG_ERR, "Dump: pft_table_age = %jd", (intmax_t)pft_table_age); - syslog(LOG_ERR, "Dump: pft_table_count = %d", pft_table_count); + + syslog(LOG_ERR, "Dump: pfl_table_age = %jd", + (intmax_t)pfl_table_age); + syslog(LOG_ERR, "Dump: pfl_table_count = %d", + pfl_table_count); } const struct snmp_module config = { Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def Thu Mar 18 13:11:43 2010 (r205279) +++ head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def Thu Mar 18 14:54:31 2010 (r205280) @@ -186,6 +186,20 @@ ) ) ) + (11 pfLabels + (1 pfLabelsLblNumber INTEGER32 pf_labels GET) + (2 pfLabelsLblTable + (1 pfLabelsLblEntry : INTEGER pf_lbltable + (1 pfLabelsLblIndex INTEGER) + (2 pfLabelsLblName OCTETSTRING GET) + (3 pfLabelsLblEvals COUNTER64 GET) + (4 pfLabelsLblBytesIn COUNTER64 GET) + (5 pfLabelsLblBytesOut COUNTER64 GET) + (6 pfLabelsLblPktsIn COUNTER64 GET) + (7 pfLabelsLblPktsOut COUNTER64 GET) + ) + ) + ) ) ) ) From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 15:28:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B4AF106564A; Thu, 18 Mar 2010 15:28:17 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AD1A8FC18; Thu, 18 Mar 2010 15:28:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IFSHTk061916; Thu, 18 Mar 2010 15:28:17 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IFSHvJ061914; Thu, 18 Mar 2010 15:28:17 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003181528.o2IFSHvJ061914@svn.freebsd.org> From: Rui Paulo Date: Thu, 18 Mar 2010 15:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205281 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 15:28:17 -0000 Author: rpaulo Date: Thu Mar 18 15:28:17 2010 New Revision: 205281 URL: http://svn.freebsd.org/changeset/base/205281 Log: Unbreak build by removing a code bit that is only related to other code in my branch. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Thu Mar 18 14:54:31 2010 (r205280) +++ head/sys/net80211/ieee80211_ht.c Thu Mar 18 15:28:17 2010 (r205281) @@ -288,7 +288,7 @@ ht_announce(struct ieee80211com *ic, int const struct ieee80211_htrateset *rs) { struct ifnet *ifp = ic->ic_ifp; - int maxmcs = ic->ic_rxstream * 8; + int maxmcs = 2 * 8; const char *modestr = ieee80211_phymode_name[mode]; KASSERT(maxmcs <= 16, ("maxmcs > 16")); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 16:55:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 547391065672; Thu, 18 Mar 2010 16:55:48 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 429E48FC17; Thu, 18 Mar 2010 16:55:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IGtlNu081358; Thu, 18 Mar 2010 16:55:47 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IGtlgE081356; Thu, 18 Mar 2010 16:55:47 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201003181655.o2IGtlgE081356@svn.freebsd.org> From: Rui Paulo Date: Thu, 18 Mar 2010 16:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205282 - stable/7/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 16:55:48 -0000 Author: rpaulo Date: Thu Mar 18 16:55:47 2010 New Revision: 205282 URL: http://svn.freebsd.org/changeset/base/205282 Log: Fix HTCAP's SM power save bits to match the ones in HEAD. PR: 144476 Submitted by: Alexander Egorenkov Modified: stable/7/sys/net80211/ieee80211.h Modified: stable/7/sys/net80211/ieee80211.h ============================================================================== --- stable/7/sys/net80211/ieee80211.h Thu Mar 18 15:28:17 2010 (r205281) +++ stable/7/sys/net80211/ieee80211.h Thu Mar 18 16:55:47 2010 (r205282) @@ -531,10 +531,10 @@ struct ieee80211_ie_htcap { #define IEEE80211_HTCAP_LDPC 0x0001 /* LDPC supported */ #define IEEE80211_HTCAP_CHWIDTH40 0x0002 /* 20/40 supported */ #define IEEE80211_HTCAP_SMPS 0x000c /* SM Power Save mode */ -#define IEEE80211_HTCAP_SMPS_OFF 0x0000 /* none (static mode) */ +#define IEEE80211_HTCAP_SMPS_OFF 0x000c /* disabled */ #define IEEE80211_HTCAP_SMPS_DYNAMIC 0x0004 /* send RTS first */ /* NB: SMPS value 2 is reserved */ -#define IEEE80211_HTCAP_SMPS_ENA 0x000c /* enabled */ +#define IEEE80211_HTCAP_SMPS_ENA 0x0000 /* enabled (static mode) */ #define IEEE80211_HTCAP_GREENFIELD 0x0010 /* Greenfield supported */ #define IEEE80211_HTCAP_SHORTGI20 0x0020 /* Short GI in 20MHz */ #define IEEE80211_HTCAP_SHORTGI40 0x0040 /* Short GI in 40MHz */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 17:00:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD98A106567E; Thu, 18 Mar 2010 17:00:44 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAAAB8FC13; Thu, 18 Mar 2010 17:00:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IH0iAm082526; Thu, 18 Mar 2010 17:00:44 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IH0iJF082519; Thu, 18 Mar 2010 17:00:44 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <201003181700.o2IH0iJF082519@svn.freebsd.org> From: Max Laier Date: Thu, 18 Mar 2010 17:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205283 - in stable/8/sys: dev/cxgb dev/e1000 dev/ixgbe dev/mxge net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 17:00:44 -0000 Author: mlaier Date: Thu Mar 18 17:00:44 2010 New Revision: 205283 URL: http://svn.freebsd.org/changeset/base/205283 Log: MFC r203834 and r205197: Make ALTQ work for drbr consumers. Modified: stable/8/sys/dev/cxgb/cxgb_sge.c stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/e1000/if_igb.c stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/mxge/if_mxge.c stable/8/sys/net/if_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_sge.c Thu Mar 18 16:55:47 2010 (r205282) +++ stable/8/sys/dev/cxgb/cxgb_sge.c Thu Mar 18 17:00:44 2010 (r205283) @@ -228,6 +228,8 @@ static uint8_t flit_desc_map[] = { #define TXQ_LOCK(qs) mtx_lock(&(qs)->lock) #define TXQ_UNLOCK(qs) mtx_unlock(&(qs)->lock) #define TXQ_RING_EMPTY(qs) drbr_empty((qs)->port->ifp, (qs)->txq[TXQ_ETH].txq_mr) +#define TXQ_RING_NEEDS_ENQUEUE(qs) \ + drbr_needs_enqueue((qs)->port->ifp, (qs)->txq[TXQ_ETH].txq_mr) #define TXQ_RING_FLUSH(qs) drbr_flush((qs)->port->ifp, (qs)->txq[TXQ_ETH].txq_mr) #define TXQ_RING_DEQUEUE_COND(qs, func, arg) \ drbr_dequeue_cond((qs)->port->ifp, (qs)->txq[TXQ_ETH].txq_mr, func, arg) @@ -1712,7 +1714,7 @@ cxgb_transmit_locked(struct ifnet *ifp, * - there is space in hardware transmit queue */ if (check_pkt_coalesce(qs) == 0 && - TXQ_RING_EMPTY(qs) && avail > 4) { + !TXQ_RING_NEEDS_ENQUEUE(qs) && avail > 4) { if (t3_encap(qs, &m)) { if (m != NULL && (error = drbr_enqueue(ifp, br, m)) != 0) Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Thu Mar 18 16:55:47 2010 (r205282) +++ stable/8/sys/dev/e1000/if_em.c Thu Mar 18 17:00:44 2010 (r205283) @@ -1032,7 +1032,7 @@ em_mq_start_locked(struct ifnet *ifp, st || (!adapter->link_active)) { error = drbr_enqueue(ifp, adapter->br, m); return (error); - } else if (drbr_empty(ifp, adapter->br) && + } else if (!drbr_needs_enqueue(ifp, adapter->br) && (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) { if ((error = em_xmit(adapter, &m)) != 0) { if (m != NULL) Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Thu Mar 18 16:55:47 2010 (r205282) +++ stable/8/sys/dev/e1000/if_igb.c Thu Mar 18 17:00:44 2010 (r205283) @@ -853,7 +853,7 @@ igb_mq_start_locked(struct ifnet *ifp, s goto process; /* If nothing queued go right to xmit */ - if (drbr_empty(ifp, txr->br)) { + if (!drbr_needs_enqueue(ifp, txr->br)) { if ((err = igb_xmit(txr, &m)) != 0) { if (m != NULL) err = drbr_enqueue(ifp, txr->br, m); Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Thu Mar 18 16:55:47 2010 (r205282) +++ stable/8/sys/dev/ixgbe/ixgbe.c Thu Mar 18 17:00:44 2010 (r205283) @@ -768,7 +768,7 @@ ixgbe_mq_start_locked(struct ifnet *ifp, goto process; /* If nothing queued go right to xmit */ - if (drbr_empty(ifp, txr->br)) { + if (!drbr_needs_enqueue(ifp, txr->br)) { if (ixgbe_xmit(txr, &m)) { if (m && (err = drbr_enqueue(ifp, txr->br, m)) != 0) return (err); Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Thu Mar 18 16:55:47 2010 (r205282) +++ stable/8/sys/dev/mxge/if_mxge.c Thu Mar 18 17:00:44 2010 (r205283) @@ -2249,7 +2249,7 @@ mxge_transmit_locked(struct mxge_slice_s return (err); } - if (drbr_empty(ifp, tx->br) && + if (!drbr_needs_enqueue(ifp, tx->br) && ((tx->mask - (tx->req - tx->done)) > tx->max_desc)) { /* let BPF see it */ BPF_MTAP(ifp, m); Modified: stable/8/sys/net/if_var.h ============================================================================== --- stable/8/sys/net/if_var.h Thu Mar 18 16:55:47 2010 (r205282) +++ stable/8/sys/net/if_var.h Thu Mar 18 17:00:44 2010 (r205283) @@ -602,12 +602,8 @@ drbr_flush(struct ifnet *ifp, struct buf struct mbuf *m; #ifdef ALTQ - if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd)) { - while (!IFQ_IS_EMPTY(&ifp->if_snd)) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); - m_freem(m); - } - } + if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd)) + IFQ_PURGE(&ifp->if_snd); #endif while ((m = buf_ring_dequeue_sc(br)) != NULL) m_freem(m); @@ -628,7 +624,7 @@ drbr_dequeue(struct ifnet *ifp, struct b struct mbuf *m; if (ALTQ_IS_ENABLED(&ifp->if_snd)) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + IFQ_DEQUEUE(&ifp->if_snd, m); return (m); } #endif @@ -641,11 +637,15 @@ drbr_dequeue_cond(struct ifnet *ifp, str { struct mbuf *m; #ifdef ALTQ - /* - * XXX need to evaluate / requeue - */ - if (ALTQ_IS_ENABLED(&ifp->if_snd)) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + if (ALTQ_IS_ENABLED(&ifp->if_snd)) { + IFQ_LOCK(&ifp->if_snd); + IFQ_POLL_NOLOCK(&ifp->if_snd, m); + if (m != NULL && func(m, arg) == 0) { + IFQ_UNLOCK(&ifp->if_snd); + return (NULL); + } + IFQ_DEQUEUE_NOLOCK(&ifp->if_snd, m); + IFQ_UNLOCK(&ifp->if_snd); return (m); } #endif @@ -661,12 +661,22 @@ drbr_empty(struct ifnet *ifp, struct buf { #ifdef ALTQ if (ALTQ_IS_ENABLED(&ifp->if_snd)) - return (IFQ_DRV_IS_EMPTY(&ifp->if_snd)); + return (IFQ_IS_EMPTY(&ifp->if_snd)); #endif return (buf_ring_empty(br)); } static __inline int +drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br) +{ +#ifdef ALTQ + if (ALTQ_IS_ENABLED(&ifp->if_snd)) + return (1); +#endif + return (!buf_ring_empty(br)); +} + +static __inline int drbr_inuse(struct ifnet *ifp, struct buf_ring *br) { #ifdef ALTQ From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:35:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAE171065676; Thu, 18 Mar 2010 18:35:28 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8AA58FC22; Thu, 18 Mar 2010 18:35:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIZSvb003549; Thu, 18 Mar 2010 18:35:28 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIZSvt003547; Thu, 18 Mar 2010 18:35:28 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181835.o2IIZSvt003547@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205284 - stable/8/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:35:29 -0000 Author: yongari Date: Thu Mar 18 18:35:28 2010 New Revision: 205284 URL: http://svn.freebsd.org/changeset/base/205284 Log: MFC r202821-202822. r202821: Fix a long standing ASF heartbeat sending bug. The initial implementation of heartbeat interval was 2 but there was typo which caused the heartbeat is sent approximately every 5 seconds. This caused unintended controller reset by firmware because firmware thought OS was crashed. Submitted by: Floris Bos < info <> je-eigen-domein dot nl > Tested by: Andrzej Tobola < ato <> iem dot pw dot edu dot pl > r202822: Use new handshake command for BCM5750 or new controllers. Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Thu Mar 18 17:00:44 2010 (r205283) +++ stable/8/sys/dev/bge/if_bge.c Thu Mar 18 18:35:28 2010 (r205284) @@ -2744,9 +2744,8 @@ bge_attach(device_t dev) & BGE_HWCFG_ASF) { sc->bge_asf_mode |= ASF_ENABLE; sc->bge_asf_mode |= ASF_STACKUP; - if (sc->bge_asicrev == BGE_ASICREV_BCM5750) { + if (BGE_IS_575X_PLUS(sc)) sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; - } } } @@ -3677,7 +3676,7 @@ bge_asf_driver_up(struct bge_softc *sc) if (sc->bge_asf_count) sc->bge_asf_count --; else { - sc->bge_asf_count = 5; + sc->bge_asf_count = 2; bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_DRV_ALIVE); bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:38:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A0A4106564A; Thu, 18 Mar 2010 18:38:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17EB88FC14; Thu, 18 Mar 2010 18:38:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIcrVG004326; Thu, 18 Mar 2010 18:38:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIcrtX004324; Thu, 18 Mar 2010 18:38:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181838.o2IIcrtX004324@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205285 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:38:54 -0000 Author: yongari Date: Thu Mar 18 18:38:53 2010 New Revision: 205285 URL: http://svn.freebsd.org/changeset/base/205285 Log: MFC r202821-202822. r202821: Fix a long standing ASF heartbeat sending bug. The initial implementation of heartbeat interval was 2 but there was typo which caused the heartbeat is sent approximately every 5 seconds. This caused unintended controller reset by firmware because firmware thought OS was crashed. Submitted by: Floris Bos < info <> je-eigen-domein dot nl > Tested by: Andrzej Tobola < ato <> iem dot pw dot edu dot pl > r202822: Use new handshake command for BCM5750 or new controllers. Modified: stable/7/sys/dev/bge/if_bge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Thu Mar 18 18:35:28 2010 (r205284) +++ stable/7/sys/dev/bge/if_bge.c Thu Mar 18 18:38:53 2010 (r205285) @@ -2744,9 +2744,8 @@ bge_attach(device_t dev) & BGE_HWCFG_ASF) { sc->bge_asf_mode |= ASF_ENABLE; sc->bge_asf_mode |= ASF_STACKUP; - if (sc->bge_asicrev == BGE_ASICREV_BCM5750) { + if (BGE_IS_575X_PLUS(sc)) sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; - } } } @@ -3673,7 +3672,7 @@ bge_asf_driver_up(struct bge_softc *sc) if (sc->bge_asf_count) sc->bge_asf_count --; else { - sc->bge_asf_count = 5; + sc->bge_asf_count = 2; bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_DRV_ALIVE); bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:44:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F2CC1065670; Thu, 18 Mar 2010 18:44:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D1C38FC19; Thu, 18 Mar 2010 18:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIi8dd005546; Thu, 18 Mar 2010 18:44:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIi8n0005544; Thu, 18 Mar 2010 18:44:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181844.o2IIi8n0005544@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205286 - stable/8/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:44:09 -0000 Author: yongari Date: Thu Mar 18 18:44:08 2010 New Revision: 205286 URL: http://svn.freebsd.org/changeset/base/205286 Log: MFC r203355: Add more bit definitions to PCI express device control and device status register. Modified: stable/8/sys/dev/pci/pcireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Thu Mar 18 18:38:53 2010 (r205285) +++ stable/8/sys/dev/pci/pcireg.h Thu Mar 18 18:44:08 2010 (r205286) @@ -605,9 +605,17 @@ #define PCIR_EXPRESS_DEVICE_CAP 0x4 #define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 #define PCIR_EXPRESS_DEVICE_CTL 0x8 +#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 #define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 +#define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 #define PCIM_EXP_CTL_MAX_READ_REQUEST 0x7000 #define PCIR_EXPRESS_DEVICE_STA 0xa +#define PCIM_EXP_STA_CORRECTABLE_ERROR 0x0001 +#define PCIM_EXP_STA_NON_FATAL_ERROR 0x0002 +#define PCIM_EXP_STA_FATAL_ERROR 0x0004 +#define PCIM_EXP_STA_UNSUPPORTED_REQ 0x0008 +#define PCIM_EXP_STA_AUX_POWER 0x0010 +#define PCIM_EXP_STA_TRANSACTION_PND 0x0020 #define PCIR_EXPRESS_LINK_CAP 0xc #define PCIM_LINK_CAP_MAX_SPEED 0x0000000f #define PCIM_LINK_CAP_MAX_WIDTH 0x000003f0 From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:45:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECFEC106566C; Thu, 18 Mar 2010 18:45:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF988FC1F; Thu, 18 Mar 2010 18:45:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIjjq6005970; Thu, 18 Mar 2010 18:45:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIjjFt005968; Thu, 18 Mar 2010 18:45:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181845.o2IIjjFt005968@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205287 - stable/7/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:45:46 -0000 Author: yongari Date: Thu Mar 18 18:45:45 2010 New Revision: 205287 URL: http://svn.freebsd.org/changeset/base/205287 Log: MFC r203355: Add more bit definitions to PCI express device control and device status register. Modified: stable/7/sys/dev/pci/pcireg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Thu Mar 18 18:44:08 2010 (r205286) +++ stable/7/sys/dev/pci/pcireg.h Thu Mar 18 18:45:45 2010 (r205287) @@ -605,9 +605,17 @@ #define PCIR_EXPRESS_DEVICE_CAP 0x4 #define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 #define PCIR_EXPRESS_DEVICE_CTL 0x8 +#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 #define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 +#define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 #define PCIM_EXP_CTL_MAX_READ_REQUEST 0x7000 #define PCIR_EXPRESS_DEVICE_STA 0xa +#define PCIM_EXP_STA_CORRECTABLE_ERROR 0x0001 +#define PCIM_EXP_STA_NON_FATAL_ERROR 0x0002 +#define PCIM_EXP_STA_FATAL_ERROR 0x0004 +#define PCIM_EXP_STA_UNSUPPORTED_REQ 0x0008 +#define PCIM_EXP_STA_AUX_POWER 0x0010 +#define PCIM_EXP_STA_TRANSACTION_PND 0x0020 #define PCIR_EXPRESS_LINK_CAP 0xc #define PCIM_LINK_CAP_MAX_SPEED 0x0000000f #define PCIM_LINK_CAP_MAX_WIDTH 0x000003f0 From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:50:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B52A106564A; Thu, 18 Mar 2010 18:50:20 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 793628FC22; Thu, 18 Mar 2010 18:50:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIoKGT007012; Thu, 18 Mar 2010 18:50:20 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIoKho007010; Thu, 18 Mar 2010 18:50:20 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181850.o2IIoKho007010@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205288 - stable/8/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:50:20 -0000 Author: yongari Date: Thu Mar 18 18:50:20 2010 New Revision: 205288 URL: http://svn.freebsd.org/changeset/base/205288 Log: MFC r203358,203716: r203358: PCI express device status register has W1C feature. Writing 0 has no effect. Make sure to clear error bits by writing 1. [1] While I'm here use predefined value instead of hardcodig magic vlaue. Submitted by: msaitoh at NetBSD [1] r203716: Move device specific flag configuration to attach routine. The softc obtained in device probe wouldn't be the same one used in device attach. Drivers should not assume any values stored in softc structure in probe routine will be available for its attach routine. Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Thu Mar 18 18:45:45 2010 (r205287) +++ stable/8/sys/dev/bge/if_bge.c Thu Mar 18 18:50:20 2010 (r205288) @@ -1993,10 +1993,6 @@ bge_probe(device_t dev) snprintf(buf, 96, "%s, %sASIC rev. %#08x", model, br != NULL ? "" : "unknown ", id); device_set_desc_copy(dev, buf); - if (pci_get_subvendor(dev) == DELL_VENDORID) - sc->bge_flags |= BGE_FLAG_NO_3LED; - if (did == BCOM_DEVICEID_BCM5755M) - sc->bge_flags |= BGE_FLAG_ADJUST_TRIM; return (0); } t++; @@ -2607,6 +2603,10 @@ bge_attach(device_t dev) sc->bge_flags |= BGE_FLAG_ADC_BUG; if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0) sc->bge_flags |= BGE_FLAG_5704_A0_BUG; + if (pci_get_subvendor(dev) == DELL_VENDORID) + sc->bge_flags |= BGE_FLAG_NO_3LED; + if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M) + sc->bge_flags |= BGE_FLAG_ADJUST_TRIM; if (BGE_IS_5705_PLUS(sc) && !(sc->bge_flags & BGE_FLAG_ADJUST_TRIM)) { if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || @@ -3136,14 +3136,17 @@ bge_reset(struct bge_softc *sc) devctl = pci_read_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2); /* Clear enable no snoop and disable relaxed ordering. */ - devctl &= ~(0x0010 | 0x0800); + devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE | + PCIM_EXP_CTL_NOSNOOP_ENABLE); /* Set PCIE max payload size to 128. */ devctl &= ~PCIM_EXP_CTL_MAX_PAYLOAD; pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, devctl, 2); /* Clear error status. */ pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA, - 0, 2); + PCIM_EXP_STA_CORRECTABLE_ERROR | + PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR | + PCIM_EXP_STA_UNSUPPORTED_REQ, 2); } /* Reset some of the PCI state that got zapped by reset. */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:52:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BACC106566C; Thu, 18 Mar 2010 18:52:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3378FC0C; Thu, 18 Mar 2010 18:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIqJRw007537; Thu, 18 Mar 2010 18:52:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIqJCT007535; Thu, 18 Mar 2010 18:52:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181852.o2IIqJCT007535@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205289 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:52:19 -0000 Author: yongari Date: Thu Mar 18 18:52:18 2010 New Revision: 205289 URL: http://svn.freebsd.org/changeset/base/205289 Log: MFC r203358,203716: r203358: PCI express device status register has W1C feature. Writing 0 has no effect. Make sure to clear error bits by writing 1. [1] While I'm here use predefined value instead of hardcodig magic vlaue. Submitted by: msaitoh at NetBSD [1] r203716: Move device specific flag configuration to attach routine. The softc obtained in device probe wouldn't be the same one used in device attach. Drivers should not assume any values stored in softc structure in probe routine will be available for its attach routine. Modified: stable/7/sys/dev/bge/if_bge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Thu Mar 18 18:50:20 2010 (r205288) +++ stable/7/sys/dev/bge/if_bge.c Thu Mar 18 18:52:18 2010 (r205289) @@ -1993,10 +1993,6 @@ bge_probe(device_t dev) snprintf(buf, 96, "%s, %sASIC rev. %#08x", model, br != NULL ? "" : "unknown ", id); device_set_desc_copy(dev, buf); - if (pci_get_subvendor(dev) == DELL_VENDORID) - sc->bge_flags |= BGE_FLAG_NO_3LED; - if (did == BCOM_DEVICEID_BCM5755M) - sc->bge_flags |= BGE_FLAG_ADJUST_TRIM; return (0); } t++; @@ -2607,6 +2603,10 @@ bge_attach(device_t dev) sc->bge_flags |= BGE_FLAG_ADC_BUG; if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0) sc->bge_flags |= BGE_FLAG_5704_A0_BUG; + if (pci_get_subvendor(dev) == DELL_VENDORID) + sc->bge_flags |= BGE_FLAG_NO_3LED; + if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M) + sc->bge_flags |= BGE_FLAG_ADJUST_TRIM; if (BGE_IS_5705_PLUS(sc) && !(sc->bge_flags & BGE_FLAG_ADJUST_TRIM)) { if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || @@ -3136,14 +3136,17 @@ bge_reset(struct bge_softc *sc) devctl = pci_read_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2); /* Clear enable no snoop and disable relaxed ordering. */ - devctl &= ~(0x0010 | 0x0800); + devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE | + PCIM_EXP_CTL_NOSNOOP_ENABLE); /* Set PCIE max payload size to 128. */ devctl &= ~PCIM_EXP_CTL_MAX_PAYLOAD; pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, devctl, 2); /* Clear error status. */ pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA, - 0, 2); + PCIM_EXP_STA_CORRECTABLE_ERROR | + PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR | + PCIM_EXP_STA_UNSUPPORTED_REQ, 2); } /* Reset some of the PCI state that got zapped by reset. */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:58:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62E511065679; Thu, 18 Mar 2010 18:58:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51F918FC13; Thu, 18 Mar 2010 18:58:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIwHEU008941; Thu, 18 Mar 2010 18:58:17 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIwHsO008939; Thu, 18 Mar 2010 18:58:17 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003181858.o2IIwHsO008939@svn.freebsd.org> From: Doug Barton Date: Thu, 18 Mar 2010 18:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205290 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:58:17 -0000 Author: dougb Date: Thu Mar 18 18:58:17 2010 New Revision: 205290 URL: http://svn.freebsd.org/changeset/base/205290 Log: For those of us mere mortals who do not aspire to the lofty heights of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in the 'make universe' goodnes without using unecessary time and resources. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Mar 18 18:52:18 2010 (r205289) +++ head/Makefile Thu Mar 18 18:58:17 2010 (r205290) @@ -311,6 +311,7 @@ universe_${target}: "check _.${target}.buildworld for details" | ${MAKEFAIL})) @echo ">> ${target} buildworld completed on `LC_ALL=C date`" .endif +.if !defined(MAKE_JUST_WORLDS) .if exists(${.CURDIR}/sys/${target}/conf/NOTES) @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ @@ -319,6 +320,7 @@ universe_${target}: .endif @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \ universe_kernels +.endif @echo ">> ${target} completed on `LC_ALL=C date`" .endfor universe_kernels: universe_kernconfs From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 18:58:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26BC510657AE; Thu, 18 Mar 2010 18:58:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13E6D8FC19; Thu, 18 Mar 2010 18:58:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IIwOUA009009; Thu, 18 Mar 2010 18:58:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IIwOnv009007; Thu, 18 Mar 2010 18:58:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181858.o2IIwOnv009007@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 18:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205291 - stable/8/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 18:58:25 -0000 Author: yongari Date: Thu Mar 18 18:58:24 2010 New Revision: 205291 URL: http://svn.freebsd.org/changeset/base/205291 Log: MFC r202826-202827,204146 r202826: s/Mhz/MHz/g Submitted by: N.J. Mann njm dot me dot uk > r202827: Yukon Ultra2 has 125MHz clock. r204146: Correct inversed programming of ethernet hardware address on big-endian architecture. Submitted by: C. Jayachandran (initial version) Modified: stable/8/sys/dev/msk/if_msk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Thu Mar 18 18:58:17 2010 (r205290) +++ stable/8/sys/dev/msk/if_msk.c Thu Mar 18 18:58:24 2010 (r205291) @@ -1699,15 +1699,15 @@ mskc_attach(device_t dev) switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_EC_U: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_EX: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; /* @@ -1725,11 +1725,11 @@ mskc_attach(device_t dev) sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_FE: - sc->msk_clock = 100; /* 100 Mhz */ + sc->msk_clock = 100; /* 100 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER; break; case CHIP_ID_YUKON_FE_P: - sc->msk_clock = 50; /* 50 Mhz */ + sc->msk_clock = 50; /* 50 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { @@ -1748,15 +1748,15 @@ mskc_attach(device_t dev) } break; case CHIP_ID_YUKON_XL: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_UL_2: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ break; } @@ -3715,10 +3715,10 @@ msk_init_locked(struct msk_if_softc *sc_ struct msk_softc *sc; struct ifnet *ifp; struct mii_data *mii; - uint16_t eaddr[ETHER_ADDR_LEN / 2]; + uint8_t *eaddr; uint16_t gmac; uint32_t reg; - int error, i; + int error; MSK_IF_LOCK_ASSERT(sc_if); @@ -3787,14 +3787,20 @@ msk_init_locked(struct msk_if_softc *sc_ GMAC_WRITE_2(sc, sc_if->msk_port, GM_SERIAL_MODE, gmac); /* Set station address. */ - bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN); - for (i = 0; i < ETHER_ADDR_LEN /2; i++) - GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L + i * 4, - eaddr[i]); - for (i = 0; i < ETHER_ADDR_LEN /2; i++) - GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L + i * 4, - eaddr[i]); - + eaddr = IF_LLADDR(ifp); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L, + eaddr[0] | (eaddr[1] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1M, + eaddr[2] | (eaddr[3] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1H, + eaddr[4] | (eaddr[5] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L, + eaddr[0] | (eaddr[1] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2M, + eaddr[2] | (eaddr[3] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2H, + eaddr[4] | (eaddr[5] << 8)); + /* Disable interrupts for counter overflows. */ GMAC_WRITE_2(sc, sc_if->msk_port, GM_TX_IRQ_MSK, 0); GMAC_WRITE_2(sc, sc_if->msk_port, GM_RX_IRQ_MSK, 0); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 19:00:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 666D7106564A; Thu, 18 Mar 2010 19:00:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 509808FC08; Thu, 18 Mar 2010 19:00:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IJ0amo009596; Thu, 18 Mar 2010 19:00:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IJ0am5009587; Thu, 18 Mar 2010 19:00:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201003181900.o2IJ0am5009587@svn.freebsd.org> From: Doug Barton Date: Thu, 18 Mar 2010 19:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205292 - in head: contrib/bind9 contrib/bind9/bin/named contrib/bind9/doc/arm contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns contrib/bind9/lib/lwres/man lib/bind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 19:00:36 -0000 Author: dougb Date: Thu Mar 18 19:00:35 2010 New Revision: 205292 URL: http://svn.freebsd.org/changeset/base/205292 Log: Update to 9.6.2-P1, the latest patchfix release which deals with the problems related to the handling of broken DNSSEC trust chains. This fix is only relevant for those who have DNSSEC validation enabled and configure trust anchors from third parties, either manually, or through a system like DLV. Modified: head/contrib/bind9/CHANGES head/contrib/bind9/bin/named/server.c head/contrib/bind9/doc/arm/Bv9ARM-book.xml head/contrib/bind9/doc/arm/Bv9ARM.ch06.html head/contrib/bind9/doc/arm/Bv9ARM.ch07.html head/contrib/bind9/doc/arm/Bv9ARM.ch08.html head/contrib/bind9/doc/arm/Bv9ARM.ch09.html head/contrib/bind9/doc/arm/Bv9ARM.html head/contrib/bind9/doc/arm/Bv9ARM.pdf head/contrib/bind9/doc/arm/man.dig.html head/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html head/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html head/contrib/bind9/doc/arm/man.dnssec-keygen.html head/contrib/bind9/doc/arm/man.dnssec-signzone.html head/contrib/bind9/doc/arm/man.host.html head/contrib/bind9/doc/arm/man.named-checkconf.html head/contrib/bind9/doc/arm/man.named-checkzone.html head/contrib/bind9/doc/arm/man.named.html head/contrib/bind9/doc/arm/man.nsupdate.html head/contrib/bind9/doc/arm/man.rndc-confgen.html head/contrib/bind9/doc/arm/man.rndc.conf.html head/contrib/bind9/doc/arm/man.rndc.html head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/include/dns/rdataset.h head/contrib/bind9/lib/dns/include/dns/resolver.h head/contrib/bind9/lib/dns/include/dns/result.h head/contrib/bind9/lib/dns/include/dns/validator.h head/contrib/bind9/lib/dns/ncache.c head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/rdatalist.c head/contrib/bind9/lib/dns/rdataset.c head/contrib/bind9/lib/dns/rdataslab.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/result.c head/contrib/bind9/lib/dns/sdb.c head/contrib/bind9/lib/dns/sdlz.c head/contrib/bind9/lib/dns/validator.c head/contrib/bind9/lib/dns/view.c head/contrib/bind9/lib/lwres/man/lwres.html head/contrib/bind9/lib/lwres/man/lwres_buffer.html head/contrib/bind9/lib/lwres/man/lwres_config.html head/contrib/bind9/lib/lwres/man/lwres_context.html head/contrib/bind9/lib/lwres/man/lwres_gabn.html head/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html head/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html head/contrib/bind9/lib/lwres/man/lwres_gethostent.html head/contrib/bind9/lib/lwres/man/lwres_getipnode.html head/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html head/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html head/contrib/bind9/lib/lwres/man/lwres_gnba.html head/contrib/bind9/lib/lwres/man/lwres_hstrerror.html head/contrib/bind9/lib/lwres/man/lwres_inetntop.html head/contrib/bind9/lib/lwres/man/lwres_noop.html head/contrib/bind9/lib/lwres/man/lwres_packet.html head/contrib/bind9/lib/lwres/man/lwres_resutil.html head/contrib/bind9/version head/lib/bind/config.h Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/CHANGES Thu Mar 18 19:00:35 2010 (r205292) @@ -1,3 +1,6 @@ + --- 9.6.2-P1 released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] --- 9.6.2 released --- Modified: head/contrib/bind9/bin/named/server.c ============================================================================== --- head/contrib/bind9/bin/named/server.c Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/bin/named/server.c Thu Mar 18 19:00:35 2010 (r205292) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.520.12.11 2009/12/24 00:17:47 each Exp $ */ +/* $Id: server.c,v 1.520.12.11.8.2 2010/02/25 10:57:11 tbox Exp $ */ /*! \file */ @@ -4726,6 +4726,8 @@ dumpdone(void *arg, isc_result_t result) } if (dctx->cache != NULL) { dns_adb_dump(dctx->view->view->adb, dctx->fp); + dns_resolver_printbadcache(dctx->view->view->resolver, + dctx->fp); dns_db_detach(&dctx->cache); } if (dctx->dumpzones) { Modified: head/contrib/bind9/doc/arm/Bv9ARM-book.xml ============================================================================== --- head/contrib/bind9/doc/arm/Bv9ARM-book.xml Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/doc/arm/Bv9ARM-book.xml Thu Mar 18 19:00:35 2010 (r205292) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + BIND 9 Administrator Reference Manual @@ -7705,6 +7705,13 @@ avoid-v6-udp-ports { 40000; range 50000 1800 (30 minutes). + + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. + + Modified: head/contrib/bind9/doc/arm/Bv9ARM.ch06.html ============================================================================== --- head/contrib/bind9/doc/arm/Bv9ARM.ch06.html Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/doc/arm/Bv9ARM.ch06.html Thu Mar 18 19:00:35 2010 (r205292) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -78,25 +78,25 @@
    server Statement Definition and Usage
    statistics-channels Statement Grammar
    -
    statistics-channels Statement Definition and +
    statistics-channels Statement Definition and Usage
    -
    trusted-keys Statement Grammar
    -
    trusted-keys Statement Definition +
    trusted-keys Statement Grammar
    +
    trusted-keys Statement Definition and Usage
    view Statement Grammar
    -
    view Statement Definition and Usage
    +
    view Statement Definition and Usage
    zone Statement Grammar
    -
    zone Statement Definition and Usage
    +
    zone Statement Definition and Usage
    -
    Zone File
    +
    Zone File
    Types of Resource Records and When to Use Them
    -
    Discussion of MX Records
    +
    Discussion of MX Records
    Setting TTLs
    -
    Inverse Mapping in IPv4
    -
    Other Zone File Directives
    -
    BIND Master File Extension: the $GENERATE Directive
    +
    Inverse Mapping in IPv4
    +
    Other Zone File Directives
    +
    BIND Master File Extension: the $GENERATE Directive
    Additional File Formats
    BIND9 Statistics
    @@ -4397,14 +4397,22 @@ avoid-v6-udp-ports { 40000; range 50000 Tuning
    lame-ttl
    -

    +

    +

    Sets the number of seconds to cache a lame server indication. 0 disables caching. (This is NOT recommended.) The default is 600 (10 minutes) and the maximum value is 1800 (30 minutes). -

    +

    +

    + Lame-ttl also controls the amount of time DNSSEC + validation failures are cached. There is a minimum + of 30 seconds applied to bad cache entries if the + lame-ttl is set to less than 30 seconds. +

    +
    max-ncache-ttl

    To reduce network traffic and increase performance, @@ -5060,7 +5068,7 @@ avoid-v6-udp-ports { 40000; range 50000

    -statistics-channels Statement Definition and +statistics-channels Statement Definition and Usage

    The statistics-channels statement @@ -5111,7 +5119,7 @@ avoid-v6-udp-ports { 40000; range 50000

    -trusted-keys Statement Grammar

    +trusted-keys Statement Grammar
    trusted-keys {
         string number number number string ;
         [ string number number number string ; [...]]
    @@ -5120,7 +5128,7 @@ avoid-v6-udp-ports { 40000; range 50000 
     
     

    -trusted-keys Statement Definition +trusted-keys Statement Definition and Usage

    The trusted-keys statement defines @@ -5166,7 +5174,7 @@ avoid-v6-udp-ports { 40000; range 50000

    -view Statement Definition and Usage

    +view Statement Definition and Usage

    The view statement is a powerful feature @@ -5432,10 +5440,10 @@ zone zone_

    -zone Statement Definition and Usage

    +zone Statement Definition and Usage

    -Zone Types

    +Zone Types
    @@ -5646,7 +5654,7 @@ zone zone_

    -Class

    +Class

    The zone's name may optionally be followed by a class. If a class is not specified, class IN (for Internet), @@ -5668,7 +5676,7 @@ zone zone_

    -Zone Options

    +Zone Options
    allow-notify

    @@ -6247,7 +6255,7 @@ zone zone_

    -Zone File

    +Zone File

    Types of Resource Records and When to Use Them

    @@ -6260,7 +6268,7 @@ zone zone_

    -Resource Records

    +Resource Records

    A domain name identifies a node. Each node has a set of resource information, which may be empty. The set of resource @@ -6997,7 +7005,7 @@ zone zone_

    -Textual expression of RRs

    +Textual expression of RRs

    RRs are represented in binary form in the packets of the DNS protocol, and are usually represented in highly encoded form @@ -7200,7 +7208,7 @@ zone zone_

    -Discussion of MX Records

    +Discussion of MX Records

    As described above, domain servers store information as a series of resource records, each of which contains a particular @@ -7456,7 +7464,7 @@ zone zone_

    -Inverse Mapping in IPv4

    +Inverse Mapping in IPv4

    Reverse name resolution (that is, translation from IP address to name) is achieved by means of the in-addr.arpa domain @@ -7517,7 +7525,7 @@ zone zone_

    -Other Zone File Directives

    +Other Zone File Directives

    The Master File Format was initially defined in RFC 1035 and has subsequently been extended. While the Master File Format @@ -7532,7 +7540,7 @@ zone zone_

    -The @ (at-sign)

    +The @ (at-sign)

    When used in the label (or name) field, the asperand or at-sign (@) symbol represents the current origin. @@ -7543,7 +7551,7 @@ zone zone_

    -The $ORIGIN Directive

    +The $ORIGIN Directive

    Syntax: $ORIGIN domain-name @@ -7572,7 +7580,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMP

    -The $INCLUDE Directive

    +The $INCLUDE Directive

    Syntax: $INCLUDE filename @@ -7608,7 +7616,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMP

    -The $TTL Directive

    +The $TTL Directive

    Syntax: $TTL default-ttl @@ -7627,7 +7635,7 @@ WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMP

    -BIND Master File Extension: the $GENERATE Directive

    +BIND Master File Extension: the $GENERATE Directive

    Syntax: $GENERATE range @@ -8018,7 +8026,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Name Server Statistics Counters

    +Name Server Statistics Counters
    @@ -8575,7 +8583,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Zone Maintenance Statistics Counters

    +Zone Maintenance Statistics Counters
    @@ -8729,7 +8737,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Resolver Statistics Counters

    +Resolver Statistics Counters
    @@ -9105,7 +9113,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Socket I/O Statistics Counters

    +Socket I/O Statistics Counters

    Socket I/O statistics counters are defined per socket types, which are @@ -9260,7 +9268,7 @@ $GENERATE 1-127 $ CNAME $.0

    -Compatibility with BIND 8 Counters

    +Compatibility with BIND 8 Counters

    Most statistics counters that were available in BIND 8 are also supported in Modified: head/contrib/bind9/doc/arm/Bv9ARM.ch07.html ============================================================================== --- head/contrib/bind9/doc/arm/Bv9ARM.ch07.html Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/doc/arm/Bv9ARM.ch07.html Thu Mar 18 19:00:35 2010 (r205292) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -46,10 +46,10 @@

    Table of Contents

    Access Control Lists
    -
    Chroot and Setuid
    +
    Chroot and Setuid
    -
    The chroot Environment
    -
    Using the setuid Function
    +
    The chroot Environment
    +
    Using the setuid Function
    Dynamic Update Security
    @@ -119,7 +119,7 @@ zone "example.com" {

    -Chroot and Setuid +Chroot and Setuid

    On UNIX servers, it is possible to run BIND @@ -145,7 +145,7 @@ zone "example.com" {

    -The chroot Environment

    +The chroot Environment

    In order for a chroot environment to @@ -173,7 +173,7 @@ zone "example.com" {

    -Using the setuid Function

    +Using the setuid Function

    Prior to running the named daemon, use Modified: head/contrib/bind9/doc/arm/Bv9ARM.ch08.html ============================================================================== --- head/contrib/bind9/doc/arm/Bv9ARM.ch08.html Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/doc/arm/Bv9ARM.ch08.html Thu Mar 18 19:00:35 2010 (r205292) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -45,18 +45,18 @@

    -Common Problems

    +Common Problems

    -It's not working; how can I figure out what's wrong?

    +It's not working; how can I figure out what's wrong?

    The best solution to solving installation and configuration issues is to take preventative measures by setting @@ -68,7 +68,7 @@

    -Incrementing and Changing the Serial Number

    +Incrementing and Changing the Serial Number

    Zone serial numbers are just numbers — they aren't date related. A lot of people set them to a number that @@ -95,7 +95,7 @@

    -Where Can I Get Help?

    +Where Can I Get Help?

    The Internet Systems Consortium (ISC) offers a wide range Modified: head/contrib/bind9/doc/arm/Bv9ARM.ch09.html ============================================================================== --- head/contrib/bind9/doc/arm/Bv9ARM.ch09.html Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/doc/arm/Bv9ARM.ch09.html Thu Mar 18 19:00:35 2010 (r205292) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -45,21 +45,21 @@

    -Acknowledgments

    +Acknowledgments

    A Brief History of the DNS and BIND @@ -162,7 +162,7 @@

    -General DNS Reference Information

    +General DNS Reference Information

    IPv6 addresses (AAAA)

    @@ -250,17 +250,17 @@

    -Bibliography

    +Bibliography

    Standards

    -

    [RFC974] C. Partridge. Mail Routing and the Domain System. January 1986.

    +

    [RFC974] C. Partridge. Mail Routing and the Domain System. January 1986.

    -

    [RFC1034] P.V. Mockapetris. Domain Names — Concepts and Facilities. November 1987.

    +

    [RFC1034] P.V. Mockapetris. Domain Names — Concepts and Facilities. November 1987.

    -

    [RFC1035] P. V. Mockapetris. Domain Names — Implementation and +

    [RFC1035] P. V. Mockapetris. Domain Names — Implementation and Specification. November 1987.

    @@ -268,42 +268,42 @@

    Proposed Standards

    -

    [RFC2181] R., R. Bush Elz. Clarifications to the DNS +

    [RFC2181] R., R. Bush Elz. Clarifications to the DNS Specification. July 1997.

    -

    [RFC2308] M. Andrews. Negative Caching of DNS +

    [RFC2308] M. Andrews. Negative Caching of DNS Queries. March 1998.

    -

    [RFC1995] M. Ohta. Incremental Zone Transfer in DNS. August 1996.

    +

    [RFC1995] M. Ohta. Incremental Zone Transfer in DNS. August 1996.

    -

    [RFC1996] P. Vixie. A Mechanism for Prompt Notification of Zone Changes. August 1996.

    +

    [RFC1996] P. Vixie. A Mechanism for Prompt Notification of Zone Changes. August 1996.

    -

    [RFC2136] P. Vixie, S. Thomson, Y. Rekhter, and J. Bound. Dynamic Updates in the Domain Name System. April 1997.

    +

    [RFC2136] P. Vixie, S. Thomson, Y. Rekhter, and J. Bound. Dynamic Updates in the Domain Name System. April 1997.

    -

    [RFC2671] P. Vixie. Extension Mechanisms for DNS (EDNS0). August 1997.

    +

    [RFC2671] P. Vixie. Extension Mechanisms for DNS (EDNS0). August 1997.

    -

    [RFC2672] M. Crawford. Non-Terminal DNS Name Redirection. August 1999.

    +

    [RFC2672] M. Crawford. Non-Terminal DNS Name Redirection. August 1999.

    -

    [RFC2845] P. Vixie, O. Gudmundsson, D. Eastlake, 3rd, and B. Wellington. Secret Key Transaction Authentication for DNS (TSIG). May 2000.

    +

    [RFC2845] P. Vixie, O. Gudmundsson, D. Eastlake, 3rd, and B. Wellington. Secret Key Transaction Authentication for DNS (TSIG). May 2000.

    -

    [RFC2930] D. Eastlake, 3rd. Secret Key Establishment for DNS (TKEY RR). September 2000.

    +

    [RFC2930] D. Eastlake, 3rd. Secret Key Establishment for DNS (TKEY RR). September 2000.

    -

    [RFC2931] D. Eastlake, 3rd. DNS Request and Transaction Signatures (SIG(0)s). September 2000.

    +

    [RFC2931] D. Eastlake, 3rd. DNS Request and Transaction Signatures (SIG(0)s). September 2000.

    -

    [RFC3007] B. Wellington. Secure Domain Name System (DNS) Dynamic Update. November 2000.

    +

    [RFC3007] B. Wellington. Secure Domain Name System (DNS) Dynamic Update. November 2000.

    -

    [RFC3645] S. Kwan, P. Garg, J. Gilroy, L. Esibov, J. Westhead, and R. Hall. Generic Security Service Algorithm for Secret +

    [RFC3645] S. Kwan, P. Garg, J. Gilroy, L. Esibov, J. Westhead, and R. Hall. Generic Security Service Algorithm for Secret Key Transaction Authentication for DNS (GSS-TSIG). October 2003.

    @@ -312,19 +312,19 @@

    DNS Security Proposed Standards

    -

    [RFC3225] D. Conrad. Indicating Resolver Support of DNSSEC. December 2001.

    +

    [RFC3225] D. Conrad. Indicating Resolver Support of DNSSEC. December 2001.

    -

    [RFC3833] D. Atkins and R. Austein. Threat Analysis of the Domain Name System (DNS). August 2004.

    +

    [RFC3833] D. Atkins and R. Austein. Threat Analysis of the Domain Name System (DNS). August 2004.

    -

    [RFC4033] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. DNS Security Introduction and Requirements. March 2005.

    +

    [RFC4033] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. DNS Security Introduction and Requirements. March 2005.

    -

    [RFC4034] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Resource Records for the DNS Security Extensions. March 2005.

    +

    [RFC4034] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Resource Records for the DNS Security Extensions. March 2005.

    -

    [RFC4035] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Protocol Modifications for the DNS +

    [RFC4035] R. Arends, R. Austein, M. Larson, D. Massey, and S. Rose. Protocol Modifications for the DNS Security Extensions. March 2005.

    @@ -332,146 +332,146 @@

    Other Important RFCs About DNS Implementation

    -

    [RFC1535] E. Gavron. A Security Problem and Proposed Correction With Widely +

    [RFC1535] E. Gavron. A Security Problem and Proposed Correction With Widely Deployed DNS Software.. October 1993.

    -

    [RFC1536] A. Kumar, J. Postel, C. Neuman, P. Danzig, and S. Miller. Common DNS Implementation +

    [RFC1536] A. Kumar, J. Postel, C. Neuman, P. Danzig, and S. Miller. Common DNS Implementation Errors and Suggested Fixes. October 1993.

    -

    [RFC1982] R. Elz and R. Bush. Serial Number Arithmetic. August 1996.

    +

    [RFC1982] R. Elz and R. Bush. Serial Number Arithmetic. August 1996.

    -

    [RFC4074] Y. Morishita and T. Jinmei. Common Misbehaviour Against DNS +

    [RFC4074] Y. Morishita and T. Jinmei. Common Misbehaviour Against DNS Queries for IPv6 Addresses. May 2005.

    Resource Record Types

    -

    [RFC1183] C.F. Everhart, L. A. Mamakos, R. Ullmann, and P. Mockapetris. New DNS RR Definitions. October 1990.

    +

    [RFC1183] C.F. Everhart, L. A. Mamakos, R. Ullmann, and P. Mockapetris. New DNS RR Definitions. October 1990.

    -

    [RFC1706] B. Manning and R. Colella. DNS NSAP Resource Records. October 1994.

    +

    [RFC1706] B. Manning and R. Colella. DNS NSAP Resource Records. October 1994.

    -

    [RFC2168] R. Daniel and M. Mealling. Resolution of Uniform Resource Identifiers using +

    [RFC2168] R. Daniel and M. Mealling. Resolution of Uniform Resource Identifiers using the Domain Name System. June 1997.

    -

    [RFC1876] C. Davis, P. Vixie, T., and I. Dickinson. A Means for Expressing Location Information in the +

    [RFC1876] C. Davis, P. Vixie, T., and I. Dickinson. A Means for Expressing Location Information in the Domain Name System. January 1996.

    -

    [RFC2052] A. Gulbrandsen and P. Vixie. A DNS RR for Specifying the +

    [RFC2052] A. Gulbrandsen and P. Vixie. A DNS RR for Specifying the Location of Services.. October 1996.

    -

    [RFC2163] A. Allocchio. Using the Internet DNS to +

    [RFC2163] A. Allocchio. Using the Internet DNS to Distribute MIXER Conformant Global Address Mapping. January 1998.

    -

    [RFC2230] R. Atkinson. Key Exchange Delegation Record for the DNS. October 1997.

    +

    [RFC2230] R. Atkinson. Key Exchange Delegation Record for the DNS. October 1997.

    -

    [RFC2536] D. Eastlake, 3rd. DSA KEYs and SIGs in the Domain Name System (DNS). March 1999.

    +

    [RFC2536] D. Eastlake, 3rd. DSA KEYs and SIGs in the Domain Name System (DNS). March 1999.

    -

    [RFC2537] D. Eastlake, 3rd. RSA/MD5 KEYs and SIGs in the Domain Name System (DNS). March 1999.

    +

    [RFC2537] D. Eastlake, 3rd. RSA/MD5 KEYs and SIGs in the Domain Name System (DNS). March 1999.

    -

    [RFC2538] D. Eastlake, 3rd and O. Gudmundsson. Storing Certificates in the Domain Name System (DNS). March 1999.

    +

    [RFC2538] D. Eastlake, 3rd and O. Gudmundsson. Storing Certificates in the Domain Name System (DNS). March 1999.

    -

    [RFC2539] D. Eastlake, 3rd. Storage of Diffie-Hellman Keys in the Domain Name System (DNS). March 1999.

    +

    [RFC2539] D. Eastlake, 3rd. Storage of Diffie-Hellman Keys in the Domain Name System (DNS). March 1999.

    -

    [RFC2540] D. Eastlake, 3rd. Detached Domain Name System (DNS) Information. March 1999.

    +

    [RFC2540] D. Eastlake, 3rd. Detached Domain Name System (DNS) Information. March 1999.

    -

    [RFC2782] A. Gulbrandsen. P. Vixie. L. Esibov. A DNS RR for specifying the location of services (DNS SRV). February 2000.

    +

    [RFC2782] A. Gulbrandsen. P. Vixie. L. Esibov. A DNS RR for specifying the location of services (DNS SRV). February 2000.

    -

    [RFC2915] M. Mealling. R. Daniel. The Naming Authority Pointer (NAPTR) DNS Resource Record. September 2000.

    +

    [RFC2915] M. Mealling. R. Daniel. The Naming Authority Pointer (NAPTR) DNS Resource Record. September 2000.

    -

    [RFC3110] D. Eastlake, 3rd. RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS). May 2001.

    +

    [RFC3110] D. Eastlake, 3rd. RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS). May 2001.

    -

    [RFC3123] P. Koch. A DNS RR Type for Lists of Address Prefixes (APL RR). June 2001.

    +

    [RFC3123] P. Koch. A DNS RR Type for Lists of Address Prefixes (APL RR). June 2001.

    -

    [RFC3596] S. Thomson, C. Huitema, V. Ksinant, and M. Souissi. DNS Extensions to support IP +

    [RFC3596] S. Thomson, C. Huitema, V. Ksinant, and M. Souissi. DNS Extensions to support IP version 6. October 2003.

    -

    [RFC3597] A. Gustafsson. Handling of Unknown DNS Resource Record (RR) Types. September 2003.

    +

    [RFC3597] A. Gustafsson. Handling of Unknown DNS Resource Record (RR) Types. September 2003.

    DNS and the Internet

    -

    [RFC1101] P. V. Mockapetris. DNS Encoding of Network Names +

    [RFC1101] P. V. Mockapetris. DNS Encoding of Network Names and Other Types. April 1989.

    -

    [RFC1123] Braden. Requirements for Internet Hosts - Application and +

    [RFC1123] Braden. Requirements for Internet Hosts - Application and Support. October 1989.

    -

    [RFC1591] J. Postel. Domain Name System Structure and Delegation. March 1994.

    +

    [RFC1591] J. Postel. Domain Name System Structure and Delegation. March 1994.

    -

    [RFC2317] H. Eidnes, G. de Groot, and P. Vixie. Classless IN-ADDR.ARPA Delegation. March 1998.

    +

    [RFC2317] H. Eidnes, G. de Groot, and P. Vixie. Classless IN-ADDR.ARPA Delegation. March 1998.

    -

    [RFC2826] Internet Architecture Board. IAB Technical Comment on the Unique DNS Root. May 2000.

    +

    [RFC2826] Internet Architecture Board. IAB Technical Comment on the Unique DNS Root. May 2000.

    -

    [RFC2929] D. Eastlake, 3rd, E. Brunner-Williams, and B. Manning. Domain Name System (DNS) IANA Considerations. September 2000.

    +

    [RFC2929] D. Eastlake, 3rd, E. Brunner-Williams, and B. Manning. Domain Name System (DNS) IANA Considerations. September 2000.

    DNS Operations

    -

    [RFC1033] M. Lottor. Domain administrators operations guide.. November 1987.

    +

    [RFC1033] M. Lottor. Domain administrators operations guide.. November 1987.

    -

    [RFC1537] P. Beertema. Common DNS Data File +

    [RFC1537] P. Beertema. Common DNS Data File Configuration Errors. October 1993.

    -

    [RFC1912] D. Barr. Common DNS Operational and +

    [RFC1912] D. Barr. Common DNS Operational and Configuration Errors. February 1996.

    -

    [RFC2010] B. Manning and P. Vixie. Operational Criteria for Root Name Servers.. October 1996.

    +

    [RFC2010] B. Manning and P. Vixie. Operational Criteria for Root Name Servers.. October 1996.

    -

    [RFC2219] M. Hamilton and R. Wright. Use of DNS Aliases for +

    [RFC2219] M. Hamilton and R. Wright. Use of DNS Aliases for Network Services.. October 1997.

    Internationalized Domain Names

    -

    [RFC2825] IAB and R. Daigle. A Tangled Web: Issues of I18N, Domain Names, +

    [RFC2825] IAB and R. Daigle. A Tangled Web: Issues of I18N, Domain Names, and the Other Internet protocols. May 2000.

    -

    [RFC3490] P. Faltstrom, P. Hoffman, and A. Costello. Internationalizing Domain Names in Applications (IDNA). March 2003.

    +

    [RFC3490] P. Faltstrom, P. Hoffman, and A. Costello. Internationalizing Domain Names in Applications (IDNA). March 2003.

    -

    [RFC3491] P. Hoffman and M. Blanchet. Nameprep: A Stringprep Profile for Internationalized Domain Names. March 2003.

    +

    [RFC3491] P. Hoffman and M. Blanchet. Nameprep: A Stringprep Profile for Internationalized Domain Names. March 2003.

    -

    [RFC3492] A. Costello. Punycode: A Bootstring encoding of Unicode +

    [RFC3492] A. Costello. Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA). March 2003.

    @@ -487,47 +487,47 @@

    -

    [RFC1464] R. Rosenbaum. Using the Domain Name System To Store Arbitrary String +

    [RFC1464] R. Rosenbaum. Using the Domain Name System To Store Arbitrary String Attributes. May 1993.

    -

    [RFC1713] A. Romao. Tools for DNS Debugging. November 1994.

    +

    [RFC1713] A. Romao. Tools for DNS Debugging. November 1994.

    -

    [RFC1794] T. Brisco. DNS Support for Load +

    [RFC1794] T. Brisco. DNS Support for Load Balancing. April 1995.

    -

    [RFC2240] O. Vaughan. A Legal Basis for Domain Name Allocation. November 1997.

    +

    [RFC2240] O. Vaughan. A Legal Basis for Domain Name Allocation. November 1997.

    -

    [RFC2345] J. Klensin, T. Wolf, and G. Oglesby. Domain Names and Company Name Retrieval. May 1998.

    +

    [RFC2345] J. Klensin, T. Wolf, and G. Oglesby. Domain Names and Company Name Retrieval. May 1998.

    -

    [RFC2352] O. Vaughan. A Convention For Using Legal Names as Domain Names. May 1998.

    +

    [RFC2352] O. Vaughan. A Convention For Using Legal Names as Domain Names. May 1998.

    -

    [RFC3071] J. Klensin. Reflections on the DNS, RFC 1591, and Categories of Domains. February 2001.

    +

    [RFC3071] J. Klensin. Reflections on the DNS, RFC 1591, and Categories of Domains. February 2001.

    -

    [RFC3258] T. Hardie. Distributing Authoritative Name Servers via +

    [RFC3258] T. Hardie. Distributing Authoritative Name Servers via Shared Unicast Addresses. April 2002.

    -

    [RFC3901] A. Durand and J. Ihren. DNS IPv6 Transport Operational Guidelines. September 2004.

    +

    [RFC3901] A. Durand and J. Ihren. DNS IPv6 Transport Operational Guidelines. September 2004.

    Obsolete and Unimplemented Experimental RFC

    -

    [RFC1712] C. Farrell, M. Schulze, S. Pleitner, and D. Baldoni. DNS Encoding of Geographical +

    [RFC1712] C. Farrell, M. Schulze, S. Pleitner, and D. Baldoni. DNS Encoding of Geographical Location. November 1994.

    -

    [RFC2673] M. Crawford. Binary Labels in the Domain Name System. August 1999.

    +

    [RFC2673] M. Crawford. Binary Labels in the Domain Name System. August 1999.

    -

    [RFC2874] M. Crawford and C. Huitema. DNS Extensions to Support IPv6 Address Aggregation +

    [RFC2874] M. Crawford and C. Huitema. DNS Extensions to Support IPv6 Address Aggregation and Renumbering. July 2000.

    @@ -541,39 +541,39 @@

    -

    [RFC2065] D. Eastlake, 3rd and C. Kaufman. Domain Name System Security Extensions. January 1997.

    +

    [RFC2065] D. Eastlake, 3rd and C. Kaufman. Domain Name System Security Extensions. January 1997.

    -

    [RFC2137] D. Eastlake, 3rd. Secure Domain Name System Dynamic Update. April 1997.

    +

    [RFC2137] D. Eastlake, 3rd. Secure Domain Name System Dynamic Update. April 1997.

    -

    [RFC2535] D. Eastlake, 3rd. Domain Name System Security Extensions. March 1999.

    +

    [RFC2535] D. Eastlake, 3rd. Domain Name System Security Extensions. March 1999.

    -

    [RFC3008] B. Wellington. Domain Name System Security (DNSSEC) +

    [RFC3008] B. Wellington. Domain Name System Security (DNSSEC) Signing Authority. November 2000.

    -

    [RFC3090] E. Lewis. DNS Security Extension Clarification on Zone Status. March 2001.

    +

    [RFC3090] E. Lewis. DNS Security Extension Clarification on Zone Status. March 2001.

    -

    [RFC3445] D. Massey and S. Rose. Limiting the Scope of the KEY Resource Record (RR). December 2002.

    +

    [RFC3445] D. Massey and S. Rose. Limiting the Scope of the KEY Resource Record (RR). December 2002.

    -

    [RFC3655] B. Wellington and O. Gudmundsson. Redefinition of DNS Authenticated Data (AD) bit. November 2003.

    +

    [RFC3655] B. Wellington and O. Gudmundsson. Redefinition of DNS Authenticated Data (AD) bit. November 2003.

    -

    [RFC3658] O. Gudmundsson. Delegation Signer (DS) Resource Record (RR). December 2003.

    +

    [RFC3658] O. Gudmundsson. Delegation Signer (DS) Resource Record (RR). December 2003.

    -

    [RFC3755] S. Weiler. Legacy Resolver Compatibility for Delegation Signer (DS). May 2004.

    +

    [RFC3755] S. Weiler. Legacy Resolver Compatibility for Delegation Signer (DS). May 2004.

    -

    [RFC3757] O. Kolkman, J. Schlyter, and E. Lewis. Domain Name System KEY (DNSKEY) Resource Record +

    [RFC3757] O. Kolkman, J. Schlyter, and E. Lewis. Domain Name System KEY (DNSKEY) Resource Record (RR) Secure Entry Point (SEP) Flag. April 2004.

    -

    [RFC3845] J. Schlyter. DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format. August 2004.

    +

    [RFC3845] J. Schlyter. DNS Security (DNSSEC) NextSECure (NSEC) RDATA Format. August 2004.

    @@ -594,14 +594,14 @@

    -Other Documents About BIND +Other Documents About BIND

    -Bibliography

    +Bibliography
    -

    Paul Albitz and Cricket Liu. DNS and BIND. Copyright © 1998 Sebastopol, CA: O'Reilly and Associates.

    +

    Paul Albitz and Cricket Liu. DNS and BIND. Copyright © 1998 Sebastopol, CA: O'Reilly and Associates.

    Modified: head/contrib/bind9/doc/arm/Bv9ARM.html ============================================================================== --- head/contrib/bind9/doc/arm/Bv9ARM.html Thu Mar 18 18:58:24 2010 (r205291) +++ head/contrib/bind9/doc/arm/Bv9ARM.html Thu Mar 18 19:00:35 2010 (r205292) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + @@ -157,25 +157,25 @@
    server Statement Definition and Usage
    statistics-channels Statement Grammar
    -
    statistics-channels Statement Definition and +
    statistics-channels Statement Definition and Usage
    -
    trusted-keys Statement Grammar
    -
    trusted-keys Statement Definition +
    trusted-keys Statement Grammar
    +
    trusted-keys Statement Definition and Usage
    view Statement Grammar
    -
    view Statement Definition and Usage
    +
    view Statement Definition and Usage
    zone Statement Grammar
    -
    zone Statement Definition and Usage
    +
    zone Statement Definition and Usage
    -
    Zone File
    +
    Zone File
    Types of Resource Records and When to Use Them
    -
    Discussion of MX Records
    +
    Discussion of MX Records
    Setting TTLs
    -
    Inverse Mapping in IPv4
    -
    Other Zone File Directives
    -
    BIND Master File Extension: the $GENERATE Directive
    +
    Inverse Mapping in IPv4
    +
    Other Zone File Directives
    +
    BIND Master File Extension: the $GENERATE Directive
    Additional File Formats
    BIND9 Statistics
    @@ -184,31 +184,31 @@
    7. BIND 9 Security Considerations
    Access Control Lists
    -
    Chroot and Setuid
    +
    Chroot and Setuid
    -
    The chroot Environment
    -
    Using the setuid Function
    +
    The chroot Environment
    +
    Using the setuid Function
    Dynamic Update Security
    8. Troubleshooting
    -
    Common Problems
    -
    It's not working; how can I figure out what's wrong?
    -
    Incrementing and Changing the Serial Number
    -
    Where Can I Get Help?
    +
    Common Problems
    +
    It's not working; how can I figure out what's wrong?
    +
    Incrementing and Changing the Serial Number
    +
    Where Can I Get Help?
    A. Appendices
    -
    Acknowledgments
    +
    Acknowledgments
    A Brief History of the DNS and BIND
    -
    General DNS Reference Information
    +
    General DNS Reference Information
    IPv6 addresses (AAAA)
    Bibliography (and Suggested Reading)
    Request for Comments (RFCs)
    Internet Drafts
    -
    Other Documents About BIND
    +
    Other Documents About BIND
    I. Manual pages
    *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 19:00:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5241065675; Thu, 18 Mar 2010 19:00:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39DD28FC16; Thu, 18 Mar 2010 19:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IJ0c3q009633; Thu, 18 Mar 2010 19:00:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IJ0cOE009631; Thu, 18 Mar 2010 19:00:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181900.o2IJ0cOE009631@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 19:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205293 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 19:00:38 -0000 Author: yongari Date: Thu Mar 18 19:00:37 2010 New Revision: 205293 URL: http://svn.freebsd.org/changeset/base/205293 Log: MFC r202826-202827,204146 r202826: s/Mhz/MHz/g Submitted by: N.J. Mann njm dot me dot uk > r202827: Yukon Ultra2 has 125MHz clock. r204146: Correct inversed programming of ethernet hardware address on big-endian architecture. Submitted by: C. Jayachandran (initial version) Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Mar 18 19:00:35 2010 (r205292) +++ stable/7/sys/dev/msk/if_msk.c Thu Mar 18 19:00:37 2010 (r205293) @@ -1699,15 +1699,15 @@ mskc_attach(device_t dev) switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_EC_U: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_EX: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; /* @@ -1725,11 +1725,11 @@ mskc_attach(device_t dev) sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_FE: - sc->msk_clock = 100; /* 100 Mhz */ + sc->msk_clock = 100; /* 100 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER; break; case CHIP_ID_YUKON_FE_P: - sc->msk_clock = 50; /* 50 Mhz */ + sc->msk_clock = 50; /* 50 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { @@ -1748,15 +1748,15 @@ mskc_attach(device_t dev) } break; case CHIP_ID_YUKON_XL: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_UL_2: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ break; } @@ -3715,10 +3715,10 @@ msk_init_locked(struct msk_if_softc *sc_ struct msk_softc *sc; struct ifnet *ifp; struct mii_data *mii; - uint16_t eaddr[ETHER_ADDR_LEN / 2]; + uint8_t *eaddr; uint16_t gmac; uint32_t reg; - int error, i; + int error; MSK_IF_LOCK_ASSERT(sc_if); @@ -3787,14 +3787,20 @@ msk_init_locked(struct msk_if_softc *sc_ GMAC_WRITE_2(sc, sc_if->msk_port, GM_SERIAL_MODE, gmac); /* Set station address. */ - bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN); - for (i = 0; i < ETHER_ADDR_LEN /2; i++) - GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L + i * 4, - eaddr[i]); - for (i = 0; i < ETHER_ADDR_LEN /2; i++) - GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L + i * 4, - eaddr[i]); - + eaddr = IF_LLADDR(ifp); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L, + eaddr[0] | (eaddr[1] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1M, + eaddr[2] | (eaddr[3] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1H, + eaddr[4] | (eaddr[5] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L, + eaddr[0] | (eaddr[1] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2M, + eaddr[2] | (eaddr[3] << 8)); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2H, + eaddr[4] | (eaddr[5] << 8)); + /* Disable interrupts for counter overflows. */ GMAC_WRITE_2(sc, sc_if->msk_port, GM_TX_IRQ_MSK, 0); GMAC_WRITE_2(sc, sc_if->msk_port, GM_RX_IRQ_MSK, 0); From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 19:04:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9BAB106566B; Thu, 18 Mar 2010 19:04:04 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6E48FC18; Thu, 18 Mar 2010 19:04:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IJ44Kj010450; Thu, 18 Mar 2010 19:04:04 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IJ44Jl010447; Thu, 18 Mar 2010 19:04:04 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181904.o2IJ44Jl010447@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 19:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205294 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 19:04:04 -0000 Author: yongari Date: Thu Mar 18 19:04:04 2010 New Revision: 205294 URL: http://svn.freebsd.org/changeset/base/205294 Log: MFC r204149: Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to TSO over VLAN without VLAN hardware tagging. Driver changes and userland support will follow. Modified: stable/8/sys/net/if.h stable/8/sys/net/if_vlan.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/net/if.h ============================================================================== --- stable/8/sys/net/if.h Thu Mar 18 19:00:37 2010 (r205293) +++ stable/8/sys/net/if.h Thu Mar 18 19:04:04 2010 (r205294) @@ -218,6 +218,7 @@ struct if_data { #define IFCAP_TOE6 0x08000 /* interface can offload TCP6 */ #define IFCAP_VLAN_HWFILTER 0x10000 /* interface hw can filter vlan tag */ #define IFCAP_POLLING_NOCOUNT 0x20000 /* polling ticks cannot be fragmented */ +#define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) Modified: stable/8/sys/net/if_vlan.c ============================================================================== --- stable/8/sys/net/if_vlan.c Thu Mar 18 19:00:37 2010 (r205293) +++ stable/8/sys/net/if_vlan.c Thu Mar 18 19:04:04 2010 (r205294) @@ -1275,11 +1275,26 @@ vlan_capabilities(struct ifvlan *ifv) if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM; - ifp->if_hwassist = p->if_hwassist; + ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | + CSUM_UDP | CSUM_SCTP | CSUM_IP_FRAGS | CSUM_FRAGMENT); } else { ifp->if_capenable = 0; ifp->if_hwassist = 0; } + /* + * If the parent interface can do TSO on VLANs then + * propagate the hardware-assisted flag. TSO on VLANs + * does not necessarily require hardware VLAN tagging. + */ + if (p->if_capabilities & IFCAP_VLAN_HWTSO) + ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; + if (p->if_capenable & IFCAP_VLAN_HWTSO) { + ifp->if_capenable |= p->if_capenable & IFCAP_TSO; + ifp->if_hwassist |= p->if_hwassist & CSUM_TSO; + } else { + ifp->if_capenable &= ~(p->if_capenable & IFCAP_TSO); + ifp->if_hwassist &= ~(p->if_hwassist & CSUM_TSO); + } } static void From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 19:10:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BB3A106564A; Thu, 18 Mar 2010 19:10:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2958FC13; Thu, 18 Mar 2010 19:10:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IJA3cM011806; Thu, 18 Mar 2010 19:10:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IJA3f0011802; Thu, 18 Mar 2010 19:10:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003181910.o2IJA3f0011802@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Mar 2010 19:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205295 - stable/8/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 19:10:03 -0000 Author: yongari Date: Thu Mar 18 19:10:03 2010 New Revision: 205295 URL: http://svn.freebsd.org/changeset/base/205295 Log: MFC r204150: Add TSO support on VLAN in fconfig(8). Modified: stable/8/sbin/ifconfig/ifconfig.8 stable/8/sbin/ifconfig/ifconfig.c stable/8/sbin/ifconfig/ifvlan.c Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.8 Thu Mar 18 19:04:04 2010 (r205294) +++ stable/8/sbin/ifconfig/ifconfig.8 Thu Mar 18 19:10:03 2010 (r205295) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd February 20, 2010 .Dt IFCONFIG 8 .Os .Sh NAME @@ -408,20 +408,20 @@ they support in their capabilities. is a synonym for enabling all available WOL mechanisms. To disable WOL use .Fl wol . -.It Cm vlanmtu , vlanhwtag, vlanhwfilter +.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso If the driver offers user-configurable VLAN support, enable -reception of extended frames, tag processing in hardware, or -frame filtering in hardware, +reception of extended frames, tag processing in hardware, +frame filtering in hardware, or TSO on VLAN, respectively. Note that this must be issued on a physical interface associated with .Xr vlan 4 , not on a .Xr vlan 4 interface itself. -.It Fl vlanmtu , vlanhwtag, vlanhwfilter +.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso If the driver offers user-configurable VLAN support, disable -reception of extended frames, tag processing in hardware, or -frame filtering in hardware, +reception of extended frames, tag processing in hardware, +frame filtering in hardware, or TSO on VLAN, respectively. .It Cm vnet Ar jail Move the interface to the Modified: stable/8/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.c Thu Mar 18 19:04:04 2010 (r205294) +++ stable/8/sbin/ifconfig/ifconfig.c Thu Mar 18 19:10:03 2010 (r205295) @@ -865,7 +865,7 @@ unsetifdescr(const char *val, int value, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ -"\21VLAN_HWFILTER" +"\21VLAN_HWFILTER\23VLAN_HWTSO" /* * Print the status of the interface. If an address family was Modified: stable/8/sbin/ifconfig/ifvlan.c ============================================================================== --- stable/8/sbin/ifconfig/ifvlan.c Thu Mar 18 19:04:04 2010 (r205294) +++ stable/8/sbin/ifconfig/ifvlan.c Thu Mar 18 19:10:03 2010 (r205295) @@ -181,6 +181,8 @@ static struct cmd vlan_cmds[] = { DEF_CMD("-vlanhwtag", -IFCAP_VLAN_HWTAGGING, setifcap), DEF_CMD("vlanhwfilter", IFCAP_VLAN_HWFILTER, setifcap), DEF_CMD("-vlanhwfilter", -IFCAP_VLAN_HWFILTER, setifcap), + DEF_CMD("-vlanhwtso", -IFCAP_VLAN_HWTSO, setifcap), + DEF_CMD("vlanhwtso", IFCAP_VLAN_HWTSO, setifcap), }; static struct afswtch af_vlan = { .af_name = "af_vlan", From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 19:45:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF1F1065673 for ; Thu, 18 Mar 2010 19:45:10 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 7251C8FC1D for ; Thu, 18 Mar 2010 19:45:10 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-054-235.pools.arcor-ip.net [88.66.54.235]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lvg76-1NZe1Z1etI-017XoK; Thu, 18 Mar 2010 20:45:09 +0100 Received: (qmail 20641 invoked from network); 18 Mar 2010 19:45:09 -0000 Received: from f8x64.laiers.local (192.168.4.188) by router.laiers.local with SMTP; 18 Mar 2010 19:45:09 -0000 From: Max Laier Organization: FreeBSD To: Doug Barton Date: Thu, 18 Mar 2010 20:45:08 +0100 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE-p2; KDE/4.3.5; amd64; ; ) References: <201003181858.o2IIwHsO008939@svn.freebsd.org> In-Reply-To: <201003181858.o2IIwHsO008939@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003182045.08966.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19UIThEIh2rvpQLMV+axarjVpnDsEmKiddtVOf rvLQp6gCXsOpB5zQx3lPvk23YqXR9drXagH/ypNWiKFavyVUmC iFKLtlYQ46Gc/iGDQz/Dg== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205290 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 19:45:10 -0000 On Thursday 18 March 2010 19:58:17 Doug Barton wrote: > Author: dougb > Date: Thu Mar 18 18:58:17 2010 > New Revision: 205290 > URL: http://svn.freebsd.org/changeset/base/205290 > > Log: > For those of us mere mortals who do not aspire to the lofty heights > of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in > the 'make universe' goodnes without using unecessary time and resources. Could you document that in share/man/man7/build.7 ? > Modified: > head/Makefile > > Modified: head/Makefile > =========================================================================== > === --- head/Makefile Thu Mar 18 18:52:18 2010 (r205289) > +++ head/Makefile Thu Mar 18 18:58:17 2010 (r205290) > @@ -311,6 +311,7 @@ universe_${target}: > "check _.${target}.buildworld for details" | ${MAKEFAIL})) > @echo ">> ${target} buildworld completed on `LC_ALL=C date`" > .endif > +.if !defined(MAKE_JUST_WORLDS) > .if exists(${.CURDIR}/sys/${target}/conf/NOTES) > @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ > ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ > @@ -319,6 +320,7 @@ universe_${target}: > .endif > @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \ > universe_kernels > +.endif > @echo ">> ${target} completed on `LC_ALL=C date`" > .endfor > universe_kernels: universe_kernconfs From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 19:55:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD4E1065679; Thu, 18 Mar 2010 19:55:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id C3D078FC29; Thu, 18 Mar 2010 19:55:06 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id C37F441C759; Thu, 18 Mar 2010 20:55:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id V4vKhMmdVrKv; Thu, 18 Mar 2010 20:55:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 662B841C75C; Thu, 18 Mar 2010 20:55:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 305794448EC; Thu, 18 Mar 2010 19:52:48 +0000 (UTC) Date: Thu, 18 Mar 2010 19:52:48 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Doug Barton In-Reply-To: <201003181858.o2IIwHsO008939@svn.freebsd.org> Message-ID: <20100318195128.K33454@maildrop.int.zabbadoz.net> References: <201003181858.o2IIwHsO008939@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205290 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 19:55:07 -0000 On Thu, 18 Mar 2010, Doug Barton wrote: > Author: dougb > Date: Thu Mar 18 18:58:17 2010 > New Revision: 205290 > URL: http://svn.freebsd.org/changeset/base/205290 > > Log: > For those of us mere mortals who do not aspire to the lofty heights > of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in > the 'make universe' goodnes without using unecessary time and resources. Just FYI, you could do that with .. already: make universe KERNCONFS= > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Thu Mar 18 18:52:18 2010 (r205289) > +++ head/Makefile Thu Mar 18 18:58:17 2010 (r205290) > @@ -311,6 +311,7 @@ universe_${target}: > "check _.${target}.buildworld for details" | ${MAKEFAIL})) > @echo ">> ${target} buildworld completed on `LC_ALL=C date`" > .endif > +.if !defined(MAKE_JUST_WORLDS) > .if exists(${.CURDIR}/sys/${target}/conf/NOTES) > @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ > ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ > @@ -319,6 +320,7 @@ universe_${target}: > .endif > @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \ > universe_kernels > +.endif > @echo ">> ${target} completed on `LC_ALL=C date`" > .endfor > universe_kernels: universe_kernconfs > -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 20:06:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE4C61065672 for ; Thu, 18 Mar 2010 20:06:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 648E88FC14 for ; Thu, 18 Mar 2010 20:06:03 +0000 (UTC) Received: (qmail 21221 invoked by uid 399); 18 Mar 2010 20:06:02 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 18 Mar 2010 20:06:02 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BA287A9.6070804@FreeBSD.org> Date: Thu, 18 Mar 2010 13:06:01 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100218 Thunderbird/3.0.1 MIME-Version: 1.0 To: Max Laier References: <201003181858.o2IIwHsO008939@svn.freebsd.org> <201003182045.08966.max@love2party.net> In-Reply-To: <201003182045.08966.max@love2party.net> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB 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 Subject: Re: svn commit: r205290 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 20:06:03 -0000 On 03/18/10 12:45, Max Laier wrote: > On Thursday 18 March 2010 19:58:17 Doug Barton wrote: >> Author: dougb >> Date: Thu Mar 18 18:58:17 2010 >> New Revision: 205290 >> URL: http://svn.freebsd.org/changeset/base/205290 >> >> Log: >> For those of us mere mortals who do not aspire to the lofty heights >> of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in >> the 'make universe' goodnes without using unecessary time and resources. > > Could you document that in share/man/man7/build.7 ? Sure, I'll put it right next to the docs for MAKE_JUST_KERNELS. -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 20:13:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78E43106566B; Thu, 18 Mar 2010 20:13:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 680D88FC16; Thu, 18 Mar 2010 20:13:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IKD4Cp025630; Thu, 18 Mar 2010 20:13:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IKD4jv025628; Thu, 18 Mar 2010 20:13:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003182013.o2IKD4jv025628@svn.freebsd.org> From: Ed Schouten Date: Thu, 18 Mar 2010 20:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205296 - head/usr.sbin/jls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 20:13:04 -0000 Author: ed Date: Thu Mar 18 20:13:04 2010 New Revision: 205296 URL: http://svn.freebsd.org/changeset/base/205296 Log: Properly progress through the list of IPv6 addresses using in6_addr size. Right now if a jail has multiple IPv6 addresses, it will print them shifting only 4 bytes at a time. Example: 2001:4dd0:ff41::b23f:a9 2001:4dd0:ff41::b23f:aa Becomes: 2001:4dd0:ff41::b23f:a9 ff41::b23f:a9:2001:4dd0 By casting to in6_addr, it uses the correct offsets. MFC after: 1 week Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Thu Mar 18 19:10:03 2010 (r205295) +++ head/usr.sbin/jls/jls.c Thu Mar 18 20:13:04 2010 (r205296) @@ -355,7 +355,7 @@ print_jail(int pflags, int jflags) count = params[7].jp_valuelen / sizeof(struct in6_addr); for (ai = 0; ai < count; ai++) if (inet_ntop(AF_INET6, - &((struct in_addr *)params[7].jp_value)[ai], + &((struct in6_addr *)params[7].jp_value)[ai], ipbuf, sizeof(ipbuf)) == NULL) err(1, "inet_ntop"); else From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 20:15:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1CFE106566B; Thu, 18 Mar 2010 20:15:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D09168FC16; Thu, 18 Mar 2010 20:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IKFY8s026233; Thu, 18 Mar 2010 20:15:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IKFY1v026231; Thu, 18 Mar 2010 20:15:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003182015.o2IKFY1v026231@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 18 Mar 2010 20:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205297 - head/sys/compat/x86bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 20:15:35 -0000 Author: jkim Date: Thu Mar 18 20:15:34 2010 New Revision: 205297 URL: http://svn.freebsd.org/changeset/base/205297 Log: Detect illegal access to unmapped memory within real mode emulator to aid debugging. Update copyright date while I am here. Modified: head/sys/compat/x86bios/x86bios.c Modified: head/sys/compat/x86bios/x86bios.c ============================================================================== --- head/sys/compat/x86bios/x86bios.c Thu Mar 18 20:13:04 2010 (r205296) +++ head/sys/compat/x86bios/x86bios.c Thu Mar 18 20:15:34 2010 (r205297) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2009 Alex Keda - * Copyright (c) 2009 Jung-uk Kim + * Copyright (c) 2009-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -81,6 +81,10 @@ static vm_offset_t *x86bios_map; static vm_paddr_t x86bios_seg_phys; +static int x86bios_fault; +static uint32_t x86bios_fault_addr; +static uint32_t x86bios_fault_inst; + SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging"); static int x86bios_trace_call; TUNABLE_INT("debug.x86bios.call", &x86bios_trace_call); @@ -91,6 +95,15 @@ TUNABLE_INT("debug.x86bios.int", &x86bio SYSCTL_INT(_debug_x86bios, OID_AUTO, int, CTLFLAG_RW, &x86bios_trace_int, 0, "Trace software interrupt handlers"); +static void +x86bios_set_fault(struct x86emu *emu, uint32_t addr) +{ + + x86bios_fault = 1; + x86bios_fault_addr = addr; + x86bios_fault_inst = (emu->x86.R_CS << 4) + emu->x86.R_IP; +} + static void * x86bios_get_pages(uint32_t offset, size_t size) { @@ -123,8 +136,10 @@ x86bios_emu_rdb(struct x86emu *emu, uint uint8_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) + if (va == NULL) { + x86bios_set_fault(emu, addr); x86emu_halt_sys(emu); + } return (*va); } @@ -135,8 +150,10 @@ x86bios_emu_rdw(struct x86emu *emu, uint uint16_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) + if (va == NULL) { + x86bios_set_fault(emu, addr); x86emu_halt_sys(emu); + } return (le16toh(*va)); } @@ -147,8 +164,10 @@ x86bios_emu_rdl(struct x86emu *emu, uint uint32_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) + if (va == NULL) { + x86bios_set_fault(emu, addr); x86emu_halt_sys(emu); + } return (le32toh(*va)); } @@ -159,8 +178,10 @@ x86bios_emu_wrb(struct x86emu *emu, uint uint8_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) + if (va == NULL) { + x86bios_set_fault(emu, addr); x86emu_halt_sys(emu); + } *va = val; } @@ -171,8 +192,10 @@ x86bios_emu_wrw(struct x86emu *emu, uint uint16_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) + if (va == NULL) { + x86bios_set_fault(emu, addr); x86emu_halt_sys(emu); + } *va = htole16(val); } @@ -183,8 +206,10 @@ x86bios_emu_wrl(struct x86emu *emu, uint uint32_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) + if (va == NULL) { + x86bios_set_fault(emu, addr); x86emu_halt_sys(emu); + } *va = htole32(val); } @@ -331,15 +356,20 @@ x86bios_call(struct x86regs *regs, uint1 mtx_lock_spin(&x86bios_lock); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); + x86bios_fault = 0; x86emu_exec_call(&x86bios_emu, seg, off); memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock_spin(&x86bios_lock); - if (x86bios_trace_call) + if (x86bios_trace_call) { printf("Exiting 0x%05x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX, regs->R_DX, regs->R_ES, regs->R_DI); + if (x86bios_fault) + printf("Page fault at 0x%05x from 0x%05x.\n", + x86bios_fault_addr, x86bios_fault_inst); + } } uint32_t @@ -370,15 +400,20 @@ x86bios_intr(struct x86regs *regs, int i mtx_lock_spin(&x86bios_lock); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); + x86bios_fault = 0; x86emu_exec_intr(&x86bios_emu, intno); memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock_spin(&x86bios_lock); - if (x86bios_trace_int) + if (x86bios_trace_int) { printf("Exiting int 0x%x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", intno, regs->R_AX, regs->R_BX, regs->R_CX, regs->R_DX, regs->R_ES, regs->R_DI); + if (x86bios_fault) + printf("Page fault at 0x%05x from 0x%05x.\n", + x86bios_fault_addr, x86bios_fault_inst); + } } void * From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 20:30:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F8F81065670; Thu, 18 Mar 2010 20:30:26 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F18F8FC0C; Thu, 18 Mar 2010 20:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IKUQhX029556; Thu, 18 Mar 2010 20:30:26 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IKUQkE029555; Thu, 18 Mar 2010 20:30:26 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003182030.o2IKUQkE029555@svn.freebsd.org> From: Kip Macy Date: Thu, 18 Mar 2010 20:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205298 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 20:30:26 -0000 Author: kmacy Date: Thu Mar 18 20:30:25 2010 New Revision: 205298 URL: http://svn.freebsd.org/changeset/base/205298 Log: turn 205266 in to a no-op until the problem can be properly diagnosed Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Thu Mar 18 20:15:34 2010 (r205297) +++ head/sys/vm/uma_int.h Thu Mar 18 20:30:25 2010 (r205298) @@ -162,7 +162,7 @@ struct uma_hash { /* * align field or structure to cache line */ -#define UMA_ALIGN __aligned(CACHE_LINE_SIZE) +#define UMA_ALIGN /* * Structures for per cpu queues. From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 20:57:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 701971065676; Thu, 18 Mar 2010 20:57:57 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E77F8FC1B; Thu, 18 Mar 2010 20:57:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IKvv5W035703; Thu, 18 Mar 2010 20:57:57 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IKvvVe035699; Thu, 18 Mar 2010 20:57:57 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201003182057.o2IKvvVe035699@svn.freebsd.org> From: David Christensen Date: Thu, 18 Mar 2010 20:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205299 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 20:57:57 -0000 Author: davidch Date: Thu Mar 18 20:57:57 2010 New Revision: 205299 URL: http://svn.freebsd.org/changeset/base/205299 Log: - Added support for 5709S/5716S PHYs. Submitted by: pyunyh MFC after: 2 weeks Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/brgphyreg.h head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu Mar 18 20:30:25 2010 (r205298) +++ head/sys/dev/mii/brgphy.c Thu Mar 18 20:57:57 2010 (r205299) @@ -75,6 +75,7 @@ struct brgphy_softc { #define BRGPHY_5706S 0x0001 #define BRGPHY_5708S 0x0002 #define BRGPHY_NOANWAIT 0x0004 +#define BRGPHY_5709S 0x0008 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -139,6 +140,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; @@ -216,30 +218,34 @@ brgphy_attach(device_t dev) break; case MII_OUI_xxBROADCOM: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_BCM5706: - case MII_MODEL_xxBROADCOM_BCM5714: - /* - * The 5464 PHY used in the 5706 supports both copper - * and fiber interfaces over GMII. Need to check the - * shadow registers to see which mode is actually - * in effect, and therefore whether we have 5706C or - * 5706S. - */ - PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, - BRGPHY_SHADOW_1C_MODE_CTRL); - if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & - BRGPHY_SHADOW_1C_ENA_1000X) { - bsc->serdes_flags |= BRGPHY_5706S; - sc->mii_flags |= MIIF_HAVEFIBER; - } - break; + case MII_MODEL_xxBROADCOM_BCM5706: + case MII_MODEL_xxBROADCOM_BCM5714: + /* + * The 5464 PHY used in the 5706 supports both copper + * and fiber interfaces over GMII. Need to check the + * shadow registers to see which mode is actually + * in effect, and therefore whether we have 5706C or + * 5706S. + */ + PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C, + BRGPHY_SHADOW_1C_MODE_CTRL); + if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) & + BRGPHY_SHADOW_1C_ENA_1000X) { + bsc->serdes_flags |= BRGPHY_5706S; + sc->mii_flags |= MIIF_HAVEFIBER; + } + break; } break; case MII_OUI_xxBROADCOM_ALT1: switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: - bsc->serdes_flags |= BRGPHY_5708S; - sc->mii_flags |= MIIF_HAVEFIBER; - break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5708S: + bsc->serdes_flags |= BRGPHY_5708S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; + case MII_MODEL_xxBROADCOM_ALT1_BCM5709S: + bsc->serdes_flags |= BRGPHY_5709S; + sc->mii_flags |= MIIF_HAVEFIBER; + break; } break; default: device_printf(dev, "Unrecognized OUI for PHY!\n"); @@ -631,6 +637,7 @@ brgphy_status(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); + /* Check for MRBE auto-negotiated speed results. */ switch (xstat & BRGPHY_5708S_PG0_1000X_STAT1_SPEED_MASK) { case BRGPHY_5708S_PG0_1000X_STAT1_SPEED_10: mii->mii_media_active |= IFM_10_FL; break; @@ -642,11 +649,40 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_2500_SX; break; } + /* Check for MRBE auto-negotiated duplex results. */ if (xstat & BRGPHY_5708S_PG0_1000X_STAT1_FDX) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } + + } else if (bsc->serdes_flags & BRGPHY_5709S) { + + /* Select GP Status Block of the AN MMD, get autoneg results. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); + xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + /* Check for MRBE auto-negotiated speed results. */ + switch (xstat & BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK) { + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10: + mii->mii_media_active |= IFM_10_FL; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100: + mii->mii_media_active |= IFM_100_FX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G: + mii->mii_media_active |= IFM_1000_SX; break; + case BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G: + mii->mii_media_active |= IFM_2500_SX; break; + } + + /* Check for MRBE auto-negotiated duplex results. */ + if (xstat & BRGPHY_GP_STATUS_TOP_ANEG_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + } + } #if 0 @@ -967,6 +1003,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1089,7 +1126,49 @@ brgphy_reset(struct mii_softc *sc) PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); } - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709 && + (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { + + /* Select the SerDes Digital block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_SERDES_DIG); + val = PHY_READ(sc, BRGPHY_SERDES_DIG_1000X_CTL1); + val &= ~BRGPHY_SD_DIG_1000X_CTL1_AUTODET; + val |= BRGPHY_SD_DIG_1000X_CTL1_FIBER; + PHY_WRITE(sc, BRGPHY_SERDES_DIG_1000X_CTL1, val); + + /* Select the Over 1G block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_OVER_1G); + + /* Enable autoneg "Next Page" to advertise 2.5G support. */ + val = PHY_READ(sc, BRGPHY_OVER_1G_UNFORMAT_PG1); + if (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + val |= BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + else + val &= ~BRGPHY_5708S_ANEG_NXT_PG_XMIT1_25G; + PHY_WRITE(sc, BRGPHY_OVER_1G_UNFORMAT_PG1, val); + + /* Select the Multi-Rate Backplane Ethernet block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_MRBE); + + /* Enable MRBE speed autoneg. */ + val = PHY_READ(sc, BRGPHY_MRBE_MSG_PG5_NP); + val |= BRGPHY_MRBE_MSG_PG5_NP_MBRE | + BRGPHY_MRBE_MSG_PG5_NP_T2; + PHY_WRITE(sc, BRGPHY_MRBE_MSG_PG5_NP, val); + + /* Select the Clause 73 User B0 block of the AN MMD. */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_CL73_USER_B0); + + /* Enable MRBE speed autoneg. */ + PHY_WRITE(sc, BRGPHY_CL73_USER_B0_MBRE_CTL1, + BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP | + BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR | + BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG); + + /* Restore IEEE0 block (assumed in all brgphy(4) code). */ + PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + + } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) brgphy_fixup_disable_early_dac(sc); Modified: head/sys/dev/mii/brgphyreg.h ============================================================================== --- head/sys/dev/mii/brgphyreg.h Thu Mar 18 20:30:25 2010 (r205298) +++ head/sys/dev/mii/brgphyreg.h Thu Mar 18 20:57:57 2010 (r205299) @@ -359,6 +359,61 @@ /* End: PHY register values for the 5708S SerDes PHY */ /*******************************************************/ +/*******************************************************/ +/* Begin: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + +/* 5709S SerDes "General Purpose Status" Registers */ +#define BRGPHY_BLOCK_ADDR_GP_STATUS 0x8120 +#define BRGPHY_GP_STATUS_TOP_ANEG_STATUS 0x1B +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_MASK 0x3F00 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_10 0x0000 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_100 0x0100 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1G 0x0200 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_25G 0x0300 +#define BRGPHY_GP_STATUS_TOP_ANEG_SPEED_1GKX 0x0D00 +#define BRGPHY_GP_STATUS_TOP_ANEG_FDX 0x0008 +#define BRGPHY_GP_STATUS_TOP_ANEG_LINK_UP 0x0004 +#define BRGPHY_GP_STATUS_TOP_ANEG_CL73_COMP 0x0001 + +/* 5709S SerDes "SerDes Digital" Registers */ +#define BRGPHY_BLOCK_ADDR_SERDES_DIG 0x8300 +#define BRGPHY_SERDES_DIG_1000X_CTL1 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_AUTODET 0x0010 +#define BRGPHY_SD_DIG_1000X_CTL1_FIBER 0x0001 + +/* 5709S SerDes "Over 1G" Registers */ +#define BRGPHY_BLOCK_ADDR_OVER_1G 0x8320 +#define BRGPHY_OVER_1G_UNFORMAT_PG1 0x19 + +/* 5709S SerDes "Multi-Rate Backplane Ethernet" Registers */ +#define BRGPHY_BLOCK_ADDR_MRBE 0x8350 +#define BRGPHY_MRBE_MSG_PG5_NP 0x10 +#define BRGPHY_MRBE_MSG_PG5_NP_MBRE 0x0001 +#define BRGPHY_MRBE_MSG_PG5_NP_T2 0x0001 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_CL73_USER_B0 0x8370 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1 0x12 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_NP_AFT_BP 0x2000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_STA_MGR 0x4000 +#define BRGPHY_CL73_USER_B0_MBRE_CTL1_ANEG 0x8000 + +/* 5709S SerDes "IEEE Clause 73 User B0" Registers */ +#define BRGPHY_BLOCK_ADDR_ADDR_EXT 0xFFD0 + +/* 5709S SerDes "Combo IEEE 0" Registers */ +#define BRGPHY_BLOCK_ADDR_COMBO_IEEE0 0xFFE0 + +#define BRGPHY_ADDR_EXT 0x1E +#define BRGPHY_BLOCK_ADDR 0x1F + +#define BRGPHY_ADDR_EXT_AN_MMD 0x3800 + +/*******************************************************/ +/* End: PHY register values for the 5709S SerDes PHY */ +/*******************************************************/ + #define BRGPHY_INTRS \ ~(BRGPHY_IMR_LNK_CHG|BRGPHY_IMR_LSP_CHG|BRGPHY_IMR_DUP_CHG) Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Thu Mar 18 20:30:25 2010 (r205298) +++ head/sys/dev/mii/miidevs Thu Mar 18 20:57:57 2010 (r205299) @@ -150,6 +150,7 @@ model xxBROADCOM_ALT1 BCM5722 0x002d BCM model xxBROADCOM_ALT1 BCM5784 0x003a BCM5784 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709C 0x003c BCM5709C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY +model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 18 21:00:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C073106566C; Thu, 18 Mar 2010 21:00:54 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39AF88FC1C; Thu, 18 Mar 2010 21:00:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2IL0snZ036426; Thu, 18 Mar 2010 21:00:54 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2IL0r5v036422; Thu, 18 Mar 2010 21:00:53 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201003182100.o2IL0r5v036422@svn.freebsd.org> From: David Christensen Date: Thu, 18 Mar 2010 21:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205300 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 21:00:54 -0000 Author: davidch Date: Thu Mar 18 21:00:53 2010 New Revision: 205300 URL: http://svn.freebsd.org/changeset/base/205300 Log: - Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions. MFC after: 2 weeks Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcefw.h head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Thu Mar 18 20:57:57 2010 (r205299) +++ head/sys/dev/bce/if_bce.c Thu Mar 18 21:00:53 2010 (r205300) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); * BCM5708C B1, B2 * BCM5708S B1, B2 * BCM5709C A1, C0 + * BCM5709S A1, C0 * BCM5716C C0 + * BCM5716S C0 * * The following controllers are not supported by this driver: * BCM5706C A0, A1 (pre-production) @@ -46,7 +48,7 @@ __FBSDID("$FreeBSD$"); * BCM5708C A0, B0 (pre-production) * BCM5708S A0, B0 (pre-production) * BCM5709C A0 B0, B1, B2 (pre-production) - * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) + * BCM5709S A0, B0, B1, B2 (pre-production) */ #include "opt_bce.h" @@ -320,6 +322,7 @@ static void bce_dump_rxp_state (struct static void bce_dump_tpat_state (struct bce_softc *, int); static void bce_dump_cp_state (struct bce_softc *, int); static void bce_dump_com_state (struct bce_softc *, int); +static void bce_dump_rv2p_state (struct bce_softc *); static void bce_breakpoint (struct bce_softc *); #endif @@ -360,6 +363,7 @@ static int bce_nvram_write (struct bc /* */ /****************************************************************************/ static void bce_get_media (struct bce_softc *); +static void bce_init_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -1096,7 +1100,10 @@ bce_attach(device_t dev) else ifp->if_baudrate = IF_Mbps(1000); - /* Check for an MII child bus by probing the PHY. */ + /* Handle any special PHY initialization for SerDes PHYs. */ + bce_init_media(sc); + + /* MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", @@ -1504,7 +1511,17 @@ bce_miibus_read_reg(device_t dev, int ph return(0); } - if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val = REG_RD(sc, BCE_EMAC_MDIO_MODE); val &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -1584,6 +1601,16 @@ bce_miibus_write_reg(device_t dev, int p DB_PRINT_PHY_REG(reg, val); + /* + * The 5709S PHY is an IEEE Clause 45 PHY + * with special mappings to work with IEEE + * Clause 22 register accesses. + */ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if (reg >= MII_BMCR && reg <= MII_ANLPRNP) + reg += 0x10; + } + if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) { val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE); val1 &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL; @@ -2647,9 +2674,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } else { switch (strap) { @@ -2659,9 +2688,11 @@ bce_get_media(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for SerDes.\n"); sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + break; default: DBPRINT(sc, BCE_INFO_LOAD, "BCM5709 s/w configured for Copper.\n"); + break; } } @@ -2669,15 +2700,22 @@ bce_get_media(struct bce_softc *sc) sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { + sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + + /* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */ + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) sc->bce_phy_addr = 2; + + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { + sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG; + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); } - } + } } else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708)) sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG; @@ -2691,6 +2729,37 @@ bce_get_media_exit: /****************************************************************************/ +/* Performs PHY initialization required before MII drivers access the */ +/* device. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_init_media(struct bce_softc *sc) +{ + if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + /* + * Configure 5709S/5716S PHYs to use traditional IEEE + * Clause 22 method. Otherwise we have no way to attach + * the PHY in mii(4) layer. PHY specific configuration + * is done in mii layer. + */ + + /* Select auto-negotiation MMD of the PHY. */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT); + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD); + + /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */ + bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr, + BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); + } +} + + +/****************************************************************************/ /* Free any DMA memory owned by the driver. */ /* */ /* Scans through each data structre that requires DMA memory and frees */ @@ -6679,7 +6748,7 @@ bce_tso_setup(struct bce_softc *sc, stru DBPRINT(sc, BCE_EXTREME_SEND, "%s(): hdr_len = %d, e_hlen = %d, " "ip_hlen = %d, tcp_hlen = %d, ip_len = %d\n", - __FUNCTION__, hdr_len, sizeof(struct ether_header), ip_hlen, + __FUNCTION__, hdr_len, (int) sizeof(struct ether_header), ip_hlen, tcp_hlen, ip_len); /* Set the LSO flag in the TX BD */ @@ -7943,7 +8012,7 @@ bce_sysctl_dump_tx_chain(SYSCTL_HANDLER_ if (result == 1) { sc = (struct bce_softc *)arg1; - bce_dump_tx_chain(sc, 0, USABLE_TX_BD); + bce_dump_tx_chain(sc, 0, TOTAL_TX_BD); } return error; @@ -8626,7 +8695,7 @@ bce_add_sysctls(struct bce_softc *sc) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_freeze_controller(struct bce_softc *sc) { u32 val; @@ -8643,7 +8712,7 @@ bce_freeze_controller(struct bce_softc * /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_unfreeze_controller(struct bce_softc *sc) { u32 val; @@ -8661,7 +8730,7 @@ bce_unfreeze_controller(struct bce_softc /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_dump_enet(struct bce_softc *sc, struct mbuf *m) { struct ether_vlan_header *eh; @@ -8915,7 +8984,9 @@ bce_dump_pg_mbuf_chain(struct bce_softc static __attribute__ ((noinline)) void bce_dump_txbd(struct bce_softc *sc, int idx, struct tx_bd *txbd) { - if (idx > MAX_TX_BD) + int i = 0; + + if (idx > MAX_TX_BD) /* Index out of range. */ BCE_PRINTF("tx_bd[0x%04X]: Invalid tx_bd index!\n", idx); else if ((idx & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) @@ -8923,52 +8994,65 @@ bce_dump_txbd(struct bce_softc *sc, int BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, chain page pointer\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo); else { - /* Normal tx_bd entry. */ - BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "vlan tag= 0x%04X, flags = 0x%04X (", idx, - txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, - txbd->tx_bd_flags); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) - printf(" CONN_FAULT"); - - if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) - printf(" TCP_UDP_CKSUM"); + /* Normal tx_bd entry. */ + BCE_PRINTF("tx_bd[0x%04X]: haddr = 0x%08X:%08X, mss_nbytes = 0x%08X, " + "vlan tag = 0x%04X, flags = 0x%04X (", idx, + txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); - if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) - printf(" IP_CKSUM"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_CONN_FAULT) { + if (i>0) printf("|"); printf("CONN_FAULT"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) - printf(" VLAN"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_TCP_UDP_CKSUM) { + if (i>0) printf("|"); printf("TCP_UDP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) - printf(" COAL_NOW"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_IP_CKSUM) { + if (i>0) printf("|"); printf("IP_CKSUM"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) - printf(" DONT_GEN_CRC"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_VLAN_TAG) { + if (i>0) printf("|"); printf("VLAN"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_START) - printf(" START"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_COAL_NOW) { + if (i>0) printf("|"); printf("COAL_NOW"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_END) - printf(" END"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_DONT_GEN_CRC) { + if (i>0) printf("|"); printf("DONT_GEN_CRC"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) - printf(" LSO"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_START) { + if (i>0) printf("|"); printf("START"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) - printf(" OPTION_WORD"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_END) { + if (i>0) printf("|"); printf("END"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) - printf(" FLAGS"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_LSO) { + if (i>0) printf("|"); printf("LSO"); i++; + } - if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) - printf(" SNAP"); + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_OPTION_WORD) { + if (i>0) printf("|"); + printf("SW_OPTION=%d", ((txbd->tx_bd_flags & + TX_BD_FLAGS_SW_OPTION_WORD) >> 8)); i++; + } - printf(" )\n"); - } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_FLAGS) { + if (i>0) printf("|"); printf("SW_FLAGS"); i++; + } + if (txbd->tx_bd_flags & TX_BD_FLAGS_SW_SNAP) { + if (i>0) printf("|"); printf("SNAP)"); + } else { + printf(")\n"); + } + } } @@ -9415,10 +9499,8 @@ bce_dump_tx_chain(struct bce_softc *sc, BCE_PRINTF("page size = 0x%08X, tx chain pages = 0x%08X\n", (u32) BCM_PAGE_SIZE, (u32) TX_PAGES); - BCE_PRINTF("tx_bd per page = 0x%08X, usable tx_bd per page = 0x%08X\n", (u32) TOTAL_TX_BD_PER_PAGE, (u32) USABLE_TX_BD_PER_PAGE); - BCE_PRINTF("total tx_bd = 0x%08X\n", (u32) TOTAL_TX_BD); BCE_PRINTF( @@ -9426,11 +9508,11 @@ bce_dump_tx_chain(struct bce_softc *sc, " tx_bd data " "----------------------------\n"); - /* Now print out the tx_bd's themselves. */ + /* Now print out a decoded list of TX buffer descriptors. */ for (int i = 0; i < count; i++) { txbd = &sc->tx_bd_chain[TX_PAGE(tx_prod)][TX_IDX(tx_prod)]; bce_dump_txbd(sc, tx_prod, txbd); - tx_prod = NEXT_TX_BD(tx_prod); + tx_prod++; } BCE_PRINTF( @@ -9530,6 +9612,17 @@ bce_dump_pg_chain(struct bce_softc *sc, } #endif +#define BCE_PRINT_RX_CONS(arg) \ +if (sblk->status_rx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - rx_quick_consumer_index##arg\n", \ + sblk->status_rx_quick_consumer_index##arg, \ + (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index##arg)); + +#define BCE_PRINT_TX_CONS(arg) \ +if (sblk->status_tx_quick_consumer_index##arg) \ + BCE_PRINTF("0x%04X(0x%04X) - tx_quick_consumer_index##arg\n", \ + sblk->status_tx_quick_consumer_index##arg, \ + (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index##arg)); /****************************************************************************/ /* Prints out the status block from host memory. */ @@ -9549,90 +9642,28 @@ bce_dump_status_block(struct bce_softc * " Status Block " "----------------------------\n"); + /* Theses indices are used for normal L2 drivers. */ BCE_PRINTF(" 0x%08X - attn_bits\n", sblk->status_attn_bits); BCE_PRINTF(" 0x%08X - attn_bits_ack\n", sblk->status_attn_bits_ack); - BCE_PRINTF("0x%04X(0x%04X) - rx_cons0\n", - sblk->status_rx_quick_consumer_index0, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index0)); - - BCE_PRINTF("0x%04X(0x%04X) - tx_cons0\n", - sblk->status_tx_quick_consumer_index0, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index0)); + BCE_PRINT_RX_CONS(0); + BCE_PRINT_TX_CONS(0) BCE_PRINTF(" 0x%04X - status_idx\n", sblk->status_idx); /* Theses indices are not used for normal L2 drivers. */ - if (sblk->status_rx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons1\n", - sblk->status_rx_quick_consumer_index1, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index1)); - - if (sblk->status_tx_quick_consumer_index1) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons1\n", - sblk->status_tx_quick_consumer_index1, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index1)); - - if (sblk->status_rx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X)- rx_cons2\n", - sblk->status_rx_quick_consumer_index2, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index2)); - - if (sblk->status_tx_quick_consumer_index2) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons2\n", - sblk->status_tx_quick_consumer_index2, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index2)); - - if (sblk->status_rx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - rx_cons3\n", - sblk->status_rx_quick_consumer_index3, - (u16) RX_CHAIN_IDX(sblk->status_rx_quick_consumer_index3)); - - if (sblk->status_tx_quick_consumer_index3) - BCE_PRINTF("0x%04X(0x%04X) - tx_cons3\n", - sblk->status_tx_quick_consumer_index3, - (u16) TX_CHAIN_IDX(sblk->status_tx_quick_consumer_index3)); - - if (sblk->status_rx_quick_consumer_index4 || - sblk->status_rx_quick_consumer_index5) - BCE_PRINTF("rx_cons4 = 0x%08X, rx_cons5 = 0x%08X\n", - sblk->status_rx_quick_consumer_index4, - sblk->status_rx_quick_consumer_index5); - - if (sblk->status_rx_quick_consumer_index6 || - sblk->status_rx_quick_consumer_index7) - BCE_PRINTF("rx_cons6 = 0x%08X, rx_cons7 = 0x%08X\n", - sblk->status_rx_quick_consumer_index6, - sblk->status_rx_quick_consumer_index7); - - if (sblk->status_rx_quick_consumer_index8 || - sblk->status_rx_quick_consumer_index9) - BCE_PRINTF("rx_cons8 = 0x%08X, rx_cons9 = 0x%08X\n", - sblk->status_rx_quick_consumer_index8, - sblk->status_rx_quick_consumer_index9); - - if (sblk->status_rx_quick_consumer_index10 || - sblk->status_rx_quick_consumer_index11) - BCE_PRINTF("rx_cons10 = 0x%08X, rx_cons11 = 0x%08X\n", - sblk->status_rx_quick_consumer_index10, - sblk->status_rx_quick_consumer_index11); - - if (sblk->status_rx_quick_consumer_index12 || - sblk->status_rx_quick_consumer_index13) - BCE_PRINTF("rx_cons12 = 0x%08X, rx_cons13 = 0x%08X\n", - sblk->status_rx_quick_consumer_index12, - sblk->status_rx_quick_consumer_index13); - - if (sblk->status_rx_quick_consumer_index14 || - sblk->status_rx_quick_consumer_index15) - BCE_PRINTF("rx_cons14 = 0x%08X, rx_cons15 = 0x%08X\n", - sblk->status_rx_quick_consumer_index14, - sblk->status_rx_quick_consumer_index15); + BCE_PRINT_RX_CONS(1); BCE_PRINT_RX_CONS(2); BCE_PRINT_RX_CONS(3); + BCE_PRINT_RX_CONS(4); BCE_PRINT_RX_CONS(5); BCE_PRINT_RX_CONS(6); + BCE_PRINT_RX_CONS(7); BCE_PRINT_RX_CONS(8); BCE_PRINT_RX_CONS(9); + BCE_PRINT_RX_CONS(10); BCE_PRINT_RX_CONS(11); BCE_PRINT_RX_CONS(12); + BCE_PRINT_RX_CONS(13); BCE_PRINT_RX_CONS(14); BCE_PRINT_RX_CONS(15); - if (sblk->status_completion_producer_index || + BCE_PRINT_TX_CONS(1); BCE_PRINT_TX_CONS(2); BCE_PRINT_TX_CONS(3); + + if (sblk->status_completion_producer_index || sblk->status_cmd_consumer_index) BCE_PRINTF("com_prod = 0x%08X, cmd_cons = 0x%08X\n", sblk->status_completion_producer_index, @@ -9645,6 +9676,14 @@ bce_dump_status_block(struct bce_softc * } +#define BCE_PRINT_64BIT_STAT(arg) \ +if (sblk->arg##_lo || sblk->arg##_hi) \ + BCE_PRINTF("0x%08X:%08X : arg\n", sblk->arg##_hi, sblk->arg##_lo); + +#define BCE_PRINT_32BIT_STAT(arg) \ +if (sblk->arg) \ + BCE_PRINTF(" 0x%08X : arg\n", sblk->arg); + /****************************************************************************/ /* Prints out the statistics block from host memory. */ /* */ @@ -9663,252 +9702,60 @@ bce_dump_stats_block(struct bce_softc *s " Stats Block (All Stats Not Shown Are 0) " "---------------\n"); - if (sblk->stat_IfHCInOctets_hi - || sblk->stat_IfHCInOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInOctets\n", - sblk->stat_IfHCInOctets_hi, - sblk->stat_IfHCInOctets_lo); - - if (sblk->stat_IfHCInBadOctets_hi - || sblk->stat_IfHCInBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBadOctets\n", - sblk->stat_IfHCInBadOctets_hi, - sblk->stat_IfHCInBadOctets_lo); - - if (sblk->stat_IfHCOutOctets_hi - || sblk->stat_IfHCOutOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutOctets\n", - sblk->stat_IfHCOutOctets_hi, - sblk->stat_IfHCOutOctets_lo); - - if (sblk->stat_IfHCOutBadOctets_hi - || sblk->stat_IfHCOutBadOctets_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBadOctets\n", - sblk->stat_IfHCOutBadOctets_hi, - sblk->stat_IfHCOutBadOctets_lo); - - if (sblk->stat_IfHCInUcastPkts_hi - || sblk->stat_IfHCInUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInUcastPkts\n", - sblk->stat_IfHCInUcastPkts_hi, - sblk->stat_IfHCInUcastPkts_lo); - - if (sblk->stat_IfHCInBroadcastPkts_hi - || sblk->stat_IfHCInBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInBroadcastPkts\n", - sblk->stat_IfHCInBroadcastPkts_hi, - sblk->stat_IfHCInBroadcastPkts_lo); - - if (sblk->stat_IfHCInMulticastPkts_hi - || sblk->stat_IfHCInMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcInMulticastPkts\n", - sblk->stat_IfHCInMulticastPkts_hi, - sblk->stat_IfHCInMulticastPkts_lo); - - if (sblk->stat_IfHCOutUcastPkts_hi - || sblk->stat_IfHCOutUcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutUcastPkts\n", - sblk->stat_IfHCOutUcastPkts_hi, - sblk->stat_IfHCOutUcastPkts_lo); - - if (sblk->stat_IfHCOutBroadcastPkts_hi - || sblk->stat_IfHCOutBroadcastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutBroadcastPkts\n", - sblk->stat_IfHCOutBroadcastPkts_hi, - sblk->stat_IfHCOutBroadcastPkts_lo); - - if (sblk->stat_IfHCOutMulticastPkts_hi - || sblk->stat_IfHCOutMulticastPkts_lo) - BCE_PRINTF("0x%08X:%08X : " - "IfHcOutMulticastPkts\n", - sblk->stat_IfHCOutMulticastPkts_hi, - sblk->stat_IfHCOutMulticastPkts_lo); - - if (sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors) - BCE_PRINTF(" 0x%08X : " - "emac_tx_stat_dot3statsinternalmactransmiterrors\n", - sblk->stat_emac_tx_stat_dot3statsinternalmactransmiterrors); - - if (sblk->stat_Dot3StatsCarrierSenseErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsCarrierSenseErrors\n", - sblk->stat_Dot3StatsCarrierSenseErrors); - - if (sblk->stat_Dot3StatsFCSErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsFCSErrors\n", - sblk->stat_Dot3StatsFCSErrors); - - if (sblk->stat_Dot3StatsAlignmentErrors) - BCE_PRINTF(" 0x%08X : Dot3StatsAlignmentErrors\n", - sblk->stat_Dot3StatsAlignmentErrors); - - if (sblk->stat_Dot3StatsSingleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsSingleCollisionFrames\n", - sblk->stat_Dot3StatsSingleCollisionFrames); - - if (sblk->stat_Dot3StatsMultipleCollisionFrames) - BCE_PRINTF(" 0x%08X : Dot3StatsMultipleCollisionFrames\n", - sblk->stat_Dot3StatsMultipleCollisionFrames); - - if (sblk->stat_Dot3StatsDeferredTransmissions) - BCE_PRINTF(" 0x%08X : Dot3StatsDeferredTransmissions\n", - sblk->stat_Dot3StatsDeferredTransmissions); - - if (sblk->stat_Dot3StatsExcessiveCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsExcessiveCollisions\n", - sblk->stat_Dot3StatsExcessiveCollisions); - - if (sblk->stat_Dot3StatsLateCollisions) - BCE_PRINTF(" 0x%08X : Dot3StatsLateCollisions\n", - sblk->stat_Dot3StatsLateCollisions); - - if (sblk->stat_EtherStatsCollisions) - BCE_PRINTF(" 0x%08X : EtherStatsCollisions\n", - sblk->stat_EtherStatsCollisions); - - if (sblk->stat_EtherStatsFragments) - BCE_PRINTF(" 0x%08X : EtherStatsFragments\n", - sblk->stat_EtherStatsFragments); - - if (sblk->stat_EtherStatsJabbers) - BCE_PRINTF(" 0x%08X : EtherStatsJabbers\n", - sblk->stat_EtherStatsJabbers); - - if (sblk->stat_EtherStatsUndersizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsUndersizePkts\n", - sblk->stat_EtherStatsUndersizePkts); - - if (sblk->stat_EtherStatsOversizePkts) - BCE_PRINTF(" 0x%08X : EtherStatsOverrsizePkts\n", - sblk->stat_EtherStatsOversizePkts); - - if (sblk->stat_EtherStatsPktsRx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx64Octets\n", - sblk->stat_EtherStatsPktsRx64Octets); - - if (sblk->stat_EtherStatsPktsRx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsRx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsRx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsRx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsRx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsRx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsRx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsRx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsRx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsRx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsRx1523Octetsto9022Octets); - - if (sblk->stat_EtherStatsPktsTx64Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx64Octets\n", - sblk->stat_EtherStatsPktsTx64Octets); - - if (sblk->stat_EtherStatsPktsTx65Octetsto127Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx65Octetsto127Octets\n", - sblk->stat_EtherStatsPktsTx65Octetsto127Octets); - - if (sblk->stat_EtherStatsPktsTx128Octetsto255Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx128Octetsto255Octets\n", - sblk->stat_EtherStatsPktsTx128Octetsto255Octets); - - if (sblk->stat_EtherStatsPktsTx256Octetsto511Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx256Octetsto511Octets\n", - sblk->stat_EtherStatsPktsTx256Octetsto511Octets); - - if (sblk->stat_EtherStatsPktsTx512Octetsto1023Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx512Octetsto1023Octets\n", - sblk->stat_EtherStatsPktsTx512Octetsto1023Octets); - - if (sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1024Octetsto1522Octets\n", - sblk->stat_EtherStatsPktsTx1024Octetsto1522Octets); - - if (sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets) - BCE_PRINTF(" 0x%08X : EtherStatsPktsTx1523Octetsto9022Octets\n", - sblk->stat_EtherStatsPktsTx1523Octetsto9022Octets); - - if (sblk->stat_XonPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XonPauseFramesReceived\n", - sblk->stat_XonPauseFramesReceived); - - if (sblk->stat_XoffPauseFramesReceived) - BCE_PRINTF(" 0x%08X : XoffPauseFramesReceived\n", - sblk->stat_XoffPauseFramesReceived); - - if (sblk->stat_OutXonSent) - BCE_PRINTF(" 0x%08X : OutXonSent\n", - sblk->stat_OutXonSent); - - if (sblk->stat_OutXoffSent) - BCE_PRINTF(" 0x%08X : OutXoffSent\n", - sblk->stat_OutXoffSent); - - if (sblk->stat_FlowControlDone) - BCE_PRINTF(" 0x%08X : FlowControlDone\n", - sblk->stat_FlowControlDone); - - if (sblk->stat_MacControlFramesReceived) - BCE_PRINTF(" 0x%08X : MacControlFramesReceived\n", - sblk->stat_MacControlFramesReceived); - - if (sblk->stat_XoffStateEntered) - BCE_PRINTF(" 0x%08X : XoffStateEntered\n", - sblk->stat_XoffStateEntered); - - if (sblk->stat_IfInFramesL2FilterDiscards) - BCE_PRINTF(" 0x%08X : IfInFramesL2FilterDiscards\n", - sblk->stat_IfInFramesL2FilterDiscards); - - if (sblk->stat_IfInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerDiscards\n", - sblk->stat_IfInRuleCheckerDiscards); - - if (sblk->stat_IfInFTQDiscards) - BCE_PRINTF(" 0x%08X : IfInFTQDiscards\n", - sblk->stat_IfInFTQDiscards); - - if (sblk->stat_IfInMBUFDiscards) - BCE_PRINTF(" 0x%08X : IfInMBUFDiscards\n", - sblk->stat_IfInMBUFDiscards); - - if (sblk->stat_IfInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : IfInRuleCheckerP4Hit\n", - sblk->stat_IfInRuleCheckerP4Hit); - - if (sblk->stat_CatchupInRuleCheckerDiscards) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerDiscards\n", - sblk->stat_CatchupInRuleCheckerDiscards); - - if (sblk->stat_CatchupInFTQDiscards) - BCE_PRINTF(" 0x%08X : CatchupInFTQDiscards\n", - sblk->stat_CatchupInFTQDiscards); - - if (sblk->stat_CatchupInMBUFDiscards) - BCE_PRINTF(" 0x%08X : CatchupInMBUFDiscards\n", - sblk->stat_CatchupInMBUFDiscards); - - if (sblk->stat_CatchupInRuleCheckerP4Hit) - BCE_PRINTF(" 0x%08X : CatchupInRuleCheckerP4Hit\n", - sblk->stat_CatchupInRuleCheckerP4Hit); + BCE_PRINT_64BIT_STAT(stat_IfHCInOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBadOctets); + BCE_PRINT_64BIT_STAT(stat_IfHCInUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCInMulticastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutUcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutBroadcastPkts); + BCE_PRINT_64BIT_STAT(stat_IfHCOutMulticastPkts); + BCE_PRINT_32BIT_STAT(stat_emac_tx_stat_dot3statsinternalmactransmiterrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsCarrierSenseErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsFCSErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsAlignmentErrors); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsSingleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsMultipleCollisionFrames); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsDeferredTransmissions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsExcessiveCollisions); + BCE_PRINT_32BIT_STAT(stat_Dot3StatsLateCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsCollisions); + BCE_PRINT_32BIT_STAT(stat_EtherStatsFragments); + BCE_PRINT_32BIT_STAT(stat_EtherStatsJabbers); + BCE_PRINT_32BIT_STAT(stat_EtherStatsUndersizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsOversizePkts); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsRx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx64Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx65Octetsto127Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx128Octetsto255Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx256Octetsto511Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx512Octetsto1023Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1024Octetsto1522Octets); + BCE_PRINT_32BIT_STAT(stat_EtherStatsPktsTx1523Octetsto9022Octets); + BCE_PRINT_32BIT_STAT(stat_XonPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffPauseFramesReceived); + BCE_PRINT_32BIT_STAT(stat_OutXonSent); + BCE_PRINT_32BIT_STAT(stat_OutXoffSent); + BCE_PRINT_32BIT_STAT(stat_FlowControlDone); + BCE_PRINT_32BIT_STAT(stat_MacControlFramesReceived); + BCE_PRINT_32BIT_STAT(stat_XoffStateEntered); + BCE_PRINT_32BIT_STAT(stat_IfInFramesL2FilterDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_IfInRuleCheckerP4Hit); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInFTQDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInMBUFDiscards); + BCE_PRINT_32BIT_STAT(stat_CatchupInRuleCheckerP4Hit); BCE_PRINTF( "----------------------------" @@ -10465,7 +10312,7 @@ static __attribute__ ((noinline)) void bce_dump_com_state(struct bce_softc *sc, int regs) { u32 val; - u32 fw_version[3]; + u32 fw_version[4]; BCE_PRINTF( "----------------------------" @@ -10508,12 +10355,76 @@ bce_dump_com_state(struct bce_softc *sc, /****************************************************************************/ +/* Prints out the Receive Virtual 2 Physical (RV2P) state. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static __attribute__ ((noinline)) void +bce_dump_rv2p_state(struct bce_softc *sc) +{ + u32 val, pc1, pc2, fw_ver_high, fw_ver_low; + + BCE_PRINTF( + "----------------------------" + " RV2P State " + "----------------------------\n"); + + /* Stall the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val |= BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2; + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Read the firmware version. */ + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC1_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P1 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + val = 0x00000001; + REG_WR_IND(sc, BCE_RV2P_PROC2_ADDR_CMD, val); + fw_ver_low = REG_RD_IND(sc, BCE_RV2P_INSTR_LOW); + fw_ver_high = REG_RD_IND(sc, BCE_RV2P_INSTR_HIGH) & BCE_RV2P_INSTR_HIGH_HIGH; + BCE_PRINTF("RV2P2 Firmware version - 0x%08X:0x%08X\n", fw_ver_high, fw_ver_low); + + /* Resume the RV2P processors. */ + val = REG_RD_IND(sc, BCE_RV2P_CONFIG); + val &= ~(BCE_RV2P_CONFIG_STALL_PROC1 | BCE_RV2P_CONFIG_STALL_PROC2); + REG_WR_IND(sc, BCE_RV2P_CONFIG, val); + + /* Fetch the program counter value. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (1st read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (1st read)\n", pc2); + + /* Fetch the program counter value again to see if it is advancing. */ + val = 0x68007800; + REG_WR_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK, val); + val = REG_RD_IND(sc, BCE_RV2P_DEBUG_VECT_PEEK); + pc1 = (val & BCE_RV2P_DEBUG_VECT_PEEK_1_VALUE); + pc2 = (val & BCE_RV2P_DEBUG_VECT_PEEK_2_VALUE) >> 16; + BCE_PRINTF("0x%08X - RV2P1 program counter (2nd read)\n", pc1); + BCE_PRINTF("0x%08X - RV2P2 program counter (2nd read)\n", pc2); + + BCE_PRINTF( + "----------------------------" + "----------------" + "----------------------------\n"); +} + + +/****************************************************************************/ /* Prints out the driver state and then enters the debugger. */ /* */ /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static __attribute__ ((noinline)) void bce_breakpoint(struct bce_softc *sc) { @@ -10544,6 +10455,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_tpat_state(sc, 0); bce_dump_cp_state(sc, 0); bce_dump_com_state(sc, 0); + bce_dump_rv2p_state(sc); #ifdef BCE_JUMBO_HDRSPLIT bce_dump_pgbd(sc, 0, NULL); bce_dump_pg_mbuf_chain(sc, 0, USABLE_PG_BD); Modified: head/sys/dev/bce/if_bcefw.h ============================================================================== --- head/sys/dev/bce/if_bcefw.h Thu Mar 18 20:57:57 2010 (r205299) +++ head/sys/dev/bce/if_bcefw.h Thu Mar 18 21:00:53 2010 (r205300) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Thu Mar 18 20:57:57 2010 (r205299) +++ head/sys/dev/bce/if_bcereg.h Thu Mar 18 21:00:53 2010 (r205300) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2009 Broadcom Corporation + * Copyright (c) 2006-2010 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -453,24 +453,10 @@ } /* Announces function entry. */ -#if 0 -#define DBENTER(cond) \ - u32 start_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - u32 end_time; \ - DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__); -#endif - #define DBENTER(cond) \ DBPRINT(sc, (cond), "%s(enter)\n", __FUNCTION__) /* Announces function exit. */ -#if 0 -#define DBEXIT(cond, val) \ - end_time = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); \ - val += (u64) BCE_TIME_DELTA(start_time, end_time); \ - DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__); -#endif - #define DBEXIT(cond) \ DBPRINT(sc, (cond), "%s(exit)\n", __FUNCTION__) @@ -6454,6 +6440,7 @@ struct bce_softc #define BCE_PHY_INT_MODE_MASK_FLAG 0x00000300 #define BCE_PHY_INT_MODE_AUTO_POLLING_FLAG 0x00000100 #define BCE_PHY_INT_MODE_LINK_READY_FLAG 0x00000200 +#define BCE_PHY_IEEE_CLAUSE_45_FLAG 0x00000400 /* Values that need to be shared with the PHY driver. */ u32 bce_shared_hw_cfg; From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 00:18:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3192F106564A; Fri, 19 Mar 2010 00:18:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EF6A8FC18; Fri, 19 Mar 2010 00:18:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J0IrgN081191; Fri, 19 Mar 2010 00:18:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J0IroV081190; Fri, 19 Mar 2010 00:18:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003190018.o2J0IroV081190@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 19 Mar 2010 00:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205301 - stable/7/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 00:18:54 -0000 Author: yongari Date: Fri Mar 19 00:18:53 2010 New Revision: 205301 URL: http://svn.freebsd.org/changeset/base/205301 Log: MFC r194781: - Added code to read bootcode firwmare version. - Created dedicated shared memory access routines. Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Thu Mar 18 21:00:53 2010 (r205300) +++ stable/7/sys/dev/bce/if_bce.c Fri Mar 19 00:18:53 2010 (r205301) @@ -329,6 +329,8 @@ static void bce_breakpoint (struct bce /****************************************************************************/ static u32 bce_reg_rd_ind (struct bce_softc *, u32); static void bce_reg_wr_ind (struct bce_softc *, u32, u32); +static void bce_shmem_wr (struct bce_softc *, u32, u32); +static u32 bce_shmem_rd (struct bce_softc *, u32); static void bce_ctx_wr (struct bce_softc *, u32, u32, u32); static int bce_miibus_read_reg (device_t, int, int); static int bce_miibus_write_reg (device_t, int, int, int); @@ -574,6 +576,8 @@ bce_probe(device_t dev) static void bce_print_adapter_info(struct bce_softc *sc) { + int i = 0; + DBENTER(BCE_VERBOSE_LOAD); BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); @@ -596,19 +600,33 @@ bce_print_adapter_info(struct bce_softc } /* Firmware version and device features. */ - printf("B/C (0x%08X); Flags( ", sc->bce_bc_ver); + printf("B/C (%s); Flags (", sc->bce_bc_ver); + #ifdef BCE_JUMBO_HDRSPLIT printf("SPLT "); + i++; #endif - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) - printf("MFW "); - if (sc->bce_flags & BCE_USING_MSI_FLAG) - printf("MSI "); - if (sc->bce_flags & BCE_USING_MSIX_FLAG) - printf("MSI-X "); - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) - printf("2.5G "); - printf(")\n"); + if (sc->bce_flags & BCE_USING_MSI_FLAG) { + if (i > 0) printf("|"); + printf("MSI"); i++; + } + + if (sc->bce_flags & BCE_USING_MSIX_FLAG) { + if (i > 0) printf("|"); + printf("MSI-X "); i++; + } + + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { + if (i > 0) printf("|"); + printf("2.5G"); i++; + } + + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + if (i > 0) printf("|"); + printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); + } else { + printf(")\n"); + } DBEXIT(BCE_VERBOSE_LOAD); } @@ -847,13 +865,50 @@ bce_attach(device_t dev) __FUNCTION__, sc->bce_shmem_base); /* Fetch the bootcode revision. */ - sc->bce_bc_ver = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_DEV_INFO_BC_REV); + val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV); + for (int i = 0, j = 0; i < 3; i++) { + u8 num; + + num = (u8) (val >> (24 - (i * 8))); + for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) { + if (num >= k || !skip0 || k == 1) { + sc->bce_bc_ver[j++] = (num / k) + '0'; + skip0 = 0; + } + } + if (i != 2) + sc->bce_bc_ver[j++] = '.'; + } + + /* Check if any management firwmare is running. */ + val = bce_shmem_rd(sc, BCE_PORT_FEATURE); + if (val & BCE_PORT_FEATURE_ASF_ENABLED) { + sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + + /* Allow time for firmware to enter the running state. */ + for (int i = 0; i < 30; i++) { + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + if (val & BCE_CONDITION_MFW_RUN_MASK) + break; + DELAY(10000); + } + } - /* Check if any management firmware is running. */ - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_PORT_FEATURE); - if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) - sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + /* Check the current bootcode state. */ + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); + val &= BCE_CONDITION_MFW_RUN_MASK; + if (val != BCE_CONDITION_MFW_RUN_UNKNOWN && + val != BCE_CONDITION_MFW_RUN_NONE) { + u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR); + int i = 0; + + for (int j = 0; j < 3; j++) { + val = bce_reg_rd_ind(sc, addr + j * 4); + val = bswap32(val); + memcpy(&sc->bce_mfw_ver[i], &val, 4); + i += 4; + } + } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -967,10 +1022,8 @@ bce_attach(device_t dev) bce_get_media(sc); /* Store data needed by PHY driver for backplane applications */ - sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_SHARED_HW_CFG_CONFIG); - sc->bce_port_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_PORT_HW_CFG_CONFIG); + sc->bce_shared_hw_cfg = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); + sc->bce_port_hw_cfg = bce_shmem_rd(sc, BCE_PORT_HW_CFG_CONFIG); /* Allocate DMA memory resources. */ if (bce_dma_alloc(dev)) { @@ -1293,6 +1346,36 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 } +/****************************************************************************/ +/* Shared memory write. */ +/* */ +/* Writes NetXtreme II shared memory region. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_shmem_wr(struct bce_softc *sc, u32 offset, u32 val) +{ + bce_reg_wr_ind(sc, sc->bce_shmem_base + offset, val); +} + + +/****************************************************************************/ +/* Shared memory read. */ +/* */ +/* Reads NetXtreme II shared memory region. */ +/* */ +/* Returns: */ +/* The 32 bit value read. */ +/****************************************************************************/ +static u32 +bce_shmem_rd(struct bce_softc *sc, u32 offset) +{ + return (bce_reg_rd_ind(sc, sc->bce_shmem_base + offset)); +} + + #ifdef BCE_DEBUG /****************************************************************************/ /* Context memory read. */ @@ -2094,7 +2177,7 @@ bce_init_nvram(struct bce_softc *sc) bce_init_nvram_get_flash_size: /* Write the flash config data to the shared memory interface. */ - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_SHARED_HW_CFG_CONFIG2); + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG2); val &= BCE_SHARED_HW_CFG2_NVM_SIZE_MASK; if (val) sc->bce_flash_size = val; @@ -2583,8 +2666,7 @@ bce_get_media(struct bce_softc *sc) sc->bce_flags |= BCE_NO_WOL_FLAG; if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { sc->bce_phy_addr = 2; - val = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_SHARED_HW_CFG_CONFIG); + val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); @@ -3487,12 +3569,12 @@ bce_fw_sync(struct bce_softc *sc, u32 ms msg_data); /* Send the message to the bootcode driver mailbox. */ - REG_WR_IND(sc, sc->bce_shmem_base + BCE_DRV_MB, msg_data); + bce_shmem_wr(sc, BCE_DRV_MB, msg_data); /* Wait for the bootcode to acknowledge the message. */ for (i = 0; i < FW_ACK_TIME_OUT_MS; i++) { /* Check for a response in the bootcode firmware mailbox. */ - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_FW_MB); + val = bce_shmem_rd(sc, BCE_FW_MB); if ((val & BCE_FW_MSG_ACK) == (msg_data & BCE_DRV_MSG_SEQ)) break; DELAY(1000); @@ -3509,7 +3591,7 @@ bce_fw_sync(struct bce_softc *sc, u32 ms msg_data &= ~BCE_DRV_MSG_CODE; msg_data |= BCE_DRV_MSG_CODE_FW_TIMEOUT; - REG_WR_IND(sc, sc->bce_shmem_base + BCE_DRV_MB, msg_data); + bce_shmem_wr(sc, BCE_DRV_MB, msg_data); sc->bce_fw_timed_out = 1; rc = EBUSY; @@ -4309,10 +4391,8 @@ bce_get_mac_addr(struct bce_softc *sc) * shared memory for speed. */ - mac_hi = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_PORT_HW_CFG_MAC_UPPER); - mac_lo = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_PORT_HW_CFG_MAC_LOWER); + mac_hi = bce_shmem_rd(sc, BCE_PORT_HW_CFG_MAC_UPPER); + mac_lo = bce_shmem_rd(sc, BCE_PORT_HW_CFG_MAC_LOWER); if ((mac_lo == 0) && (mac_hi == 0)) { BCE_PRINTF("%s(%d): Invalid Ethernet address!\n", @@ -4467,8 +4547,7 @@ bce_reset(struct bce_softc *sc, u32 rese goto bce_reset_exit; /* Set a firmware reminder that this is a soft reset. */ - REG_WR_IND(sc, sc->bce_shmem_base + BCE_DRV_RESET_SIGNATURE, - BCE_DRV_RESET_SIGNATURE_MAGIC); + bce_shmem_wr(sc, BCE_DRV_RESET_SIGNATURE, BCE_DRV_RESET_SIGNATURE_MAGIC); /* Dummy read to force the chip to complete all current transactions. */ val = REG_RD(sc, BCE_MISC_ID); @@ -4735,7 +4814,7 @@ bce_blockinit(struct bce_softc *sc) REG_WR(sc, BCE_HC_COMMAND, BCE_HC_COMMAND_CLR_STAT_NOW); /* Verify that bootcode is running. */ - reg = REG_RD_IND(sc, sc->bce_shmem_base + BCE_DEV_INFO_SIGNATURE); + reg = bce_shmem_rd(sc, BCE_DEV_INFO_SIGNATURE); DBRUNIF(DB_RANDOMTRUE(bootcode_running_failure_sim_control), BCE_PRINTF("%s(%d): Simulating bootcode failure.\n", @@ -7470,7 +7549,7 @@ bce_pulse(void *xsc) /* Tell the firmware that the driver is still running. */ msg = (u32) ++sc->bce_fw_drv_pulse_wr_seq; - REG_WR_IND(sc, sc->bce_shmem_base + BCE_DRV_PULSE_MB, msg); + bce_shmem_wr(sc, BCE_DRV_PULSE_MB, msg); /* Schedule the next pulse. */ callout_reset(&sc->bce_pulse_callout, hz, bce_pulse, sc); @@ -9824,7 +9903,7 @@ bce_dump_hw_state(struct bce_softc *sc) " Hardware State " "----------------------------\n"); - BCE_PRINTF("0x%08X - bootcode version\n", sc->bce_bc_ver); + BCE_PRINTF("%s - bootcode version\n", sc->bce_bc_ver); val = REG_RD(sc, BCE_MISC_ENABLE_STATUS_BITS); BCE_PRINTF("0x%08X - (0x%06X) misc_enable_status_bits\n", @@ -9949,21 +10028,21 @@ bce_dump_bc_state(struct bce_softc *sc) " Bootcode State " "----------------------------\n"); - BCE_PRINTF("0x%08X - bootcode version\n", sc->bce_bc_ver); + BCE_PRINTF("%s - bootcode version\n", sc->bce_bc_ver); - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_BC_RESET_TYPE); + val = bce_shmem_rd(sc, BCE_BC_RESET_TYPE); BCE_PRINTF("0x%08X - (0x%06X) reset_type\n", val, BCE_BC_RESET_TYPE); - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_BC_STATE); + val = bce_shmem_rd(sc, BCE_BC_STATE); BCE_PRINTF("0x%08X - (0x%06X) state\n", val, BCE_BC_STATE); - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_BC_CONDITION); + val = bce_shmem_rd(sc, BCE_BC_CONDITION); BCE_PRINTF("0x%08X - (0x%06X) condition\n", val, BCE_BC_CONDITION); - val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_BC_STATE_DEBUG_CMD); + val = bce_shmem_rd(sc, BCE_BC_STATE_DEBUG_CMD); BCE_PRINTF("0x%08X - (0x%06X) debug_cmd\n", val, BCE_BC_STATE_DEBUG_CMD); Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Thu Mar 18 21:00:53 2010 (r205300) +++ stable/7/sys/dev/bce/if_bcereg.h Fri Mar 19 00:18:53 2010 (r205301) @@ -996,6 +996,8 @@ struct flash_spec { #define BCE_PORT_FEATURE_MBA_VLAN_TAG_MASK 0xffff #define BCE_PORT_FEATURE_MBA_VLAN_ENABLE 0x10000 +#define BCE_MFW_VER_PTR 0x00000014c + #define BCE_BC_STATE_RESET_TYPE 0x000001c0 #define BCE_BC_STATE_RESET_TYPE_SIG 0x00005254 #define BCE_BC_STATE_RESET_TYPE_SIG_MASK 0x0000ffff @@ -1051,7 +1053,13 @@ struct flash_spec { #define BCE_BC_STATE_ERR_NO_RXP (BCE_BC_STATE_SIGN | 0x0600) #define BCE_BC_STATE_ERR_TOO_MANY_RBUF (BCE_BC_STATE_SIGN | 0x0700) -#define BCE_BC_CONDITION 0x000001c8 +#define BCE_BC_STATE_CONDITION 0x000001c8 +#define BCE_CONDITION_MFW_RUN_UNKNOWN 0x00000000 +#define BCE_CONDITION_MFW_RUN_IPMI 0x00002000 +#define BCE_CONDITION_MFW_RUN_UMP 0x00004000 +#define BCE_CONDITION_MFW_RUN_NCSI 0x00006000 +#define BCE_CONDITION_MFW_RUN_NONE 0x0000e000 +#define BCE_CONDITION_MFW_RUN_MASK 0x0000e000 #define BCE_BC_STATE_DEBUG_CMD 0x1dc #define BCE_BC_STATE_BC_DBG_CMD_SIGNATURE 0x42440000 @@ -6454,7 +6462,8 @@ struct bce_softc char * bce_name; /* Name string */ /* Tracks the version of bootcode firmware. */ - u32 bce_bc_ver; + char bce_bc_ver[32]; + char bce_mfw_ver[32]; /* Tracks the state of the firmware. 0 = Running while any */ /* other value indicates that the firmware is not responding. */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 00:26:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7505106564A; Fri, 19 Mar 2010 00:26:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 952D18FC08; Fri, 19 Mar 2010 00:26:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J0Qj3J083012; Fri, 19 Mar 2010 00:26:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J0QjHW083009; Fri, 19 Mar 2010 00:26:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003190026.o2J0QjHW083009@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 19 Mar 2010 00:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205303 - stable/8/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 00:26:46 -0000 Author: yongari Date: Fri Mar 19 00:26:45 2010 New Revision: 205303 URL: http://svn.freebsd.org/changeset/base/205303 Log: MFC r202717: - Added a workaround for NC-SI management firmware that would allow frames to be accepted while the driver is resetting the hardware. This failure is generally observed when broadcast frames are received during driver load and will generate "Unable to write CTX memory" errors. - Small changes to driver flags display. PR: kern/135836, kern/140684 Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Fri Mar 19 00:19:55 2010 (r205302) +++ stable/8/sys/dev/bce/if_bce.c Fri Mar 19 00:26:45 2010 (r205303) @@ -371,6 +371,9 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); @@ -603,9 +606,10 @@ bce_print_adapter_info(struct bce_softc printf("B/C (%s); Flags (", sc->bce_bc_ver); #ifdef BCE_JUMBO_HDRSPLIT - printf("SPLT "); + printf("SPLT"); i++; #endif + if (sc->bce_flags & BCE_USING_MSI_FLAG) { if (i > 0) printf("|"); printf("MSI"); i++; @@ -613,7 +617,7 @@ bce_print_adapter_info(struct bce_softc if (sc->bce_flags & BCE_USING_MSIX_FLAG) { if (i > 0) printf("|"); - printf("MSI-X "); i++; + printf("MSI-X"); i++; } if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { @@ -2976,6 +2980,7 @@ bce_dma_map_addr(void *arg, bus_dma_segm /* |PG Buffers | none | none | none | none | */ /* |TX Buffers | none | none | none | none | */ /* |Chain Pages(1) | 4KiB | 4KiB | 4KiB | 4KiB | */ +/* |Context Memory | | | | | */ /* +-----------------+----------+----------+----------+----------+ */ /* */ /* (1) Must align with CPU page size (BCM_PAGE_SZIE). */ @@ -3665,15 +3670,10 @@ bce_load_cpu_fw(struct bce_softc *sc, st struct fw_info *fw) { u32 offset; - u32 val; DBENTER(BCE_VERBOSE_RESET); - /* Halt the CPU. */ - val = REG_RD_IND(sc, cpu_reg->mode); - val |= cpu_reg->mode_value_halt; - REG_WR_IND(sc, cpu_reg->mode, val); - REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + bce_halt_cpu(sc, cpu_reg); /* Load the Text area. */ offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base); @@ -3726,9 +3726,28 @@ bce_load_cpu_fw(struct bce_softc *sc, st } } - /* Clear the pre-fetch instruction. */ - REG_WR_IND(sc, cpu_reg->inst, 0); - REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + /* Clear the pre-fetch instruction and set the FW start address. */ + REG_WR_IND(sc, cpu_reg->inst, 0); + REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Starts the RISC processor. */ +/* */ +/* Assumes the CPU starting address has already been set. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); /* Start the CPU. */ val = REG_RD_IND(sc, cpu_reg->mode); @@ -3741,6 +3760,62 @@ bce_load_cpu_fw(struct bce_softc *sc, st /****************************************************************************/ +/* Halts the RISC processor. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_halt_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); + + /* Halt the CPU. */ + val = REG_RD_IND(sc, cpu_reg->mode); + val |= cpu_reg->mode_value_halt; + REG_WR_IND(sc, cpu_reg->mode, val); + REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Initialize the RX CPU. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_rxp_cpu(struct bce_softc *sc) +{ + struct cpu_reg cpu_reg; + + DBENTER(BCE_VERBOSE_RESET); + + cpu_reg.mode = BCE_RXP_CPU_MODE; + cpu_reg.mode_value_halt = BCE_RXP_CPU_MODE_SOFT_HALT; + cpu_reg.mode_value_sstep = BCE_RXP_CPU_MODE_STEP_ENA; + cpu_reg.state = BCE_RXP_CPU_STATE; + cpu_reg.state_value_clear = 0xffffff; + cpu_reg.gpr0 = BCE_RXP_CPU_REG_FILE; + cpu_reg.evmask = BCE_RXP_CPU_EVENT_MASK; + cpu_reg.pc = BCE_RXP_CPU_PROGRAM_COUNTER; + cpu_reg.inst = BCE_RXP_CPU_INSTRUCTION; + cpu_reg.bp = BCE_RXP_CPU_HW_BREAKPOINT; + cpu_reg.spad_base = BCE_RXP_SCRATCH; + cpu_reg.mips_view_base = 0x8000000; + + DBPRINT(sc, BCE_INFO_RESET, "Starting RX firmware.\n"); + bce_start_cpu(sc, &cpu_reg); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ /* Initialize the RX CPU. */ /* */ /* Returns: */ @@ -3833,6 +3908,8 @@ bce_init_rxp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading RX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + /* Delay RXP start until initialization is complete. */ + DBEXIT(BCE_VERBOSE_RESET); } @@ -3929,6 +4006,7 @@ bce_init_txp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4026,6 +4104,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TPAT firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4123,6 +4202,7 @@ bce_init_cp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading CP firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4220,6 +4300,7 @@ bce_init_com_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading COM firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4665,6 +4746,12 @@ bce_chipinit(struct bce_softc *sc) /* Initialize the on-boards CPUs */ bce_init_cpus(sc); + /* Enable management frames (NC-SI) to flow to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) | BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Prepare NVRAM for access. */ if (bce_init_nvram(sc)) { rc = ENODEV; @@ -4845,6 +4932,15 @@ bce_blockinit(struct bce_softc *sc) /* Enable link state change interrupt generation. */ REG_WR(sc, BCE_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); + /* Enable the RXP. */ + bce_start_rxp_cpu(sc); + + /* Disable management frames (NC-SI) from flowing to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) & ~BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Enable all remaining blocks in the MAC. */ if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) @@ -5851,22 +5947,29 @@ bce_rx_intr(struct bce_softc *sc) DBRUN(sc->debug_rx_mbuf_alloc--); sc->free_rx_bd++; - /* - * Frames received on the NetXteme II are prepended with an - * l2_fhdr structure which provides status information about - * the received frame (including VLAN tags and checksum info). - * The frames are also automatically adjusted to align the IP - * header (i.e. two null bytes are inserted before the Ethernet - * header). As a result the data DMA'd by the controller into - * the mbuf is as follows: - * - * +---------+-----+---------------------+-----+ - * | l2_fhdr | pad | packet data | FCS | - * +---------+-----+---------------------+-----+ - * - * The l2_fhdr needs to be checked and skipped and the FCS needs - * to be stripped before sending the packet up the stack. - */ + if(m0 == NULL) { + DBPRINT(sc, BCE_EXTREME_RECV, "%s(): Oops! Empty mbuf pointer " + "found in sc->rx_mbuf_ptr[0x%04X]!\n", + __FUNCTION__, sw_rx_cons_idx); + goto bce_rx_int_next_rx; + } + + /* + * Frames received on the NetXteme II are prepended with an + * l2_fhdr structure which provides status information about + * the received frame (including VLAN tags and checksum info). + * The frames are also automatically adjusted to align the IP + * header (i.e. two null bytes are inserted before the Ethernet + * header). As a result the data DMA'd by the controller into + * the mbuf is as follows: + * + * +---------+-----+---------------------+-----+ + * | l2_fhdr | pad | packet data | FCS | + * +---------+-----+---------------------+-----+ + * + * The l2_fhdr needs to be checked and skipped and the FCS needs + * to be stripped before sending the packet up the stack. + */ l2fhdr = mtod(m0, struct l2_fhdr *); /* Get the packet data + FCS length and the status. */ @@ -6387,6 +6490,7 @@ bce_init_locked(struct bce_softc *sc) bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -10038,9 +10142,9 @@ bce_dump_bc_state(struct bce_softc *sc) BCE_PRINTF("0x%08X - (0x%06X) state\n", val, BCE_BC_STATE); - val = bce_shmem_rd(sc, BCE_BC_CONDITION); + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); BCE_PRINTF("0x%08X - (0x%06X) condition\n", - val, BCE_BC_CONDITION); + val, BCE_BC_STATE_CONDITION); val = bce_shmem_rd(sc, BCE_BC_STATE_DEBUG_CMD); BCE_PRINTF("0x%08X - (0x%06X) debug_cmd\n", Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Fri Mar 19 00:19:55 2010 (r205302) +++ stable/8/sys/dev/bce/if_bcereg.h Fri Mar 19 00:26:45 2010 (r205303) @@ -3715,6 +3715,10 @@ struct l2_fhdr { #define BCE_RPM_CONFIG_SORT_VECT_VAL (0xfL<<4) #define BCE_RPM_CONFIG_IGNORE_VLAN (1L<<31) +#define BCE_RPM_MGMT_PKT_CTRL 0x0000180c +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_DISCARD_EN (1L<<30) +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_EN (1L<<31) + #define BCE_RPM_VLAN_MATCH0 0x00001810 #define BCE_RPM_VLAN_MATCH0_RPM_VLAN_MTCH0_VALUE (0xfffL<<0) From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 00:29:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C0001065670; Fri, 19 Mar 2010 00:29:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59ED98FC14; Fri, 19 Mar 2010 00:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J0Tqv2083708; Fri, 19 Mar 2010 00:29:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J0Tqko083705; Fri, 19 Mar 2010 00:29:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201003190029.o2J0Tqko083705@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 19 Mar 2010 00:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205304 - stable/7/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 00:29:52 -0000 Author: yongari Date: Fri Mar 19 00:29:52 2010 New Revision: 205304 URL: http://svn.freebsd.org/changeset/base/205304 Log: MFC r202717: - Added a workaround for NC-SI management firmware that would allow frames to be accepted while the driver is resetting the hardware. This failure is generally observed when broadcast frames are received during driver load and will generate "Unable to write CTX memory" errors. - Small changes to driver flags display. PR: kern/135836, kern/140684 Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Fri Mar 19 00:26:45 2010 (r205303) +++ stable/7/sys/dev/bce/if_bce.c Fri Mar 19 00:29:52 2010 (r205304) @@ -371,6 +371,9 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); @@ -603,9 +606,10 @@ bce_print_adapter_info(struct bce_softc printf("B/C (%s); Flags (", sc->bce_bc_ver); #ifdef BCE_JUMBO_HDRSPLIT - printf("SPLT "); + printf("SPLT"); i++; #endif + if (sc->bce_flags & BCE_USING_MSI_FLAG) { if (i > 0) printf("|"); printf("MSI"); i++; @@ -613,7 +617,7 @@ bce_print_adapter_info(struct bce_softc if (sc->bce_flags & BCE_USING_MSIX_FLAG) { if (i > 0) printf("|"); - printf("MSI-X "); i++; + printf("MSI-X"); i++; } if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { @@ -2976,6 +2980,7 @@ bce_dma_map_addr(void *arg, bus_dma_segm /* |PG Buffers | none | none | none | none | */ /* |TX Buffers | none | none | none | none | */ /* |Chain Pages(1) | 4KiB | 4KiB | 4KiB | 4KiB | */ +/* |Context Memory | | | | | */ /* +-----------------+----------+----------+----------+----------+ */ /* */ /* (1) Must align with CPU page size (BCM_PAGE_SZIE). */ @@ -3665,15 +3670,10 @@ bce_load_cpu_fw(struct bce_softc *sc, st struct fw_info *fw) { u32 offset; - u32 val; DBENTER(BCE_VERBOSE_RESET); - /* Halt the CPU. */ - val = REG_RD_IND(sc, cpu_reg->mode); - val |= cpu_reg->mode_value_halt; - REG_WR_IND(sc, cpu_reg->mode, val); - REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + bce_halt_cpu(sc, cpu_reg); /* Load the Text area. */ offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base); @@ -3726,9 +3726,28 @@ bce_load_cpu_fw(struct bce_softc *sc, st } } - /* Clear the pre-fetch instruction. */ - REG_WR_IND(sc, cpu_reg->inst, 0); - REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + /* Clear the pre-fetch instruction and set the FW start address. */ + REG_WR_IND(sc, cpu_reg->inst, 0); + REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Starts the RISC processor. */ +/* */ +/* Assumes the CPU starting address has already been set. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); /* Start the CPU. */ val = REG_RD_IND(sc, cpu_reg->mode); @@ -3741,6 +3760,62 @@ bce_load_cpu_fw(struct bce_softc *sc, st /****************************************************************************/ +/* Halts the RISC processor. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_halt_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); + + /* Halt the CPU. */ + val = REG_RD_IND(sc, cpu_reg->mode); + val |= cpu_reg->mode_value_halt; + REG_WR_IND(sc, cpu_reg->mode, val); + REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Initialize the RX CPU. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_rxp_cpu(struct bce_softc *sc) +{ + struct cpu_reg cpu_reg; + + DBENTER(BCE_VERBOSE_RESET); + + cpu_reg.mode = BCE_RXP_CPU_MODE; + cpu_reg.mode_value_halt = BCE_RXP_CPU_MODE_SOFT_HALT; + cpu_reg.mode_value_sstep = BCE_RXP_CPU_MODE_STEP_ENA; + cpu_reg.state = BCE_RXP_CPU_STATE; + cpu_reg.state_value_clear = 0xffffff; + cpu_reg.gpr0 = BCE_RXP_CPU_REG_FILE; + cpu_reg.evmask = BCE_RXP_CPU_EVENT_MASK; + cpu_reg.pc = BCE_RXP_CPU_PROGRAM_COUNTER; + cpu_reg.inst = BCE_RXP_CPU_INSTRUCTION; + cpu_reg.bp = BCE_RXP_CPU_HW_BREAKPOINT; + cpu_reg.spad_base = BCE_RXP_SCRATCH; + cpu_reg.mips_view_base = 0x8000000; + + DBPRINT(sc, BCE_INFO_RESET, "Starting RX firmware.\n"); + bce_start_cpu(sc, &cpu_reg); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ /* Initialize the RX CPU. */ /* */ /* Returns: */ @@ -3833,6 +3908,8 @@ bce_init_rxp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading RX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + /* Delay RXP start until initialization is complete. */ + DBEXIT(BCE_VERBOSE_RESET); } @@ -3929,6 +4006,7 @@ bce_init_txp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4026,6 +4104,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TPAT firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4123,6 +4202,7 @@ bce_init_cp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading CP firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4220,6 +4300,7 @@ bce_init_com_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading COM firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4665,6 +4746,12 @@ bce_chipinit(struct bce_softc *sc) /* Initialize the on-boards CPUs */ bce_init_cpus(sc); + /* Enable management frames (NC-SI) to flow to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) | BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Prepare NVRAM for access. */ if (bce_init_nvram(sc)) { rc = ENODEV; @@ -4845,6 +4932,15 @@ bce_blockinit(struct bce_softc *sc) /* Enable link state change interrupt generation. */ REG_WR(sc, BCE_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); + /* Enable the RXP. */ + bce_start_rxp_cpu(sc); + + /* Disable management frames (NC-SI) from flowing to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) & ~BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Enable all remaining blocks in the MAC. */ if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) @@ -5851,22 +5947,29 @@ bce_rx_intr(struct bce_softc *sc) DBRUN(sc->debug_rx_mbuf_alloc--); sc->free_rx_bd++; - /* - * Frames received on the NetXteme II are prepended with an - * l2_fhdr structure which provides status information about - * the received frame (including VLAN tags and checksum info). - * The frames are also automatically adjusted to align the IP - * header (i.e. two null bytes are inserted before the Ethernet - * header). As a result the data DMA'd by the controller into - * the mbuf is as follows: - * - * +---------+-----+---------------------+-----+ - * | l2_fhdr | pad | packet data | FCS | - * +---------+-----+---------------------+-----+ - * - * The l2_fhdr needs to be checked and skipped and the FCS needs - * to be stripped before sending the packet up the stack. - */ + if(m0 == NULL) { + DBPRINT(sc, BCE_EXTREME_RECV, "%s(): Oops! Empty mbuf pointer " + "found in sc->rx_mbuf_ptr[0x%04X]!\n", + __FUNCTION__, sw_rx_cons_idx); + goto bce_rx_int_next_rx; + } + + /* + * Frames received on the NetXteme II are prepended with an + * l2_fhdr structure which provides status information about + * the received frame (including VLAN tags and checksum info). + * The frames are also automatically adjusted to align the IP + * header (i.e. two null bytes are inserted before the Ethernet + * header). As a result the data DMA'd by the controller into + * the mbuf is as follows: + * + * +---------+-----+---------------------+-----+ + * | l2_fhdr | pad | packet data | FCS | + * +---------+-----+---------------------+-----+ + * + * The l2_fhdr needs to be checked and skipped and the FCS needs + * to be stripped before sending the packet up the stack. + */ l2fhdr = mtod(m0, struct l2_fhdr *); /* Get the packet data + FCS length and the status. */ @@ -6387,6 +6490,7 @@ bce_init_locked(struct bce_softc *sc) bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -10038,9 +10142,9 @@ bce_dump_bc_state(struct bce_softc *sc) BCE_PRINTF("0x%08X - (0x%06X) state\n", val, BCE_BC_STATE); - val = bce_shmem_rd(sc, BCE_BC_CONDITION); + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); BCE_PRINTF("0x%08X - (0x%06X) condition\n", - val, BCE_BC_CONDITION); + val, BCE_BC_STATE_CONDITION); val = bce_shmem_rd(sc, BCE_BC_STATE_DEBUG_CMD); BCE_PRINTF("0x%08X - (0x%06X) debug_cmd\n", Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Fri Mar 19 00:26:45 2010 (r205303) +++ stable/7/sys/dev/bce/if_bcereg.h Fri Mar 19 00:29:52 2010 (r205304) @@ -3712,6 +3712,10 @@ struct l2_fhdr { #define BCE_RPM_CONFIG_SORT_VECT_VAL (0xfL<<4) #define BCE_RPM_CONFIG_IGNORE_VLAN (1L<<31) +#define BCE_RPM_MGMT_PKT_CTRL 0x0000180c +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_DISCARD_EN (1L<<30) +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_EN (1L<<31) + #define BCE_RPM_VLAN_MATCH0 0x00001810 #define BCE_RPM_VLAN_MATCH0_RPM_VLAN_MTCH0_VALUE (0xfffL<<0) From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 01:16:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D0F31065673; Fri, 19 Mar 2010 01:16:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CE948FC1D; Fri, 19 Mar 2010 01:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J1GruT094131; Fri, 19 Mar 2010 01:16:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J1Gr2v094129; Fri, 19 Mar 2010 01:16:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003190116.o2J1Gr2v094129@svn.freebsd.org> From: Xin LI Date: Fri, 19 Mar 2010 01:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 01:16:53 -0000 Author: delphij Date: Fri Mar 19 01:16:53 2010 New Revision: 205307 URL: http://svn.freebsd.org/changeset/base/205307 Log: SSE is enabled by default about 5 years ago so there is no point pretending that we support I486 and I586 CPUs in the GENERIC kernel, users wants these support would have to build a custom kernel to explicitly disable SSE anyways. MFC after: 1 month Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Fri Mar 19 00:51:48 2010 (r205306) +++ head/sys/i386/conf/GENERIC Fri Mar 19 01:16:53 2010 (r205307) @@ -18,8 +18,6 @@ # # $FreeBSD$ -cpu I486_CPU -cpu I586_CPU cpu I686_CPU ident GENERIC From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 01:20:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFAAB10656AC; Fri, 19 Mar 2010 01:20:12 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id C68B88FD1B; Fri, 19 Mar 2010 01:18:28 +0000 (UTC) Received: from [172.16.135.102] (lportal.in1.lcl [172.16.1.9]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2J1IRAt043139; Thu, 18 Mar 2010 17:18:27 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4BA2D0DF.3070606@feral.com> Date: Thu, 18 Mar 2010 18:18:23 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Xin LI References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> In-Reply-To: <201003190116.o2J1Gr2v094129@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Thu, 18 Mar 2010 17:18:27 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 01:20:14 -0000 On 3/18/2010 6:16 PM, Xin LI wrote: > Author: delphij > Date: Fri Mar 19 01:16:53 2010 > New Revision: 205307 > URL: http://svn.freebsd.org/changeset/base/205307 > > Log: > SSE is enabled by default about 5 years ago so there is no point pretending > that we support I486 and I586 CPUs in the GENERIC kernel, users wants these > support would have to build a custom kernel to explicitly disable SSE > anyways. > > And the crowd roars it's approval! From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 01:36:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE46D1065672; Fri, 19 Mar 2010 01:36:24 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id CBB998FC12; Fri, 19 Mar 2010 01:36:24 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.4/8.14.4) with ESMTP id o2J1aNQW062561; Thu, 18 Mar 2010 18:36:23 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.4/8.14.4/Submit) id o2J1aNId062560; Thu, 18 Mar 2010 18:36:23 -0700 (PDT) (envelope-from sgk) Date: Thu, 18 Mar 2010 18:36:23 -0700 From: Steve Kargl To: Matthew Jacob Message-ID: <20100319013623.GA62539@troutmask.apl.washington.edu> References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BA2D0DF.3070606@feral.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 01:36:25 -0000 On Thu, Mar 18, 2010 at 06:18:23PM -0700, Matthew Jacob wrote: > On 3/18/2010 6:16 PM, Xin LI wrote: > >Author: delphij > >Date: Fri Mar 19 01:16:53 2010 > >New Revision: 205307 > >URL: http://svn.freebsd.org/changeset/base/205307 > > > >Log: > > SSE is enabled by default about 5 years ago so there is no point > > pretending > > that we support I486 and I586 CPUs in the GENERIC kernel, users wants > > these > > support would have to build a custom kernel to explicitly disable SSE > > anyways. > > > > > > And the crowd roars it's approval! > Can you explain? AFAIK, SSE including floating point instructions. Floating point operations aren't allowed in the kernel. -- Steve From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 01:44:44 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5D53106564A; Fri, 19 Mar 2010 01:44:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (out-0-9.mx.aerioconnect.net [216.240.47.69]) by mx1.freebsd.org (Postfix) with ESMTP id 8ED9A8FC15; Fri, 19 Mar 2010 01:44:44 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o2J1igOW030384; Thu, 18 Mar 2010 18:44:42 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 542092D6012; Thu, 18 Mar 2010 18:44:42 -0700 (PDT) Message-ID: <4BA2D70D.3050703@elischer.org> Date: Thu, 18 Mar 2010 18:44:45 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Matthew Jacob References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> In-Reply-To: <4BA2D0DF.3070606@feral.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 01:44:44 -0000 Matthew Jacob wrote: > On 3/18/2010 6:16 PM, Xin LI wrote: >> Author: delphij >> Date: Fri Mar 19 01:16:53 2010 >> New Revision: 205307 >> URL: http://svn.freebsd.org/changeset/base/205307 >> >> Log: >> SSE is enabled by default about 5 years ago so there is no point >> pretending >> that we support I486 and I586 CPUs in the GENERIC kernel, users >> wants these >> support would have to build a custom kernel to explicitly disable SSE >> anyways. >> >> > > And the crowd roars it's approval! or not. If I'm not mistaken this means that the install CDs will no longer even boot on a lot of machines. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 01:49:44 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041D7106564A; Fri, 19 Mar 2010 01:49:44 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id BACEC8FC2D; Fri, 19 Mar 2010 01:49:43 +0000 (UTC) Received: from [172.16.135.102] (lportal.in1.lcl [172.16.1.9]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2J1ngvN043421; Thu, 18 Mar 2010 17:49:42 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4BA2D832.6030902@feral.com> Date: Thu, 18 Mar 2010 18:49:38 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Julian Elischer References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> In-Reply-To: <4BA2D70D.3050703@elischer.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Thu, 18 Mar 2010 17:49:42 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 01:49:44 -0000 >> And the crowd roars it's approval! > > or not. > > If I'm not mistaken this means that the install CDs will no longer > even boot on a lot of machines. > > If I'm not mistaken, the GENERIC kernels won't boot and run fully on a real i386/i486 anyway. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 02:11:43 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974C9106566B; Fri, 19 Mar 2010 02:11:43 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (lefty.soaustin.net [66.135.55.46]) by mx1.freebsd.org (Postfix) with ESMTP id 749F58FC17; Fri, 19 Mar 2010 02:11:43 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id F06478C07D; Thu, 18 Mar 2010 21:11:42 -0500 (CDT) Date: Thu, 18 Mar 2010 21:11:42 -0500 From: Mark Linimon To: Julian Elischer Message-ID: <20100319021142.GB3948@lonesome.com> References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BA2D70D.3050703@elischer.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@FreeBSD.org, Xin LI , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Matthew Jacob Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 02:11:43 -0000 On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote: > If I'm not mistaken this means that the install CDs will no longer even > boot on a lot of machines. I wonder how much RAM most of those systems have ... mcl From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 02:21:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DFB8106566C; Fri, 19 Mar 2010 02:21:12 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmpop107.cox.net (eastrmpop107.cox.net [68.230.240.49]) by mx1.freebsd.org (Postfix) with ESMTP id D790B8FC08; Fri, 19 Mar 2010 02:21:11 +0000 (UTC) Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao102.cox.net (InterMail vM.8.00.01.00 201-2244-105-20090324) with ESMTP id <20100319021022.PUWW12873.eastrmmtao102.cox.net@eastrmimpo02.cox.net>; Thu, 18 Mar 2010 22:10:22 -0400 Received: from localhost ([68.103.37.153]) by eastrmimpo02.cox.net with bizsmtp id uqAK1d00S3JFCbG02qAL1u; Thu, 18 Mar 2010 22:10:20 -0400 X-VR-Score: -100.00 X-Authority-Analysis: v=1.1 cv=xqrWPJi0nDUkPX9xm8G/8+dKWP5pzR5NBQvKt+8+2ys= c=1 sm=1 a=qBwI8mw2O5oA:10 a=IkcTkHD0fZMA:10 a=N4x68aYdfVlkKDflYggXRA==:17 a=6I5d2MoRAAAA:8 a=kviXuzpPAAAA:8 a=CoW-qECvhnM33EP98MYA:9 a=P1R7cgPSKlqjU0aws3Bybav2GvQA:4 a=QEXdDO2ut3YA:10 a=SV7veod9ZcQA:10 a=4vB-4DCPJfMA:10 a=N4x68aYdfVlkKDflYggXRA==:117 X-CM-Score: 0.00 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> To: "Xin LI" Date: Thu, 18 Mar 2010 20:13:46 -0600 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Jeremy Messenger" Message-ID: In-Reply-To: <201003190116.o2J1Gr2v094129@svn.freebsd.org> User-Agent: Opera Mail/10.10 (Linux) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 02:21:12 -0000 On Thu, 18 Mar 2010 19:16:53 -0600, Xin LI wrote: > Author: delphij > Date: Fri Mar 19 01:16:53 2010 > New Revision: 205307 > URL: http://svn.freebsd.org/changeset/base/205307 > > Log: > SSE is enabled by default about 5 years ago so there is no point > pretending > that we support I486 and I586 CPUs in the GENERIC kernel, users wants > these > support would have to build a custom kernel to explicitly disable SSE > anyways. > MFC after: 1 month Geode is i586, right? Or not matter, it still can be using i686? Soekris, a few small motherboards and other thin clients are still using Geode. Cheers, Mezz > Modified: > head/sys/i386/conf/GENERIC > > Modified: head/sys/i386/conf/GENERIC > ============================================================================== > --- head/sys/i386/conf/GENERIC Fri Mar 19 00:51:48 2010 (r205306) > +++ head/sys/i386/conf/GENERIC Fri Mar 19 01:16:53 2010 (r205307) > @@ -18,8 +18,6 @@ > # > # $FreeBSD$ > -cpu I486_CPU > -cpu I586_CPU > cpu I686_CPU > ident GENERIC -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 04:07:59 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA70106564A; Fri, 19 Mar 2010 04:07:59 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id D0F018FC12; Fri, 19 Mar 2010 04:07:58 +0000 (UTC) Received: from [172.16.135.102] (lportal.in1.lcl [172.16.1.9]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2J47v5a044030; Thu, 18 Mar 2010 20:07:57 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4BA2F899.8070503@feral.com> Date: Thu, 18 Mar 2010 21:07:53 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Julian Elischer References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> In-Reply-To: <4BA2D70D.3050703@elischer.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Thu, 18 Mar 2010 20:07:57 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 04:07:59 -0000 Does anyone out there have a 486 DX4 even? Can you boot 8.0 CDs? > or not. > > If I'm not mistaken this means that the install CDs will no longer > even boot on a lot of machines. > > From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 04:09:31 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59DB3106566C; Fri, 19 Mar 2010 04:09:31 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 3295B8FC1A; Fri, 19 Mar 2010 04:09:31 +0000 (UTC) Received: from [172.16.135.102] (lportal.in1.lcl [172.16.1.9]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2J49UrD044045; Thu, 18 Mar 2010 20:09:30 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4BA2F8F5.20109@feral.com> Date: Thu, 18 Mar 2010 21:09:25 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Mark Linimon References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> <20100319021142.GB3948@lonesome.com> In-Reply-To: <20100319021142.GB3948@lonesome.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Thu, 18 Mar 2010 20:09:30 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI , Julian Elischer Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 04:09:31 -0000 On 3/18/2010 7:11 PM, Mark Linimon wrote: > On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote: > >> If I'm not mistaken this means that the install CDs will no longer even >> boot on a lot of machines. >> > I wonder how much RAM most of those systems have ... > > mcl > IIRC, my DX2 486 had 32MiB From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 05:35:46 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B37106564A; Fri, 19 Mar 2010 05:35:46 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (out-0-13.mx.aerioconnect.net [216.240.47.73]) by mx1.freebsd.org (Postfix) with ESMTP id 334BA8FC1D; Fri, 19 Mar 2010 05:35:45 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o2J5ZcKt014805; Thu, 18 Mar 2010 22:35:38 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id E41252D6015; Thu, 18 Mar 2010 22:35:37 -0700 (PDT) Message-ID: <4BA30D2D.4060505@elischer.org> Date: Thu, 18 Mar 2010 22:35:41 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Matthew Jacob References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> <20100319021142.GB3948@lonesome.com> <4BA2F8F5.20109@feral.com> In-Reply-To: <4BA2F8F5.20109@feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@FreeBSD.org, Mark Linimon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 05:35:46 -0000 Matthew Jacob wrote: > On 3/18/2010 7:11 PM, Mark Linimon wrote: >> On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote: >> >>> If I'm not mistaken this means that the install CDs will no longer even >>> boot on a lot of machines. >>> >> I wonder how much RAM most of those systems have ... >> >> mcl >> > IIRC, my DX2 486 had 32MiB From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 05:39:02 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 803E5106566B; Fri, 19 Mar 2010 05:39:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (out-0-13.mx.aerioconnect.net [216.240.47.73]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF578FC0C; Fri, 19 Mar 2010 05:39:02 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o2J5cue4014938; Thu, 18 Mar 2010 22:38:57 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 4AE8F2D6013; Thu, 18 Mar 2010 22:38:56 -0700 (PDT) Message-ID: <4BA30DF3.1070100@elischer.org> Date: Thu, 18 Mar 2010 22:38:59 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Mark Linimon References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> <20100319021142.GB3948@lonesome.com> In-Reply-To: <20100319021142.GB3948@lonesome.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@FreeBSD.org, Xin LI , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Matthew Jacob Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 05:39:02 -0000 Mark Linimon wrote: > On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote: >> If I'm not mistaken this means that the install CDs will no longer even >> boot on a lot of machines. > > I wonder how much RAM most of those systems have ... > > mcl CPU: Geode(TM) Integrated Processor by AMD PCS (499.91-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x5a2 Stepping = 2 Features=0x88a93d AMD Features=0xc0400000 real memory = 536870912 (512 MB) avail memory = 436473856 (416 MB) I can no longer boot my home gateway off the cd if I need the rescue disk... that kinda sucks From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 05:39:57 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5451065676; Fri, 19 Mar 2010 05:39:57 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (out-0-13.mx.aerioconnect.net [216.240.47.73]) by mx1.freebsd.org (Postfix) with ESMTP id A870E8FC15; Fri, 19 Mar 2010 05:39:57 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o2J5driN014981; Thu, 18 Mar 2010 22:39:53 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 095EF2D6016; Thu, 18 Mar 2010 22:39:52 -0700 (PDT) Message-ID: <4BA30E2C.7020003@elischer.org> Date: Thu, 18 Mar 2010 22:39:56 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Matthew Jacob References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> <20100319021142.GB3948@lonesome.com> <4BA2F8F5.20109@feral.com> <4BA30D2D.4060505@elischer.org> In-Reply-To: <4BA30D2D.4060505@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@FreeBSD.org, Mark Linimon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 05:39:57 -0000 Julian Elischer wrote: > Matthew Jacob wrote: >> On 3/18/2010 7:11 PM, Mark Linimon wrote: >>> On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote: >>> >>>> If I'm not mistaken this means that the install CDs will no longer even >>>> boot on a lot of machines. >>>> >>> I wonder how much RAM most of those systems have ... >>> >>> mcl >>> >> IIRC, my DX2 486 had 32MiB oops premature send button pressing From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 05:40:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C84106566B; Fri, 19 Mar 2010 05:40:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AE548FC21; Fri, 19 Mar 2010 05:40:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J5emv4052389; Fri, 19 Mar 2010 05:40:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J5elVt052387; Fri, 19 Mar 2010 05:40:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003190540.o2J5elVt052387@svn.freebsd.org> From: Warner Losh Date: Fri, 19 Mar 2010 05:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205310 - head/gnu/usr.bin/gdb/arch/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 05:40:48 -0000 Author: imp Date: Fri Mar 19 05:40:47 2010 New Revision: 205310 URL: http://svn.freebsd.org/changeset/base/205310 Log: Fix typo in comment Modified: head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h Modified: head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h Fri Mar 19 03:30:19 2010 (r205309) +++ head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h Fri Mar 19 05:40:47 2010 (r205310) @@ -32,4 +32,4 @@ /* We can attach and detach. */ #define ATTACH_DETACH -#endif /* NM_NBSD_H */ +#endif /* NM_FBSD_H */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 06:33:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34361106564A; Fri, 19 Mar 2010 06:33:47 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id E96A08FC0C; Fri, 19 Mar 2010 06:33:46 +0000 (UTC) Received: by pvc7 with SMTP id 7so237312pvc.13 for ; Thu, 18 Mar 2010 23:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=ieCLySOSrd+arw73pzwaklUjW8+Quz7EBZi/ArD7cJQ=; b=B6y5sLdxP4lc35CKW4+zoT5SDSQPf9i6BNFCBDd1v/5NcXcMT6LSXCfqn/WdMZi8ki 0gD1Gj+FYZurTPyBxY+kFhOFiC7Rr3AW8gnkgGOIbjFRW/gKV54pkjprj8tRIEbGImdC zBACSVf9g9yj3SvgG/9CJbkAyBEgi0FTpdZkM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=xuyrza4IFSt5IM5U6i/yCAUciHlg7xWsqsrY3ZccRk9ZheMSUxLsY4tfi+Pfhy4Cv7 bMgoc5la0MbDN3dtZrSWxBpFW3ucpJPpIQXT3lB/4DunfDD33q6m6bKeTYy6d5lKhQjB k6OiV6CuoksoRSHUEA40ur5d4ttjtsqHn3a+I= MIME-Version: 1.0 Received: by 10.142.249.29 with SMTP id w29mr438245wfh.163.1268980425986; Thu, 18 Mar 2010 23:33:45 -0700 (PDT) Date: Thu, 18 Mar 2010 23:33:45 -0700 Message-ID: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> From: Garrett Cooper To: Xin LI Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 06:33:47 -0000 On Thu, Mar 18, 2010 at 6:16 PM, Xin LI wrote: > Author: delphij > Date: Fri Mar 19 01:16:53 2010 > New Revision: 205307 > URL: http://svn.freebsd.org/changeset/base/205307 > > Log: > =A0SSE is enabled by default about 5 years ago so there is no point prete= nding > =A0that we support I486 and I586 CPUs in the GENERIC kernel, users wants = these > =A0support would have to build a custom kernel to explicitly disable SSE > =A0anyways. > > =A0MFC after: =A0 =A01 month > > Modified: > =A0head/sys/i386/conf/GENERIC > > Modified: head/sys/i386/conf/GENERIC > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/i386/conf/GENERIC =A0Fri Mar 19 00:51:48 2010 =A0 =A0 =A0 = =A0(r205306) > +++ head/sys/i386/conf/GENERIC =A0Fri Mar 19 01:16:53 2010 =A0 =A0 =A0 = =A0(r205307) > @@ -18,8 +18,6 @@ > =A0# > =A0# $FreeBSD$ > > -cpu =A0 =A0 =A0 =A0 =A0 =A0I486_CPU > -cpu =A0 =A0 =A0 =A0 =A0 =A0I586_CPU > =A0cpu =A0 =A0 =A0 =A0 =A0 =A0I686_CPU > =A0ident =A0 =A0 =A0 =A0 =A0GENERIC 1. UPDATING entry ? 2. CC -current@ with the news? Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 09:20:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B501065670; Fri, 19 Mar 2010 09:20:06 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B63008FC1A; Fri, 19 Mar 2010 09:20:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J9K6Ql003967; Fri, 19 Mar 2010 09:20:06 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J9K6oD003965; Fri, 19 Mar 2010 09:20:06 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003190920.o2J9K6oD003965@svn.freebsd.org> From: Hiroki Sato Date: Fri, 19 Mar 2010 09:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205311 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 09:20:06 -0000 Author: hrs Date: Fri Mar 19 09:20:06 2010 New Revision: 205311 URL: http://svn.freebsd.org/changeset/base/205311 Log: Update relnotes for 7.3R (second round): acpi(4) SRAT parsing support, closefrom(2) added, utimes(2) vfs.timestamp_precision support, kmem_map increased to 512GB on amd64, lindev(4) added, linux(4) improvements, PECOFF support removed, P1003_1B_SEMAPHORES is now default, >2GB shared mem segment for SYSV IPC, sglist(9) added, SYSV IPC API changed with backward compatibility, superpages, zfsboot 64-bit LBA, fd shortage fix, /boot.config fix, zfsloader added, boot loader GPT issue fixed, amdsbwd(4) added, cpuctl(4) CPUCTL_MSR[CS]BIT support, cpufreq(4) Phenon support, ipmi(4) bugfix, hw.mca.enabled added, hw.pagesizes added, VIA Nano processor support, DRM RS880, RV740, R6/7xx 3D, Intel G41 support, alc(4) added, bge(4) improvements, cas(4) added, et(4) checksum offloading support, msk(4) improvements, mxge(4) improvements, vge(4) improvements, xl(4) bugfix, gif(4)+if_bridge(4) EtherIP bugfix, IPcomp net.inet.ipcomp.ipcomp_enable change, ng_iface(4) bugfix, tap(4) TAPGIFNAME ioctl added, aac(4) upgraded, ahc(4) Adaptec 39320LPE support, ata(4) timeout increased and some bugfixes, gmirror balancing algorithm change, gpart(8) bugfix, hptrr(4) hw.hptrr.attach_generic added, mfi(4) LSI MegaRAID SAS 1078 and Dell PERC6 support, ext2fs(5) improvements, pseudofs(9) MPSAFE, UFS_DIRHASH improvements, apropos(1) change, cp(1) symlink handling bugfix, cpucontrol(8) atomic AND/OR for MSR, crontab(5) no longer has HOME= line, df(1) -h/-H supports inode counts, dhclient(8) uses 68 as the source port for unicast DHCPREQUEST, symlink handling bugfix in find(1) and rm(1), gzip(1) pack'd file support, libradius(3) RADIUS server support, lp(1) -m/-t added, lpq(1) EoL char handling fixed, mfiutil(8) added, mptutil(8) added, ntpd(8) IPv6 anycast addr bind issue fixed, ppp(8) race fixed, pwait(1) added, strptime(3) %z added, sysintall(8) now uses 400MB for EFI partition on IA64, tail(1) -F never returns with ENOENT, traceroute{,6}(8) AS num lookup, tzsetup(8) -s added, yp(8) shadow.* map added, service(8) added, $create_args_IF added to rc.conf, $fsck_y_flags added, rc.d/named improvements, crashinfo(8) support in rc.d/savecore, rc.d/static_arp added, ISC BIND 9.4.3-P4, tzdata2009u, tzcode2009k, unifdef 1.188, and release ISO image filenames changed to "FreeBSD-*". Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Mar 19 05:40:47 2010 (r205310) +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Mar 19 09:20:06 2010 (r205311) @@ -151,13 +151,35 @@ Kernel Changes + The &man.acpi.4; subsystem now supports parsing SRAT + (System Resource Affinity Table used to describe affinity + relationships between CPUs and memory. + + The &man.closefrom.2; system call has been added. This + closes any open file descriptors which are equal to or larger + than the specified value. Note that this does not fail with + any errors and this is not multi-thread safe. + The &man.ddb.8; subcommands for &man.geom.8; now supports pagination. - &os; Linux emulation layer now supports robust futex, and - futex has been reimplemented by using &man.sx.9; lock. - Initial support of &man.ktr.4; tracing has also been - added. + The &man.futimes.2;, &man.lutimes.2;, and &man.utimes.2; + system call now support a sysctl variable + vfs.timestamp_precision. + + The kmem_map KVA space has + been increased to 512GB. + + The &man.lindev.4; driver has been added. This is for + linux-specific pseudo devices and currently used only for + /dev/full. + + &os; Linux emulation layer now supports + SO_PEERCRED socket option, + MSG_CMSG_CLOEXEC for + recvmsg(), and robust futex. The futex + has been reimplemented by using &man.sx.9; lock. Initial + support of &man.ktr.4; tracing has also been added. A lock handling error has been fixed in interaction between &man.malloc.3; implementation and threading library. @@ -165,19 +187,85 @@ call in a thread and the &man.malloc.3; function in another thread, it caused a deadlock in the child process. + PECOFF image activator support has been removed. + + &os; now supports POSIX semaphores + (P1003_1B_SEMAPHORES kernel option) by + default. + + &os; now supports shared memory segments for System V IPC + which is larger than 2GB on 64-bit platforms. For more + details, see /usr/src/UPDATING + file. + + The &man.sglist.9; API to manage scatter/gather lists of + phyiscal addresses has been added. + + &os; ABI of some of the structures used by the System V + IPC API has been changed internally. For new kernel modules, + the kern_msgctl(), + kern_semctl(), and + kern_shmctl() functions will be + transparently renamed to the new + kern_new_*() functions by using ABI + shims. The old functions remain as the old names to provide + backward compatibility for older kernel modules. + + The &os; virtual memory + subsystem now supports fully transparent use of + superpages for application memory; + application memory pages are dynamically promoted to or + demoted from superpages without any modification to + application code. This change offers the benefit of large + page sizes such as improved virtual memory efficiency and + reduced TLB (translation lookaside buffer) misses without + downsides like application changes and virtual memory + inflexibility. This can be enabled by setting a loader tunable + vm.pmap.pg_ps_enabled to + 1 and is enabled by default on + &arch.amd64;. + Boot Loader Changes A new boot loader gptzfsboot, which support GPT and ZFS has been added. - The boot loader zfsboot now supports - more than sevevn drives in the ZFS pools. + The boot loader zfsboot now always + uses 64-bit LBAs and supports more than seven drives in the + ZFS pools. + + A bug in zfsboot has been fixed. A + /boot.config smaller than 512 bytes + was ignored. + + zfsloader, the final boot loader + similar to &man.loader.8; which supports ZFS has been + added. + + A bug in the boot loader has been fixed. It failed to + recognize GPT correctly when the system supports both of MBR + and GPT and they are synchronized with each other. Hardware Support + The amdsbwd(4) driver for AMD + SB600/SB7xx watchdog timer has been added. + + The &man.cpuctl.4; driver now supports atomically + setting/clearing individual bits of a MSR register. Two new + ioctl calls CPUCTL_MSRSBIT and + CPUCTL_MSRCBIT treat the data field of + struct in the argument passed as a mask and set/clear bits + of the MSR register according to the mask value. The + &man.cpucontrol.8; utility also supports this feature. For + more details, see Userland Changes section. + + The &man.cpufreq.4; driver now supports Phenom (Family + 10h). + The &man.hwpmc.4; driver for Hardware Performance Monitoring Counter support has been added. This consists of the kernel driver, &man.pmc.3; interface @@ -187,10 +275,22 @@ data about specific processes or for the system as a whole. + Several bugs in the &man.ipmi.4; driver which prevents + the watchdog timeout setting from working, have been + fixed. + The &man.k8temp.4; driver has been renamed with &man.amdtemp.4;. The new driver supports AMD K10 and K11 as well as K8. + A loader tunable hw.mca.enabled has + been added. This can be used to enable/disable the machine + check code. Disabled by default. + + A sysctl variable hw.pagesizes has + been added. This reports all of the supported page sizes on + the system. + The &man.pci.4; subsystem now supports proxying of PCI Express MSI/MSI-X (Message Signaled Interrupt) requests and bus interrupt requests for child devices. This allows child @@ -204,25 +304,58 @@ 1. This value can be queried via a sysctl variable of the same name. + &os; now supports VIA Nano processor + family. + Multimedia Support - + DRM now supports Radeon HD + 4200 (RS880), 4770 (RV740), and R6/7xx 3D, and Intel G41 + chips. Network Interface Support - A bug in the &man.bge.4; driver has been fixed. It - caused a panic when a lot of traffic is being handled on - the interface while the system is shutting down. + The &man.alc.4; driver for Atheros AR8131/AR8132 PCIe + ethernet controller has been added. + + Several bugs in the &man.bge.4; driver have been + fixed. It caused a panic when a lot of traffic is being + handled on the interface while the system is shutting + down, and had a DMA issue when buffer address crosses a + multple of the 4GB boundaries. + + The &man.bge.4; driver now supports TSO (TCP + segmentation offloading) for BCM5755 or newer + chips. + + The &man.cas.4; driver has been added + to provide support for Sun Cassini/Cassini+ and National + Semiconductor DP83065 Saturn Gigabit Ethernet + devices. The &man.cxgb.4; driver has been upgraded to the latest version. The firmware version is 7.1.0. - A bug in the &man.fxp.4; driver has been fixed. It - caused incorrect IP packet length in the header when TSO - (TCP segmentation offloading) is enabled. + The &man.et.4; driver now supports IPv4/TCP/UDP Tx + checksum offloading. + + The &man.fxp.4; driver has been improved. The + multicast filter re-programming is now more robust. A bug + which caused incorrect IP packet length in the header when + TSO (TCP segmentation offloading) is enabled has been + fixed. + + The &man.msk.4; driver has been improved for robust + operation. Also, it now supports Yukon FE+ A0 including + 88E8040, 88E8040T, 88E8042, 88E8048, 88E8057, and + 88E8070. + + Several bugs in the &man.mxge.4; driver have been + fixed. It could lost the promiscuous flag on resetting + and a kernel panic on the hardware fault. A bug in the &man.nfe.4; driver has been fixed. It caused buffer allocation failure for jumbo frames. @@ -240,36 +373,128 @@ ranges are 1 (100us) to 255, and the actual delivery of interrupt would be delayed based on this value. The - default is 1. + default is 1. For more details, see + &man.nge.4; manual page. + + The &man.vge.4; driver has been improved. It now + supports hardware checksum offloading for &man.vlan.4; + tagged frames and WoL (Wake-on-Lan). Hardware MAC + statistics can be obtained via a new sysctl variable + dev.vge.N.stats. + Another new sysctl variables + dev.nge.N.int_holdoff, + dev.nge.N.rx_coal_pkt, + and + dev.nge.N.tx_coal_pkt + has been added to control interrupt moderation. For more + details, see &man.vge.4; manual page. + + A bug in the &man.xl.4; driver which caused occasional + watchdog timeouts has been fixed. Network Protocols + A bug in the &man.gif.4; that EtherIP packets sent by + combination of &man.if.bridge.4; and &man.gif.4; have a + reversed version field has been fixed. If you need to + communicate with older &os; releases via EtherIP, use new + flags accept_rev_ethip_ver and + send_rev_ethip_ver to control handling + the reversed version field. These can be set by + &man.ifconfig.8 utility to &man.gif.4; interfaces. The + EtherIP implementation found on &os; 6.1, 6.2, 6.3, 7.0, + 7.1, and 7.2 had an interoperability issue because it sent + the incorrect EtherIP packets and discarded the correct + ones. For more details, see &man.gif.4; manual page. + + IPcomp protocol is now enabled by default. This can be + controlled by a sysctl variable + net.inet.ipcomp.ipcomp_enable. + + A bug in the &man.ng.iface.4; driver has been fixed. + An infinite loop happened when a packet passes out via two + different &man.netgraph.3; interfaces sequentially due to + tunneling. + A kernel option IPFW_DEFAULT_TO_ACCEPT has been replaced with a new loader tunable net.inet.ip.fw.default_to_accept. The value can be queried via a sysctl variable of the same name. + + The &man.tap.4; software network interface supports a + new ioctl TAPGIFNAME. This is + convenient shortcut ported from NetBSD to obtain network + interface name using file descriptor for character + device. Disks and Storage - + The &man.aac.4; driver has been synchronized with the + latest official vendor driver. + + The &man.ahc.4; driver now supports Adaptec 39320LPE + adapters. + ATA command timeout in the &man.ata.4; driver has been + increased. This value can be set by using a kernel option + . + + A bug in the &man.ata.4; driver has been fixed. It + could generate an I/O request larger than contoller's + maximum I/O size and caused a kernel panic. + + An algorithm for load balancing mode + in the &man.gmirror.8; GEOM class has been changed and this + mode is now set by default instead of + split. The load mode + uses averaged number of requests, running on each drive + instead of measuring last request execution time for each + drive and choosing one with smallest time. + + A bug in the &man.gpart.8; GEOM class has been fixed. + It could not handle a GPT header whose size is greater than + 92 bytes which is written by OpenSolaris. + + The &man.hptrr.4; driver now supports a new loader + tunable hw.hptrr.attach_generic to + prevent the driver from being attached to some Marvell chips + which have no HPT RAID BIOS. + + The &man.mfi.4; driver now supports LSI MegaRAID SAS + 1078 and Dell PERC6. File Systems + The &man.ext2fs.5; file system has been improved. A bug + when the inode size is other than 128 has been fixed. + &os; Network File System now supports caching of negative pathname lookup in the NFS client, and uses 3 seconds timeout (30 seconds in the prior releases) for caching attributes of a directory in the client. + The &man.pseudofs.9; subsystem used in &man.procfs.5; + and &man.linprocfs.5; are now MPSAFE. + + UFS_DIRHASH (enabled by + default) now supports removing the cache data when the + system memory is low (via vm_lowmem event + handler). A bug that the system caused a panic when + decreasing a sysctl variable + vfs.ufs.dirhash_maxmem below the current + amount of memory used by + UFS_DIRHASH, has been + fixed. + A new sysctl variable for the &man.VFS.9; subsystem vfs.flushbufqtarget has been added. This fixes issues in bufdaemon, a kernel @@ -295,6 +520,13 @@ Userland Changes + The &man.apropos.1; command no longer sets the necessary + directories to PATH variable. This means + if the caller does not have /bin and /usr/bin in + PATH, then it does not work. + The &man.bluetooth.3; library now supports Bluetooth HCI API. @@ -305,14 +537,48 @@ has been fixed. It used link target's flags as the original one. + The &man.cp.1; command now preserves file flags on + symbolic links when options are + specified. It reported an error function not + implemented. + + The &man.cpucontrol.8; command now allows user to perform + atomic bitwise AND and OR operations on MSR registers. Two new + operations (&= and |=) + have been added. The first one applies bitwise AND operation + between the current contents of the MSR register and the mask, + and the second performs bitwise OR. The argument can be + optionally prefixed with ~ inversion + operator. The following is an example to clear the second bit + of TSC MSR: + + &prompt.root; cpucontrol -m 0x10&=~0x02 + The &man.cpuset.1; command now supports interrupt binding by a new option . + The default &man.crontab.5; file no longer define a + variable HOME. + + The &man.df.1; command now uses human-readable output for + inode counts when an or + is specified. + A bug in the &man.dhclient.8; utility when appending a NUL-terminated text provided by a DHCP server, has been fixed. + The &man.dhclient.8; utility now + uses 68 (bootpc) as the source port for + unicast DHCPREQUEST packets instead of + allowing the protocol stack to pick a random source port. + This fixes the behavior where &man.dhclient.8; would never + transition from RENEWING + to BOUND without going + through REBINDING in some networks which + has a tight policy on DHCP spoofing. + The &man.fdisk.8; utility now supports size qualifiers (K, M, and G) and * for automatic calculation in the p command. @@ -334,6 +600,15 @@ find -L . -type l -print0 | xargs rm -0 + A bug in the &man.find.1; and &man.rm.1; command has been + fixed. When a symbolic link has uchg or + uappend flag, the commands attempted to + clear the target file, not the symbolic link itself. + + The &man.gzip.1; command now supports uncompressing files + compressed by pack(1), which is found in some commercial Unix + systems. + The &man.ktrace.1; utility now supports a new KTRACE record for &man.sysctl.3; invocations. @@ -346,24 +621,61 @@ named kernel feature is present by checking the kern.features sysctl MIB. + The &man.libradius.3; now supports simple embedded RADIUS + server. + + The &man.lp.1; command now supports + option to send an email after the files have been printed, and + option to + write title on the banner page of + the output. These are required by POSIX standard. + + The &man.lpq.1; command now correctly translates remote + host names which contain non-standard end-of-line + characters. + The &man.man.1; command now supports manual pages in UTF-8. The &man.mergemaster.8; utility now uses an option when it invokes &man.mtree.8; command to follow symbolic links. + A userland utility &man.mfiutil.8; for the + &man.mfi.4; devices has been added. This includes basic + features to monitor controller, array, and drive status, + change basic attributes, create/delete arrays and spares, + and flush the controller firmware. Note that this is a + small utility, not a replacement of MegaCLI in the Ports + Collection which is supported officially and provides more + functionality. + + A userland utility &man.mptutil.8; for the + &man.mpt.4; devices has been added. This includes basic + features to monitor controller, array, and drive status, + change basic attributes, and create/delete arrays and + spares. + The &man.newfs.msdos.8; command now supports media which have no CHS parameter. + The &man.ntpd.8; daemon no longer tries to bind an IPv6 + anycast address. + The &man.pkill.1; command now ignores itself and the ancestors when finding processes. An option has been added for backward compatible behavior. + A race condition in the &man.ppp.8; daemon has been + fixed. + The &man.ps.1; command now supports a new flag . This displays descendant info with the output similar to Linux's (or ). + The &man.pwait.1; command, which waits for any process to + terminate has been added. + The &man.pwd.mkdb.8; now verifies login name length is shorter than MAXLOGNAME when a option is specified. Note that entries @@ -383,26 +695,111 @@ environment variable is automatically unset if the process is tainted with setuid/setgid. + The &man.strptime.3; function now supports + %z format specifier. + The &man.sysinstall.8; utility now supports a comma-separated list of network interfaces in netDev option in install.cfg. + The &man.sysinstall.8; utility now uses 400MB + for the EFI partition instead of 100MB in the previous + releases. + + The &man.tail.1; flag now persists in + trying to open files rather than giving up when it encounters + an error. ENOENT errors are not reported. + This behavior is consistent with the GNU version. + + The &man.traceroute.8; and &man.traceroute6.8; now support + an flag to display AS number corresponding + to the lookup IP address on each hop. It will query the + number to WHOIS server specified in + option. If no is specified, + whois.radb.net will be used as the default + value. + + The &man.tzsetup.8; command now supports an + option to skip the initial question about + adjusting the clock if not set to UTC. + + The &man.yp.8; utilities now support + shadow.byname and + shadow.byuid maps. These requires + privileged port access. + <filename>/etc/rc.d</filename> Scripts - + The &man.service.8; command as an easy interface for the + rc.d scripts has been added. + + The &man.rc.conf.5; file now supports + create_args_IF + for interfaces created via + cloned_interfaces + + The rc.d/fsck script now supports + options for fsck_y_enable via + fsck_y_flags. + + The rc.d/named script now supports + zone file check by &man.named-checkconf.8; before the + startup and the following options: + + + + named_wait has the script loop + until a specified hostname in named_wait_host + (localhost by default) can be + successfully looked up. This is disabled by + default. + + + + named_auto_forward creates a + forwarder configuration file based on the contents of + /etc/resolv.conf. This allows you + to utilize a local resolver for better performance, less + network traffic, custom zones, etc. while still relying + on the benefits of your local network resolver. This is + disabled by default. + + + + The rc.d/savecore script now + supports invoking &man.crashinfo.8; automatically during + boot. A new variable crashinfo_enable + has been added to enable it. + + The rc.d/static_arp script has been + added. This allows the administrator to statically bind MAC + to IPv4 address at boot time. An example is as + follows: + + static_arp_pairs="gw" +static_arp_gw="192.168.1.1 00:01:02:03:04:05" Contributed Software + ISC BIND has been updated to + version 9.4.3-P4. + sendmail has been updated from version 8.14.3 to version 8.14.4. The timezone database has been updated - to the tzdata2009i release. + to the tzdata2009u release. + + The timezone binary has been updated + to the tzcode2009k release. + + unifdef has been updated to + version 1.188. @@ -416,7 +813,8 @@ Release Engineering and Integration - + &os; release ISO images now have FreeBSD- + at the beginning of the filenames. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 09:40:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F60B1065670; Fri, 19 Mar 2010 09:40:31 +0000 (UTC) (envelope-from paul@fletchermoorland.co.uk) Received: from hydra.fletchermoorland.co.uk (hydra.fletchermoorland.co.uk [78.33.209.59]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1948FC16; Fri, 19 Mar 2010 09:40:30 +0000 (UTC) Received: from demophon.fletchermoorland.co.uk (demophon.fletchermoorland.co.uk [192.168.0.154]) by hydra.fletchermoorland.co.uk (8.14.3/8.14.3) with ESMTP id o2J96Pri051482; Fri, 19 Mar 2010 09:06:25 GMT (envelope-from paul@fletchermoorland.co.uk) Message-ID: <4BA33E91.3030602@fletchermoorland.co.uk> Date: Fri, 19 Mar 2010 09:06:25 +0000 From: Paul Wootton User-Agent: Thunderbird 2.0.0.23 (X11/20091217) MIME-Version: 1.0 To: Julian Elischer References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> <20100319021142.GB3948@lonesome.com> <4BA30DF3.1070100@elischer.org> In-Reply-To: <4BA30DF3.1070100@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.5 required=10.0 tests=ALL_TRUSTED,BAYES_50, DNS_FROM_OPENWHOIS,FH_DATE_PAST_20XX autolearn=no version=3.2.5 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hydra.fletchermoorland.co.uk Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 09:40:31 -0000 Julian Elischer wrote: > CPU: Geode(TM) Integrated Processor by AMD PCS (499.91-MHz 586-class CPU) > Origin = "AuthenticAMD" Id = 0x5a2 Stepping = 2 > Features=0x88a93d > AMD Features=0xc0400000 > real memory = 536870912 (512 MB) > avail memory = 436473856 (416 MB) > > I can no longer boot my home gateway off the cd > if I need the rescue disk... > > that kinda sucks > Just a me too with a Geode and 512Mb RAM... I wonder how many people this will actually be affect? I bet there are quite a few Geode machines that run BSD. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 09:53:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A226106564A; Fri, 19 Mar 2010 09:53:25 +0000 (UTC) (envelope-from syrinx@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EBED8FC14; Fri, 19 Mar 2010 09:53:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2J9rPOE011234; Fri, 19 Mar 2010 09:53:25 GMT (envelope-from syrinx@svn.freebsd.org) Received: (from syrinx@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2J9rPWV011232; Fri, 19 Mar 2010 09:53:25 GMT (envelope-from syrinx@svn.freebsd.org) Message-Id: <201003190953.o2J9rPWV011232@svn.freebsd.org> From: Shteryana Shopova Date: Fri, 19 Mar 2010 09:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205312 - head/usr.sbin/bsnmpd/modules/snmp_pf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 09:53:25 -0000 Author: syrinx Date: Fri Mar 19 09:53:25 2010 New Revision: 205312 URL: http://svn.freebsd.org/changeset/base/205312 Log: Make sure the snmp_pf module will first refresh its entires if necessary, then find a specific entry, and get the requested value. So far, it found the specific entry, refreshed the entry list if necessary, and got the requested value from the found entry. The problem is that refreshing nukes all old entries and replaces them with new ones and the obtained entry pointer was no longer valid after the refresh. Reviewed by: bz, philip MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Fri Mar 19 09:20:06 2010 (r205311) +++ head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Fri Mar 19 09:53:25 2010 (r205312) @@ -534,6 +534,9 @@ pf_iftable(struct snmp_context __unused asn_subid_t which = val->var.subs[sub - 1]; struct pfi_entry *e = NULL; + if ((time(NULL) - pfi_table_age) > PFI_TABLE_MAXAGE) + pfi_refresh(); + switch (op) { case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); @@ -557,9 +560,6 @@ pf_iftable(struct snmp_context __unused abort(); } - if ((time(NULL) - pfi_table_age) > PFI_TABLE_MAXAGE) - pfi_refresh(); - switch (which) { case LEAF_pfInterfacesIfDescr: return (string_get(val, e->pfi.pfik_name, -1)); @@ -684,6 +684,9 @@ pf_tbltable(struct snmp_context __unused asn_subid_t which = val->var.subs[sub - 1]; struct pft_entry *e = NULL; + if ((time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) + pft_refresh(); + switch (op) { case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); @@ -707,9 +710,6 @@ pf_tbltable(struct snmp_context __unused abort(); } - if ((time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) - pft_refresh(); - switch (which) { case LEAF_pfTablesTblDescr: return (string_get(val, e->pft.pfrts_name, -1)); @@ -842,6 +842,9 @@ pf_altqq(struct snmp_context __unused *c return (SNMP_ERR_NOERROR); } + if ((time(NULL) - pfq_table_age) > PFQ_TABLE_MAXAGE) + pfq_refresh(); + switch (op) { case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); @@ -865,9 +868,6 @@ pf_altqq(struct snmp_context __unused *c abort(); } - if ((time(NULL) - pfq_table_age) > PFQ_TABLE_MAXAGE) - pfq_refresh(); - switch (which) { case LEAF_pfAltqQueueDescr: return (string_get(val, e->altq.qname, -1)); @@ -930,6 +930,9 @@ pf_lbltable(struct snmp_context __unused asn_subid_t which = val->var.subs[sub - 1]; struct pfl_entry *e = NULL; + if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) + pfl_refresh(); + switch (op) { case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); @@ -953,9 +956,6 @@ pf_lbltable(struct snmp_context __unused abort(); } - if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) - pfl_refresh(); - switch (which) { case LEAF_pfLabelsLblName: return (string_get(val, e->name, -1)); From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:26:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16963106564A; Fri, 19 Mar 2010 10:26:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE9DC8FC13; Fri, 19 Mar 2010 10:25:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAPxw3019440; Fri, 19 Mar 2010 10:25:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAPxN6019438; Fri, 19 Mar 2010 10:25:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191025.o2JAPxN6019438@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205313 - stable/8/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:26:00 -0000 Author: kib Date: Fri Mar 19 10:25:59 2010 New Revision: 205313 URL: http://svn.freebsd.org/changeset/base/205313 Log: MFC r204755: Update the list of the process flags. Note that the lists of pending signals for process and its threads are distinct. Modified: stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Fri Mar 19 09:53:25 2010 (r205312) +++ stable/8/bin/ps/ps.1 Fri Mar 19 10:25:59 2010 (r205313) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd March 5, 2010 .Dt PS 1 .Os .Sh NAME @@ -284,11 +284,10 @@ The percentage of real memory used by th The flags associated with the process as in the include file .In sys/proc.h : -.Bl -column P_STOPPED_SINGLE 0x4000000 +.Bl -column P_SINGLE_BOUNDARY 0x40000000 .It Dv "P_ADVLOCK" Ta No "0x00001 Process may hold a POSIX advisory lock" .It Dv "P_CONTROLT" Ta No "0x00002 Has a controlling terminal" .It Dv "P_KTHREAD" Ta No "0x00004 Kernel thread" -.It Dv "P_NOLOAD" Ta No "0x00008 Ignore during load avg calculations" .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" @@ -305,8 +304,14 @@ the include file .It Dv "P_STOPPED_SINGLE" Ta No "0x80000 Only one thread can continue" .It Dv "P_PROTECTED" Ta No "0x100000 Do not kill on memory overcommit" .It Dv "P_SIGEVENT" Ta No "0x200000 Process pending signals changed" +.It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000 Threads should suspend at user boundary" +.It Dv "P_HWPMC" Ta No "0x800000 Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x1000000 Process is in jail" .It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()" +.It Dv "P_STATCHILD" Ta No "0x8000000 Child process stopped or exited" +.It Dv "P_INMEM" Ta No "0x10000000 Loaded into memory" +.It Dv "P_SWAPPINGOUT" Ta No "0x20000000 Process is being swapped out" +.It Dv "P_SWAPPINGIN" Ta No "0x40000000 Process is being swapped in" .El .It Cm label The MAC label of the process. @@ -615,6 +620,13 @@ wait channel (as a symbolic name) .It Cm xstat exit or stop status (valid only for stopped or zombie process) .El +.Pp +Note that the +.Cm pending +column displays bitmask of signals pending in the process queue when +.Fl H +option is not specified, otherwise the per-thread queue of pending signals +is shown. .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:28:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6234B106564A; Fri, 19 Mar 2010 10:28:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5082D8FC17; Fri, 19 Mar 2010 10:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JASnnj020115; Fri, 19 Mar 2010 10:28:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JASnBf020113; Fri, 19 Mar 2010 10:28:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191028.o2JASnBf020113@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205314 - stable/8/tools/regression/aio/aiotest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:28:49 -0000 Author: kib Date: Fri Mar 19 10:28:49 2010 New Revision: 205314 URL: http://svn.freebsd.org/changeset/base/205314 Log: MFC r205224: Add missing headers. Modified: stable/8/tools/regression/aio/aiotest/aiotest.c Directory Properties: stable/8/tools/regression/aio/aiotest/ (props changed) Modified: stable/8/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- stable/8/tools/regression/aio/aiotest/aiotest.c Fri Mar 19 10:25:59 2010 (r205313) +++ stable/8/tools/regression/aio/aiotest/aiotest.c Fri Mar 19 10:28:49 2010 (r205314) @@ -40,14 +40,17 @@ #include #include +#include #include #include #include #include #include +#include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:33:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E90151065672; Fri, 19 Mar 2010 10:33:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D67B78FC0C; Fri, 19 Mar 2010 10:33:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAXjWe021275; Fri, 19 Mar 2010 10:33:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAXjrm021269; Fri, 19 Mar 2010 10:33:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191033.o2JAXjrm021269@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205315 - in stable/8/tools/regression/mqueue: mqtest1 mqtest2 mqtest3 mqtest4 mqtest5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:33:46 -0000 Author: kib Date: Fri Mar 19 10:33:45 2010 New Revision: 205315 URL: http://svn.freebsd.org/changeset/base/205315 Log: MFC r205225: Add missing headers. While there, arrange headers alphabetically. Modified: stable/8/tools/regression/mqueue/mqtest1/mqtest1.c stable/8/tools/regression/mqueue/mqtest2/mqtest2.c stable/8/tools/regression/mqueue/mqtest3/mqtest3.c stable/8/tools/regression/mqueue/mqtest4/mqtest4.c stable/8/tools/regression/mqueue/mqtest5/mqtest5.c Directory Properties: stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) Modified: stable/8/tools/regression/mqueue/mqtest1/mqtest1.c ============================================================================== --- stable/8/tools/regression/mqueue/mqtest1/mqtest1.c Fri Mar 19 10:28:49 2010 (r205314) +++ stable/8/tools/regression/mqueue/mqtest1/mqtest1.c Fri Mar 19 10:33:45 2010 (r205315) @@ -1,10 +1,11 @@ /* $FreeBSD$ */ -#include -#include +#include +#include #include +#include #include -#include +#include #define MQNAME "/mytstqueue1" Modified: stable/8/tools/regression/mqueue/mqtest2/mqtest2.c ============================================================================== --- stable/8/tools/regression/mqueue/mqtest2/mqtest2.c Fri Mar 19 10:28:49 2010 (r205314) +++ stable/8/tools/regression/mqueue/mqtest2/mqtest2.c Fri Mar 19 10:33:45 2010 (r205315) @@ -1,8 +1,13 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include #include +#include #include +#include +#include #include #define MQNAME "/mytstqueue2" Modified: stable/8/tools/regression/mqueue/mqtest3/mqtest3.c ============================================================================== --- stable/8/tools/regression/mqueue/mqtest3/mqtest3.c Fri Mar 19 10:28:49 2010 (r205314) +++ stable/8/tools/regression/mqueue/mqtest3/mqtest3.c Fri Mar 19 10:33:45 2010 (r205315) @@ -1,10 +1,15 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include #define MQNAME "/mytstqueue3" #define LOOPS 1000 Modified: stable/8/tools/regression/mqueue/mqtest4/mqtest4.c ============================================================================== --- stable/8/tools/regression/mqueue/mqtest4/mqtest4.c Fri Mar 19 10:28:49 2010 (r205314) +++ stable/8/tools/regression/mqueue/mqtest4/mqtest4.c Fri Mar 19 10:33:45 2010 (r205315) @@ -1,11 +1,16 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include -#include #define MQNAME "/mytstqueue4" #define LOOPS 1000 Modified: stable/8/tools/regression/mqueue/mqtest5/mqtest5.c ============================================================================== --- stable/8/tools/regression/mqueue/mqtest5/mqtest5.c Fri Mar 19 10:28:49 2010 (r205314) +++ stable/8/tools/regression/mqueue/mqtest5/mqtest5.c Fri Mar 19 10:33:45 2010 (r205315) @@ -1,12 +1,16 @@ /* $FreeBSD$ */ -#include -#include + +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include -#include -#include #define MQNAME "/mytstqueue5" #define LOOPS 1000 From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:41:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF41E106564A; Fri, 19 Mar 2010 10:41:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE6838FC15; Fri, 19 Mar 2010 10:41:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAfW0O023000; Fri, 19 Mar 2010 10:41:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAfW6w022998; Fri, 19 Mar 2010 10:41:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191041.o2JAfW6w022998@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205316 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:41:32 -0000 Author: kib Date: Fri Mar 19 10:41:32 2010 New Revision: 205316 URL: http://svn.freebsd.org/changeset/base/205316 Log: Fix two style issues. MFC after: 2 weeks Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Fri Mar 19 10:33:45 2010 (r205315) +++ head/sys/kern/uipc_syscalls.c Fri Mar 19 10:41:32 2010 (r205316) @@ -2528,7 +2528,7 @@ sctp_generic_sendmsg_iov(td, uap) goto sctp_bad; #endif /* MAC */ - auio.uio_iov = iov; + auio.uio_iov = iov; auio.uio_iovcnt = uap->iovlen; auio.uio_segflg = UIO_USERSPACE; auio.uio_rw = UIO_WRITE; @@ -2638,7 +2638,7 @@ sctp_generic_recvmsg(td, uap) } else { fromlen = 0; } - if(uap->msg_flags) { + if (uap->msg_flags) { error = copyin(uap->msg_flags, &msg_flags, sizeof (int)); if (error) { goto out; From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:44:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBA31106566C; Fri, 19 Mar 2010 10:44:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAC518FC12; Fri, 19 Mar 2010 10:44:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAi23a023611; Fri, 19 Mar 2010 10:44:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAi2tH023609; Fri, 19 Mar 2010 10:44:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191044.o2JAi2tH023609@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205317 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:44:03 -0000 Author: kib Date: Fri Mar 19 10:44:02 2010 New Revision: 205317 URL: http://svn.freebsd.org/changeset/base/205317 Log: Remove dead statement. Reviewed by: tuexen MFC after: 2 weeks Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Fri Mar 19 10:41:32 2010 (r205316) +++ head/sys/kern/uipc_syscalls.c Fri Mar 19 10:44:02 2010 (r205317) @@ -2625,7 +2625,6 @@ sctp_generic_recvmsg(td, uap) error = mac_socket_check_receive(td->td_ucred, so); if (error) { goto out; - return (error); } #endif /* MAC */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:46:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 713AE106564A; Fri, 19 Mar 2010 10:46:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 608F08FC16; Fri, 19 Mar 2010 10:46:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAkslA024269; Fri, 19 Mar 2010 10:46:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAksqH024267; Fri, 19 Mar 2010 10:46:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191046.o2JAksqH024267@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205318 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:46:54 -0000 Author: kib Date: Fri Mar 19 10:46:54 2010 New Revision: 205318 URL: http://svn.freebsd.org/changeset/base/205318 Log: Properly handle compat32 calls to sctp generic sendmsd/recvmsg functions that take iov. Reviewed by: tuexen MFC after: 2 weeks Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Fri Mar 19 10:44:02 2010 (r205317) +++ head/sys/kern/uipc_syscalls.c Fri Mar 19 10:46:54 2010 (r205318) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -69,6 +70,9 @@ __FBSDID("$FreeBSD$"); #ifdef KTRACE #include #endif +#ifdef COMPAT_FREEBSD32 +#include +#endif #include @@ -2513,7 +2517,13 @@ sctp_generic_sendmsg_iov(td, uap) if (error) goto sctp_bad1; - error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + error = freebsd32_copyiniov((struct iovec32 *)uap->iov, + uap->iovlen, &iov, EMSGSIZE); + else +#endif + error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); if (error) goto sctp_bad1; #ifdef KTRACE @@ -2615,10 +2625,15 @@ sctp_generic_recvmsg(td, uap) if (error) { return (error); } - error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); - if (error) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + error = freebsd32_copyiniov((struct iovec32 *)uap->iov, + uap->iovlen, &iov, EMSGSIZE); + else +#endif + error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); + if (error) goto out1; - } so = fp->f_data; #ifdef MAC From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:49:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6BF5106566C; Fri, 19 Mar 2010 10:49:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5A3D8FC27; Fri, 19 Mar 2010 10:49:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAn3GR024770; Fri, 19 Mar 2010 10:49:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAn3JC024767; Fri, 19 Mar 2010 10:49:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191049.o2JAn3JC024767@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205319 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:49:03 -0000 Author: kib Date: Fri Mar 19 10:49:03 2010 New Revision: 205319 URL: http://svn.freebsd.org/changeset/base/205319 Log: Make freebsd32_copyiniov() available outside of freebsd32_misc. MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/freebsd32_util.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 10:46:54 2010 (r205318) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 10:49:03 2010 (r205319) @@ -873,7 +873,7 @@ freebsd32_pwritev(struct thread *td, str return (error); } -static int +int freebsd32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, int error) { Modified: head/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_util.h Fri Mar 19 10:46:54 2010 (r205318) +++ head/sys/compat/freebsd32/freebsd32_util.h Fri Mar 19 10:49:03 2010 (r205319) @@ -84,5 +84,8 @@ int syscall32_deregister(int *offset, int syscall32_module_handler(struct module *mod, int what, void *arg); register_t *freebsd32_copyout_strings(struct image_params *imgp); +struct iovec32; +int freebsd32_copyiniov(struct iovec32 *iovp, u_int iovcnt, + struct iovec **iov, int error); #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:50:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D83B1106566C; Fri, 19 Mar 2010 10:50:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 494A78FC2D; Fri, 19 Mar 2010 10:50:44 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o2JAoebV034326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Mar 2010 12:50:40 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o2JAoeat071525; Fri, 19 Mar 2010 12:50:40 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o2JAoehc071524; Fri, 19 Mar 2010 12:50:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Mar 2010 12:50:40 +0200 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100319105040.GC2415@deviant.kiev.zoral.com.ua> References: <201003191049.o2JAn3JC024767@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="t0UkRYy7tHLRMCai" Content-Disposition: inline In-Reply-To: <201003191049.o2JAn3JC024767@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r205319 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:50:45 -0000 --t0UkRYy7tHLRMCai Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 19, 2010 at 10:49:03AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Mar 19 10:49:03 2010 > New Revision: 205319 > URL: http://svn.freebsd.org/changeset/base/205319 >=20 > Log: > Make freebsd32_copyiniov() available outside of freebsd32_misc. > =20 > MFC after: 2 weeks This has to be committed before r205318, I am sorry for messing it. --t0UkRYy7tHLRMCai Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkujVv8ACgkQC3+MBN1Mb4i2AQCgz5hst6YKPkXSz+kR+DKv1q6E vT8AoK4MV7yzir6sAdXgPfwjIwYvSBrj =fmIU -----END PGP SIGNATURE----- --t0UkRYy7tHLRMCai-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:52:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 714A51065678; Fri, 19 Mar 2010 10:52:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6067F8FC1E; Fri, 19 Mar 2010 10:52:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAqtqQ025664; Fri, 19 Mar 2010 10:52:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAqtIZ025661; Fri, 19 Mar 2010 10:52:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191052.o2JAqtIZ025661@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205320 - in head/sys: compat/freebsd32 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:52:55 -0000 Author: kib Date: Fri Mar 19 10:52:54 2010 New Revision: 205320 URL: http://svn.freebsd.org/changeset/base/205320 Log: FOr SYSCALL_MODULE_HELPER, use "sys/" module name. FOr SYSCALL32_MODULE_HELPER, use "sys32/" module name. This avoids modules name conflict when compat32 syscall does not need shims. Note that SYSCALL_MODULE_HELPER is going to be unused in the tree by several next commits. Suggested by: jhb MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32_util.h head/sys/sys/sysent.h Modified: head/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_util.h Fri Mar 19 10:49:03 2010 (r205319) +++ head/sys/compat/freebsd32/freebsd32_util.h Fri Mar 19 10:52:54 2010 (r205320) @@ -61,7 +61,7 @@ static struct syscall_module_data name## }; \ \ static moduledata_t name##32_mod = { \ - #name, \ + "sys32/" #name, \ syscall32_module_handler, \ &name##_syscall32_mod \ }; \ Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Mar 19 10:49:03 2010 (r205319) +++ head/sys/sys/sysent.h Fri Mar 19 10:52:54 2010 (r205320) @@ -149,7 +149,7 @@ static struct syscall_module_data name## }; \ \ static moduledata_t name##_mod = { \ - #name, \ + "sys/" #name, \ syscall_module_handler, \ &name##_syscall_mod \ }; \ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 10:56:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A17FF106566B; Fri, 19 Mar 2010 10:56:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FDB68FC08; Fri, 19 Mar 2010 10:56:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JAuUas026493; Fri, 19 Mar 2010 10:56:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JAuUki026488; Fri, 19 Mar 2010 10:56:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191056.o2JAuUki026488@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 10:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205321 - in head/sys: compat/freebsd32 kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 10:56:30 -0000 Author: kib Date: Fri Mar 19 10:56:30 2010 New Revision: 205321 URL: http://svn.freebsd.org/changeset/base/205321 Log: Introduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and neccessary support functions to allow registering dynamically loaded syscalls from the MOD_LOAD handlers. Helpers handle registration failures semi-automatically. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/freebsd32_util.h head/sys/kern/kern_syscalls.c head/sys/sys/sysent.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 10:52:54 2010 (r205320) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 10:56:30 2010 (r205321) @@ -3084,6 +3084,36 @@ syscall32_module_handler(struct module * } } +int +syscall32_helper_register(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + int error; + + for (sd1 = sd; sd1->syscall_no != NO_SYSCALL; sd1++) { + error = syscall32_register(&sd1->syscall_no, &sd1->new_sysent, + &sd1->old_sysent); + if (error != 0) { + syscall32_helper_unregister(sd); + return (error); + } + sd1->registered = 1; + } + return (0); +} + +int +syscall32_helper_unregister(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + + for (sd1 = sd; sd1->registered != 0; sd1++) { + syscall32_deregister(&sd1->syscall_no, &sd1->old_sysent); + sd1->registered = 0; + } + return (0); +} + register_t * freebsd32_copyout_strings(struct image_params *imgp) { Modified: head/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_util.h Fri Mar 19 10:52:54 2010 (r205320) +++ head/sys/compat/freebsd32/freebsd32_util.h Fri Mar 19 10:56:30 2010 (r205321) @@ -78,10 +78,21 @@ SYSCALL32_MODULE(syscallname, & syscallname##_syscall32, & syscallname##_sysent32,\ NULL, NULL); +#define SYSCALL32_INIT_HELPER(syscallname) { \ + .new_sysent = { \ + .sy_narg = (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + .sy_call = (sy_call_t *)& syscallname, \ + }, \ + .syscall_no = FREEBSD32_SYS_##syscallname \ +} + int syscall32_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent); int syscall32_deregister(int *offset, struct sysent *old_sysent); int syscall32_module_handler(struct module *mod, int what, void *arg); +int syscall32_helper_register(struct syscall_helper_data *sd); +int syscall32_helper_unregister(struct syscall_helper_data *sd); register_t *freebsd32_copyout_strings(struct image_params *imgp); struct iovec32; Modified: head/sys/kern/kern_syscalls.c ============================================================================== --- head/sys/kern/kern_syscalls.c Fri Mar 19 10:52:54 2010 (r205320) +++ head/sys/kern/kern_syscalls.c Fri Mar 19 10:56:30 2010 (r205321) @@ -135,3 +135,33 @@ syscall_module_handler(struct module *mo else return (0); } + +int +syscall_helper_register(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + int error; + + for (sd1 = sd; sd1->syscall_no != NO_SYSCALL; sd1++) { + error = syscall_register(&sd1->syscall_no, &sd1->new_sysent, + &sd1->old_sysent); + if (error != 0) { + syscall_helper_unregister(sd); + return (error); + } + sd1->registered = 1; + } + return (0); +} + +int +syscall_helper_unregister(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + + for (sd1 = sd; sd1->registered != 0; sd1++) { + syscall_deregister(&sd1->syscall_no, &sd1->old_sysent); + sd1->registered = 0; + } + return (0); +} Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Mar 19 10:52:54 2010 (r205320) +++ head/sys/sys/sysent.h Fri Mar 19 10:56:30 2010 (r205321) @@ -166,10 +166,34 @@ SYSCALL_MODULE(syscallname, \ (sysent[SYS_##syscallname].sy_call != (sy_call_t *)lkmnosys && \ sysent[SYS_##syscallname].sy_call != (sy_call_t *)lkmressys) +/* + * Syscall registration helpers with resource allocation handling. + */ +struct syscall_helper_data { + struct sysent new_sysent; + struct sysent old_sysent; + int syscall_no; + int registered; +}; +#define SYSCALL_INIT_HELPER(syscallname) { \ + .new_sysent = { \ + .sy_narg = (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + .sy_call = (sy_call_t *)& syscallname, \ + .sy_auevent = SYS_AUE_##syscallname \ + }, \ + .syscall_no = SYS_##syscallname \ +} +#define SYSCALL_INIT_LAST { \ + .syscall_no = NO_SYSCALL \ +} + int syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent); int syscall_deregister(int *offset, struct sysent *old_sysent); int syscall_module_handler(struct module *mod, int what, void *arg); +int syscall_helper_register(struct syscall_helper_data *sd); +int syscall_helper_unregister(struct syscall_helper_data *sd); /* Special purpose system call functions. */ struct nosys_args; From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:01:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C11E106566C; Fri, 19 Mar 2010 11:01:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A7A48FC1F; Fri, 19 Mar 2010 11:01:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JB1pbC027704; Fri, 19 Mar 2010 11:01:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JB1pNY027700; Fri, 19 Mar 2010 11:01:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191101.o2JB1pNY027700@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205322 - in head/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:01:52 -0000 Author: kib Date: Fri Mar 19 11:01:51 2010 New Revision: 205322 URL: http://svn.freebsd.org/changeset/base/205322 Log: Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to sysv_ipc.c. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32_ipc.h head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/sysv_ipc.c Modified: head/sys/compat/freebsd32/freebsd32_ipc.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ipc.h Fri Mar 19 10:56:30 2010 (r205321) +++ head/sys/compat/freebsd32/freebsd32_ipc.h Fri Mar 19 11:01:51 2010 (r205322) @@ -147,6 +147,14 @@ struct shmid_ds32_old { int32_t shm_ctime; uint32_t shm_internal; }; + +void freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, + struct ipc_perm *ip); +void freebsd32_ipcperm_old_out(struct ipc_perm *ip, + struct ipc_perm32_old *ip32); #endif +void freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip); +void freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32); + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_IPC_H_ */ Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 10:56:30 2010 (r205321) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 11:01:51 2010 (r205322) @@ -1400,60 +1400,6 @@ freebsd4_freebsd32_fhstatfs(struct threa } #endif -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -static void -freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) -{ - - CP(*ip32, *ip, cuid); - CP(*ip32, *ip, cgid); - CP(*ip32, *ip, uid); - CP(*ip32, *ip, gid); - CP(*ip32, *ip, mode); - CP(*ip32, *ip, seq); - CP(*ip32, *ip, key); -} - -static void -freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) -{ - - CP(*ip, *ip32, cuid); - CP(*ip, *ip32, cgid); - CP(*ip, *ip32, uid); - CP(*ip, *ip32, gid); - CP(*ip, *ip32, mode); - CP(*ip, *ip32, seq); - CP(*ip, *ip32, key); -} -#endif - -static void -freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip) -{ - - CP(*ip32, *ip, cuid); - CP(*ip32, *ip, cgid); - CP(*ip32, *ip, uid); - CP(*ip32, *ip, gid); - CP(*ip32, *ip, mode); - CP(*ip32, *ip, seq); - CP(*ip32, *ip, key); -} - -static void -freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32) -{ - - CP(*ip, *ip32, cuid); - CP(*ip, *ip32, cgid); - CP(*ip, *ip32, uid); - CP(*ip, *ip32, gid); - CP(*ip, *ip32, mode); - CP(*ip, *ip32, seq); - CP(*ip, *ip32, key); -} int freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) Modified: head/sys/kern/sysv_ipc.c ============================================================================== --- head/sys/kern/sysv_ipc.c Fri Mar 19 10:56:30 2010 (r205321) +++ head/sys/kern/sysv_ipc.c Fri Mar 19 11:01:51 2010 (r205322) @@ -178,3 +178,69 @@ ipcperm_new2old(struct ipc_perm *new, st old->key = new->key; } #endif + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) +void +freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) +{ + + CP(*ip32, *ip, cuid); + CP(*ip32, *ip, cgid); + CP(*ip32, *ip, uid); + CP(*ip32, *ip, gid); + CP(*ip32, *ip, mode); + CP(*ip32, *ip, seq); + CP(*ip32, *ip, key); +} + +void +freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) +{ + + CP(*ip, *ip32, cuid); + CP(*ip, *ip32, cgid); + CP(*ip, *ip32, uid); + CP(*ip, *ip32, gid); + CP(*ip, *ip32, mode); + CP(*ip, *ip32, seq); + CP(*ip, *ip32, key); +} +#endif + +void +freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip) +{ + + CP(*ip32, *ip, cuid); + CP(*ip32, *ip, cgid); + CP(*ip32, *ip, uid); + CP(*ip32, *ip, gid); + CP(*ip32, *ip, mode); + CP(*ip32, *ip, seq); + CP(*ip32, *ip, key); +} + +void +freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32) +{ + + CP(*ip, *ip32, cuid); + CP(*ip, *ip32, cgid); + CP(*ip, *ip32, uid); + CP(*ip, *ip32, gid); + CP(*ip, *ip32, mode); + CP(*ip, *ip32, seq); + CP(*ip, *ip32, key); +} +#endif From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:04:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79BDD1065670; Fri, 19 Mar 2010 11:04:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66B968FC1B; Fri, 19 Mar 2010 11:04:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JB4gGe028367; Fri, 19 Mar 2010 11:04:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JB4gAY028361; Fri, 19 Mar 2010 11:04:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191104.o2JB4gAY028361@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205323 - in head/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:04:42 -0000 Author: kib Date: Fri Mar 19 11:04:42 2010 New Revision: 205323 URL: http://svn.freebsd.org/changeset/base/205323 Log: Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding sysv_{msg,sem,shm}.c files. Mark SysV IPC freebsd32 syscalls as NOSTD and add required SYSCALL_INIT_HELPER/SYSCALL32_INIT_HELPERs to provide auto register/unregister on module load. This makes COMPAT_FREEBSD32 functional with SysV IPC compiled and loaded as modules. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/sysv_msg.c head/sys/kern/sysv_sem.c head/sys/kern/sysv_shm.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 11:01:51 2010 (r205322) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 11:04:42 2010 (r205323) @@ -1402,536 +1402,6 @@ freebsd4_freebsd32_fhstatfs(struct threa int -freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) -{ - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - switch (uap->which) { - case 0: - return (freebsd7_freebsd32_semctl(td, - (struct freebsd7_freebsd32_semctl_args *)&uap->a2)); - default: - return (semsys(td, (struct semsys_args *)uap)); - } -#else - return (nosys(td, NULL)); -#endif -} - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -int -freebsd7_freebsd32_semctl(struct thread *td, - struct freebsd7_freebsd32_semctl_args *uap) -{ - struct semid_ds32_old dsbuf32; - struct semid_ds dsbuf; - union semun semun; - union semun32 arg; - register_t rval; - int error; - - switch (uap->cmd) { - case SEM_STAT: - case IPC_SET: - case IPC_STAT: - case GETALL: - case SETVAL: - case SETALL: - error = copyin(uap->arg, &arg, sizeof(arg)); - if (error) - return (error); - break; - } - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - semun.buf = &dsbuf; - break; - case IPC_SET: - error = copyin(PTRIN(arg.buf), &dsbuf32, sizeof(dsbuf32)); - if (error) - return (error); - freebsd32_ipcperm_old_in(&dsbuf32.sem_perm, &dsbuf.sem_perm); - PTRIN_CP(dsbuf32, dsbuf, sem_base); - CP(dsbuf32, dsbuf, sem_nsems); - CP(dsbuf32, dsbuf, sem_otime); - CP(dsbuf32, dsbuf, sem_ctime); - semun.buf = &dsbuf; - break; - case GETALL: - case SETALL: - semun.array = PTRIN(arg.array); - break; - case SETVAL: - semun.val = arg.val; - break; - } - - error = kern_semctl(td, uap->semid, uap->semnum, uap->cmd, &semun, - &rval); - if (error) - return (error); - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - bzero(&dsbuf32, sizeof(dsbuf32)); - freebsd32_ipcperm_old_out(&dsbuf.sem_perm, &dsbuf32.sem_perm); - PTROUT_CP(dsbuf, dsbuf32, sem_base); - CP(dsbuf, dsbuf32, sem_nsems); - CP(dsbuf, dsbuf32, sem_otime); - CP(dsbuf, dsbuf32, sem_ctime); - error = copyout(&dsbuf32, PTRIN(arg.buf), sizeof(dsbuf32)); - break; - } - - if (error == 0) - td->td_retval[0] = rval; - return (error); -} -#endif - -int -freebsd32_semctl(struct thread *td, struct freebsd32_semctl_args *uap) -{ - struct semid_ds32 dsbuf32; - struct semid_ds dsbuf; - union semun semun; - union semun32 arg; - register_t rval; - int error; - - switch (uap->cmd) { - case SEM_STAT: - case IPC_SET: - case IPC_STAT: - case GETALL: - case SETVAL: - case SETALL: - error = copyin(uap->arg, &arg, sizeof(arg)); - if (error) - return (error); - break; - } - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - semun.buf = &dsbuf; - break; - case IPC_SET: - error = copyin(PTRIN(arg.buf), &dsbuf32, sizeof(dsbuf32)); - if (error) - return (error); - freebsd32_ipcperm_in(&dsbuf32.sem_perm, &dsbuf.sem_perm); - PTRIN_CP(dsbuf32, dsbuf, sem_base); - CP(dsbuf32, dsbuf, sem_nsems); - CP(dsbuf32, dsbuf, sem_otime); - CP(dsbuf32, dsbuf, sem_ctime); - semun.buf = &dsbuf; - break; - case GETALL: - case SETALL: - semun.array = PTRIN(arg.array); - break; - case SETVAL: - semun.val = arg.val; - break; - } - - error = kern_semctl(td, uap->semid, uap->semnum, uap->cmd, &semun, - &rval); - if (error) - return (error); - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - bzero(&dsbuf32, sizeof(dsbuf32)); - freebsd32_ipcperm_out(&dsbuf.sem_perm, &dsbuf32.sem_perm); - PTROUT_CP(dsbuf, dsbuf32, sem_base); - CP(dsbuf, dsbuf32, sem_nsems); - CP(dsbuf, dsbuf32, sem_otime); - CP(dsbuf, dsbuf32, sem_ctime); - error = copyout(&dsbuf32, PTRIN(arg.buf), sizeof(dsbuf32)); - break; - } - - if (error == 0) - td->td_retval[0] = rval; - return (error); -} - -int -freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap) -{ - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - switch (uap->which) { - case 0: - return (freebsd7_freebsd32_msgctl(td, - (struct freebsd7_freebsd32_msgctl_args *)&uap->a2)); - case 2: - return (freebsd32_msgsnd(td, - (struct freebsd32_msgsnd_args *)&uap->a2)); - case 3: - return (freebsd32_msgrcv(td, - (struct freebsd32_msgrcv_args *)&uap->a2)); - default: - return (msgsys(td, (struct msgsys_args *)uap)); - } -#else - return (nosys(td, NULL)); -#endif -} - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -int -freebsd7_freebsd32_msgctl(struct thread *td, - struct freebsd7_freebsd32_msgctl_args *uap) -{ - struct msqid_ds msqbuf; - struct msqid_ds32_old msqbuf32; - int error; - - if (uap->cmd == IPC_SET) { - error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); - if (error) - return (error); - freebsd32_ipcperm_old_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); - PTRIN_CP(msqbuf32, msqbuf, msg_first); - PTRIN_CP(msqbuf32, msqbuf, msg_last); - CP(msqbuf32, msqbuf, msg_cbytes); - CP(msqbuf32, msqbuf, msg_qnum); - CP(msqbuf32, msqbuf, msg_qbytes); - CP(msqbuf32, msqbuf, msg_lspid); - CP(msqbuf32, msqbuf, msg_lrpid); - CP(msqbuf32, msqbuf, msg_stime); - CP(msqbuf32, msqbuf, msg_rtime); - CP(msqbuf32, msqbuf, msg_ctime); - } - error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); - if (error) - return (error); - if (uap->cmd == IPC_STAT) { - bzero(&msqbuf32, sizeof(msqbuf32)); - freebsd32_ipcperm_old_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); - PTROUT_CP(msqbuf, msqbuf32, msg_first); - PTROUT_CP(msqbuf, msqbuf32, msg_last); - CP(msqbuf, msqbuf32, msg_cbytes); - CP(msqbuf, msqbuf32, msg_qnum); - CP(msqbuf, msqbuf32, msg_qbytes); - CP(msqbuf, msqbuf32, msg_lspid); - CP(msqbuf, msqbuf32, msg_lrpid); - CP(msqbuf, msqbuf32, msg_stime); - CP(msqbuf, msqbuf32, msg_rtime); - CP(msqbuf, msqbuf32, msg_ctime); - error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); - } - return (error); -} -#endif - -int -freebsd32_msgctl(struct thread *td, struct freebsd32_msgctl_args *uap) -{ - struct msqid_ds msqbuf; - struct msqid_ds32 msqbuf32; - int error; - - if (uap->cmd == IPC_SET) { - error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); - if (error) - return (error); - freebsd32_ipcperm_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); - PTRIN_CP(msqbuf32, msqbuf, msg_first); - PTRIN_CP(msqbuf32, msqbuf, msg_last); - CP(msqbuf32, msqbuf, msg_cbytes); - CP(msqbuf32, msqbuf, msg_qnum); - CP(msqbuf32, msqbuf, msg_qbytes); - CP(msqbuf32, msqbuf, msg_lspid); - CP(msqbuf32, msqbuf, msg_lrpid); - CP(msqbuf32, msqbuf, msg_stime); - CP(msqbuf32, msqbuf, msg_rtime); - CP(msqbuf32, msqbuf, msg_ctime); - } - error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); - if (error) - return (error); - if (uap->cmd == IPC_STAT) { - freebsd32_ipcperm_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); - PTROUT_CP(msqbuf, msqbuf32, msg_first); - PTROUT_CP(msqbuf, msqbuf32, msg_last); - CP(msqbuf, msqbuf32, msg_cbytes); - CP(msqbuf, msqbuf32, msg_qnum); - CP(msqbuf, msqbuf32, msg_qbytes); - CP(msqbuf, msqbuf32, msg_lspid); - CP(msqbuf, msqbuf32, msg_lrpid); - CP(msqbuf, msqbuf32, msg_stime); - CP(msqbuf, msqbuf32, msg_rtime); - CP(msqbuf, msqbuf32, msg_ctime); - error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); - } - return (error); -} - -int -freebsd32_msgsnd(struct thread *td, struct freebsd32_msgsnd_args *uap) -{ - const void *msgp; - long mtype; - int32_t mtype32; - int error; - - msgp = PTRIN(uap->msgp); - if ((error = copyin(msgp, &mtype32, sizeof(mtype32))) != 0) - return (error); - mtype = mtype32; - return (kern_msgsnd(td, uap->msqid, - (const char *)msgp + sizeof(mtype32), - uap->msgsz, uap->msgflg, mtype)); -} - -int -freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap) -{ - void *msgp; - long mtype; - int32_t mtype32; - int error; - - msgp = PTRIN(uap->msgp); - if ((error = kern_msgrcv(td, uap->msqid, - (char *)msgp + sizeof(mtype32), uap->msgsz, - uap->msgtyp, uap->msgflg, &mtype)) != 0) - return (error); - mtype32 = (int32_t)mtype; - return (copyout(&mtype32, msgp, sizeof(mtype32))); -} - -int -freebsd32_shmsys(struct thread *td, struct freebsd32_shmsys_args *uap) -{ - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - switch (uap->which) { - case 0: { /* shmat */ - struct shmat_args ap; - - ap.shmid = uap->a2; - ap.shmaddr = PTRIN(uap->a3); - ap.shmflg = uap->a4; - return (sysent[SYS_shmat].sy_call(td, &ap)); - } - case 2: { /* shmdt */ - struct shmdt_args ap; - - ap.shmaddr = PTRIN(uap->a2); - return (sysent[SYS_shmdt].sy_call(td, &ap)); - } - case 3: { /* shmget */ - struct shmget_args ap; - - ap.key = uap->a2; - ap.size = uap->a3; - ap.shmflg = uap->a4; - return (sysent[SYS_shmget].sy_call(td, &ap)); - } - case 4: { /* shmctl */ - struct freebsd7_freebsd32_shmctl_args ap; - - ap.shmid = uap->a2; - ap.cmd = uap->a3; - ap.buf = PTRIN(uap->a4); - return (freebsd7_freebsd32_shmctl(td, &ap)); - } - case 1: /* oshmctl */ - default: - return (EINVAL); - } -#else - return (nosys(td, NULL)); -#endif -} - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -int -freebsd7_freebsd32_shmctl(struct thread *td, - struct freebsd7_freebsd32_shmctl_args *uap) -{ - int error = 0; - union { - struct shmid_ds shmid_ds; - struct shm_info shm_info; - struct shminfo shminfo; - } u; - union { - struct shmid_ds32_old shmid_ds32; - struct shm_info32 shm_info32; - struct shminfo32 shminfo32; - } u32; - size_t sz; - - if (uap->cmd == IPC_SET) { - if ((error = copyin(uap->buf, &u32.shmid_ds32, - sizeof(u32.shmid_ds32)))) - goto done; - freebsd32_ipcperm_old_in(&u32.shmid_ds32.shm_perm, - &u.shmid_ds.shm_perm); - CP(u32.shmid_ds32, u.shmid_ds, shm_segsz); - CP(u32.shmid_ds32, u.shmid_ds, shm_lpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_cpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_nattch); - CP(u32.shmid_ds32, u.shmid_ds, shm_atime); - CP(u32.shmid_ds32, u.shmid_ds, shm_dtime); - CP(u32.shmid_ds32, u.shmid_ds, shm_ctime); - } - - error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&u, &sz); - if (error) - goto done; - - /* Cases in which we need to copyout */ - switch (uap->cmd) { - case IPC_INFO: - CP(u.shminfo, u32.shminfo32, shmmax); - CP(u.shminfo, u32.shminfo32, shmmin); - CP(u.shminfo, u32.shminfo32, shmmni); - CP(u.shminfo, u32.shminfo32, shmseg); - CP(u.shminfo, u32.shminfo32, shmall); - error = copyout(&u32.shminfo32, uap->buf, - sizeof(u32.shminfo32)); - break; - case SHM_INFO: - CP(u.shm_info, u32.shm_info32, used_ids); - CP(u.shm_info, u32.shm_info32, shm_rss); - CP(u.shm_info, u32.shm_info32, shm_tot); - CP(u.shm_info, u32.shm_info32, shm_swp); - CP(u.shm_info, u32.shm_info32, swap_attempts); - CP(u.shm_info, u32.shm_info32, swap_successes); - error = copyout(&u32.shm_info32, uap->buf, - sizeof(u32.shm_info32)); - break; - case SHM_STAT: - case IPC_STAT: - freebsd32_ipcperm_old_out(&u.shmid_ds.shm_perm, - &u32.shmid_ds32.shm_perm); - if (u.shmid_ds.shm_segsz > INT32_MAX) - u32.shmid_ds32.shm_segsz = INT32_MAX; - else - CP(u.shmid_ds, u32.shmid_ds32, shm_segsz); - CP(u.shmid_ds, u32.shmid_ds32, shm_lpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_cpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_nattch); - CP(u.shmid_ds, u32.shmid_ds32, shm_atime); - CP(u.shmid_ds, u32.shmid_ds32, shm_dtime); - CP(u.shmid_ds, u32.shmid_ds32, shm_ctime); - u32.shmid_ds32.shm_internal = 0; - error = copyout(&u32.shmid_ds32, uap->buf, - sizeof(u32.shmid_ds32)); - break; - } - -done: - if (error) { - /* Invalidate the return value */ - td->td_retval[0] = -1; - } - return (error); -} -#endif - -int -freebsd32_shmctl(struct thread *td, struct freebsd32_shmctl_args *uap) -{ - int error = 0; - union { - struct shmid_ds shmid_ds; - struct shm_info shm_info; - struct shminfo shminfo; - } u; - union { - struct shmid_ds32 shmid_ds32; - struct shm_info32 shm_info32; - struct shminfo32 shminfo32; - } u32; - size_t sz; - - if (uap->cmd == IPC_SET) { - if ((error = copyin(uap->buf, &u32.shmid_ds32, - sizeof(u32.shmid_ds32)))) - goto done; - freebsd32_ipcperm_in(&u32.shmid_ds32.shm_perm, - &u.shmid_ds.shm_perm); - CP(u32.shmid_ds32, u.shmid_ds, shm_segsz); - CP(u32.shmid_ds32, u.shmid_ds, shm_lpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_cpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_nattch); - CP(u32.shmid_ds32, u.shmid_ds, shm_atime); - CP(u32.shmid_ds32, u.shmid_ds, shm_dtime); - CP(u32.shmid_ds32, u.shmid_ds, shm_ctime); - } - - error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&u, &sz); - if (error) - goto done; - - /* Cases in which we need to copyout */ - switch (uap->cmd) { - case IPC_INFO: - CP(u.shminfo, u32.shminfo32, shmmax); - CP(u.shminfo, u32.shminfo32, shmmin); - CP(u.shminfo, u32.shminfo32, shmmni); - CP(u.shminfo, u32.shminfo32, shmseg); - CP(u.shminfo, u32.shminfo32, shmall); - error = copyout(&u32.shminfo32, uap->buf, - sizeof(u32.shminfo32)); - break; - case SHM_INFO: - CP(u.shm_info, u32.shm_info32, used_ids); - CP(u.shm_info, u32.shm_info32, shm_rss); - CP(u.shm_info, u32.shm_info32, shm_tot); - CP(u.shm_info, u32.shm_info32, shm_swp); - CP(u.shm_info, u32.shm_info32, swap_attempts); - CP(u.shm_info, u32.shm_info32, swap_successes); - error = copyout(&u32.shm_info32, uap->buf, - sizeof(u32.shm_info32)); - break; - case SHM_STAT: - case IPC_STAT: - freebsd32_ipcperm_out(&u.shmid_ds.shm_perm, - &u32.shmid_ds32.shm_perm); - if (u.shmid_ds.shm_segsz > INT32_MAX) - u32.shmid_ds32.shm_segsz = INT32_MAX; - else - CP(u.shmid_ds, u32.shmid_ds32, shm_segsz); - CP(u.shmid_ds, u32.shmid_ds32, shm_lpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_cpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_nattch); - CP(u.shmid_ds, u32.shmid_ds32, shm_atime); - CP(u.shmid_ds, u32.shmid_ds32, shm_dtime); - CP(u.shmid_ds, u32.shmid_ds32, shm_ctime); - error = copyout(&u32.shmid_ds32, uap->buf, - sizeof(u32.shmid_ds32)); - break; - } - -done: - if (error) { - /* Invalidate the return value */ - td->td_retval[0] = -1; - } - return (error); -} - -int freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap) { struct pread_args ap; Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri Mar 19 11:01:51 2010 (r205322) +++ head/sys/compat/freebsd32/syscalls.master Fri Mar 19 11:04:42 2010 (r205323) @@ -309,11 +309,11 @@ struct rtprio *rtp); } 167 AUE_NULL UNIMPL nosys 168 AUE_NULL UNIMPL nosys -169 AUE_SEMSYS STD { int freebsd32_semsys(int which, int a2, \ +169 AUE_SEMSYS NOSTD { int freebsd32_semsys(int which, int a2, \ int a3, int a4, int a5); } -170 AUE_MSGSYS STD { int freebsd32_msgsys(int which, int a2, \ +170 AUE_MSGSYS NOSTD { int freebsd32_msgsys(int which, int a2, \ int a3, int a4, int a5, int a6); } -171 AUE_SHMSYS STD { int freebsd32_shmsys(uint32_t which, uint32_t a2, \ +171 AUE_SHMSYS NOSTD { int freebsd32_shmsys(uint32_t which, uint32_t a2, \ uint32_t a3, uint32_t a4); } 172 AUE_NULL UNIMPL nosys 173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \ @@ -401,26 +401,29 @@ ; The following were introduced with NetBSD/4.4Lite-2 ; They are initialized by their respective modules/sysinits ; XXX PROBLEM!! -220 AUE_SEMCTL COMPAT7 { int freebsd32_semctl(int semid, int semnum, \ +220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32_semctl( \ + int semid, int semnum, \ int cmd, union semun32 *arg); } -221 AUE_SEMGET NOPROTO { int semget(key_t key, int nsems, \ +221 AUE_SEMGET NOSTD|NOPROTO { int semget(key_t key, int nsems, \ int semflg); } -222 AUE_SEMOP NOPROTO { int semop(int semid, struct sembuf *sops, \ - u_int nsops); } +222 AUE_SEMOP NOSTD|NOPROTO { int semop(int semid, \ + struct sembuf *sops, u_int nsops); } 223 AUE_NULL UNIMPL semconfig -224 AUE_MSGCTL COMPAT7 { int freebsd32_msgctl(int msqid, int cmd, \ +224 AUE_MSGCTL COMPAT7|NOSTD { int freebsd32_msgctl( \ + int msqid, int cmd, \ struct msqid_ds32_old *buf); } -225 AUE_MSGGET NOPROTO { int msgget(key_t key, int msgflg); } -226 AUE_MSGSND STD { int freebsd32_msgsnd(int msqid, void *msgp, \ +225 AUE_MSGGET NOSTD|NOPROTO { int msgget(key_t key, int msgflg); } +226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, void *msgp, \ size_t msgsz, int msgflg); } -227 AUE_MSGRCV STD { int freebsd32_msgrcv(int msqid, void *msgp, \ +227 AUE_MSGRCV NOSTD { int freebsd32_msgrcv(int msqid, void *msgp, \ size_t msgsz, long msgtyp, int msgflg); } -228 AUE_SHMAT NOPROTO { int shmat(int shmid, void *shmaddr, \ +228 AUE_SHMAT NOSTD|NOPROTO { int shmat(int shmid, void *shmaddr, \ int shmflg); } -229 AUE_SHMCTL COMPAT7 { int freebsd32_shmctl(int shmid, int cmd, \ +229 AUE_SHMCTL COMPAT7|NOSTD { int freebsd32_shmctl( \ + int shmid, int cmd, \ struct shmid_ds32_old *buf); } -230 AUE_SHMDT NOPROTO { int shmdt(void *shmaddr); } -231 AUE_SHMGET NOPROTO { int shmget(key_t key, int size, \ +230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(void *shmaddr); } +231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, int size, \ int shmflg); } ; 232 AUE_NULL STD { int freebsd32_clock_gettime(clockid_t clock_id, \ @@ -925,11 +928,11 @@ unsigned int iovcnt, int flags); } 508 AUE_NULL NOPROTO { int jail_remove(int jid); } 509 AUE_CLOSEFROM NOPROTO { int closefrom(int lowfd); } -510 AUE_SEMCTL STD { int freebsd32_semctl(int semid, int semnum, \ +510 AUE_SEMCTL NOSTD { int freebsd32_semctl(int semid, int semnum, \ int cmd, union semun32 *arg); } -511 AUE_MSGCTL STD { int freebsd32_msgctl(int msqid, int cmd, \ +511 AUE_MSGCTL NOSTD { int freebsd32_msgctl(int msqid, int cmd, \ struct msqid_ds32 *buf); } -512 AUE_SHMCTL STD { int freebsd32_shmctl(int shmid, int cmd, \ +512 AUE_SHMCTL NOSTD { int freebsd32_shmctl(int shmid, int cmd, \ struct shmid_ds32 *buf); } 513 AUE_LPATHCONF NOPROTO { int lpathconf(char *path, int name); } 514 AUE_CAP_NEW UNIMPL cap_new Modified: head/sys/kern/sysv_msg.c ============================================================================== --- head/sys/kern/sysv_msg.c Fri Mar 19 11:01:51 2010 (r205322) +++ head/sys/kern/sysv_msg.c Fri Mar 19 11:04:42 2010 (r205323) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MSG, "msg", "SVID compatible message queues"); -static void msginit(void); +static int msginit(void); static int msgunload(void); static int sysvmsg_modload(struct module *, int, void *); @@ -152,10 +152,45 @@ static struct msg *msghdrs; /* MSGTQL ms static struct msqid_kernel *msqids; /* MSGMNI msqid_kernel struct's */ static struct mtx msq_mtx; /* global mutex for message queues. */ -static void +static struct syscall_helper_data msg_syscalls[] = { + SYSCALL_INIT_HELPER(msgctl), + SYSCALL_INIT_HELPER(msgget), + SYSCALL_INIT_HELPER(msgsnd), + SYSCALL_INIT_HELPER(msgrcv), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL_INIT_HELPER(msgsys), + SYSCALL_INIT_HELPER(freebsd7_msgctl), +#endif + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include + +static struct syscall_helper_data msg32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_msgctl), + SYSCALL32_INIT_HELPER(freebsd32_msgsnd), + SYSCALL32_INIT_HELPER(freebsd32_msgrcv), + SYSCALL32_INIT_HELPER(msgget), + SYSCALL32_INIT_HELPER(freebsd32_msgsys), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL32_INIT_HELPER(freebsd7_freebsd32_msgctl), +#endif + SYSCALL_INIT_LAST +}; +#endif + +static int msginit() { - register int i; + int i, error; TUNABLE_INT_FETCH("kern.ipc.msgseg", &msginfo.msgseg); TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz); @@ -235,6 +270,16 @@ msginit() #endif } mtx_init(&msq_mtx, "msq", NULL, MTX_DEF); + + error = syscall_helper_register(msg_syscalls); + if (error != 0) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(msg32_syscalls); + if (error != 0) + return (error); +#endif + return (0); } static int @@ -246,6 +291,11 @@ msgunload() int i; #endif + syscall_helper_unregister(msg_syscalls); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(msg32_syscalls); +#endif + for (msqid = 0; msqid < msginfo.msgmni; msqid++) { /* * Look for an unallocated and unlocked msqid_ds. @@ -283,7 +333,9 @@ sysvmsg_modload(struct module *module, i switch (cmd) { case MOD_LOAD: - msginit(); + error = msginit(); + if (error != 0) + msgunload(); break; case MOD_UNLOAD: error = msgunload(); @@ -303,11 +355,6 @@ static moduledata_t sysvmsg_mod = { NULL }; -SYSCALL_MODULE_HELPER(msgctl); -SYSCALL_MODULE_HELPER(msgget); -SYSCALL_MODULE_HELPER(msgsnd); -SYSCALL_MODULE_HELPER(msgrcv); - DECLARE_MODULE(sysvmsg, sysvmsg_mod, SI_SUB_SYSV_MSG, SI_ORDER_FIRST); MODULE_VERSION(sysvmsg, 1); @@ -1257,10 +1304,159 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD, NULL, 0, sysctl_msqids, "", "Message queue IDs"); +#ifdef COMPAT_FREEBSD32 +int +freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap) +{ + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + switch (uap->which) { + case 0: + return (freebsd7_freebsd32_msgctl(td, + (struct freebsd7_freebsd32_msgctl_args *)&uap->a2)); + case 2: + return (freebsd32_msgsnd(td, + (struct freebsd32_msgsnd_args *)&uap->a2)); + case 3: + return (freebsd32_msgrcv(td, + (struct freebsd32_msgrcv_args *)&uap->a2)); + default: + return (msgsys(td, (struct msgsys_args *)uap)); + } +#else + return (nosys(td, NULL)); +#endif +} + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) +int +freebsd7_freebsd32_msgctl(struct thread *td, + struct freebsd7_freebsd32_msgctl_args *uap) +{ + struct msqid_ds msqbuf; + struct msqid_ds32_old msqbuf32; + int error; + + if (uap->cmd == IPC_SET) { + error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); + if (error) + return (error); + freebsd32_ipcperm_old_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); + PTRIN_CP(msqbuf32, msqbuf, msg_first); + PTRIN_CP(msqbuf32, msqbuf, msg_last); + CP(msqbuf32, msqbuf, msg_cbytes); + CP(msqbuf32, msqbuf, msg_qnum); + CP(msqbuf32, msqbuf, msg_qbytes); + CP(msqbuf32, msqbuf, msg_lspid); + CP(msqbuf32, msqbuf, msg_lrpid); + CP(msqbuf32, msqbuf, msg_stime); + CP(msqbuf32, msqbuf, msg_rtime); + CP(msqbuf32, msqbuf, msg_ctime); + } + error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); + if (error) + return (error); + if (uap->cmd == IPC_STAT) { + bzero(&msqbuf32, sizeof(msqbuf32)); + freebsd32_ipcperm_old_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); + PTROUT_CP(msqbuf, msqbuf32, msg_first); + PTROUT_CP(msqbuf, msqbuf32, msg_last); + CP(msqbuf, msqbuf32, msg_cbytes); + CP(msqbuf, msqbuf32, msg_qnum); + CP(msqbuf, msqbuf32, msg_qbytes); + CP(msqbuf, msqbuf32, msg_lspid); + CP(msqbuf, msqbuf32, msg_lrpid); + CP(msqbuf, msqbuf32, msg_stime); + CP(msqbuf, msqbuf32, msg_rtime); + CP(msqbuf, msqbuf32, msg_ctime); + error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); + } + return (error); +} +#endif + +int +freebsd32_msgctl(struct thread *td, struct freebsd32_msgctl_args *uap) +{ + struct msqid_ds msqbuf; + struct msqid_ds32 msqbuf32; + int error; + + if (uap->cmd == IPC_SET) { + error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); + if (error) + return (error); + freebsd32_ipcperm_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); + PTRIN_CP(msqbuf32, msqbuf, msg_first); + PTRIN_CP(msqbuf32, msqbuf, msg_last); + CP(msqbuf32, msqbuf, msg_cbytes); + CP(msqbuf32, msqbuf, msg_qnum); + CP(msqbuf32, msqbuf, msg_qbytes); + CP(msqbuf32, msqbuf, msg_lspid); + CP(msqbuf32, msqbuf, msg_lrpid); + CP(msqbuf32, msqbuf, msg_stime); + CP(msqbuf32, msqbuf, msg_rtime); + CP(msqbuf32, msqbuf, msg_ctime); + } + error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); + if (error) + return (error); + if (uap->cmd == IPC_STAT) { + freebsd32_ipcperm_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); + PTROUT_CP(msqbuf, msqbuf32, msg_first); + PTROUT_CP(msqbuf, msqbuf32, msg_last); + CP(msqbuf, msqbuf32, msg_cbytes); + CP(msqbuf, msqbuf32, msg_qnum); + CP(msqbuf, msqbuf32, msg_qbytes); + CP(msqbuf, msqbuf32, msg_lspid); + CP(msqbuf, msqbuf32, msg_lrpid); + CP(msqbuf, msqbuf32, msg_stime); + CP(msqbuf, msqbuf32, msg_rtime); + CP(msqbuf, msqbuf32, msg_ctime); + error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); + } + return (error); +} + +int +freebsd32_msgsnd(struct thread *td, struct freebsd32_msgsnd_args *uap) +{ + const void *msgp; + long mtype; + int32_t mtype32; + int error; + + msgp = PTRIN(uap->msgp); + if ((error = copyin(msgp, &mtype32, sizeof(mtype32))) != 0) + return (error); + mtype = mtype32; + return (kern_msgsnd(td, uap->msqid, + (const char *)msgp + sizeof(mtype32), + uap->msgsz, uap->msgflg, mtype)); +} + +int +freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap) +{ + void *msgp; + long mtype; + int32_t mtype32; + int error; + + msgp = PTRIN(uap->msgp); + if ((error = kern_msgrcv(td, uap->msqid, + (char *)msgp + sizeof(mtype32), uap->msgsz, + uap->msgtyp, uap->msgflg, &mtype)) != 0) + return (error); + mtype32 = (int32_t)mtype; + return (copyout(&mtype32, msgp, sizeof(mtype32))); +} +#endif + #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -SYSCALL_MODULE_HELPER(msgsys); -SYSCALL_MODULE_HELPER(freebsd7_msgctl); /* XXX casting to (sy_call_t *) is bogus, as usual. */ static sy_call_t *msgcalls[] = { @@ -1295,7 +1491,9 @@ msgsys(td, uap) return (error); } +#ifndef CP #define CP(src, dst, fld) do { (dst).fld = (src).fld; } while (0) +#endif #ifndef _SYS_SYSPROTO_H_ struct freebsd7_msgctl_args { Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Fri Mar 19 11:01:51 2010 (r205322) +++ head/sys/kern/sysv_sem.c Fri Mar 19 11:04:42 2010 (r205323) @@ -70,7 +70,7 @@ static MALLOC_DEFINE(M_SEM, "sem", "SVID #define DPRINTF(a) #endif -static void seminit(void); +static int seminit(void); static int sysvsem_modload(struct module *, int, void *); static int semunload(void); static void semexit_myhook(void *arg, struct proc *p); @@ -214,10 +214,43 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, NULL, 0, sysctl_sema, "", ""); -static void +static struct syscall_helper_data sem_syscalls[] = { + SYSCALL_INIT_HELPER(__semctl), + SYSCALL_INIT_HELPER(semget), + SYSCALL_INIT_HELPER(semop), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL_INIT_HELPER(semsys), + SYSCALL_INIT_HELPER(freebsd7___semctl), +#endif + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include + +static struct syscall_helper_data sem32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_semctl), + SYSCALL32_INIT_HELPER(semget), + SYSCALL32_INIT_HELPER(semop), + SYSCALL32_INIT_HELPER(freebsd32_semsys), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL32_INIT_HELPER(freebsd7_freebsd32_semctl), +#endif + SYSCALL_INIT_LAST +}; +#endif + +static int seminit(void) { - int i; + int i, error; TUNABLE_INT_FETCH("kern.ipc.semmap", &seminfo.semmap); TUNABLE_INT_FETCH("kern.ipc.semmni", &seminfo.semmni); @@ -258,6 +291,16 @@ seminit(void) mtx_init(&sem_undo_mtx, "semu", NULL, MTX_DEF); semexit_tag = EVENTHANDLER_REGISTER(process_exit, semexit_myhook, NULL, EVENTHANDLER_PRI_ANY); + + error = syscall_helper_register(sem_syscalls); + if (error != 0) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(sem32_syscalls); + if (error != 0) + return (error); +#endif + return (0); } static int @@ -269,6 +312,10 @@ semunload(void) if (semtot != 0) return (EBUSY); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(sem32_syscalls); +#endif + syscall_helper_unregister(sem_syscalls); EVENTHANDLER_DEREGISTER(process_exit, semexit_tag); #ifdef MAC for (i = 0; i < seminfo.semmni; i++) @@ -292,7 +339,9 @@ sysvsem_modload(struct module *module, i switch (cmd) { case MOD_LOAD: - seminit(); + error = seminit(); + if (error != 0) + semunload(); break; case MOD_UNLOAD: error = semunload(); @@ -312,10 +361,6 @@ static moduledata_t sysvsem_mod = { NULL }; -SYSCALL_MODULE_HELPER(__semctl); -SYSCALL_MODULE_HELPER(semget); -SYSCALL_MODULE_HELPER(semop); - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:08:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2143B106566C; Fri, 19 Mar 2010 11:08:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0F38FC08; Fri, 19 Mar 2010 11:08:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JB8hZc029288; Fri, 19 Mar 2010 11:08:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JB8hXR029285; Fri, 19 Mar 2010 11:08:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191108.o2JB8hXR029285@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205324 - in head/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:08:44 -0000 Author: kib Date: Fri Mar 19 11:08:43 2010 New Revision: 205324 URL: http://svn.freebsd.org/changeset/base/205324 Log: Implement compat32 shims for ksem syscalls. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/uipc_sem.c Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri Mar 19 11:04:42 2010 (r205323) +++ head/sys/compat/freebsd32/syscalls.master Fri Mar 19 11:08:43 2010 (r205324) @@ -697,16 +697,19 @@ 398 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs *buf); } 399 AUE_NULL UNIMPL nosys -; XXX implement these? -400 AUE_NULL UNIMPL ksem_close -401 AUE_NULL UNIMPL ksem_post -402 AUE_NULL UNIMPL ksem_wait -403 AUE_NULL UNIMPL ksem_trywait -404 AUE_NULL UNIMPL ksem_init -405 AUE_NULL UNIMPL ksem_open -406 AUE_NULL UNIMPL ksem_unlink -407 AUE_NULL UNIMPL ksem_getvalue -408 AUE_NULL UNIMPL ksem_destroy +400 AUE_NULL NOSTD|NOPROTO { int ksem_close(semid_t id); } +401 AUE_NULL NOSTD|NOPROTO { int ksem_post(semid_t id); } +402 AUE_NULL NOSTD|NOPROTO { int ksem_wait(semid_t id); } +403 AUE_NULL NOSTD|NOPROTO { int ksem_trywait(semid_t id); } +404 AUE_NULL NOSTD { int freebsd32_ksem_init(semid_t *idp, \ + unsigned int value); } +405 AUE_NULL NOSTD { int freebsd32_ksem_open(semid_t *idp, \ + const char *name, int oflag, \ + mode_t mode, unsigned int value); } +406 AUE_NULL NOSTD|NOPROTO { int ksem_unlink(const char *name); } +407 AUE_NULL NOSTD|NOPROTO { int ksem_getvalue(semid_t id, \ + int *val); } +408 AUE_NULL NOSTD|NOPROTO { int ksem_destroy(semid_t id); } 409 AUE_NULL UNIMPL __mac_get_pid 410 AUE_NULL UNIMPL __mac_get_link 411 AUE_NULL UNIMPL __mac_set_link @@ -765,7 +768,8 @@ const char *path, int attrnamespace, \ void *data, size_t nbytes); } 440 AUE_NULL UNIMPL kse_switchin -441 AUE_NULL UNIMPL ksem_timedwait +441 AUE_NULL NOSTD { int freebsd32_ksem_timedwait(semid_t id, \ + const struct timespec32 *abstime); } 442 AUE_NULL STD { int freebsd32_thr_suspend( \ const struct timespec32 *timeout); } 443 AUE_NULL NOPROTO { int thr_wake(long id); } Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Fri Mar 19 11:04:42 2010 (r205323) +++ head/sys/kern/uipc_sem.c Fri Mar 19 11:08:43 2010 (r205324) @@ -34,6 +34,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" #include "opt_posix.h" #include @@ -112,7 +113,7 @@ static struct ksem *ksem_alloc(struct uc unsigned int value); static int ksem_create(struct thread *td, const char *path, semid_t *semidp, mode_t mode, unsigned int value, - int flags); + int flags, int compat32); static void ksem_drop(struct ksem *ks); static int ksem_get(struct thread *td, semid_t id, struct file **fpp); static struct ksem *ksem_hold(struct ksem *ks); @@ -374,16 +375,44 @@ ksem_remove(char *path, Fnv32_t fnv, str return (ENOENT); } +static int +ksem_create_copyout_semid(struct thread *td, semid_t *semidp, int fd, + int compat32) +{ + semid_t semid; +#ifdef COMPAT_FREEBSD32 + int32_t semid32; +#endif + void *ptr; + size_t ptrs; + +#ifdef COMPAT_FREEBSD32 + if (compat32) { + semid32 = fd; + ptr = &semid32; + ptrs = sizeof(semid32); + } else { +#endif + semid = fd; + ptr = &semid; + ptrs = sizeof(semid); + compat32 = 0; /* silence gcc */ +#ifdef COMPAT_FREEBSD32 + } +#endif + + return (copyout(ptr, semidp, ptrs)); +} + /* Other helper routines. */ static int ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode, - unsigned int value, int flags) + unsigned int value, int flags, int compat32) { struct filedesc *fdp; struct ksem *ks; struct file *fp; char *path; - semid_t semid; Fnv32_t fnv; int error, fd; @@ -404,8 +433,7 @@ ksem_create(struct thread *td, const cha * premature, but it is a lot easier to handle errors as opposed * to later when we've possibly created a new semaphore, etc. */ - semid = fd; - error = copyout(&semid, semidp, sizeof(semid)); + error = ksem_create_copyout_semid(td, semidp, fd, compat32); if (error) { fdclose(fdp, fp, fd, td); fdrop(fp, td); @@ -530,7 +558,7 @@ ksem_init(struct thread *td, struct ksem { return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value, - 0)); + 0, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -551,7 +579,7 @@ ksem_open(struct thread *td, struct ksem if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0) return (EINVAL); return (ksem_create(td, uap->name, uap->idp, uap->mode, uap->value, - uap->oflag)); + uap->oflag, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -832,38 +860,85 @@ err: return (error); } -#define SYSCALL_DATA(syscallname) \ -static int syscallname##_syscall = SYS_##syscallname; \ -static int syscallname##_registered; \ -static struct sysent syscallname##_old_sysent; \ -MAKE_SYSENT(syscallname); - -#define SYSCALL_REGISTER(syscallname) do { \ - error = syscall_register(& syscallname##_syscall, \ - & syscallname##_sysent, & syscallname##_old_sysent); \ - if (error) \ - return (error); \ - syscallname##_registered = 1; \ -} while(0) - -#define SYSCALL_DEREGISTER(syscallname) do { \ - if (syscallname##_registered) { \ - syscallname##_registered = 0; \ - syscall_deregister(& syscallname##_syscall, \ - & syscallname##_old_sysent); \ - } \ -} while(0) - -SYSCALL_DATA(ksem_init); -SYSCALL_DATA(ksem_open); -SYSCALL_DATA(ksem_unlink); -SYSCALL_DATA(ksem_close); -SYSCALL_DATA(ksem_post); -SYSCALL_DATA(ksem_wait); -SYSCALL_DATA(ksem_timedwait); -SYSCALL_DATA(ksem_trywait); -SYSCALL_DATA(ksem_getvalue); -SYSCALL_DATA(ksem_destroy); +static struct syscall_helper_data ksem_syscalls[] = { + SYSCALL_INIT_HELPER(ksem_init), + SYSCALL_INIT_HELPER(ksem_open), + SYSCALL_INIT_HELPER(ksem_unlink), + SYSCALL_INIT_HELPER(ksem_close), + SYSCALL_INIT_HELPER(ksem_post), + SYSCALL_INIT_HELPER(ksem_wait), + SYSCALL_INIT_HELPER(ksem_timedwait), + SYSCALL_INIT_HELPER(ksem_trywait), + SYSCALL_INIT_HELPER(ksem_getvalue), + SYSCALL_INIT_HELPER(ksem_destroy), + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include + +int +freebsd32_ksem_init(struct thread *td, struct freebsd32_ksem_init_args *uap) +{ + + return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value, + 0, 1)); +} + +int +freebsd32_ksem_open(struct thread *td, struct freebsd32_ksem_open_args *uap) +{ + + if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0) + return (EINVAL); + return (ksem_create(td, uap->name, uap->idp, uap->mode, uap->value, + uap->oflag, 1)); +} + +int +freebsd32_ksem_timedwait(struct thread *td, + struct freebsd32_ksem_timedwait_args *uap) +{ + struct timespec32 abstime32; + struct timespec *ts, abstime; + int error; + + /* + * We allow a null timespec (wait forever). + */ + if (uap->abstime == NULL) + ts = NULL; + else { + error = copyin(uap->abstime, &abstime32, sizeof(abstime32)); + if (error != 0) + return (error); + CP(abstime32, abstime, tv_sec); + CP(abstime32, abstime, tv_nsec); + if (abstime.tv_nsec >= 1000000000 || abstime.tv_nsec < 0) + return (EINVAL); + ts = &abstime; + } + return (kern_sem_wait(td, uap->id, 0, ts)); +} + +static struct syscall_helper_data ksem32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_ksem_init), + SYSCALL32_INIT_HELPER(freebsd32_ksem_open), + SYSCALL32_INIT_HELPER(ksem_unlink), + SYSCALL32_INIT_HELPER(ksem_close), + SYSCALL32_INIT_HELPER(ksem_post), + SYSCALL32_INIT_HELPER(ksem_wait), + SYSCALL32_INIT_HELPER(freebsd32_ksem_timedwait), + SYSCALL32_INIT_HELPER(ksem_trywait), + SYSCALL32_INIT_HELPER(ksem_getvalue), + SYSCALL32_INIT_HELPER(ksem_destroy), + SYSCALL_INIT_LAST +}; +#endif static int ksem_module_init(void) @@ -877,16 +952,14 @@ ksem_module_init(void) p31b_setcfg(CTL_P1003_1B_SEM_NSEMS_MAX, SEM_MAX); p31b_setcfg(CTL_P1003_1B_SEM_VALUE_MAX, SEM_VALUE_MAX); - SYSCALL_REGISTER(ksem_init); - SYSCALL_REGISTER(ksem_open); - SYSCALL_REGISTER(ksem_unlink); - SYSCALL_REGISTER(ksem_close); - SYSCALL_REGISTER(ksem_post); - SYSCALL_REGISTER(ksem_wait); - SYSCALL_REGISTER(ksem_timedwait); - SYSCALL_REGISTER(ksem_trywait); - SYSCALL_REGISTER(ksem_getvalue); - SYSCALL_REGISTER(ksem_destroy); + error = syscall_helper_register(ksem_syscalls); + if (error) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(ksem32_syscalls); + if (error) + return (error); +#endif return (0); } @@ -894,16 +967,10 @@ static void ksem_module_destroy(void) { - SYSCALL_DEREGISTER(ksem_init); - SYSCALL_DEREGISTER(ksem_open); - SYSCALL_DEREGISTER(ksem_unlink); - SYSCALL_DEREGISTER(ksem_close); - SYSCALL_DEREGISTER(ksem_post); - SYSCALL_DEREGISTER(ksem_wait); - SYSCALL_DEREGISTER(ksem_timedwait); - SYSCALL_DEREGISTER(ksem_trywait); - SYSCALL_DEREGISTER(ksem_getvalue); - SYSCALL_DEREGISTER(ksem_destroy); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(ksem32_syscalls); +#endif + syscall_helper_unregister(ksem_syscalls); hashdestroy(ksem_dictionary, M_KSEM, ksem_hash); sx_destroy(&ksem_dict_lock); From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:10:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92421106564A; Fri, 19 Mar 2010 11:10:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FEEE8FC1E; Fri, 19 Mar 2010 11:10:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JBAOk6029698; Fri, 19 Mar 2010 11:10:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JBAOeb029694; Fri, 19 Mar 2010 11:10:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191110.o2JBAOeb029694@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:10:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205325 - in head/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:10:24 -0000 Author: kib Date: Fri Mar 19 11:10:24 2010 New Revision: 205325 URL: http://svn.freebsd.org/changeset/base/205325 Log: Implement compat32 shims for mqueuefs. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/compat/freebsd32/syscalls.master head/sys/kern/uipc_mqueue.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Fri Mar 19 11:08:43 2010 (r205324) +++ head/sys/compat/freebsd32/freebsd32.h Fri Mar 19 11:10:24 2010 (r205325) @@ -221,4 +221,12 @@ struct prpsinfo32 { char pr_psargs[PRARGSZ+1]; }; +struct mq_attr32 { + int mq_flags; + int mq_maxmsg; + int mq_msgsize; + int mq_curmsgs; + int __reserved[4]; +}; + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri Mar 19 11:08:43 2010 (r205324) +++ head/sys/compat/freebsd32/syscalls.master Fri Mar 19 11:10:24 2010 (r205325) @@ -797,12 +797,23 @@ int param_size); } 456 AUE_NULL NOPROTO { int sigqueue(pid_t pid, int signum, \ void *value); } -457 AUE_NULL UNIMPL kmq_open -458 AUE_NULL UNIMPL kmq_setattr -459 AUE_NULL UNIMPL kmq_timedreceive -460 AUE_NULL UNIMPL kmq_timedsend -461 AUE_NULL UNIMPL kmq_notify -462 AUE_NULL UNIMPL kmq_unlink +457 AUE_NULL NOSTD { int freebsd32_kmq_open( \ + const char *path, int flags, mode_t mode, \ + const struct mq_attr32 *attr); } +458 AUE_NULL NOSTD { int freebsd32_kmq_setattr(int mqd, \ + const struct mq_attr32 *attr, \ + struct mq_attr32 *oattr); } +459 AUE_NULL NOSTD { int freebsd32_kmq_timedreceive(int mqd, \ + char *msg_ptr, size_t msg_len, \ + unsigned *msg_prio, \ + const struct timespec32 *abs_timeout); } +460 AUE_NULL NOSTD { int freebsd32_kmq_timedsend(int mqd, \ + const char *msg_ptr, size_t msg_len,\ + unsigned msg_prio, \ + const struct timespec32 *abs_timeout);} +461 AUE_NULL NOPROTO|NOSTD { int kmq_notify(int mqd, \ + const struct sigevent *sigev); } +462 AUE_NULL NOPROTO|NOSTD { int kmq_unlink(const char *path); } 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } 465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \ Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Fri Mar 19 11:08:43 2010 (r205324) +++ head/sys/kern/uipc_mqueue.c Fri Mar 19 11:10:24 2010 (r205325) @@ -45,6 +45,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -1622,7 +1624,7 @@ mqueue_send(struct mqueue *mq, const cha const struct timespec *abs_timeout) { struct mqueue_msg *msg; - struct timespec ets, ts, ts2; + struct timespec ts, ts2; struct timeval tv; int error; @@ -1658,15 +1660,12 @@ mqueue_send(struct mqueue *mq, const cha if (error != EAGAIN) goto bad; - error = copyin(abs_timeout, &ets, sizeof(ets)); - if (error != 0) - goto bad; - if (ets.tv_nsec >= 1000000000 || ets.tv_nsec < 0) { + if (abs_timeout->tv_nsec >= 1000000000 || abs_timeout->tv_nsec < 0) { error = EINVAL; goto bad; } for (;;) { - ts2 = ets; + ts2 = *abs_timeout; getnanotime(&ts); timespecsub(&ts2, &ts); if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) { @@ -1773,7 +1772,7 @@ mqueue_receive(struct mqueue *mq, char * const struct timespec *abs_timeout) { struct mqueue_msg *msg; - struct timespec ets, ts, ts2; + struct timespec ts, ts2; struct timeval tv; int error; @@ -1804,16 +1803,13 @@ mqueue_receive(struct mqueue *mq, char * if (error != EAGAIN) return (error); - error = copyin(abs_timeout, &ets, sizeof(ets)); - if (error != 0) - return (error); - if (ets.tv_nsec >= 1000000000 || ets.tv_nsec < 0) { + if (abs_timeout->tv_nsec >= 1000000000 || abs_timeout->tv_nsec < 0) { error = EINVAL; return (error); } for (;;) { - ts2 = ets; + ts2 = *abs_timeout; getnanotime(&ts); timespecsub(&ts2, &ts); if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) { @@ -1934,40 +1930,28 @@ notifier_remove(struct proc *p, struct m PROC_UNLOCK(p); } -/* - * Syscall to open a message queue. - */ -int -kmq_open(struct thread *td, struct kmq_open_args *uap) +static int +kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, + const struct mq_attr *attr) { char path[MQFS_NAMELEN + 1]; - struct mq_attr attr, *pattr; struct mqfs_node *pn; struct filedesc *fdp; struct file *fp; struct mqueue *mq; - int fd, error, len, flags, cmode; - - if ((uap->flags & O_ACCMODE) == O_ACCMODE) - return (EINVAL); + int fd, error, len, cmode; fdp = td->td_proc->p_fd; - flags = FFLAGS(uap->flags); - cmode = (((uap->mode & ~fdp->fd_cmask) & ALLPERMS) & ~S_ISTXT); + cmode = (((mode & ~fdp->fd_cmask) & ALLPERMS) & ~S_ISTXT); mq = NULL; - if ((flags & O_CREAT) && (uap->attr != NULL)) { - error = copyin(uap->attr, &attr, sizeof(attr)); - if (error) - return (error); - if (attr.mq_maxmsg <= 0 || attr.mq_maxmsg > maxmsg) + if ((flags & O_CREAT) != 0 && attr != NULL) { + if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg) return (EINVAL); - if (attr.mq_msgsize <= 0 || attr.mq_msgsize > maxmsgsize) + if (attr->mq_msgsize <= 0 || attr->mq_msgsize > maxmsgsize) return (EINVAL); - pattr = &attr; - } else - pattr = NULL; + } - error = copyinstr(uap->path, path, MQFS_NAMELEN + 1, NULL); + error = copyinstr(upath, path, MQFS_NAMELEN + 1, NULL); if (error) return (error); @@ -1990,7 +1974,7 @@ kmq_open(struct thread *td, struct kmq_o if (!(flags & O_CREAT)) { error = ENOENT; } else { - mq = mqueue_alloc(pattr); + mq = mqueue_alloc(attr); if (mq == NULL) { error = ENFILE; } else { @@ -2045,6 +2029,27 @@ kmq_open(struct thread *td, struct kmq_o } /* + * Syscall to open a message queue. + */ +int +kmq_open(struct thread *td, struct kmq_open_args *uap) +{ + struct mq_attr attr; + int flags, error; + + if ((uap->flags & O_ACCMODE) == O_ACCMODE) + return (EINVAL); + flags = FFLAGS(uap->flags); + if ((flags & O_CREAT) != 0 && uap->attr != NULL) { + error = copyin(uap->attr, &attr, sizeof(attr)); + if (error) + return (error); + } + return (kern_kmq_open(td, uap->path, flags, uap->mode, + uap->attr != NULL ? &attr : NULL)); +} + +/* * Syscall to unlink a message queue. */ int @@ -2120,39 +2125,52 @@ getmq_write(struct thread *td, int fd, s return _getmq(td, fd, fget_write, fpp, ppn, pmq); } -int -kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) +static int +kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr, + struct mq_attr *oattr) { struct mqueue *mq; struct file *fp; - struct mq_attr attr, oattr; u_int oflag, flag; int error; - if (uap->attr) { - error = copyin(uap->attr, &attr, sizeof(attr)); - if (error) - return (error); - if (attr.mq_flags & ~O_NONBLOCK) - return (EINVAL); - } - error = getmq(td, uap->mqd, &fp, NULL, &mq); + if (attr != NULL && (attr->mq_flags & ~O_NONBLOCK) != 0) + return (EINVAL); + error = getmq(td, mqd, &fp, NULL, &mq); if (error) return (error); - oattr.mq_maxmsg = mq->mq_maxmsg; - oattr.mq_msgsize = mq->mq_msgsize; - oattr.mq_curmsgs = mq->mq_curmsgs; - if (uap->attr) { + oattr->mq_maxmsg = mq->mq_maxmsg; + oattr->mq_msgsize = mq->mq_msgsize; + oattr->mq_curmsgs = mq->mq_curmsgs; + if (attr != NULL) { do { oflag = flag = fp->f_flag; flag &= ~O_NONBLOCK; - flag |= (attr.mq_flags & O_NONBLOCK); + flag |= (attr->mq_flags & O_NONBLOCK); } while (atomic_cmpset_int(&fp->f_flag, oflag, flag) == 0); } else oflag = fp->f_flag; - oattr.mq_flags = (O_NONBLOCK & oflag); + oattr->mq_flags = (O_NONBLOCK & oflag); fdrop(fp, td); - if (uap->oattr) + return (error); +} + +int +kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) +{ + struct mq_attr attr, oattr; + int error; + + if (uap->attr != NULL) { + error = copyin(uap->attr, &attr, sizeof(attr)); + if (error != 0) + return (error); + } + error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, + &oattr); + if (error != 0) + return (error); + if (uap->oattr != NULL) error = copyout(&oattr, uap->oattr, sizeof(oattr)); return (error); } @@ -2162,15 +2180,23 @@ kmq_timedreceive(struct thread *td, stru { struct mqueue *mq; struct file *fp; + struct timespec *abs_timeout, ets; int error; int waitok; error = getmq_read(td, uap->mqd, &fp, NULL, &mq); if (error) return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets, sizeof(ets)); + if (error != 0) + return (error); + abs_timeout = &ets; + } else + abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, uap->abs_timeout); + uap->msg_prio, waitok, abs_timeout); fdrop(fp, td); return (error); } @@ -2180,14 +2206,22 @@ kmq_timedsend(struct thread *td, struct { struct mqueue *mq; struct file *fp; + struct timespec *abs_timeout, ets; int error, waitok; error = getmq_write(td, uap->mqd, &fp, NULL, &mq); if (error) return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets, sizeof(ets)); + if (error != 0) + return (error); + abs_timeout = &ets; + } else + abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, uap->abs_timeout); + uap->msg_prio, waitok, abs_timeout); fdrop(fp, td); return (error); } @@ -2511,12 +2545,219 @@ static struct vfsops mqfs_vfsops = { .vfs_statfs = mqfs_statfs, }; -SYSCALL_MODULE_HELPER(kmq_open); -SYSCALL_MODULE_HELPER(kmq_setattr); -SYSCALL_MODULE_HELPER(kmq_timedsend); -SYSCALL_MODULE_HELPER(kmq_timedreceive); -SYSCALL_MODULE_HELPER(kmq_notify); -SYSCALL_MODULE_HELPER(kmq_unlink); +static struct vfsconf mqueuefs_vfsconf = { + .vfc_version = VFS_VERSION, + .vfc_name = "mqueuefs", + .vfc_vfsops = &mqfs_vfsops, + .vfc_typenum = -1, + .vfc_flags = VFCF_SYNTHETIC +}; + +static struct syscall_helper_data mq_syscalls[] = { + SYSCALL_INIT_HELPER(kmq_open), + SYSCALL_INIT_HELPER(kmq_setattr), + SYSCALL_INIT_HELPER(kmq_timedsend), + SYSCALL_INIT_HELPER(kmq_timedreceive), + SYSCALL_INIT_HELPER(kmq_notify), + SYSCALL_INIT_HELPER(kmq_unlink), + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include + +static void +mq_attr_from32(const struct mq_attr32 *from, struct mq_attr *to) +{ + + to->mq_flags = from->mq_flags; + to->mq_maxmsg = from->mq_maxmsg; + to->mq_msgsize = from->mq_msgsize; + to->mq_curmsgs = from->mq_curmsgs; +} + +static void +mq_attr_to32(const struct mq_attr *from, struct mq_attr32 *to) +{ + + to->mq_flags = from->mq_flags; + to->mq_maxmsg = from->mq_maxmsg; + to->mq_msgsize = from->mq_msgsize; + to->mq_curmsgs = from->mq_curmsgs; +} + +int +freebsd32_kmq_open(struct thread *td, struct freebsd32_kmq_open_args *uap) +{ + struct mq_attr attr; + struct mq_attr32 attr32; + int flags, error; + + if ((uap->flags & O_ACCMODE) == O_ACCMODE) + return (EINVAL); + flags = FFLAGS(uap->flags); + if ((flags & O_CREAT) != 0 && uap->attr != NULL) { + error = copyin(uap->attr, &attr32, sizeof(attr32)); + if (error) + return (error); + mq_attr_from32(&attr32, &attr); + } + return (kern_kmq_open(td, uap->path, flags, uap->mode, + uap->attr != NULL ? &attr : NULL)); +} + +int +freebsd32_kmq_setattr(struct thread *td, struct freebsd32_kmq_setattr_args *uap) +{ + struct mq_attr attr, oattr; + struct mq_attr32 attr32, oattr32; + int error; + + if (uap->attr != NULL) { + error = copyin(uap->attr, &attr32, sizeof(attr32)); + if (error != 0) + return (error); + mq_attr_from32(&attr32, &attr); + } + error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, + &oattr); + if (error != 0) + return (error); + if (uap->oattr != NULL) { + mq_attr_to32(&oattr, &oattr32); + error = copyout(&oattr32, uap->oattr, sizeof(oattr32)); + } + return (error); +} + +int +freebsd32_kmq_timedsend(struct thread *td, + struct freebsd32_kmq_timedsend_args *uap) +{ + struct mqueue *mq; + struct file *fp; + struct timespec32 ets32; + struct timespec *abs_timeout, ets; + int error; + int waitok; + + error = getmq_read(td, uap->mqd, &fp, NULL, &mq); + if (error) + return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); + if (error != 0) + return (error); + CP(ets32, ets, tv_sec); + CP(ets32, ets, tv_nsec); + abs_timeout = &ets; + } else + abs_timeout = NULL; + waitok = !(fp->f_flag & O_NONBLOCK); + error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, + uap->msg_prio, waitok, abs_timeout); + fdrop(fp, td); + return (error); +} + +int +freebsd32_kmq_timedreceive(struct thread *td, + struct freebsd32_kmq_timedreceive_args *uap) +{ + struct mqueue *mq; + struct file *fp; + struct timespec32 ets32; + struct timespec *abs_timeout, ets; + int error, waitok; + + error = getmq_write(td, uap->mqd, &fp, NULL, &mq); + if (error) + return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); + if (error != 0) + return (error); + CP(ets32, ets, tv_sec); + CP(ets32, ets, tv_nsec); + abs_timeout = &ets; + } else + abs_timeout = NULL; + waitok = !(fp->f_flag & O_NONBLOCK); + error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, + uap->msg_prio, waitok, abs_timeout); + fdrop(fp, td); + return (error); +} + +static struct syscall_helper_data mq32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_kmq_open), + SYSCALL32_INIT_HELPER(freebsd32_kmq_setattr), + SYSCALL32_INIT_HELPER(freebsd32_kmq_timedsend), + SYSCALL32_INIT_HELPER(freebsd32_kmq_timedreceive), + SYSCALL32_INIT_HELPER(kmq_notify), + SYSCALL32_INIT_HELPER(kmq_unlink), + SYSCALL_INIT_LAST +}; +#endif + +static int +mqinit(void) +{ + int error; + + error = syscall_helper_register(mq_syscalls); + if (error != 0) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(mq32_syscalls); + if (error != 0) + return (error); +#endif + return (0); +} -VFS_SET(mqfs_vfsops, mqueuefs, VFCF_SYNTHETIC); +static int +mqunload(void) +{ + +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(mq32_syscalls); +#endif + syscall_helper_unregister(mq_syscalls); + return (0); +} + +static int +mq_modload(struct module *module, int cmd, void *arg) +{ + int error = 0; + + error = vfs_modevent(module, cmd, arg); + if (error != 0) + return (error); + + switch (cmd) { + case MOD_LOAD: + error = mqinit(); + if (error != 0) + mqunload(); + break; + case MOD_UNLOAD: + error = mqunload(); + break; + default: + break; + } + return (error); +} + +static moduledata_t mqueuefs_mod = { + "mqueuefs", + mq_modload, + &mqueuefs_vfsconf +}; +DECLARE_MODULE(mqueuefs, mqueuefs_mod, SI_SUB_VFS, SI_ORDER_MIDDLE); MODULE_VERSION(mqueuefs, 1); From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:11:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D7D106564A; Fri, 19 Mar 2010 11:11:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34C228FC12; Fri, 19 Mar 2010 11:11:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JBBZk5030036; Fri, 19 Mar 2010 11:11:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JBBZe5030034; Fri, 19 Mar 2010 11:11:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191111.o2JBBZe5030034@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205326 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:11:35 -0000 Author: kib Date: Fri Mar 19 11:11:34 2010 New Revision: 205326 URL: http://svn.freebsd.org/changeset/base/205326 Log: Convert aio syscall registration to SYSCALL_INIT_HELPER. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Fri Mar 19 11:10:24 2010 (r205325) +++ head/sys/kern/vfs_aio.c Fri Mar 19 11:11:34 2010 (r205326) @@ -334,7 +334,7 @@ static TAILQ_HEAD(,aiocblist) aio_jobs; static struct unrhdr *aiod_unr; void aio_init_aioinfo(struct proc *p); -static void aio_onceonly(void); +static int aio_onceonly(void); static int aio_free_entry(struct aiocblist *aiocbe); static void aio_process(struct aiocblist *aiocbe); static int aio_newproc(int *); @@ -419,18 +419,47 @@ static moduledata_t aio_mod = { NULL }; -SYSCALL_MODULE_HELPER(aio_cancel); -SYSCALL_MODULE_HELPER(aio_error); -SYSCALL_MODULE_HELPER(aio_fsync); -SYSCALL_MODULE_HELPER(aio_read); -SYSCALL_MODULE_HELPER(aio_return); -SYSCALL_MODULE_HELPER(aio_suspend); -SYSCALL_MODULE_HELPER(aio_waitcomplete); -SYSCALL_MODULE_HELPER(aio_write); -SYSCALL_MODULE_HELPER(lio_listio); -SYSCALL_MODULE_HELPER(oaio_read); -SYSCALL_MODULE_HELPER(oaio_write); -SYSCALL_MODULE_HELPER(olio_listio); +static struct syscall_helper_data aio_syscalls[] = { + SYSCALL_INIT_HELPER(aio_cancel), + SYSCALL_INIT_HELPER(aio_error), + SYSCALL_INIT_HELPER(aio_fsync), + SYSCALL_INIT_HELPER(aio_read), + SYSCALL_INIT_HELPER(aio_return), + SYSCALL_INIT_HELPER(aio_suspend), + SYSCALL_INIT_HELPER(aio_waitcomplete), + SYSCALL_INIT_HELPER(aio_write), + SYSCALL_INIT_HELPER(lio_listio), + SYSCALL_INIT_HELPER(oaio_read), + SYSCALL_INIT_HELPER(oaio_write), + SYSCALL_INIT_HELPER(olio_listio), + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include +#include + +static struct syscall_helper_data aio32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_aio_return), + SYSCALL32_INIT_HELPER(freebsd32_aio_suspend), + SYSCALL32_INIT_HELPER(freebsd32_aio_cancel), + SYSCALL32_INIT_HELPER(freebsd32_aio_error), + SYSCALL32_INIT_HELPER(freebsd32_aio_fsync), + SYSCALL32_INIT_HELPER(freebsd32_aio_read), + SYSCALL32_INIT_HELPER(freebsd32_aio_write), + SYSCALL32_INIT_HELPER(freebsd32_aio_waitcomplete), + SYSCALL32_INIT_HELPER(freebsd32_lio_listio), + SYSCALL32_INIT_HELPER(freebsd32_oaio_read), + SYSCALL32_INIT_HELPER(freebsd32_oaio_write), + SYSCALL32_INIT_HELPER(freebsd32_olio_listio), + SYSCALL_INIT_LAST +}; +#endif DECLARE_MODULE(aio, aio_mod, SI_SUB_VFS, SI_ORDER_ANY); @@ -439,9 +468,10 @@ MODULE_VERSION(aio, 1); /* * Startup initialization */ -static void +static int aio_onceonly(void) { + int error; /* XXX: should probably just use so->callback */ aio_swake = &aio_swake_cb; @@ -474,6 +504,16 @@ aio_onceonly(void) p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, AIO_LISTIO_MAX); p31b_setcfg(CTL_P1003_1B_AIO_MAX, MAX_AIO_QUEUE); p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, 0); + + error = syscall_helper_register(aio_syscalls); + if (error) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(aio32_syscalls); + if (error) + return (error); +#endif + return (0); } /* @@ -495,6 +535,11 @@ aio_unload(void) if (!unloadable) return (EOPNOTSUPP); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(aio32_syscalls); +#endif + syscall_helper_unregister(aio_syscalls); + error = kqueue_del_filteropts(EVFILT_AIO); if (error) return error; @@ -2533,13 +2578,6 @@ filt_lio(struct knote *kn, long hint) } #ifdef COMPAT_FREEBSD32 -#include -#include -#include -#include -#include -#include -#include struct __aiocb_private32 { int32_t status; @@ -2948,16 +2986,4 @@ freebsd32_lio_listio(struct thread *td, return (error); } -SYSCALL32_MODULE_HELPER(freebsd32_aio_return); -SYSCALL32_MODULE_HELPER(freebsd32_aio_suspend); -SYSCALL32_MODULE_HELPER(freebsd32_aio_cancel); -SYSCALL32_MODULE_HELPER(freebsd32_aio_error); -SYSCALL32_MODULE_HELPER(freebsd32_aio_fsync); -SYSCALL32_MODULE_HELPER(freebsd32_aio_read); -SYSCALL32_MODULE_HELPER(freebsd32_aio_write); -SYSCALL32_MODULE_HELPER(freebsd32_aio_waitcomplete); -SYSCALL32_MODULE_HELPER(freebsd32_lio_listio); -SYSCALL32_MODULE_HELPER(freebsd32_oaio_read); -SYSCALL32_MODULE_HELPER(freebsd32_oaio_write); -SYSCALL32_MODULE_HELPER(freebsd32_olio_listio); #endif From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:13:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0735106564A; Fri, 19 Mar 2010 11:13:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF9238FC1D; Fri, 19 Mar 2010 11:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JBDgR2030547; Fri, 19 Mar 2010 11:13:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JBDgdt030545; Fri, 19 Mar 2010 11:13:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191113.o2JBDgdt030545@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205327 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:13:42 -0000 Author: kib Date: Fri Mar 19 11:13:42 2010 New Revision: 205327 URL: http://svn.freebsd.org/changeset/base/205327 Log: Remove empty line. MFC after: 2 weeks Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 11:11:34 2010 (r205326) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Mar 19 11:13:42 2010 (r205327) @@ -1400,7 +1400,6 @@ freebsd4_freebsd32_fhstatfs(struct threa } #endif - int freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:14:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5B9D106566C; Fri, 19 Mar 2010 11:14:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93EBB8FC18; Fri, 19 Mar 2010 11:14:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JBEbZg030789; Fri, 19 Mar 2010 11:14:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JBEbrc030784; Fri, 19 Mar 2010 11:14:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201003191114.o2JBEbrc030784@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Mar 2010 11:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205328 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:14:37 -0000 Author: kib Date: Fri Mar 19 11:14:37 2010 New Revision: 205328 URL: http://svn.freebsd.org/changeset/base/205328 Log: Regen Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Fri Mar 19 11:13:42 2010 (r205327) +++ head/sys/compat/freebsd32/freebsd32_proto.h Fri Mar 19 11:14:37 2010 (r205328) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -306,6 +306,17 @@ struct freebsd32_sendfile_args { char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct freebsd32_ksem_init_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; +struct freebsd32_ksem_open_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char oflag_l_[PADL_(int)]; int oflag; char oflag_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; struct freebsd32_sigaction_args { char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; @@ -330,6 +341,10 @@ struct freebsd32_umtx_lock_args { struct freebsd32_umtx_unlock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; +struct freebsd32_ksem_timedwait_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; + char abstime_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abstime; char abstime_r_[PADR_(const struct timespec32 *)]; +}; struct freebsd32_thr_suspend_args { char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; @@ -344,6 +359,31 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_kmq_open_args { + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char attr_l_[PADL_(const struct mq_attr32 *)]; const struct mq_attr32 * attr; char attr_r_[PADR_(const struct mq_attr32 *)]; +}; +struct freebsd32_kmq_setattr_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char attr_l_[PADL_(const struct mq_attr32 *)]; const struct mq_attr32 * attr; char attr_r_[PADR_(const struct mq_attr32 *)]; + char oattr_l_[PADL_(struct mq_attr32 *)]; struct mq_attr32 * oattr; char oattr_r_[PADR_(struct mq_attr32 *)]; +}; +struct freebsd32_kmq_timedreceive_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char msg_ptr_l_[PADL_(char *)]; char * msg_ptr; char msg_ptr_r_[PADR_(char *)]; + char msg_len_l_[PADL_(size_t)]; size_t msg_len; char msg_len_r_[PADR_(size_t)]; + char msg_prio_l_[PADL_(unsigned *)]; unsigned * msg_prio; char msg_prio_r_[PADR_(unsigned *)]; + char abs_timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abs_timeout; char abs_timeout_r_[PADR_(const struct timespec32 *)]; +}; +struct freebsd32_kmq_timedsend_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char msg_ptr_l_[PADL_(const char *)]; const char * msg_ptr; char msg_ptr_r_[PADR_(const char *)]; + char msg_len_l_[PADL_(size_t)]; size_t msg_len; char msg_len_r_[PADR_(size_t)]; + char msg_prio_l_[PADL_(unsigned)]; unsigned msg_prio; char msg_prio_r_[PADR_(unsigned)]; + char abs_timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abs_timeout; char abs_timeout_r_[PADR_(const struct timespec32 *)]; +}; struct freebsd32_aio_fsync_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; @@ -581,6 +621,8 @@ int freebsd32_aio_waitcomplete(struct th int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); int freebsd32_nmount(struct thread *, struct freebsd32_nmount_args *); int freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *); +int freebsd32_ksem_init(struct thread *, struct freebsd32_ksem_init_args *); +int freebsd32_ksem_open(struct thread *, struct freebsd32_ksem_open_args *); int freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *); int freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *); int freebsd32_getcontext(struct thread *, struct freebsd32_getcontext_args *); @@ -588,9 +630,14 @@ int freebsd32_setcontext(struct thread * int freebsd32_swapcontext(struct thread *, struct freebsd32_swapcontext_args *); int freebsd32_umtx_lock(struct thread *, struct freebsd32_umtx_lock_args *); int freebsd32_umtx_unlock(struct thread *, struct freebsd32_umtx_unlock_args *); +int freebsd32_ksem_timedwait(struct thread *, struct freebsd32_ksem_timedwait_args *); int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_kmq_open(struct thread *, struct freebsd32_kmq_open_args *); +int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); +int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); +int freebsd32_kmq_timedsend(struct thread *, struct freebsd32_kmq_timedsend_args *); int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); #ifdef PAD64_REQUIRED int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); @@ -909,6 +956,8 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nmount AUE_NMOUNT #define FREEBSD32_SYS_AUE_freebsd32_sendfile AUE_SENDFILE +#define FREEBSD32_SYS_AUE_freebsd32_ksem_init AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ksem_open AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_sigaction AUE_SIGACTION #define FREEBSD32_SYS_AUE_freebsd32_sigreturn AUE_SIGRETURN #define FREEBSD32_SYS_AUE_freebsd32_getcontext AUE_NULL @@ -916,9 +965,14 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_swapcontext AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_lock AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_unlock AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ksem_timedwait AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_open AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_setattr AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_timedsend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_fsync AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Fri Mar 19 11:13:42 2010 (r205327) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Fri Mar 19 11:14:37 2010 (r205328) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -303,6 +303,15 @@ #define FREEBSD32_SYS_statfs 396 #define FREEBSD32_SYS_fstatfs 397 #define FREEBSD32_SYS_fhstatfs 398 +#define FREEBSD32_SYS_ksem_close 400 +#define FREEBSD32_SYS_ksem_post 401 +#define FREEBSD32_SYS_ksem_wait 402 +#define FREEBSD32_SYS_ksem_trywait 403 +#define FREEBSD32_SYS_freebsd32_ksem_init 404 +#define FREEBSD32_SYS_freebsd32_ksem_open 405 +#define FREEBSD32_SYS_ksem_unlink 406 +#define FREEBSD32_SYS_ksem_getvalue 407 +#define FREEBSD32_SYS_ksem_destroy 408 #define FREEBSD32_SYS_extattr_set_link 412 #define FREEBSD32_SYS_extattr_get_link 413 #define FREEBSD32_SYS_extattr_delete_link 414 @@ -325,6 +334,7 @@ #define FREEBSD32_SYS_extattr_list_fd 437 #define FREEBSD32_SYS_extattr_list_file 438 #define FREEBSD32_SYS_extattr_list_link 439 +#define FREEBSD32_SYS_freebsd32_ksem_timedwait 441 #define FREEBSD32_SYS_freebsd32_thr_suspend 442 #define FREEBSD32_SYS_thr_wake 443 #define FREEBSD32_SYS_kldunloadf 444 @@ -340,6 +350,12 @@ #define FREEBSD32_SYS_freebsd32_umtx_op 454 #define FREEBSD32_SYS_freebsd32_thr_new 455 #define FREEBSD32_SYS_sigqueue 456 +#define FREEBSD32_SYS_freebsd32_kmq_open 457 +#define FREEBSD32_SYS_freebsd32_kmq_setattr 458 +#define FREEBSD32_SYS_freebsd32_kmq_timedreceive 459 +#define FREEBSD32_SYS_freebsd32_kmq_timedsend 460 +#define FREEBSD32_SYS_kmq_notify 461 +#define FREEBSD32_SYS_kmq_unlink 462 #define FREEBSD32_SYS_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 #define FREEBSD32_SYS_freebsd32_aio_fsync 465 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Mar 19 11:13:42 2010 (r205327) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Mar 19 11:14:37 2010 (r205328) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib */ const char *freebsd32_syscallnames[] = { @@ -410,15 +410,15 @@ const char *freebsd32_syscallnames[] = { "fstatfs", /* 397 = fstatfs */ "fhstatfs", /* 398 = fhstatfs */ "#399", /* 399 = nosys */ - "#400", /* 400 = ksem_close */ - "#401", /* 401 = ksem_post */ - "#402", /* 402 = ksem_wait */ - "#403", /* 403 = ksem_trywait */ - "#404", /* 404 = ksem_init */ - "#405", /* 405 = ksem_open */ - "#406", /* 406 = ksem_unlink */ - "#407", /* 407 = ksem_getvalue */ - "#408", /* 408 = ksem_destroy */ + "ksem_close", /* 400 = ksem_close */ + "ksem_post", /* 401 = ksem_post */ + "ksem_wait", /* 402 = ksem_wait */ + "ksem_trywait", /* 403 = ksem_trywait */ + "freebsd32_ksem_init", /* 404 = freebsd32_ksem_init */ + "freebsd32_ksem_open", /* 405 = freebsd32_ksem_open */ + "ksem_unlink", /* 406 = ksem_unlink */ + "ksem_getvalue", /* 407 = ksem_getvalue */ + "ksem_destroy", /* 408 = ksem_destroy */ "#409", /* 409 = __mac_get_pid */ "#410", /* 410 = __mac_get_link */ "#411", /* 411 = __mac_set_link */ @@ -451,7 +451,7 @@ const char *freebsd32_syscallnames[] = { "extattr_list_file", /* 438 = extattr_list_file */ "extattr_list_link", /* 439 = extattr_list_link */ "#440", /* 440 = kse_switchin */ - "#441", /* 441 = ksem_timedwait */ + "freebsd32_ksem_timedwait", /* 441 = freebsd32_ksem_timedwait */ "freebsd32_thr_suspend", /* 442 = freebsd32_thr_suspend */ "thr_wake", /* 443 = thr_wake */ "kldunloadf", /* 444 = kldunloadf */ @@ -467,12 +467,12 @@ const char *freebsd32_syscallnames[] = { "freebsd32_umtx_op", /* 454 = freebsd32_umtx_op */ "freebsd32_thr_new", /* 455 = freebsd32_thr_new */ "sigqueue", /* 456 = sigqueue */ - "#457", /* 457 = kmq_open */ - "#458", /* 458 = kmq_setattr */ - "#459", /* 459 = kmq_timedreceive */ - "#460", /* 460 = kmq_timedsend */ - "#461", /* 461 = kmq_notify */ - "#462", /* 462 = kmq_unlink */ + "freebsd32_kmq_open", /* 457 = freebsd32_kmq_open */ + "freebsd32_kmq_setattr", /* 458 = freebsd32_kmq_setattr */ + "freebsd32_kmq_timedreceive", /* 459 = freebsd32_kmq_timedreceive */ + "freebsd32_kmq_timedsend", /* 460 = freebsd32_kmq_timedsend */ + "kmq_notify", /* 461 = kmq_notify */ + "kmq_unlink", /* 462 = kmq_unlink */ "abort2", /* 463 = abort2 */ "thr_set_name", /* 464 = thr_set_name */ "freebsd32_aio_fsync", /* 465 = freebsd32_aio_fsync */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Fri Mar 19 11:13:42 2010 (r205327) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Fri Mar 19 11:14:37 2010 (r205328) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205014 2010-03-11 14:49:06Z nwhitehorn + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 205325 2010-03-19 11:10:24Z kib */ #include "opt_compat.h" @@ -216,9 +216,9 @@ struct sysent freebsd32_sysent[] = { { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 167 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 168 = nosys */ - { AS(freebsd32_semsys_args), (sy_call_t *)freebsd32_semsys, AUE_SEMSYS, NULL, 0, 0, 0 }, /* 169 = freebsd32_semsys */ - { AS(freebsd32_msgsys_args), (sy_call_t *)freebsd32_msgsys, AUE_MSGSYS, NULL, 0, 0, 0 }, /* 170 = freebsd32_msgsys */ - { AS(freebsd32_shmsys_args), (sy_call_t *)freebsd32_shmsys, AUE_SHMSYS, NULL, 0, 0, 0 }, /* 171 = freebsd32_shmsys */ + { AS(freebsd32_semsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 169 = freebsd32_semsys */ + { AS(freebsd32_msgsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 170 = freebsd32_msgsys */ + { AS(freebsd32_shmsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 171 = freebsd32_shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 172 = nosys */ { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0 }, /* 173 = freebsd6 freebsd32_pread */ { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0 }, /* 174 = freebsd6 freebsd32_pwrite */ @@ -267,18 +267,18 @@ struct sysent freebsd32_sysent[] = { { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 217 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 218 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 219 = lkmnosys */ - { compat7(AS(freebsd7_freebsd32_semctl_args),freebsd32_semctl), AUE_SEMCTL, NULL, 0, 0, 0 }, /* 220 = freebsd7 freebsd32_semctl */ - { AS(semget_args), (sy_call_t *)semget, AUE_SEMGET, NULL, 0, 0, 0 }, /* 221 = semget */ - { AS(semop_args), (sy_call_t *)semop, AUE_SEMOP, NULL, 0, 0, 0 }, /* 222 = semop */ + { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 220 = freebsd7 freebsd32_semctl */ + { AS(semget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 221 = semget */ + { AS(semop_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 222 = semop */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 223 = semconfig */ - { compat7(AS(freebsd7_freebsd32_msgctl_args),freebsd32_msgctl), AUE_MSGCTL, NULL, 0, 0, 0 }, /* 224 = freebsd7 freebsd32_msgctl */ - { AS(msgget_args), (sy_call_t *)msgget, AUE_MSGGET, NULL, 0, 0, 0 }, /* 225 = msgget */ - { AS(freebsd32_msgsnd_args), (sy_call_t *)freebsd32_msgsnd, AUE_MSGSND, NULL, 0, 0, 0 }, /* 226 = freebsd32_msgsnd */ - { AS(freebsd32_msgrcv_args), (sy_call_t *)freebsd32_msgrcv, AUE_MSGRCV, NULL, 0, 0, 0 }, /* 227 = freebsd32_msgrcv */ - { AS(shmat_args), (sy_call_t *)shmat, AUE_SHMAT, NULL, 0, 0, 0 }, /* 228 = shmat */ - { compat7(AS(freebsd7_freebsd32_shmctl_args),freebsd32_shmctl), AUE_SHMCTL, NULL, 0, 0, 0 }, /* 229 = freebsd7 freebsd32_shmctl */ - { AS(shmdt_args), (sy_call_t *)shmdt, AUE_SHMDT, NULL, 0, 0, 0 }, /* 230 = shmdt */ - { AS(shmget_args), (sy_call_t *)shmget, AUE_SHMGET, NULL, 0, 0, 0 }, /* 231 = shmget */ + { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 224 = freebsd7 freebsd32_msgctl */ + { AS(msgget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 225 = msgget */ + { AS(freebsd32_msgsnd_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 226 = freebsd32_msgsnd */ + { AS(freebsd32_msgrcv_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 227 = freebsd32_msgrcv */ + { AS(shmat_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 228 = shmat */ + { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 229 = freebsd7 freebsd32_shmctl */ + { AS(shmdt_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 230 = shmdt */ + { AS(shmget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 231 = shmget */ { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, 0 }, /* 232 = freebsd32_clock_gettime */ { AS(freebsd32_clock_settime_args), (sy_call_t *)freebsd32_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0 }, /* 233 = freebsd32_clock_settime */ { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, 0 }, /* 234 = freebsd32_clock_getres */ @@ -447,15 +447,15 @@ struct sysent freebsd32_sysent[] = { { AS(fstatfs_args), (sy_call_t *)fstatfs, AUE_FSTATFS, NULL, 0, 0, 0 }, /* 397 = fstatfs */ { AS(fhstatfs_args), (sy_call_t *)fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 398 = fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 399 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 400 = ksem_close */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 401 = ksem_post */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 402 = ksem_wait */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 403 = ksem_trywait */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 404 = ksem_init */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 405 = ksem_open */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 406 = ksem_unlink */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 407 = ksem_getvalue */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 408 = ksem_destroy */ + { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 400 = ksem_close */ + { AS(ksem_post_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 401 = ksem_post */ + { AS(ksem_wait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 402 = ksem_wait */ + { AS(ksem_trywait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 403 = ksem_trywait */ + { AS(freebsd32_ksem_init_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 404 = freebsd32_ksem_init */ + { AS(freebsd32_ksem_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 405 = freebsd32_ksem_open */ + { AS(ksem_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 406 = ksem_unlink */ + { AS(ksem_getvalue_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 407 = ksem_getvalue */ + { AS(ksem_destroy_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 408 = ksem_destroy */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 409 = __mac_get_pid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 410 = __mac_get_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 411 = __mac_set_link */ @@ -488,7 +488,7 @@ struct sysent freebsd32_sysent[] = { { AS(extattr_list_file_args), (sy_call_t *)extattr_list_file, AUE_EXTATTR_LIST_FILE, NULL, 0, 0, 0 }, /* 438 = extattr_list_file */ { AS(extattr_list_link_args), (sy_call_t *)extattr_list_link, AUE_EXTATTR_LIST_LINK, NULL, 0, 0, 0 }, /* 439 = extattr_list_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 440 = kse_switchin */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 441 = ksem_timedwait */ + { AS(freebsd32_ksem_timedwait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 441 = freebsd32_ksem_timedwait */ { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0, 0 }, /* 442 = freebsd32_thr_suspend */ { AS(thr_wake_args), (sy_call_t *)thr_wake, AUE_NULL, NULL, 0, 0, 0 }, /* 443 = thr_wake */ { AS(kldunloadf_args), (sy_call_t *)kldunloadf, AUE_MODUNLOAD, NULL, 0, 0, 0 }, /* 444 = kldunloadf */ @@ -504,12 +504,12 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, 0 }, /* 454 = freebsd32_umtx_op */ { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, 0 }, /* 455 = freebsd32_thr_new */ { AS(sigqueue_args), (sy_call_t *)sigqueue, AUE_NULL, NULL, 0, 0, 0 }, /* 456 = sigqueue */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 457 = kmq_open */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 458 = kmq_setattr */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 459 = kmq_timedreceive */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 460 = kmq_timedsend */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 461 = kmq_notify */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 462 = kmq_unlink */ + { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 457 = freebsd32_kmq_open */ + { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 458 = freebsd32_kmq_setattr */ + { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 459 = freebsd32_kmq_timedreceive */ + { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 460 = freebsd32_kmq_timedsend */ + { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 461 = kmq_notify */ + { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)abort2, AUE_NULL, NULL, 0, 0, 0 }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)thr_set_name, AUE_NULL, NULL, 0, 0, 0 }, /* 464 = thr_set_name */ { AS(freebsd32_aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 465 = freebsd32_aio_fsync */ @@ -570,9 +570,9 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_jail_set_args), (sy_call_t *)freebsd32_jail_set, AUE_NULL, NULL, 0, 0, 0 }, /* 507 = freebsd32_jail_set */ { AS(jail_remove_args), (sy_call_t *)jail_remove, AUE_NULL, NULL, 0, 0, 0 }, /* 508 = jail_remove */ { AS(closefrom_args), (sy_call_t *)closefrom, AUE_CLOSEFROM, NULL, 0, 0, 0 }, /* 509 = closefrom */ - { AS(freebsd32_semctl_args), (sy_call_t *)freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0, 0 }, /* 510 = freebsd32_semctl */ - { AS(freebsd32_msgctl_args), (sy_call_t *)freebsd32_msgctl, AUE_MSGCTL, NULL, 0, 0, 0 }, /* 511 = freebsd32_msgctl */ - { AS(freebsd32_shmctl_args), (sy_call_t *)freebsd32_shmctl, AUE_SHMCTL, NULL, 0, 0, 0 }, /* 512 = freebsd32_shmctl */ + { AS(freebsd32_semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 510 = freebsd32_semctl */ + { AS(freebsd32_msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 511 = freebsd32_msgctl */ + { AS(freebsd32_shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 512 = freebsd32_shmctl */ { AS(lpathconf_args), (sy_call_t *)lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0 }, /* 513 = lpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 514 = cap_new */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 515 = cap_getrights */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:44:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EF611065677; Fri, 19 Mar 2010 11:44:27 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2001:4dd0:ff41::b23f:aa]) by mx1.freebsd.org (Postfix) with ESMTP id 421238FC2A; Fri, 19 Mar 2010 11:44:27 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id A26422A2907F; Fri, 19 Mar 2010 12:44:26 +0100 (CET) Date: Fri, 19 Mar 2010 12:44:26 +0100 From: Ed Schouten To: Xin LI Message-ID: <20100319114426.GO32142@hoeg.nl> References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V3eawNQxI9TAjvgi" Content-Disposition: inline In-Reply-To: <201003190116.o2J1Gr2v094129@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:44:27 -0000 --V3eawNQxI9TAjvgi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Xin LI wrote: > Log: > SSE is enabled by default about 5 years ago so there is no point preten= ding > that we support I486 and I586 CPUs in the GENERIC kernel, users wants t= hese > support would have to build a custom kernel to explicitly disable SSE > anyways. > =20 > MFC after: 1 month Could we please leave i586 here? I agree people should throw their Pentiums on the scrapyard, but only supporting i686 by default is a bit too agressive in my opinion. --=20 Ed Schouten WWW: http://80386.nl/ --V3eawNQxI9TAjvgi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkujY5kACgkQ52SDGA2eCwXpFgCfap8uND/d6TnXvztmgvFAn7JW g40An2XtpY5vTCEqYpZQ/aOGaF1pgD3P =2SOG -----END PGP SIGNATURE----- --V3eawNQxI9TAjvgi-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 11:59:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA1A106564A; Fri, 19 Mar 2010 11:59:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE588FC1E; Fri, 19 Mar 2010 11:59:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JBx2ST040556; Fri, 19 Mar 2010 11:59:02 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JBx2aC040554; Fri, 19 Mar 2010 11:59:02 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003191159.o2JBx2aC040554@svn.freebsd.org> From: Ed Schouten Date: Fri, 19 Mar 2010 11:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205329 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 11:59:03 -0000 Author: ed Date: Fri Mar 19 11:59:02 2010 New Revision: 205329 URL: http://svn.freebsd.org/changeset/base/205329 Log: Don't add the atrun-line to the crontab when MK_AT is set. This prevents spurious calls to sendmail every 5 minutes. MFC after: 1 week Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Mar 19 11:14:37 2010 (r205328) +++ head/etc/Makefile Fri Mar 19 11:59:02 2010 (r205329) @@ -161,6 +161,9 @@ distribution: ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; +.if ${MK_AT} == "no" + sed -i "" -e '/atrun/d' ${DESTDIR}/etc/crontab +.endif .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd .endif From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 12:00:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8637E106566C; Fri, 19 Mar 2010 12:00:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7F68FC28; Fri, 19 Mar 2010 12:00:05 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0036A46B85; Fri, 19 Mar 2010 08:00:04 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3F60D8A021; Fri, 19 Mar 2010 08:00:04 -0400 (EDT) From: John Baldwin To: Xin LI Date: Fri, 19 Mar 2010 07:59:56 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> In-Reply-To: <201003190116.o2J1Gr2v094129@svn.freebsd.org> MIME-Version: 1.0 Message-Id: <201003190759.56385.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 19 Mar 2010 08:00:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 12:00:05 -0000 On Thursday 18 March 2010 9:16:53 pm Xin LI wrote: > Author: delphij > Date: Fri Mar 19 01:16:53 2010 > New Revision: 205307 > URL: http://svn.freebsd.org/changeset/base/205307 > > Log: > SSE is enabled by default about 5 years ago so there is no point pretending > that we support I486 and I586 CPUs in the GENERIC kernel, users wants these > support would have to build a custom kernel to explicitly disable SSE > anyways. > > MFC after: 1 month No, this is wrong. Revert this. We do _not_ unconditionally use SSE in the kernel. GENERIC should run just fine on a 486. If it doesn't, that should be fixed, but I have not seen any reports to the contrary. In general we do not use any floating-point / MMX / SSE instructions in the kernel as our FPU context-saving code doesn't support it. All the x86 world is not rack-mounted 64-bit servers. We should not remove support for non-686 CPUs for no good reason. 486 CPUs have cmpxchg and xadd so are perfectly adequate. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 12:04:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A713106564A; Fri, 19 Mar 2010 12:04:57 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 387888FC3E; Fri, 19 Mar 2010 12:04:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JC4u08041968; Fri, 19 Mar 2010 12:04:56 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JC4uIx041966; Fri, 19 Mar 2010 12:04:56 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003191204.o2JC4uIx041966@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 19 Mar 2010 12:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205330 - stable/7/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 12:04:57 -0000 Author: jh Date: Fri Mar 19 12:04:56 2010 New Revision: 205330 URL: http://svn.freebsd.org/changeset/base/205330 Log: MFC r204447: In _gettemp(), check that the length of the path doesn't exceed MAXPATHLEN. Otherwise the path name (or part of it) may not fit to carrybuf causing a buffer overflow. PR: bin/140228 Modified: stable/7/lib/libc/stdio/mktemp.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdio/mktemp.c ============================================================================== --- stable/7/lib/libc/stdio/mktemp.c Fri Mar 19 11:59:02 2010 (r205329) +++ stable/7/lib/libc/stdio/mktemp.c Fri Mar 19 12:04:56 2010 (r205330) @@ -116,6 +116,10 @@ _gettemp(path, doopen, domkdir, slen) for (trv = path; *trv != '\0'; ++trv) ; + if (trv - path >= MAXPATHLEN) { + errno = ENAMETOOLONG; + return (0); + } trv -= slen; suffp = trv; --trv; From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 12:07:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1648B106567E; Fri, 19 Mar 2010 12:07:29 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 048998FC0A; Fri, 19 Mar 2010 12:07:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JC7SOr042582; Fri, 19 Mar 2010 12:07:28 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JC7SUI042580; Fri, 19 Mar 2010 12:07:28 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003191207.o2JC7SUI042580@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 19 Mar 2010 12:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205331 - stable/6/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 12:07:29 -0000 Author: jh Date: Fri Mar 19 12:07:28 2010 New Revision: 205331 URL: http://svn.freebsd.org/changeset/base/205331 Log: MFC r204447: In _gettemp(), check that the length of the path doesn't exceed MAXPATHLEN. Otherwise the path name (or part of it) may not fit to carrybuf causing a buffer overflow. PR: bin/140228 Modified: stable/6/lib/libc/stdio/mktemp.c Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/stdio/mktemp.c ============================================================================== --- stable/6/lib/libc/stdio/mktemp.c Fri Mar 19 12:04:56 2010 (r205330) +++ stable/6/lib/libc/stdio/mktemp.c Fri Mar 19 12:07:28 2010 (r205331) @@ -120,6 +120,10 @@ _gettemp(path, doopen, domkdir, slen) for (trv = path; *trv != '\0'; ++trv) ; + if (trv - path >= MAXPATHLEN) { + errno = ENAMETOOLONG; + return (0); + } trv -= slen; suffp = trv; --trv; From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 12:10:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB343106564A; Fri, 19 Mar 2010 12:10:47 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id A61478FC1C; Fri, 19 Mar 2010 12:10:47 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 6A99863D1; Fri, 19 Mar 2010 12:10:44 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id o2JCAhLc018848; Fri, 19 Mar 2010 12:10:44 GMT (envelope-from phk@critter.freebsd.dk) To: John Baldwin From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 19 Mar 2010 07:59:56 -0400." <201003190759.56385.jhb@freebsd.org> Date: Fri, 19 Mar 2010 12:10:43 +0000 Message-ID: <18847.1269000643@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 12:10:48 -0000 In message <201003190759.56385.jhb@freebsd.org>, John Baldwin writes: >On Thursday 18 March 2010 9:16:53 pm Xin LI wrote: >All the x86 world is not rack-mounted 64-bit servers. We should not remove >support for non-686 CPUs for no good reason. 486 CPUs have cmpxchg and xadd >so are perfectly adequate. Seconded. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 12:43:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A04941065687; Fri, 19 Mar 2010 12:43:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFF68FC28; Fri, 19 Mar 2010 12:43:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JChIBN050429; Fri, 19 Mar 2010 12:43:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JChIv3050426; Fri, 19 Mar 2010 12:43:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003191243.o2JChIv3050426@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Mar 2010 12:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205332 - in head/sys: amd64/acpica i386/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 12:43:18 -0000 Author: jhb Date: Fri Mar 19 12:43:18 2010 New Revision: 205332 URL: http://svn.freebsd.org/changeset/base/205332 Log: Use the same policy for rejecting / not-reject ACPI tables with incorrect checksums as the base acpi(4) driver. This fixes a problem where the MADT parser would reject the MADT table during early boot causing the MP Table to be, but then the acpi(4) driver would attach and use non-SMP interrupt routing. Tested by: Alastair Hogge agh of coolrhaug com MFC after: 1 week Modified: head/sys/amd64/acpica/acpi_machdep.c head/sys/i386/acpica/acpi_machdep.c Modified: head/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- head/sys/amd64/acpica/acpi_machdep.c Fri Mar 19 12:07:28 2010 (r205331) +++ head/sys/amd64/acpica/acpi_machdep.c Fri Mar 19 12:43:18 2010 (r205332) @@ -627,8 +627,10 @@ map_table(vm_paddr_t pa, int offset, con if (ACPI_FAILURE(AcpiTbChecksum(table, length))) { if (bootverbose) printf("ACPI: Failed checksum for table %s\n", sig); +#if (ACPI_CHECKSUM_ABORT) table_unmap(table, length); return (NULL); +#endif } return (table); } Modified: head/sys/i386/acpica/acpi_machdep.c ============================================================================== --- head/sys/i386/acpica/acpi_machdep.c Fri Mar 19 12:07:28 2010 (r205331) +++ head/sys/i386/acpica/acpi_machdep.c Fri Mar 19 12:43:18 2010 (r205332) @@ -641,8 +641,10 @@ map_table(vm_paddr_t pa, int offset, con if (ACPI_FAILURE(AcpiTbChecksum(table, length))) { if (bootverbose) printf("ACPI: Failed checksum for table %s\n", sig); +#if (ACPI_CHECKSUM_ABORT) table_unmap(table, length); return (NULL); +#endif } return (table); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 13:05:20 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CF15106564A; Fri, 19 Mar 2010 13:05:20 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 626F58FC1F; Fri, 19 Mar 2010 13:05:20 +0000 (UTC) Received: from [192.168.0.102] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o2JD5Jrs089152; Fri, 19 Mar 2010 05:05:19 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4BA376A0.1050101@feral.com> Date: Fri, 19 Mar 2010 06:05:36 -0700 From: Matthew Jacob User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Poul-Henning Kamp References: <18847.1269000643@critter.freebsd.dk> In-Reply-To: <18847.1269000643@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.67.166.1]); Fri, 19 Mar 2010 05:05:20 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI , John Baldwin Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 13:05:20 -0000 On 3/19/2010 5:10 AM, Poul-Henning Kamp wrote: > In message<201003190759.56385.jhb@freebsd.org>, John Baldwin writes: > >> On Thursday 18 March 2010 9:16:53 pm Xin LI wrote: >> > >> All the x86 world is not rack-mounted 64-bit servers. We should not remove >> support for non-686 CPUs for no good reason. 486 CPUs have cmpxchg and xadd >> so are perfectly adequate. >> > Seconded. > > I had thought that the SSE was unconditional. My mistake (and big mouth). I'll agree/ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 13:19:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E885106566B; Fri, 19 Mar 2010 13:19:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE088FC2A; Fri, 19 Mar 2010 13:19:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0DCA046B09; Fri, 19 Mar 2010 09:19:27 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 653D38A01F; Fri, 19 Mar 2010 09:19:26 -0400 (EDT) From: John Baldwin To: Hiroki Sato Date: Fri, 19 Mar 2010 08:22:03 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003190920.o2J9K6oD003965@svn.freebsd.org> In-Reply-To: <201003190920.o2J9K6oD003965@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003190822.03584.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 19 Mar 2010 09:19:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-releng@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205311 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 13:19:27 -0000 On Friday 19 March 2010 5:20:06 am Hiroki Sato wrote: > --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Mar 19 05:40:47 2010 (r205310) > +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Mar 19 09:20:06 2010 (r205311) Just a couple of notes: > @@ -151,13 +151,35 @@ > > Kernel Changes > > + The &man.acpi.4; subsystem now supports parsing SRAT > + (System Resource Affinity Table used to describe affinity > + relationships between CPUs and memory. This is probably a bit of an overstatement. We only support examining it via acpidump(8). We do not support using it in the kernel to provide NUMA support (I have some WIP for this, but it's not even in HEAD yet). > + The &os; virtual memory > + subsystem now supports fully transparent use of > + superpages for application memory; > + application memory pages are dynamically promoted to or > + demoted from superpages without any modification to > + application code. This change offers the benefit of large > + page sizes such as improved virtual memory efficiency and > + reduced TLB (translation lookaside buffer) misses without > + downsides like application changes and virtual memory > + inflexibility. This can be enabled by setting a loader tunable > + vm.pmap.pg_ps_enabled to > + 1 and is enabled by default on > + &arch.amd64;. Hmm, I thought superpages was actually present in 7.2 as well, the only change in 7.3 was to enable it by default (which was subsequently reverted). Note that it is not enabled by default for 7.3, so that part should be updated, though this entire paragraph is perhaps not relevant for 7.3. Also, I think this paragraph isn't quite right: The &man.pci.4; subsystem now supports proxying of PCI Express MSI/MSI-X (Message Signaled Interrupt) requests and bus interrupt requests for child devices. This allows child devices to use MSI/MSI-X interrupts. My guess is that this is actually describing changes made to the vgapci(4) driver so that child devices such as drm(4) can use MSI? Also, MSI is not PCI-e specific, so I would just say 'PCI MSI/MSI-X (...) requests'. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 14:27:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FBA3106566B; Fri, 19 Mar 2010 14:27:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id D96AF8FC15; Fri, 19 Mar 2010 14:27:27 +0000 (UTC) Received: from c122-106-146-195.carlnfd1.nsw.optusnet.com.au (c122-106-146-195.carlnfd1.nsw.optusnet.com.au [122.106.146.195]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2JEROvU000808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Mar 2010 01:27:25 +1100 Date: Sat, 20 Mar 2010 01:27:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <201003190759.56385.jhb@freebsd.org> Message-ID: <20100320002555.I1181@delplex.bde.org> References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <201003190759.56385.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 14:27:28 -0000 On Fri, 19 Mar 2010, John Baldwin wrote: > On Thursday 18 March 2010 9:16:53 pm Xin LI wrote: >> Author: delphij >> Date: Fri Mar 19 01:16:53 2010 >> New Revision: 205307 >> URL: http://svn.freebsd.org/changeset/base/205307 >> >> Log: >> SSE is enabled by default about 5 years ago so there is no point pretending >> that we support I486 and I586 CPUs in the GENERIC kernel, users wants these >> support would have to build a custom kernel to explicitly disable SSE >> anyways. >> >> MFC after: 1 month > > No, this is wrong. Revert this. We do _not_ unconditionally use SSE in the > kernel. GENERIC should run just fine on a 486. If it doesn't, that should be > fixed, but I have not seen any reports to the contrary. Indeed. This doesn't even break the non-SSE case, since it doesn't remove I686_CPU or any of the code that dynamically chooses whether to use SSE. Most 686's don't have SSE, since a 686 is an old name for a PentiumPro or maybe a Pentium2 and these don't have SSE (not sure about the Pentium2, but my old Celeron is Pentimum2-class and it only has FXSR). However, we keep using this old name for all generations of i386's after i586, even for generations that are really HAMMERs. Thus the static configuration related to I*86_CPU is almost usless: it controls only couple of options for i486 and i586, with the more complicated and costly configuration for post-i586 being handled dynamically. Omitting I486_CPU and I586_CPU thus has very little effect except breaking i486 and i586, and having these options does little except support this foot-shooting. The effect of I486_CPU is especially small. It is: - statically disable use of the TSC in the bogus get_cyclecount() API. Although the TSC is dynamically configured elsewhere, this function wants to use the TSC without any dynamic tests, so it is uses static configuration for efficiency. - avoid compiling in functions to initialize a 486. There is dynamic code to use these functions as needed, but this optimization saves a few hundred if not a few thousand bytes. - panic if the CPU is an i486, since the necessary extra support for an i486 (just the above 2 features) is not present. I586_CPU gives a little more. E.g., support for fixing the F00F hardware bug on some Pentium1's. Again there is dynamic configuration for this but a few hundred bytes are saved by not compiling it in. > In general we do not > use any floating-point / MMX / SSE instructions in the kernel as our FPU > context-saving code doesn't support it. Actually, we do, sort of. We use the fxsave and fxrstor instructions, if available, in the context-saving code itself. These are closely related to SSE, if not part of SSE. They are in different cpuid flags (FXSR instead of SSE*), but the dynamic code for using them is configured by the same ifdefs as for using SSE. My old Celeron with FXSR thus uses fxsave/fxrstor but not SSE proper (even in userland). > All the x86 world is not rack-mounted 64-bit servers. We should not remove > support for non-686 CPUs for no good reason. 486 CPUs have cmpxchg and xadd > so are perfectly adequate. Why do we still have CPU_DISABLE_CMPXCHG then? It was mainly for i386, and is now documented as being useful for old vmware, but hopefully vmware has been replaced by not-so-old vmware, qemu, kqemu, virtualbox,... and these support cmpxchg. The configuration of cmpxchg and a couple of other things is only static. SSE has both dynamic and static configuration. Its static configuration is obfuscated for historical reasons. It used to be a positive option but now it is a negative option. The positive option is set in all 2 files that use SSE (actually only FXSR?) by the following ifdef: % #if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) % #define CPU_ENABLE_SSE % #endif So CPU_ENABLE_SSE is the default, but the dynamic code for using it can be not compiled in either by configuring CPU_DISABLE_SSE or by not configuring I686_CPU. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 14:35:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AAF1065675; Fri, 19 Mar 2010 14:35:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70C8F8FC18; Fri, 19 Mar 2010 14:35:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JEZcg2077831; Fri, 19 Mar 2010 14:35:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JEZcjo077829; Fri, 19 Mar 2010 14:35:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003191435.o2JEZcjo077829@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Mar 2010 14:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205333 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 14:35:38 -0000 Author: avg Date: Fri Mar 19 14:35:38 2010 New Revision: 205333 URL: http://svn.freebsd.org/changeset/base/205333 Log: vfs_mount.9: drop cross-reference to a removed manual MFC after: 3 days Modified: head/share/man/man9/vfs_mount.9 Modified: head/share/man/man9/vfs_mount.9 ============================================================================== --- head/share/man/man9/vfs_mount.9 Fri Mar 19 12:43:18 2010 (r205332) +++ head/share/man/man9/vfs_mount.9 Fri Mar 19 14:35:38 2010 (r205333) @@ -127,8 +127,7 @@ this call relies on a large number of ot whose errors it returns so this list may not be exhaustive. .Sh SEE ALSO .Xr mount 2 , -.Xr mount 8 , -.Xr vfs_mountedon 9 +.Xr mount 8 .Pp .Va vfs.usermount .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 14:48:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 271EC1065672; Fri, 19 Mar 2010 14:48:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15F3D8FC08; Fri, 19 Mar 2010 14:48:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JEmWC7081072; Fri, 19 Mar 2010 14:48:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JEmWS9081069; Fri, 19 Mar 2010 14:48:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201003191448.o2JEmWS9081069@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Mar 2010 14:48:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205334 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 14:48:33 -0000 Author: avg Date: Fri Mar 19 14:48:32 2010 New Revision: 205334 URL: http://svn.freebsd.org/changeset/base/205334 Log: pmap amd64/i386: fix a typo in a comment MFC after: 3 days Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Mar 19 14:35:38 2010 (r205333) +++ head/sys/amd64/amd64/pmap.c Fri Mar 19 14:48:32 2010 (r205334) @@ -1123,7 +1123,7 @@ pmap_invalidate_cache_range(vm_offset_t /* * No targeted cache flush methods are supported by CPU, - * or the supplied range is bigger then 2MB. + * or the supplied range is bigger than 2MB. * Globally invalidate cache. */ pmap_invalidate_cache(); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Mar 19 14:35:38 2010 (r205333) +++ head/sys/i386/i386/pmap.c Fri Mar 19 14:48:32 2010 (r205334) @@ -1014,7 +1014,7 @@ pmap_invalidate_cache_range(vm_offset_t /* * No targeted cache flush methods are supported by CPU, - * or the supplied range is bigger then 2MB. + * or the supplied range is bigger than 2MB. * Globally invalidate cache. */ pmap_invalidate_cache(); From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 15:53:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBFD51065673; Fri, 19 Mar 2010 15:53:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABAF68FC22; Fri, 19 Mar 2010 15:53:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JFr27q095249; Fri, 19 Mar 2010 15:53:02 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JFr25U095247; Fri, 19 Mar 2010 15:53:02 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003191553.o2JFr25U095247@svn.freebsd.org> From: Ed Schouten Date: Fri, 19 Mar 2010 15:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205335 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 15:53:02 -0000 Author: ed Date: Fri Mar 19 15:53:02 2010 New Revision: 205335 URL: http://svn.freebsd.org/changeset/base/205335 Log: Slightly improve my previous commit. Just comment out the atrun line instead of completely removing it. It is not a bad idea to leave it as a reference in case someone decides to install atrun by hand afterwards. Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Mar 19 14:48:32 2010 (r205334) +++ head/etc/Makefile Fri Mar 19 15:53:02 2010 (r205335) @@ -162,7 +162,7 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; .if ${MK_AT} == "no" - sed -i "" -e '/atrun/d' ${DESTDIR}/etc/crontab + sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab .endif .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 16:09:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFA54106564A; Fri, 19 Mar 2010 16:09:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF5438FC13; Fri, 19 Mar 2010 16:09:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JG9vtk099026; Fri, 19 Mar 2010 16:09:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JG9v6u099024; Fri, 19 Mar 2010 16:09:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201003191609.o2JG9v6u099024@svn.freebsd.org> From: Xin LI Date: Fri, 19 Mar 2010 16:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205336 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 16:09:58 -0000 Author: delphij Date: Fri Mar 19 16:09:57 2010 New Revision: 205336 URL: http://svn.freebsd.org/changeset/base/205336 Log: Back out revision 205307. For the record: CPU_ENABLE_SSE enables some code that dynamically enables SSE support but not necessarily enforce execution of SSE instructions. Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Fri Mar 19 15:53:02 2010 (r205335) +++ head/sys/i386/conf/GENERIC Fri Mar 19 16:09:57 2010 (r205336) @@ -18,6 +18,8 @@ # # $FreeBSD$ +cpu I486_CPU +cpu I586_CPU cpu I686_CPU ident GENERIC From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 16:13:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EF051065673; Fri, 19 Mar 2010 16:13:22 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 943548FC23; Fri, 19 Mar 2010 16:13:21 +0000 (UTC) Received: by wwb18 with SMTP id 18so2029907wwb.13 for ; Fri, 19 Mar 2010 09:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=Vqcp71Erky8pvUB+zFgbYCuYzj9LlHANH9DaKCYEUyM=; b=WM4X6a0AFPWVuKCek1doczckymQquer+RjNOIG7s4mMuZP4JZ616Snhi6KTIiDtPZ6 ChgatO8WDXfaZbs6JNDelpTifI3Fx8CRQ+90Js7Tgu19J3ua/KdmrNUJ38Pr5mGGRy8g X8AK7r41+BDg4ZkGzY7WaHLvTuq+fhsRUgexA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=weh4uj+ewbW1d8IZV6iem9SshtV0IueQzxqG9K2EG3FfBxn/aGmIu7soV+vYiYtHmd ahgKOIXlYKefMuv3faUDTg6ng0OOMV4BMoUmToldMK0Xx9zOiYZ6d+eKfdjavRaF4pp0 i5/GMW6nOFduSmJOS/Ky8suZ4j+qbxsUqxxWA= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.87.12 with SMTP id x12mr661834wee.185.1269015200147; Fri, 19 Mar 2010 09:13:20 -0700 (PDT) In-Reply-To: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> From: Ivan Voras Date: Fri, 19 Mar 2010 17:13:00 +0100 X-Google-Sender-Auth: 3b8e725dd1619c2b Message-ID: <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> To: Garrett Cooper 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, Xin LI Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 16:13:22 -0000 On 19 March 2010 07:33, Garrett Cooper wrote: > On Thu, Mar 18, 2010 at 6:16 PM, Xin LI wrote: >> Author: delphij >> Date: Fri Mar 19 01:16:53 2010 >> New Revision: 205307 >> URL: http://svn.freebsd.org/changeset/base/205307 >> >> Log: >> =C2=A0SSE is enabled by default about 5 years ago so there is no point p= retending >> =C2=A0that we support I486 and I586 CPUs in the GENERIC kernel, users wa= nts these >> =C2=A0support would have to build a custom kernel to explicitly disable = SSE >> =C2=A0anyways. SSE in the userland you mean? Regardless, I don't think there is now reason for compiling everything as for i386. E.g. why not add at least -mtune=3Dgeneric or even also -march=3Di686 to default gcc options? http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 16:22:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 978DF106566C; Fri, 19 Mar 2010 16:22:56 +0000 (UTC) (envelope-from netch@segfault.kiev.ua) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.freebsd.org (Postfix) with ESMTP id 16D508FC0C; Fri, 19 Mar 2010 16:22:55 +0000 (UTC) Received: from segfault.kiev.ua (localhost.segfault.kiev.ua [127.0.0.1]) by segfault.kiev.ua (8.14.3/8.14.3/8.Who.Cares) with ESMTP id o2JGMs37048145; Fri, 19 Mar 2010 18:22:54 +0200 (EET) (envelope-from netch@segfault.kiev.ua) Received: (from netch@localhost) by segfault.kiev.ua (8.14.3/8.14.3/Submit) id o2JGMnRu048142; Fri, 19 Mar 2010 18:22:49 +0200 (EET) (envelope-from netch) Date: Fri, 19 Mar 2010 18:22:49 +0200 From: Valentin Nechayev To: Ivan Voras Message-ID: <20100319162249.GD67820@netch.kiev.ua> References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> X-42: On Cc: svn-src-head@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: netch@netch.kiev.ua List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 16:22:56 -0000 Fri, Mar 19, 2010 at 17:13:00, ivoras wrote about "Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf]": > SSE in the userland you mean? Regardless, I don't think there is now > reason for compiling everything as for i386. E.g. why not add at least > -mtune=generic or even also -march=i686 to default gcc options? > > http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html Having userland compiled with i686 will give the same effect as i686-only kernel: it won't boot on machines which doesn't conform to. If it is supposed to boot on i486 and higher, no more than -march=i486 can be used. OTOH it would be quite popular for most desktops and big servers to orient to fresh hardware, so one can (if having enough resources) to split targets: 1) - for most, which would have e.g. CFLAGS=... -march=pentium3 -mmmx -msse -mfpmath=sse,387 -mtune=generic COPTFLAGS=... -march=pentium3 -mtune=generic 2) for small/embedded/etc. with defaults to i486 and make separate binary distributions for them. OT3H it isn't proven to give real effect except very limited cases (CPU-intensive (mplayer, etc.), graphics-intensive apps (KDE)). Mplayer usually uses differently compiled modules for different CPUs. There are quite few applications which can get real benefit. -netch- From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 16:27:35 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F4BC106564A; Fri, 19 Mar 2010 16:27:35 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id E9F108FC16; Fri, 19 Mar 2010 16:27:34 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 957A1A67C76; Sat, 20 Mar 2010 00:27:33 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id 0ojg1X6WDnyb; Sat, 20 Mar 2010 00:27:27 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 4254BA67C74; Sat, 20 Mar 2010 00:27:25 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=BdonylaznM9vm9zHZqgu00YtGzKQZik3n6E7VsUga3s8cTAoqRAURS5jrOBaGJ7Jo gBrbONEWzuldioTgmv0aA== Message-ID: <4BA3A5E9.1080906@delphij.net> Date: Fri, 19 Mar 2010 09:27:21 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100304 Thunderbird/3.0.3 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: Garrett Cooper References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> In-Reply-To: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 16:27:35 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/03/18 23:33, Garrett Cooper wrote: > On Thu, Mar 18, 2010 at 6:16 PM, Xin LI wrote: >> Author: delphij >> Date: Fri Mar 19 01:16:53 2010 >> New Revision: 205307 >> URL: http://svn.freebsd.org/changeset/base/205307 >> >> Log: >> SSE is enabled by default about 5 years ago so there is no point pretending >> that we support I486 and I586 CPUs in the GENERIC kernel, users wants these >> support would have to build a custom kernel to explicitly disable SSE >> anyways. >> >> MFC after: 1 month >> >> Modified: >> head/sys/i386/conf/GENERIC >> >> Modified: head/sys/i386/conf/GENERIC >> ============================================================================== >> --- head/sys/i386/conf/GENERIC Fri Mar 19 00:51:48 2010 (r205306) >> +++ head/sys/i386/conf/GENERIC Fri Mar 19 01:16:53 2010 (r205307) >> @@ -18,8 +18,6 @@ >> # >> # $FreeBSD$ >> >> -cpu I486_CPU >> -cpu I586_CPU >> cpu I686_CPU >> ident GENERIC > > 1. UPDATING entry ? > 2. CC -current@ with the news? Perhaps not, I was wrong on this: CPU_ENABLE_SSE would compile in the support for SSE, not enforcing it. Our lib32 on the other hand already uses -i686 -sse -sse2 and -mmx so I'm just cutting the wrong foot I guess :-/ Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLo6XpAAoJEATO+BI/yjfBkucIAMkBwr0dR9GMJys2sl/reDkr fNW3L6kIEY6kWu/G6H0ScTl1JXWhNcyhloOiswrVyekZJSf8bcXrbKoqTAig2ndE eEaYHFQ1mM44nN6h30qDVR0E5xJvGLK2PPrYF1X88DDn8ykDGdVkM1nkR406/lGO XyY2wdmvbwnFU535fPV/BA+uyYtBTfTQ7ZiiSUTior1086o7yHz2H3Q9a2+NlPAM T669L/2+soDpXCNzZ+Fifm9dUAtu6zHEpLnyCQ1B280x/nvKtSyJEup1QxXy+zZJ mr6nviODCfuRlEgiJRE0BzAhchLMbYpy8oEbgqbg8dZqGsnfTECQ1OUPXVRowfc= =0bfK -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 16:28:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D4B3106566B; Fri, 19 Mar 2010 16:28:28 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8528FC19; Fri, 19 Mar 2010 16:28:27 +0000 (UTC) Received: by wyb33 with SMTP id 33so1677657wyb.13 for ; Fri, 19 Mar 2010 09:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=I2nMeCyVkC7Ppm9huySJb09APH45WU9+731yrRmUkHs=; b=h3edhUmDYYGEUPguhQMzcwezVRgV7pzbSwUtmZvTbb0c6Xbmm88G57WiY0dLkwwpDs 0qBOtMkqRIv/NAxSnR+sHLhIX/Wdo8ncRSqSPYtX6hSU0F1Te/KsInfY4rSRf+SQNCdS yUSGsNVPo5obHpejeKTiDRHxSQVY1piVSMjcE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=FksJFAoZo9OCBV4VMXOIeoxe/kT0nzvT0fffgKs7uyRrJ/z/1OO2z2LywxdHjij3pO HLV1gQJvNYnLr5Dwu/PKvYIjwhKxJ5zrsWDW9ndrtCCV7QLPV+herByX2NnsaVdQKpxO eVcj1xN2t6xG55Ne368JWwD+s5rav554TcaLk= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.186.138 with SMTP id w10mr1079017wem.206.1269016106418; Fri, 19 Mar 2010 09:28:26 -0700 (PDT) In-Reply-To: <20100319162249.GD67820@netch.kiev.ua> References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> <20100319162249.GD67820@netch.kiev.ua> From: Ivan Voras Date: Fri, 19 Mar 2010 17:28:06 +0100 X-Google-Sender-Auth: 2f64366b0f4b5b20 Message-ID: <9bbcef731003190928l165c6279p6244f0c97a92600a@mail.gmail.com> To: netch@netch.kiev.ua Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 16:28:29 -0000 On 19 March 2010 17:22, Valentin Nechayev wrote: > =C2=A0Fri, Mar 19, 2010 at 17:13:00, ivoras wrote about "Re: I486_CPU and= I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/s= ys/i386/conf]": > >> SSE in the userland you mean? Regardless, I don't think there is now >> reason for compiling everything as for i386. E.g. why not add at least >> -mtune=3Dgeneric or even also -march=3Di686 to default gcc options? >> >> http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html > > Having userland compiled with i686 will give the same effect as i686-only > kernel: it won't boot on machines which doesn't conform to. If it is > supposed to boot on i486 and higher, no more than -march=3Di486 can be us= ed. Yes, this is how I read the change - the move from "i386" to "i686". I apologize if I got it wrong :) As it was pointed out earlier - small systems users and designers probably have special install procedures because of the nature of the business. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:14:34 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9061106564A; Fri, 19 Mar 2010 17:14:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A3BD58FC20; Fri, 19 Mar 2010 17:14:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2JH7xb0080850; Fri, 19 Mar 2010 11:07:59 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 19 Mar 2010 11:08:17 -0600 (MDT) Message-Id: <20100319.110817.359828849554409880.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20100319114426.GO32142@hoeg.nl> References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <20100319114426.GO32142@hoeg.nl> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, delphij@FreeBSD.org Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:14:35 -0000 In message: <20100319114426.GO32142@hoeg.nl> Ed Schouten writes: : * Xin LI wrote: : > Log: : > SSE is enabled by default about 5 years ago so there is no point pretending : > that we support I486 and I586 CPUs in the GENERIC kernel, users wants these : > support would have to build a custom kernel to explicitly disable SSE : > anyways. : > : > MFC after: 1 month : : Could we please leave i586 here? I agree people should throw their : Pentiums on the scrapyard, but only supporting i686 by default is a bit : too agressive in my opinion. I don't think we should MFC this change at all. Geodes are still fairly popular machines and have 486 cores in them. Warner From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:14:39 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E445A1065677; Fri, 19 Mar 2010 17:14:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE778FC24; Fri, 19 Mar 2010 17:14:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o2JH5N9e080786; Fri, 19 Mar 2010 11:05:24 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 19 Mar 2010 11:05:41 -0600 (MDT) Message-Id: <20100319.110541.785006297401202166.imp@bsdimp.com> To: mj@feral.com From: "M. Warner Losh" In-Reply-To: <4BA2F899.8070503@feral.com> References: <4BA2D0DF.3070606@feral.com> <4BA2D70D.3050703@elischer.org> <4BA2F899.8070503@feral.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, delphij@FreeBSD.org, julian@elischer.org Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:14:40 -0000 In message: <4BA2F899.8070503@feral.com> Matthew Jacob writes: : Does anyone out there have a 486 DX4 even? Can you boot 8.0 CDs? The soekris boxes have a geode in them, which is a 486. I've run generic on them w/o disabling SSE for ages... Warner From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:16:34 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67D88106564A; Fri, 19 Mar 2010 17:16:34 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id C85668FC28; Fri, 19 Mar 2010 17:16:33 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 4EA78A67C96; Sat, 20 Mar 2010 01:16:32 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id 1SgeLIlzDvGE; Sat, 20 Mar 2010 01:16:26 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id A1CCEA57C1A; Sat, 20 Mar 2010 01:16:24 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=ut3DmFvLhRJ4rQ3CKHG4tdrgCObge12TXbpAasVvdGcWs9cynP61Z6V34ulmQ6j5/ LkoCVbTwEIp0mUC3SWGEg== Message-ID: <4BA3B164.3000503@delphij.net> Date: Fri, 19 Mar 2010 10:16:20 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100304 Thunderbird/3.0.3 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: "M. Warner Losh" References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <20100319114426.GO32142@hoeg.nl> <20100319.110817.359828849554409880.imp@bsdimp.com> In-Reply-To: <20100319.110817.359828849554409880.imp@bsdimp.com> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, ed@80386.nl, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, delphij@FreeBSD.ORG Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:16:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/03/19 10:08, M. Warner Losh wrote: > In message: <20100319114426.GO32142@hoeg.nl> > Ed Schouten writes: > : * Xin LI wrote: > : > Log: > : > SSE is enabled by default about 5 years ago so there is no point pretending > : > that we support I486 and I586 CPUs in the GENERIC kernel, users wants these > : > support would have to build a custom kernel to explicitly disable SSE > : > anyways. > : > > : > MFC after: 1 month > : > : Could we please leave i586 here? I agree people should throw their > : Pentiums on the scrapyard, but only supporting i686 by default is a bit > : too agressive in my opinion. > > I don't think we should MFC this change at all. Geodes are still > fairly popular machines and have 486 cores in them. Yes you are right. I overlooked the effect of CPU_ENABLE_SSE which is to add the support for SSE not to enforce using it... This revision has been backed out anyways. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLo7FkAAoJEATO+BI/yjfBqdEH/i61aI1hBIzP1+owXbtsRfzL RzzdkM7eZfoNi6rYwG5JqJUQvJgxJWmQgHCMpwLZhp6D6mG4wKQKlVOJGfPiASDI fouVxR2wKRf7hnK3WngTOBjDrwZ2xLpwsViMRLftsRUPGVFhGPB1lqKIeVXQ0kgb bH9fydyeRLRXVixDJlhFq0UKfzMt3MGVbCJlKzeJ+3+EqeookIfPknN6G9NhhDzo wHIRnwaYutnB95BBvsh/f6vtDbs7zUxcpxmcO+Rxt6eQgXZo9DtfRnRSAZ8urBA0 fFPOsc+tvflX4CCrFk7DM9klVFC4QGrofnPKoTlu4LwkusF+rPZ5RlmVw4qyWPY= =/fSQ -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:19:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64B2E106566C; Fri, 19 Mar 2010 17:19:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 37D908FC1B; Fri, 19 Mar 2010 17:19:12 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CEA6246B5C; Fri, 19 Mar 2010 13:19:11 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 22C478A021; Fri, 19 Mar 2010 13:19:11 -0400 (EDT) From: John Baldwin To: Xin LI Date: Fri, 19 Mar 2010 13:14:31 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003191609.o2JG9v6u099024@svn.freebsd.org> In-Reply-To: <201003191609.o2JG9v6u099024@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003191314.31685.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 19 Mar 2010 13:19:11 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205336 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:19:12 -0000 On Friday 19 March 2010 12:09:57 pm Xin LI wrote: > Author: delphij > Date: Fri Mar 19 16:09:57 2010 > New Revision: 205336 > URL: http://svn.freebsd.org/changeset/base/205336 > > Log: > Back out revision 205307. > > For the record: > > CPU_ENABLE_SSE enables some code that dynamically enables SSE support > but not necessarily enforce execution of SSE instructions. Thanks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:19:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAB85106567B; Fri, 19 Mar 2010 17:19:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBD18FC1C; Fri, 19 Mar 2010 17:19:13 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5815D46B64; Fri, 19 Mar 2010 13:19:13 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 72F0E8A025; Fri, 19 Mar 2010 13:19:12 -0400 (EDT) From: John Baldwin To: Ivan Voras Date: Fri, 19 Mar 2010 13:16:04 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> In-Reply-To: <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003191316.04620.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 19 Mar 2010 13:19:12 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:19:13 -0000 On Friday 19 March 2010 12:13:00 pm Ivan Voras wrote: > On 19 March 2010 07:33, Garrett Cooper wrote: > > On Thu, Mar 18, 2010 at 6:16 PM, Xin LI wrote: > >> Author: delphij > >> Date: Fri Mar 19 01:16:53 2010 > >> New Revision: 205307 > >> URL: http://svn.freebsd.org/changeset/base/205307 > >> > >> Log: > >> SSE is enabled by default about 5 years ago so there is no point pretending > >> that we support I486 and I586 CPUs in the GENERIC kernel, users wants these > >> support would have to build a custom kernel to explicitly disable SSE > >> anyways. > > SSE in the userland you mean? Regardless, I don't think there is now > reason for compiling everything as for i386. E.g. why not add at least > -mtune=generic or even also -march=i686 to default gcc options? > > http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html I actually suggested using -mtune=i686 several years ago for i386. Using -mtune=generic probably would be a good thing to use when CPUTYPE is not specified for i386 and amd64 now. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:19:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30EB31065675; Fri, 19 Mar 2010 17:19:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 02C978FC1D; Fri, 19 Mar 2010 17:19:15 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B088A46B51; Fri, 19 Mar 2010 13:19:14 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id CC2F48A01F; Fri, 19 Mar 2010 13:19:13 -0400 (EDT) From: John Baldwin To: d@delphij.net Date: Fri, 19 Mar 2010 13:19:01 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> <4BA3A5E9.1080906@delphij.net> In-Reply-To: <4BA3A5E9.1080906@delphij.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003191319.01928.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 19 Mar 2010 13:19:13 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:19:15 -0000 On Friday 19 March 2010 12:27:21 pm Xin LI wrote: > On 2010/03/18 23:33, Garrett Cooper wrote: > > On Thu, Mar 18, 2010 at 6:16 PM, Xin LI wrote: > >> Author: delphij > >> Date: Fri Mar 19 01:16:53 2010 > >> New Revision: 205307 > >> URL: http://svn.freebsd.org/changeset/base/205307 > >> > >> Log: > >> SSE is enabled by default about 5 years ago so there is no point pretending > >> that we support I486 and I586 CPUs in the GENERIC kernel, users wants these > >> support would have to build a custom kernel to explicitly disable SSE > >> anyways. > >> > >> MFC after: 1 month > >> > >> Modified: > >> head/sys/i386/conf/GENERIC > >> > >> Modified: head/sys/i386/conf/GENERIC > >> ============================================================================== > >> --- head/sys/i386/conf/GENERIC Fri Mar 19 00:51:48 2010 (r205306) > >> +++ head/sys/i386/conf/GENERIC Fri Mar 19 01:16:53 2010 (r205307) > >> @@ -18,8 +18,6 @@ > >> # > >> # $FreeBSD$ > >> > >> -cpu I486_CPU > >> -cpu I586_CPU > >> cpu I686_CPU > >> ident GENERIC > > > > 1. UPDATING entry ? > > 2. CC -current@ with the news? > > Perhaps not, I was wrong on this: CPU_ENABLE_SSE would compile in the > support for SSE, not enforcing it. Our lib32 on the other hand already > uses -i686 -sse -sse2 and -mmx so I'm just cutting the wrong foot I > guess :-/ I believe the lib32 bits assume they will always run on an amd64-capable CPU in which case SSE2 is guaranteed to be present. Similarly, I think the lib32 variant of libc uses a different method of setting up TLS than the native i386 version (I think the lib32 libc uses a GSBASE sysarch() directly vs what an i386 libc does, or at least this used to be true at one point in the past if not currently true). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 17:46:25 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E49F91065673; Fri, 19 Mar 2010 17:46:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 7AE868FC2C; Fri, 19 Mar 2010 17:46:25 +0000 (UTC) Received: from besplex.bde.org (c122-106-146-195.carlnfd1.nsw.optusnet.com.au [122.106.146.195]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o2JHkLld007906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Mar 2010 04:46:23 +1100 Date: Sat, 20 Mar 2010 04:46:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201003191316.04620.jhb@freebsd.org> Message-ID: <20100320043345.J2151@besplex.bde.org> References: <7d6fde3d1003182333m336d52fbh987035a21568250d@mail.gmail.com> <9bbcef731003190913k4f3afbd8mb4e767c40433be8e@mail.gmail.com> <201003191316.04620.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Xin LI , Ivan Voras , svn-src-head@FreeBSD.org, Garrett Cooper Subject: Re: I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 17:46:26 -0000 On Fri, 19 Mar 2010, John Baldwin wrote: > On Friday 19 March 2010 12:13:00 pm Ivan Voras wrote: >> SSE in the userland you mean? Regardless, I don't think there is now >> reason for compiling everything as for i386. E.g. why not add at least >> -mtune=generic or even also -march=i686 to default gcc options? >> >> http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html > > I actually suggested using -mtune=i686 several years ago for i386. Using > -mtune=generic probably would be a good thing to use when CPUTYPE is not > specified for i386 and amd64 now. Er, isn't -mtune=generic the default in gcc-4.2? I once fought with gcc-4.2 to produce kernels with similar size and compile time to ones produced by gcc-3 (impossible for the runtime since gcc got another 40% slower and kernel source size and complications expanded another 40% even when the object size didn't bloat much). It took -i386 and a couple of other flags like -fno-inline-functions-called-once (the latter is also needed to unbreak debugging with ddb and profiling). The flags had very little difference on runtime efficiency, partly because I ran the kernels mainly on Athlons which run old i386-optimized code amazingly well but gain on benefits from i686 optimizations. Optimizing Athlon kernels for Athlons also makes little difference but I usually do it. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 18:33:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17C70106566C; Fri, 19 Mar 2010 18:33:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0477D8FC08; Fri, 19 Mar 2010 18:33:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JIXfJI031017; Fri, 19 Mar 2010 18:33:41 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JIXeBX031015; Fri, 19 Mar 2010 18:33:40 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003191833.o2JIXeBX031015@svn.freebsd.org> From: Hiroki Sato Date: Fri, 19 Mar 2010 18:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205342 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 18:33:41 -0000 Author: hrs Date: Fri Mar 19 18:33:40 2010 New Revision: 205342 URL: http://svn.freebsd.org/changeset/base/205342 Log: Update relnotes (final round, hopefully): SA-09:09,10,11,12,14,15,16,17,10:01,02,03, security.jail.ip[46]_saddrsel, acpidump(8) SRAT support (acpi(4) entry removed)[1], sched_ule(4) deadlock fixed (EN-10:02), superpages enabled by default on amd64 (superpages entry revised)[1], security.bsd.map_at_zero, boot2 on pc98 reimplemented, vgapci(4) MSI/MSI-X proxying (item of the old pci(4) item removed)[1], bce(4) bugfix, cxgb(4) firmware 7.8.0[2], fxp(4) + TSO = poor performance fixed, mxge(4) firmware 1.4.48b, ste(4) improvements, vlan(4) now in GENERIC, gstripe(8) default stripe size is now 64KB, fetch(1) HTTP digest auth support, fetch(1) NO_PROXY/no_proxy support, getpagesize(3) added, mergemaster(8) DELETE_STALE_RC_FILES support, tftp(1) exit status fixed, traceroute(8) address selection in jail, whois(1) -d removed, $vlans_IF in rc.conf added, ISC BIND 9.4-ESV, tzdata2010b, GNOME 2.28.2, and KDE 4.3.5. Spotted by: jhb[1] and np[2] Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Mar 19 17:48:34 2010 (r205341) +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Mar 19 18:33:40 2010 (r205342) @@ -120,7 +120,6 @@ advisories available from . - Kernel Changes - The &man.acpi.4; subsystem now supports parsing SRAT - (System Resource Affinity Table used to describe affinity - relationships between CPUs and memory. - The &man.closefrom.2; system call has been added. This closes any open file descriptors which are equal to or larger than the specified value. Note that this does not fail with @@ -167,6 +230,21 @@ system call now support a sysctl variable vfs.timestamp_precision. + The &man.jail.8; subsystem now supports + security.jail.ip4_saddrsel and + security.jail.ip6_saddrsel sysctl variables + to control whether to use source address selection or the + primary jail address for unbound outgoing connections. The + default is that the source address selection is enabled. + Also, the jail parameter ip4.saddrsel and + ip6.saddrsel are boolean option to enable + the source address selection for IPv4 and IPv6, respectively. + If another boolean parameters + ip4.nosaddrsel and + ip6.nosaddrsel are set, the child jails do + not inherit the address selection options of the + parent. + The kmem_map KVA space has been increased to 512GB. @@ -193,13 +271,17 @@ (P1003_1B_SEMAPHORES kernel option) by default. + A deadlock in the &man.sched.ule.4; scheduler has been + fixed. For more details, see EN-10:02.sched_ule. + &os; now supports shared memory segments for System V IPC which is larger than 2GB on 64-bit platforms. For more details, see /usr/src/UPDATING file. The &man.sglist.9; API to manage scatter/gather lists of - phyiscal addresses has been added. + physical addresses has been added. &os; ABI of some of the structures used by the System V IPC API has been changed internally. For new kernel modules, @@ -211,19 +293,19 @@ shims. The old functions remain as the old names to provide backward compatibility for older kernel modules. - The &os; virtual memory - subsystem now supports fully transparent use of - superpages for application memory; - application memory pages are dynamically promoted to or - demoted from superpages without any modification to - application code. This change offers the benefit of large - page sizes such as improved virtual memory efficiency and - reduced TLB (translation lookaside buffer) misses without - downsides like application changes and virtual memory - inflexibility. This can be enabled by setting a loader tunable - vm.pmap.pg_ps_enabled to - 1 and is enabled by default on - &arch.amd64;. + The superpages in + the &os; virtual memory subsystem is now enabled by + default. + + A new sysctl variable + security.bsd.map_at_zero has been added and + set to 1 (allow) by default. This controls + whether &os; allows to map an object at the address + 0, which is part of the user-controlled + portion of the virtual address space. Disabling this has some + effect on preventing an attack which injects malicious code + into that location and triggers a NULL pointer dereference in + the kernel. Boot Loader Changes @@ -246,6 +328,10 @@ A bug in the boot loader has been fixed. It failed to recognize GPT correctly when the system supports both of MBR and GPT and they are synchronized with each other. + + The boot2 program + has been replaced with the latest version for + &arch.i386;. @@ -266,6 +352,29 @@ The &man.cpufreq.4; driver now supports Phenom (Family 10h). + CPU cache flushing has been optimized + when changing caching attributes of pages by doing nothing + for CPUs that support self-snooping and using + CLFLUSH instead of a full cache + invalidate when possible. &os; does not use + CLFLUSH on Intel CPUs due to problems + with flushing the local APIC range by default. This can be + controlled via the hw.clflush_disable + loader tunable. A setting of 1 disables + the use of CLFLUSH. A setting of + 0 allows CLFLUSH to be + used for Intel CPUs when CPUID_SS is not + present. This fixes a kernel panic occurred on Xen which + disables self-snooping. + + The epic(4) driver for the front panel + LEDs in Sun Fire V215/V245 has been added. + + The fire(4) driver for + Fire JBus to PCIe bridges found in at least + the Sun Fire V215/V245 and Sun Ultra 25/45 machines has been + added. + The &man.hwpmc.4; driver for Hardware Performance Monitoring Counter support has been added. This consists of the kernel driver, &man.pmc.3; interface @@ -291,11 +400,6 @@ been added. This reports all of the supported page sizes on the system. - The &man.pci.4; subsystem now supports proxying of PCI - Express MSI/MSI-X (Message Signaled Interrupt) requests and - bus interrupt requests for child devices. This allows child - devices to use MSI/MSI-X interrupts. - PCI Express memory-mapped configuration space access, ACPI MCFG table support, and BAR (Base Address Register) handling in the &man.pci.4; subsystem has been improved. @@ -313,19 +417,35 @@ DRM now supports Radeon HD 4200 (RS880), 4770 (RV740), and R6/7xx 3D, and Intel G41 chips. + + The vgapci(4) driver for PCI VGA display devices + which can attach devices as the children now supports + proxying of PCI MSI/MSI-X (Message Signaled Interrupt) + requests and bus interrupt requests for the child devices. + This allows child devices to use MSI/MSI-X interrupts. Network Interface Support The &man.alc.4; driver for Atheros AR8131/AR8132 PCIe - ethernet controller has been added. + Ethernet controller has been added. + + A bug in the &man.bce.4; driver has been fixed. When + adding a &man.bce.4; interface on the system as a + &man.lagg.4; member with the LACP aggregation protocol + enabled network communication via the &man.bce.4; + interface stopped completely. Although the &man.bce.4; + interface worked if it was not a &man.lagg.4; member, the + incoming traffic statistics which can be found in + &man.netstat.1; output was incorrect because every packet + was recognized as full-sized one. Several bugs in the &man.bge.4; driver have been fixed. It caused a panic when a lot of traffic is being handled on the interface while the system is shutting down, and had a DMA issue when buffer address crosses a - multple of the 4GB boundaries. + multiple of the 4GB boundaries. The &man.bge.4; driver now supports TSO (TCP segmentation offloading) for BCM5755 or newer @@ -337,7 +457,7 @@ devices. The &man.cxgb.4; driver has been upgraded to the - latest version. The firmware version is 7.1.0. + latest version. The firmware version is 7.8.0. The &man.et.4; driver now supports IPv4/TCP/UDP Tx checksum offloading. @@ -346,7 +466,8 @@ multicast filter re-programming is now more robust. A bug which caused incorrect IP packet length in the header when TSO (TCP segmentation offloading) is enabled has been - fixed. + fixed. This fixes poor performance when TSO is enabled in + the previous releases. The &man.msk.4; driver has been improved for robust operation. Also, it now supports Yukon FE+ A0 including @@ -354,8 +475,9 @@ 88E8070. Several bugs in the &man.mxge.4; driver have been - fixed. It could lost the promiscuous flag on resetting - and a kernel panic on the hardware fault. + fixed and the firmware version is now 1.4.48b. It could + lost the promiscuous flag on resetting and a kernel panic + on the hardware fault. A bug in the &man.nfe.4; driver has been fixed. It caused buffer allocation failure for jumbo frames. @@ -376,6 +498,17 @@ default is 1. For more details, see &man.nge.4; manual page. + The &man.ste.4; driver has been improved and now works + on all supported platforms. It now supports + suspend/resume and WoL (Wake-on-Lan). Hardware MAC + statistics can be obtained via a new sysctl variable + dev.ste.N.stats. + Another new sysctl variables + dev.ste.N.int_rx_mod + has been added to control RX interrupt moderation time. + The default value is 150 (150us). For + more details, see &man.ste.4; manual page. + The &man.vge.4; driver has been improved. It now supports hardware checksum offloading for &man.vlan.4; tagged frames and WoL (Wake-on-Lan). Hardware MAC @@ -431,6 +564,9 @@ convenient shortcut ported from NetBSD to obtain network interface name using file descriptor for character device. + + The &man.vlan.4; driver is now enabled in the + GENERIC kernel. @@ -447,7 +583,7 @@ . A bug in the &man.ata.4; driver has been fixed. It - could generate an I/O request larger than contoller's + could generate an I/O request larger than controller's maximum I/O size and caused a kernel panic. An algorithm for load balancing mode @@ -462,6 +598,9 @@ It could not handle a GPT header whose size is greater than 92 bytes which is written by OpenSolaris. + The default stripe size of &man.gstripe.8; GEOM class + has been changed from 4KB to 64KB. + The &man.hptrr.4; driver now supports a new loader tunable hw.hptrr.attach_generic to prevent the driver from being attached to some Marvell chips @@ -512,7 +651,7 @@ for caching or the ZFS Intent Log, and partial &man.chflags.2; support. It also includes some &os;-specific additions, such as booting from ZFS file systems, removal of ARC - size limitations, ARC backpressure (which allows ZFS to work + size limitations, ARC back pressure (which allows ZFS to work without tunables on &arch.amd64;), and many bugfixes. @@ -520,6 +659,10 @@ Userland Changes + The &man.acpidump.8; utility now supports parsing SRAT + (System Resource Affinity Table used to describe affinity + relationships between CPUs and memory. + The &man.apropos.1; command no longer sets the necessary directories to PATH variable. This means if the caller does not have * for automatic calculation in the p command. + The &man.fetch.1; command now supports HTTP digest + authentication. + + The &man.fetch.1; command now supports + NO_PROXY and no_proxy + environment variables to disable use of HTTP proxy. For more + details, see &man.fetch.3; manual page. + A bug in the &man.fetch.1; command that FTP_TIMEOUT and HTTP_TIMEOUT environment variables were @@ -621,6 +772,11 @@ named kernel feature is present by checking the kern.features sysctl MIB. + &os; libc library now includes + &man.getpagesize.3; function that returns either the number of + page sizes supported by the system or a specified subset of + the supported page sizes. + The &man.libradius.3; now supports simple embedded RADIUS server. @@ -640,6 +796,11 @@ option when it invokes &man.mtree.8; command to follow symbolic links. + The &man.mergemaster.8; utility now supports + DELETE_STALE_RC_FILES variable in + mergemaster.rc file to delete stale rc.d + scripts automatically. + A userland utility &man.mfiutil.8; for the &man.mfi.4; devices has been added. This includes basic features to monitor controller, array, and drive status, @@ -712,18 +873,31 @@ an error. ENOENT errors are not reported. This behavior is consistent with the GNU version. + The &man.tftp.1; command now returns a correct exit status + in the case of successful file transfer. + + The &man.traceroute.8; program now uses in-kernel source + address selection even in a &man.jail.8; environment. + The &man.traceroute.8; and &man.traceroute6.8; now support an flag to display AS number corresponding to the lookup IP address on each hop. It will query the number to WHOIS server specified in option. If no is specified, - whois.radb.net will be used as the default - value. + whois.radb.net will be used as the default value. The &man.tzsetup.8; command now supports an option to skip the initial question about adjusting the clock if not set to UTC. + The &man.whois.1; utility has been updated. A + option has been removed because + whois.nic.mil no longer exists, and it + supports searching for IPv6 addresses just like it can do for + IPv4 addresses without having to explicitly specify that the + ARIN server should be used to get the initial + information. + The &man.yp.8; utilities now support shadow.byname and shadow.byuid maps. These requires @@ -740,6 +914,16 @@ for interfaces created via cloned_interfaces + The &man.rc.conf.5; file now supports + vlans_IF for + creating &man.vlan.4; interfaces. If a vlan interface is a + number, then that number is treated as the vlan tag for the + interface and the interface will be named + IF.N. + Otherwise, the vlan tag must be provided via a + parameter in a create_args_IF + variable. + The rc.d/fsck script now supports options for fsck_y_enable via fsck_y_flags. @@ -787,13 +971,13 @@ static_arp_gw="192.168.1.1 00:01:02:03:0 Contributed Software ISC BIND has been updated to - version 9.4.3-P4. + version 9.4-ESV. sendmail has been updated from version 8.14.3 to version 8.14.4. The timezone database has been updated - to the tzdata2009u release. + to the tzdata2010b release. The timezone binary has been updated to the tzcode2009k release. @@ -815,12 +999,16 @@ static_arp_gw="192.168.1.1 00:01:02:03:0 &os; release ISO images now have FreeBSD- at the beginning of the filenames. - - - - Documentation - + The supported version of the + GNOME desktop environment + (x11/gnome2) has been + updated to 2.28.2. + + The supported version of the + KDE desktop environment (x11/kde4) has been updated to + 4.3.5. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 18:35:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF3A1065670; Fri, 19 Mar 2010 18:35:24 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210348FC0A; Fri, 19 Mar 2010 18:35:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JIZOmm031437; Fri, 19 Mar 2010 18:35:24 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JIZOMV031436; Fri, 19 Mar 2010 18:35:24 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003191835.o2JIZOMV031436@svn.freebsd.org> From: Hiroki Sato Date: Fri, 19 Mar 2010 18:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205343 - in releng/7.3/release/doc: de_DE.ISO8859-1 fr_FR.ISO8859-1 ja_JP.eucJP ru_RU.KOI8-R X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 18:35:24 -0000 Author: hrs Date: Fri Mar 19 18:35:23 2010 New Revision: 205343 URL: http://svn.freebsd.org/changeset/base/205343 Log: Remove obsolete translations. Approved by: re (implicitly) Deleted: releng/7.3/release/doc/de_DE.ISO8859-1/ releng/7.3/release/doc/fr_FR.ISO8859-1/ releng/7.3/release/doc/ja_JP.eucJP/ releng/7.3/release/doc/ru_RU.KOI8-R/ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 18:43:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DF21106566C; Fri, 19 Mar 2010 18:43:16 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2F88FC16; Fri, 19 Mar 2010 18:43:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JIhFLQ033159; Fri, 19 Mar 2010 18:43:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JIhF3j033155; Fri, 19 Mar 2010 18:43:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003191843.o2JIhF3j033155@svn.freebsd.org> From: Hiroki Sato Date: Fri, 19 Mar 2010 18:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205344 - in releng/7.3/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 18:43:16 -0000 Author: hrs Date: Fri Mar 19 18:43:15 2010 New Revision: 205344 URL: http://svn.freebsd.org/changeset/base/205344 Log: Bump copyright year and trim old entries. Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/errata/article.sgml releng/7.3/release/doc/en_US.ISO8859-1/hardware/article.sgml releng/7.3/release/doc/share/sgml/release.ent Modified: releng/7.3/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/errata/article.sgml Fri Mar 19 18:35:23 2010 (r205343) +++ releng/7.3/release/doc/en_US.ISO8859-1/errata/article.sgml Fri Mar 19 18:43:15 2010 (r205344) @@ -16,7 +16,7 @@ %release; - + ]>
    @@ -40,8 +40,7 @@ $FreeBSD$ - 2008 - 2009 + 2010 The &os; Documentation Project @@ -120,13 +119,12 @@ For a list of all &os; CERT security advisories, see or . - Security Advisories - No advisories. + No advisory. - + - - - - + - + From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 19:25:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3740106566B; Fri, 19 Mar 2010 19:25:46 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id A89CA8FC15; Fri, 19 Mar 2010 19:25:46 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.71) (envelope-from ) id 1NshpG-0005mN-Ee; Fri, 19 Mar 2010 22:25:42 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 05BC1B860; Fri, 19 Mar 2010 22:25:42 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 0006EB829; Fri, 19 Mar 2010 22:25:41 +0300 (MSK) Date: Fri, 19 Mar 2010 22:25:41 +0300 From: Dmitry Marakasov To: Steve Kargl Message-ID: <20100319192541.GH48794@hades.panopticon> References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <4BA2D0DF.3070606@feral.com> <20100319013623.GA62539@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20100319013623.GA62539@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, Xin LI , svn-src-all@freebsd.org, src-committers@freebsd.org, Matthew Jacob Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 19:25:47 -0000 * Steve Kargl (sgk@troutmask.apl.washington.edu) wrote: > Can you explain? AFAIK, SSE including floating point > instructions. Floating point operations aren't allowed > in the kernel. Afaik, there are also effecient memory copy/move/fill instructions, that do not require floating point context. For example, movnti is used in sse2_pagezero(). -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 19:51:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32DA41065670; Fri, 19 Mar 2010 19:51:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 207288FC12; Fri, 19 Mar 2010 19:51:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JJp4st048155; Fri, 19 Mar 2010 19:51:04 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JJp3EQ048150; Fri, 19 Mar 2010 19:51:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201003191951.o2JJp3EQ048150@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 19 Mar 2010 19:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205345 - in head/sys: kern net sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 19:51:04 -0000 Author: bz Date: Fri Mar 19 19:51:03 2010 New Revision: 205345 URL: http://svn.freebsd.org/changeset/base/205345 Log: Split eventhandler_register() into an internal part and a wrapper function that provides the allocated and setup eventhandler entry. Add a new wrapper for VIMAGE that allocates extra space to hold the callback function and argument in addition to an extra wrapper function. While the wrapper function goes as normal callback function the argument points to the extra space allocated holding the original func and arg that the wrapper function can then call. Provide an iterator function for the virtual network stack (vnet) that will call the callback function for each network stack. Provide a new set of macros for VNET that in the non-VIMAGE case will just call eventhandler_register() while in the VIMAGE case it will use vimage_eventhandler_register() passing in the extra iterator function but will only register once rather than per-vnet. We need a special macro in case we are interested in the tag returned as we must check for curvnet and can neither simply assign the return value, nor not change it in the non-vnet0 case without that. Sponsored by: ISPsystem Discussed with: jhb Reviewed by: zec (earlier version), jhb MFC after: 1 month Modified: head/sys/kern/subr_eventhandler.c head/sys/net/vnet.c head/sys/net/vnet.h head/sys/sys/eventhandler.h Modified: head/sys/kern/subr_eventhandler.c ============================================================================== --- head/sys/kern/subr_eventhandler.c Fri Mar 19 18:43:15 2010 (r205344) +++ head/sys/kern/subr_eventhandler.c Fri Mar 19 19:51:03 2010 (r205345) @@ -68,15 +68,15 @@ SYSINIT(eventhandlers, SI_SUB_EVENTHANDL * Insertion is O(n) due to the priority scan, but optimises to O(1) * if all priorities are identical. */ -eventhandler_tag -eventhandler_register(struct eventhandler_list *list, const char *name, - void *func, void *arg, int priority) +static eventhandler_tag +eventhandler_register_internal(struct eventhandler_list *list, + const char *name, eventhandler_tag epn) { struct eventhandler_list *new_list; - struct eventhandler_entry_generic *eg; struct eventhandler_entry *ep; KASSERT(eventhandler_lists_initted, ("eventhandler registered too early")); + KASSERT(epn != NULL, ("%s: cannot register NULL event", __func__)); /* lock the eventhandler lists */ mtx_lock(&eventhandler_mutex); @@ -117,31 +117,68 @@ eventhandler_register(struct eventhandle } mtx_unlock(&eventhandler_mutex); - /* allocate an entry for this handler, populate it */ - eg = malloc(sizeof(struct eventhandler_entry_generic), M_EVENTHANDLER, - M_WAITOK | M_ZERO); - eg->func = func; - eg->ee.ee_arg = arg; - eg->ee.ee_priority = priority; - KASSERT(priority != EHE_DEAD_PRIORITY, + KASSERT(epn->ee_priority != EHE_DEAD_PRIORITY, ("%s: handler for %s registered with dead priority", __func__, name)); /* sort it into the list */ - CTR4(KTR_EVH, "%s: adding item %p (function %p) to \"%s\"", __func__, eg, - func, name); + CTR4(KTR_EVH, "%s: adding item %p (function %p) to \"%s\"", __func__, epn, + ((struct eventhandler_entry_generic *)epn)->func, name); EHL_LOCK(list); TAILQ_FOREACH(ep, &list->el_entries, ee_link) { if (ep->ee_priority != EHE_DEAD_PRIORITY && - eg->ee.ee_priority < ep->ee_priority) { - TAILQ_INSERT_BEFORE(ep, &eg->ee, ee_link); + epn->ee_priority < ep->ee_priority) { + TAILQ_INSERT_BEFORE(ep, epn, ee_link); break; } } if (ep == NULL) - TAILQ_INSERT_TAIL(&list->el_entries, &eg->ee, ee_link); + TAILQ_INSERT_TAIL(&list->el_entries, epn, ee_link); EHL_UNLOCK(list); - return(&eg->ee); + return(epn); +} + +eventhandler_tag +eventhandler_register(struct eventhandler_list *list, const char *name, + void *func, void *arg, int priority) +{ + struct eventhandler_entry_generic *eg; + + /* allocate an entry for this handler, populate it */ + eg = malloc(sizeof(struct eventhandler_entry_generic), M_EVENTHANDLER, + M_WAITOK | M_ZERO); + eg->func = func; + eg->ee.ee_arg = arg; + eg->ee.ee_priority = priority; + + return (eventhandler_register_internal(list, name, &eg->ee)); +} + +#ifdef VIMAGE +struct eventhandler_entry_generic_vimage +{ + struct eventhandler_entry ee; + vimage_iterator_func_t func; /* Vimage iterator function. */ + struct eventhandler_entry_vimage v_ee; /* Original func, arg. */ +}; + +eventhandler_tag +vimage_eventhandler_register(struct eventhandler_list *list, const char *name, + void *func, void *arg, int priority, vimage_iterator_func_t iterfunc) +{ + struct eventhandler_entry_generic_vimage *eg; + + /* allocate an entry for this handler, populate it */ + eg = malloc(sizeof(struct eventhandler_entry_generic_vimage), + M_EVENTHANDLER, M_WAITOK | M_ZERO); + eg->func = iterfunc; + eg->v_ee.func = func; + eg->v_ee.ee_arg = arg; + eg->ee.ee_arg = &eg->v_ee; + eg->ee.ee_priority = priority; + + return (eventhandler_register_internal(list, name, &eg->ee)); } +#endif void eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag) Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Fri Mar 19 18:43:15 2010 (r205344) +++ head/sys/net/vnet.c Fri Mar 19 19:51:03 2010 (r205345) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -55,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifdef DDB #include #include @@ -637,6 +640,39 @@ vnet_sysuninit(void) VNET_SYSINIT_RUNLOCK(); } +/* + * EVENTHANDLER(9) extensions. + */ +/* + * Invoke the eventhandler function originally registered with the possibly + * registered argument for all virtual network stack instances. + * + * This iterator can only be used for eventhandlers that do not take any + * additional arguments, as we do ignore the variadic arguments from the + * EVENTHANDLER_INVOKE() call. + */ +void +vnet_global_eventhandler_iterator_func(void *arg, ...) +{ + VNET_ITERATOR_DECL(vnet_iter); + struct eventhandler_entry_vimage *v_ee; + + /* + * There is a bug here in that we should actually cast things to + * (struct eventhandler_entry_ ## name *) but that's not easily + * possible in here so just re-using the variadic version we + * defined for the generic vimage case. + */ + v_ee = arg; + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + ((vimage_iterator_func_t)v_ee->func)(v_ee->ee_arg); + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK(); +} + #ifdef VNET_DEBUG struct vnet_recursion { SLIST_ENTRY(vnet_recursion) vnr_le; @@ -696,6 +732,9 @@ vnet_log_recursion(struct vnet *old_vnet } #endif /* VNET_DEBUG */ +/* + * DDB(4). + */ #ifdef DDB DB_SHOW_COMMAND(vnets, db_show_vnets) { Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Fri Mar 19 18:43:15 2010 (r205344) +++ head/sys/net/vnet.h Fri Mar 19 19:51:03 2010 (r205345) @@ -313,6 +313,29 @@ void vnet_register_sysuninit(void *arg); void vnet_deregister_sysinit(void *arg); void vnet_deregister_sysuninit(void *arg); +/* + * EVENTHANDLER(9) extensions. + */ +#include + +void vnet_global_eventhandler_iterator_func(void *, ...); +#define VNET_GLOBAL_EVENTHANDLER_REGISTER_TAG(tag, name, func, arg, priority) \ +do { \ + if (IS_DEFAULT_VNET(curvnet)) { \ + (tag) = vimage_eventhandler_register(NULL, #name, func, \ + arg, priority, \ + vnet_global_eventhandler_iterator_func); \ + } \ +} while(0) +#define VNET_GLOBAL_EVENTHANDLER_REGISTER(name, func, arg, priority) \ +do { \ + if (IS_DEFAULT_VNET(curvnet)) { \ + vimage_eventhandler_register(NULL, #name, func, \ + arg, priority, \ + vnet_global_eventhandler_iterator_func); \ + } \ +} while(0) + #else /* !VIMAGE */ /* @@ -384,6 +407,13 @@ void vnet_deregister_sysuninit(void *arg #define VNET_SYSUNINIT(ident, subsystem, order, func, arg) \ SYSUNINIT(ident, subsystem, order, func, arg) +/* + * Without VIMAGE revert to the default implementation. + */ +#define VNET_GLOBAL_EVENTHANDLER_REGISTER_TAG(tag, name, func, arg, priority) \ + (tag) = eventhandler_register(NULL, #name, func, arg, priority) +#define VNET_GLOBAL_EVENTHANDLER_REGISTER(name, func, arg, priority) \ + eventhandler_register(NULL, #name, func, arg, priority) #endif /* VIMAGE */ #endif /* _KERNEL */ Modified: head/sys/sys/eventhandler.h ============================================================================== --- head/sys/sys/eventhandler.h Fri Mar 19 18:43:15 2010 (r205344) +++ head/sys/sys/eventhandler.h Fri Mar 19 19:51:03 2010 (r205345) @@ -41,6 +41,14 @@ struct eventhandler_entry { void *ee_arg; }; +#ifdef VIMAGE +struct eventhandler_entry_vimage { + void (* func)(void); /* Original function registered. */ + void *ee_arg; /* Original argument registered. */ + void *sparep[2]; +}; +#endif + struct eventhandler_list { char *el_name; int el_flags; @@ -142,6 +150,14 @@ void eventhandler_deregister(struct even struct eventhandler_list *eventhandler_find_list(const char *name); void eventhandler_prune_list(struct eventhandler_list *list); +#ifdef VIMAGE +typedef void (*vimage_iterator_func_t)(void *, ...); + +eventhandler_tag vimage_eventhandler_register(struct eventhandler_list *list, + const char *name, void *func, void *arg, int priority, + vimage_iterator_func_t); +#endif + /* * Standard system event queues. */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 20:14:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24431065670; Fri, 19 Mar 2010 20:14:27 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75D1C8FC1B; Fri, 19 Mar 2010 20:14:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JKERLS053296; Fri, 19 Mar 2010 20:14:27 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JKERHx053294; Fri, 19 Mar 2010 20:14:27 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201003192014.o2JKERHx053294@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 19 Mar 2010 20:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205346 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 20:14:27 -0000 Author: pjd Date: Fri Mar 19 20:14:27 2010 New Revision: 205346 URL: http://svn.freebsd.org/changeset/base/205346 Log: The same code is used to import and to create pool. The order of operations is the following: 1. Try to open vdev by remembered path and guid. 2. If 1 failed, try to find vdev which guid matches and ignore the path. 3. If 2 failed this means either that the vdev we're looking for is gone or that pool is being created and vdev doesn't contain proper guid yet. To be able to handle pool creation we open vdev by path anyway. Because of 3 it is possible that we open wrong vdev on import which can lead to confusions. The solution for this is to check spa_load_state. On pool creation it will be equal to SPA_LOAD_NONE and we can open vdev only by path immediately and if it is not equal to SPA_LOAD_NONE we first open by path+guid and when that fails, we open by guid. We no longer open wrong vdev on import. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 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 Fri Mar 19 19:51:03 2010 (r205345) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Mar 19 20:14:27 2010 (r205346) @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -505,17 +506,26 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi if ((owned = mtx_owned(&Giant))) mtx_unlock(&Giant); error = 0; - cp = vdev_geom_open_by_path(vd, 1); - if (cp == NULL) { - /* - * The device at vd->vdev_path doesn't have the expected guid. - * The disks might have merely moved around so try all other - * geom providers to find one with the right guid. - */ - cp = vdev_geom_open_by_guid(vd); - } - if (cp == NULL) + + /* + * If we're creating pool, just find GEOM provider by its name + * and ignore GUID mismatches. + */ + if (vd->vdev_spa->spa_load_state == SPA_LOAD_NONE) cp = vdev_geom_open_by_path(vd, 0); + else { + cp = vdev_geom_open_by_path(vd, 1); + if (cp == NULL) { + /* + * The device at vd->vdev_path doesn't have the + * expected guid. The disks might have merely + * moved around so try all other GEOM providers + * to find one with the right guid. + */ + cp = vdev_geom_open_by_guid(vd); + } + } + if (cp == NULL) { ZFS_LOG(1, "Provider %s not found.", vd->vdev_path); error = ENOENT; From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 20:32:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88A881065675 for ; Fri, 19 Mar 2010 20:32:20 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from hosting.nash.net.ua (hosting.nash.net.ua [193.151.252.10]) by mx1.freebsd.org (Postfix) with SMTP id BA3588FC1E for ; Fri, 19 Mar 2010 20:32:19 +0000 (UTC) Received: (qmail 31948 invoked by uid 509); 19 Mar 2010 04:32:17 -0000 Received: from ravenloft.kiev.ua (94.244.131.95) by hosting.nash.net.ua with SMTP; 19 Mar 2010 04:32:17 -0000 Date: Fri, 19 Mar 2010 06:31:16 +0200 From: Alex Kozlov To: Jeremy Messenger , Xin LI , svn-src-all@freebsd.org Message-ID: <20100319043116.GA27028@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 20:32:20 -0000 On Thu, Mar 18, 2010 at 08:13:46PM -0600, Jeremy Messenger wrote: > On Thu, 18 Mar 2010 19:16:53 -0600, Xin LI wrote: > > > Author: delphij > > Date: Fri Mar 19 01:16:53 2010 > > New Revision: 205307 > > URL: http://svn.freebsd.org/changeset/base/205307 > > > > Log: > > SSE is enabled by default about 5 years ago so there is no point > > pretending > > that we support I486 and I586 CPUs in the GENERIC kernel, users wants > > these > > support would have to build a custom kernel to explicitly disable SSE > > anyways. > > MFC after: 1 month > > Geode is i586, right? Or not matter, it still can be using i686? Soekris, > a few small motherboards and other thin clients are still using Geode. All magic happens in initializecpu(sys/i386/i386/initcpu.c) If geode reports himself as i586 then sse won't be enabled. Although some bioses allow it at startup. As a side note, I'm realy not sure that contemporary kernel can boot on IBM Blue Lightning or Cyrix 486SLC or even Cyrix 5x86, can anyone test it? -- Adios From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 21:15:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57F251065672; Fri, 19 Mar 2010 21:15:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2FA8FC24; Fri, 19 Mar 2010 21:15:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JLFiLo066836; Fri, 19 Mar 2010 21:15:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JLFirf066834; Fri, 19 Mar 2010 21:15:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201003192115.o2JLFirf066834@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 19 Mar 2010 21:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205347 - head/sys/compat/x86bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 21:15:44 -0000 Author: jkim Date: Fri Mar 19 21:15:43 2010 New Revision: 205347 URL: http://svn.freebsd.org/changeset/base/205347 Log: - Map EBDA if available and add 64KB above 1MB (high memory), just in case. - Print the initial memory map when bootverbose is set. - Change the page fault address format from linear to %cs:%ip style. - Move duplicate code into a newly added function. - Add strictly aligned memory access for distant future. ;-) Modified: head/sys/compat/x86bios/x86bios.c Modified: head/sys/compat/x86bios/x86bios.c ============================================================================== --- head/sys/compat/x86bios/x86bios.c Fri Mar 19 20:14:27 2010 (r205346) +++ head/sys/compat/x86bios/x86bios.c Fri Mar 19 21:15:43 2010 (r205347) @@ -56,18 +56,20 @@ __FBSDID("$FreeBSD$"); #define X86BIOS_IVT_SIZE 0x00000500 /* 1K + 256 (BDA) */ #define X86BIOS_SEG_SIZE 0x00010000 /* 64K */ -#define X86BIOS_MEM_SIZE 0x00100000 /* 1M */ +#define X86BIOS_MEM_SIZE (0x00100000 + X86BIOS_SEG_SIZE) + /* 1M + 64K (high memory) */ #define X86BIOS_IVT_BASE 0x00000000 #define X86BIOS_RAM_BASE 0x00001000 -#define X86BIOS_ROM_BASE 0x000a0000 /* XXX EBDA? */ +#define X86BIOS_ROM_BASE 0x000a0000 -#define X86BIOS_ROM_SIZE (X86BIOS_MEM_SIZE - X86BIOS_ROM_BASE) +#define X86BIOS_ROM_SIZE (X86BIOS_MEM_SIZE - (uint32_t)x86bios_rom_phys) #define X86BIOS_PAGES (X86BIOS_MEM_SIZE / X86BIOS_PAGE_SIZE) #define X86BIOS_R_DS _pad1 #define X86BIOS_R_SS _pad2 +#define X86BIOS_R_SP _pad3.I16_reg.x_reg static struct x86emu x86bios_emu; @@ -79,11 +81,13 @@ static void *x86bios_seg; static vm_offset_t *x86bios_map; +static vm_paddr_t x86bios_rom_phys; static vm_paddr_t x86bios_seg_phys; static int x86bios_fault; static uint32_t x86bios_fault_addr; -static uint32_t x86bios_fault_inst; +static uint16_t x86bios_fault_cs; +static uint16_t x86bios_fault_ip; SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging"); static int x86bios_trace_call; @@ -101,7 +105,9 @@ x86bios_set_fault(struct x86emu *emu, ui x86bios_fault = 1; x86bios_fault_addr = addr; - x86bios_fault_inst = (emu->x86.R_CS << 4) + emu->x86.R_IP; + x86bios_fault_cs = emu->x86.R_CS; + x86bios_fault_ip = emu->x86.R_IP; + x86emu_halt_sys(emu); } static void * @@ -136,10 +142,8 @@ x86bios_emu_rdb(struct x86emu *emu, uint uint8_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) { + if (va == NULL) x86bios_set_fault(emu, addr); - x86emu_halt_sys(emu); - } return (*va); } @@ -150,11 +154,14 @@ x86bios_emu_rdw(struct x86emu *emu, uint uint16_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) { + if (va == NULL) x86bios_set_fault(emu, addr); - x86emu_halt_sys(emu); - } +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 1) != 0) + return (le16dec(va)); + else +#endif return (le16toh(*va)); } @@ -164,11 +171,14 @@ x86bios_emu_rdl(struct x86emu *emu, uint uint32_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) { + if (va == NULL) x86bios_set_fault(emu, addr); - x86emu_halt_sys(emu); - } +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 3) != 0) + return (le32dec(va)); + else +#endif return (le32toh(*va)); } @@ -178,10 +188,8 @@ x86bios_emu_wrb(struct x86emu *emu, uint uint8_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) { + if (va == NULL) x86bios_set_fault(emu, addr); - x86emu_halt_sys(emu); - } *va = val; } @@ -192,11 +200,14 @@ x86bios_emu_wrw(struct x86emu *emu, uint uint16_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) { + if (va == NULL) x86bios_set_fault(emu, addr); - x86emu_halt_sys(emu); - } +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 1) != 0) + le16enc(va, val); + else +#endif *va = htole16(val); } @@ -206,11 +217,14 @@ x86bios_emu_wrl(struct x86emu *emu, uint uint32_t *va; va = x86bios_get_pages(addr, sizeof(*va)); - if (va == NULL) { + if (va == NULL) x86bios_set_fault(emu, addr); - x86emu_halt_sys(emu); - } +#ifndef __NO_STRICT_ALIGNMENT + if ((addr & 3) != 0) + le32enc(va, val); + else +#endif *va = htole32(val); } @@ -306,7 +320,7 @@ x86bios_alloc(uint32_t *offset, size_t s return (NULL); vaddr = contigmalloc(size, M_DEVBUF, M_NOWAIT, X86BIOS_RAM_BASE, - X86BIOS_ROM_BASE, X86BIOS_PAGE_SIZE, 0); + x86bios_rom_phys, X86BIOS_PAGE_SIZE, 0); if (vaddr != NULL) { *offset = vtophys(vaddr); x86bios_set_pages((vm_offset_t)vaddr, *offset, size); @@ -324,7 +338,7 @@ x86bios_free(void *addr, size_t size) return; paddr = vtophys(addr); - if (paddr < X86BIOS_RAM_BASE || paddr >= X86BIOS_ROM_BASE || + if (paddr < X86BIOS_RAM_BASE || paddr >= x86bios_rom_phys || paddr % X86BIOS_PAGE_SIZE != 0) return; @@ -338,7 +352,9 @@ x86bios_init_regs(struct x86regs *regs) { bzero(regs, sizeof(*regs)); - regs->X86BIOS_R_DS = regs->X86BIOS_R_SS = x86bios_seg_phys >> 4; + regs->X86BIOS_R_DS = 0x40; + regs->X86BIOS_R_SS = x86bios_seg_phys >> 4; + regs->X86BIOS_R_SP = 0xfffe; } void @@ -367,8 +383,9 @@ x86bios_call(struct x86regs *regs, uint1 (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX, regs->R_DX, regs->R_ES, regs->R_DI); if (x86bios_fault) - printf("Page fault at 0x%05x from 0x%05x.\n", - x86bios_fault_addr, x86bios_fault_inst); + printf("Page fault at 0x%05x from 0x%04x:0x%04x.\n", + x86bios_fault_addr, x86bios_fault_cs, + x86bios_fault_ip); } } @@ -411,8 +428,9 @@ x86bios_intr(struct x86regs *regs, int i intno, regs->R_AX, regs->R_BX, regs->R_CX, regs->R_DX, regs->R_ES, regs->R_DI); if (x86bios_fault) - printf("Page fault at 0x%05x from 0x%05x.\n", - x86bios_fault_addr, x86bios_fault_inst); + printf("Page fault at 0x%05x from 0x%04x:0x%04x.\n", + x86bios_fault_addr, x86bios_fault_cs, + x86bios_fault_ip); } } @@ -468,6 +486,12 @@ x86bios_match_device(uint32_t offset, de return (1); } +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#define PROBE_EBDA 1 +#else +#define PROBE_EBDA 0 +#endif + static __inline int x86bios_map_mem(void) { @@ -475,18 +499,74 @@ x86bios_map_mem(void) x86bios_ivt = pmap_mapbios(X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE); if (x86bios_ivt == NULL) return (1); - x86bios_rom = pmap_mapdev(X86BIOS_ROM_BASE, X86BIOS_ROM_SIZE); + +#if PROBE_EBDA + /* Probe EBDA via BDA. */ + x86bios_rom_phys = *(uint16_t *)((vm_offset_t)x86bios_ivt + 0x40e); + x86bios_rom_phys = le16toh(x86bios_rom_phys) << 4; + if (x86bios_rom_phys != 0 && x86bios_rom_phys < X86BIOS_ROM_BASE && + X86BIOS_ROM_BASE - x86bios_rom_phys <= 128 * 1024) + x86bios_rom_phys = + rounddown(x86bios_rom_phys, X86BIOS_PAGE_SIZE); + else +#endif + x86bios_rom_phys = X86BIOS_ROM_BASE; + x86bios_rom = pmap_mapdev(x86bios_rom_phys, X86BIOS_ROM_SIZE); if (x86bios_rom == NULL) { pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); return (1); } +#if PROBE_EBDA + /* Change attribute for EBDA. */ + if (x86bios_rom_phys < X86BIOS_ROM_BASE && + pmap_change_attr((vm_offset_t)x86bios_rom, + X86BIOS_ROM_BASE - x86bios_rom_phys, PAT_WRITE_BACK) != 0) { + pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); + pmap_unmapdev((vm_offset_t)x86bios_rom, X86BIOS_ROM_SIZE); + return (1); + } +#endif + /* Change attribute for high memory. */ + if (pmap_change_attr((vm_offset_t)x86bios_rom + X86BIOS_ROM_SIZE - + X86BIOS_SEG_SIZE, X86BIOS_SEG_SIZE, PAT_WRITE_BACK) != 0) { + pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); + pmap_unmapdev((vm_offset_t)x86bios_rom, X86BIOS_ROM_SIZE); + return (1); + } + x86bios_seg = contigmalloc(X86BIOS_SEG_SIZE, M_DEVBUF, M_WAITOK, - X86BIOS_RAM_BASE, X86BIOS_ROM_BASE, X86BIOS_PAGE_SIZE, 0); + X86BIOS_RAM_BASE, x86bios_rom_phys, X86BIOS_PAGE_SIZE, 0); x86bios_seg_phys = vtophys(x86bios_seg); + if (bootverbose) { + printf("x86bios: IVT 0x%06x-0x%06x at %p\n", + X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE + X86BIOS_IVT_BASE - 1, + x86bios_ivt); + printf("x86bios: SSEG 0x%06x-0x%06x at %p\n", + (uint32_t)x86bios_seg_phys, + X86BIOS_SEG_SIZE + (uint32_t)x86bios_seg_phys - 1, + x86bios_seg); +#if PROBE_EBDA + if (x86bios_rom_phys < X86BIOS_ROM_BASE) + printf("x86bios: EBDA 0x%06x-0x%06x at %p\n", + (uint32_t)x86bios_rom_phys, X86BIOS_ROM_BASE - 1, + x86bios_rom); +#endif + printf("x86bios: ROM 0x%06x-0x%06x at %p\n", + X86BIOS_ROM_BASE, X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE - 1, + (void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_BASE - + x86bios_rom_phys)); + printf("x86bios: HIMEM 0x%06x-0x%06x at %p\n", + X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE, X86BIOS_MEM_SIZE - 1, + (void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_SIZE - + X86BIOS_SEG_SIZE)); + } + return (0); } +#undef PROBE_EBDA + static __inline void x86bios_unmap_mem(void) { @@ -510,7 +590,7 @@ x86bios_init(void *arg __unused) M_WAITOK | M_ZERO); x86bios_set_pages((vm_offset_t)x86bios_ivt, X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE); - x86bios_set_pages((vm_offset_t)x86bios_rom, X86BIOS_ROM_BASE, + x86bios_set_pages((vm_offset_t)x86bios_rom, x86bios_rom_phys, X86BIOS_ROM_SIZE); x86bios_set_pages((vm_offset_t)x86bios_seg, x86bios_seg_phys, X86BIOS_SEG_SIZE); From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 21:55:23 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E920A106566B; Fri, 19 Mar 2010 21:55:23 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id A66D48FC1A; Fri, 19 Mar 2010 21:55:23 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o2JLtM1J092306; Fri, 19 Mar 2010 17:55:22 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o2JLtM3G092305; Fri, 19 Mar 2010 17:55:22 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 19 Mar 2010 17:55:22 -0400 From: David Schultz To: Bruce Evans Message-ID: <20100319215522.GA91882@zim.MIT.EDU> Mail-Followup-To: Bruce Evans , John Baldwin , Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201003190116.o2J1Gr2v094129@svn.freebsd.org> <201003190759.56385.jhb@freebsd.org> <20100320002555.I1181@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100320002555.I1181@delplex.bde.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI , John Baldwin Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 21:55:24 -0000 On Sat, Mar 20, 2010, Bruce Evans wrote: > The effect of I486_CPU is especially small. > It is: > - statically disable use of the TSC in the bogus get_cyclecount() API. > Although the TSC is dynamically configured elsewhere, this function > wants to use the TSC without any dynamic tests, so it is uses static > configuration for efficiency. > - avoid compiling in functions to initialize a 486. There is dynamic > code to use these functions as needed, but this optimization saves > a few hundred if not a few thousand bytes. > - panic if the CPU is an i486, since the necessary extra support for > an i486 (just the above 2 features) is not present. > I586_CPU gives a little more. E.g., support for fixing the F00F hardware > bug on some Pentium1's. Again there is dynamic configuration for this > but a few hundred bytes are saved by not compiling it in. Agreed, these options make very little difference right now, but they *could* have a bigger impact. Other operating systems have completely deprecated older CPUs in order to take better advantage of new features than FreeBSD does. For instance, Solaris 10 requries CMPXCHG8B, which is needed to implement correct lock-free queues that are efficient enough to be useful. Supposedly this is a big win under high contention. Windows XP and later also require CMPXCHG8B. The catch, of course, is that if you write a scheduler to take advantage of lock-free queues, expensive emulation (spinlocks) will be required to make it work on hardware without the necessary support. Merely *having* a supported I486_CPU knob makes design choices like these seem unattractive. Another concrete example: We don't properly save/restore the SSE state in setjmp() on i386 because it's cumbersome to do this and without breaking older CPUs. From owner-svn-src-all@FreeBSD.ORG Fri Mar 19 22:39:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB909106566B; Fri, 19 Mar 2010 22:39:27 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8B2F8FC0A; Fri, 19 Mar 2010 22:39:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2JMdRsU085364; Fri, 19 Mar 2010 22:39:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2JMdRQs085360; Fri, 19 Mar 2010 22:39:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201003192239.o2JMdRQs085360@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Mar 2010 22:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205349 - stable/6/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 22:39:28 -0000 Author: attilio Date: Fri Mar 19 22:39:27 2010 New Revision: 205349 URL: http://svn.freebsd.org/changeset/base/205349 Log: MFC 181019, 183474, 191277, and 191626: - Move the code for doing out-of-memory grass from vm_pageout_scan() into the separate function vm_pageout_oom(). Supply a parameter for vm_pageout_oom() describing a reason for the call. - Call vm_pageout_oom() from the swp_pager_meta_build() when swap zone is exhausted. - In both pageout oom handler and vm_daemon, acquire the reference to the vmspace of the examined process instead of directly accessing its vmspace, that may change. Also, as an optimization, check for P_INEXEC flag before examining the process. Sponsored by: Sandvine Incorporated Reviewed by: emaste Modified: stable/6/sys/vm/swap_pager.c stable/6/sys/vm/vm_pageout.c stable/6/sys/vm/vm_pageout.h Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/vm/swap_pager.c ============================================================================== --- stable/6/sys/vm/swap_pager.c Fri Mar 19 21:29:30 2010 (r205348) +++ stable/6/sys/vm/swap_pager.c Fri Mar 19 22:39:27 2010 (r205349) @@ -1680,7 +1680,7 @@ swp_pager_meta_build(vm_object_t object, { struct swblock *swap; struct swblock **pswap; - int idx; + int dummy, idx; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); /* @@ -1720,9 +1720,12 @@ retry: if (swap == NULL) { mtx_unlock(&swhash_mtx); VM_OBJECT_UNLOCK(object); - if (uma_zone_exhausted(swap_zone)) + if (uma_zone_exhausted(swap_zone)) { printf("swap zone exhausted, increase kern.maxswzone\n"); - VM_WAIT; + vm_pageout_oom(VM_OOM_SWAPZ); + tsleep(&dummy, PVM, "swzonex", 10); + } else + VM_WAIT; VM_OBJECT_LOCK(object); goto retry; } Modified: stable/6/sys/vm/vm_pageout.c ============================================================================== --- stable/6/sys/vm/vm_pageout.c Fri Mar 19 21:29:30 2010 (r205348) +++ stable/6/sys/vm/vm_pageout.c Fri Mar 19 22:39:27 2010 (r205349) @@ -711,9 +711,6 @@ vm_pageout_scan(int pass) struct vm_page marker; int page_shortage, maxscan, pcount; int addl_page_shortage, addl_page_shortage_init; - struct proc *p, *bigproc; - struct thread *td; - vm_offset_t size, bigsize; vm_object_t object; int actcount, cache_cur, cache_first_failure; static int cache_last_free; @@ -1246,7 +1243,23 @@ unlock_and_continue: * doing this on the first pass in order to give ourselves a * chance to flush out dirty vnode-backed pages and to allow * active pages to be moved to the inactive queue and reclaimed. - * + */ + if (pass != 0 && + ((swap_pager_avail < 64 && vm_page_count_min()) || + (swap_pager_full && vm_paging_target() > 0))) + vm_pageout_oom(VM_OOM_MEM); +} + + +void +vm_pageout_oom(int shortage) +{ + struct proc *p, *bigproc; + vm_offset_t size, bigsize; + struct thread *td; + struct vmspace *vm; + + /* * We keep the process bigproc locked once we find it to keep anyone * from messing with it; however, there is a possibility of * deadlock if process B is bigproc and one of it's child processes @@ -1254,77 +1267,81 @@ unlock_and_continue: * lock while walking this list. To avoid this, we don't block on * the process lock but just skip a process if it is already locked. */ - if (pass != 0 && - ((swap_pager_avail < 64 && vm_page_count_min()) || - (swap_pager_full && vm_paging_target() > 0))) { - bigproc = NULL; - bigsize = 0; - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - int breakout; + bigproc = NULL; + bigsize = 0; + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + int breakout; - if (PROC_TRYLOCK(p) == 0) - continue; - /* - * If this is a system or protected process, skip it. - */ - if ((p->p_flag & P_SYSTEM) || (p->p_pid == 1) || - (p->p_flag & P_PROTECTED) || - ((p->p_pid < 48) && (swap_pager_avail != 0))) { - PROC_UNLOCK(p); - continue; - } - /* - * If the process is in a non-running type state, - * don't touch it. Check all the threads individually. - */ - mtx_lock_spin(&sched_lock); - breakout = 0; - FOREACH_THREAD_IN_PROC(p, td) { - if (!TD_ON_RUNQ(td) && - !TD_IS_RUNNING(td) && - !TD_IS_SLEEPING(td)) { - breakout = 1; - break; - } - } - if (breakout) { - mtx_unlock_spin(&sched_lock); - PROC_UNLOCK(p); - continue; - } - mtx_unlock_spin(&sched_lock); - /* - * get the process size - */ - if (!vm_map_trylock_read(&p->p_vmspace->vm_map)) { - PROC_UNLOCK(p); - continue; + if (PROC_TRYLOCK(p) == 0) + continue; + /* + * If this is a system or protected process, skip it. + */ + if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || + (p->p_pid == 1) || + ((p->p_pid < 48) && (swap_pager_avail != 0))) { + PROC_UNLOCK(p); + continue; + } + /* + * If the process is in a non-running type state, + * don't touch it. Check all the threads individually. + */ + mtx_lock_spin(&sched_lock); + breakout = 0; + FOREACH_THREAD_IN_PROC(p, td) { + if (!TD_ON_RUNQ(td) && + !TD_IS_RUNNING(td) && + !TD_IS_SLEEPING(td)) { + breakout = 1; + break; } - size = vmspace_swap_count(p->p_vmspace); - vm_map_unlock_read(&p->p_vmspace->vm_map); - size += vmspace_resident_count(p->p_vmspace); - /* - * if the this process is bigger than the biggest one - * remember it. - */ - if (size > bigsize) { - if (bigproc != NULL) - PROC_UNLOCK(bigproc); - bigproc = p; - bigsize = size; - } else - PROC_UNLOCK(p); } - sx_sunlock(&allproc_lock); - if (bigproc != NULL) { - killproc(bigproc, "out of swap space"); - mtx_lock_spin(&sched_lock); - sched_nice(bigproc, PRIO_MIN); + if (breakout) { mtx_unlock_spin(&sched_lock); - PROC_UNLOCK(bigproc); - wakeup(&cnt.v_free_count); + PROC_UNLOCK(p); + continue; + } + mtx_unlock_spin(&sched_lock); + /* + * get the process size + */ + vm = vmspace_acquire_ref(p); + if (vm == NULL) { + PROC_UNLOCK(p); + continue; } + if (!vm_map_trylock_read(&vm->vm_map)) { + vmspace_free(vm); + PROC_UNLOCK(p); + continue; + } + size = vmspace_swap_count(vm); + vm_map_unlock_read(&vm->vm_map); + if (shortage == VM_OOM_MEM) + size += vmspace_resident_count(vm); + vmspace_free(vm); + /* + * if the this process is bigger than the biggest one + * remember it. + */ + if (size > bigsize) { + if (bigproc != NULL) + PROC_UNLOCK(bigproc); + bigproc = p; + bigsize = size; + } else + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + if (bigproc != NULL) { + killproc(bigproc, "out of swap space"); + mtx_lock_spin(&sched_lock); + sched_nice(bigproc, PRIO_MIN); + mtx_unlock_spin(&sched_lock); + PROC_UNLOCK(bigproc); + wakeup(&cnt.v_free_count); } } @@ -1595,6 +1612,7 @@ vm_daemon() struct rlimit rsslim; struct proc *p; struct thread *td; + struct vmspace *vm; int breakout, swapout_flags; while (TRUE) { @@ -1619,7 +1637,7 @@ vm_daemon() * looked at this process, skip it. */ PROC_LOCK(p); - if (p->p_flag & (P_SYSTEM | P_WEXIT)) { + if (p->p_flag & (P_INEXEC | P_SYSTEM | P_WEXIT)) { PROC_UNLOCK(p); continue; } @@ -1656,13 +1674,17 @@ vm_daemon() */ if ((p->p_sflag & PS_INMEM) == 0) limit = 0; /* XXX */ + vm = vmspace_acquire_ref(p); PROC_UNLOCK(p); + if (vm == NULL) + continue; - size = vmspace_resident_count(p->p_vmspace); + size = vmspace_resident_count(vm); if (limit >= 0 && size >= limit) { vm_pageout_map_deactivate_pages( - &p->p_vmspace->vm_map, limit); + &vm->vm_map, limit); } + vmspace_free(vm); } sx_sunlock(&allproc_lock); } Modified: stable/6/sys/vm/vm_pageout.h ============================================================================== --- stable/6/sys/vm/vm_pageout.h Fri Mar 19 21:29:30 2010 (r205348) +++ stable/6/sys/vm/vm_pageout.h Fri Mar 19 22:39:27 2010 (r205349) @@ -83,6 +83,9 @@ extern int vm_pageout_page_count; #define VM_SWAP_NORMAL 1 #define VM_SWAP_IDLE 2 +#define VM_OOM_MEM 1 +#define VM_OOM_SWAPZ 2 + /* * Exported routines. */ @@ -99,5 +102,6 @@ extern void vm_waitpfault(void); #ifdef _KERNEL int vm_pageout_flush(vm_page_t *, int, int); +void vm_pageout_oom(int shortage); #endif #endif /* _VM_VM_PAGEOUT_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 03:39:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8C321065670; Sat, 20 Mar 2010 03:39:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B48F58FC0C; Sat, 20 Mar 2010 03:39:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K3dZlS054260; Sat, 20 Mar 2010 03:39:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K3dZPa054251; Sat, 20 Mar 2010 03:39:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003200339.o2K3dZPa054251@svn.freebsd.org> From: Warner Losh Date: Sat, 20 Mar 2010 03:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205354 - in head/sys: arm/conf arm/s3c2xx0 dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 03:39:36 -0000 Author: imp Date: Sat Mar 20 03:39:35 2010 New Revision: 205354 URL: http://svn.freebsd.org/changeset/base/205354 Log: Add support for the Samsung S3C2xx0 family of ARM SoCs written by Andrew Turner. The kernel supports the LN2410SBC evaluation board, and likely others. These parts (or similar ones) are in some open hardware designs for phones. Submitted by: Andrew Turner Added: head/sys/arm/conf/LN2410SBC (contents, props changed) head/sys/arm/s3c2xx0/ head/sys/arm/s3c2xx0/board_ln2410sbc.c (contents, props changed) head/sys/arm/s3c2xx0/files.s3c2xx0 (contents, props changed) head/sys/arm/s3c2xx0/s3c2410reg.h (contents, props changed) head/sys/arm/s3c2xx0/s3c2410var.h (contents, props changed) head/sys/arm/s3c2xx0/s3c2440reg.h (contents, props changed) head/sys/arm/s3c2xx0/s3c24x0.c (contents, props changed) head/sys/arm/s3c2xx0/s3c24x0_clk.c (contents, props changed) head/sys/arm/s3c2xx0/s3c24x0_machdep.c (contents, props changed) head/sys/arm/s3c2xx0/s3c24x0reg.h (contents, props changed) head/sys/arm/s3c2xx0/s3c24x0var.h (contents, props changed) head/sys/arm/s3c2xx0/s3c2xx0_space.c (contents, props changed) head/sys/arm/s3c2xx0/s3c2xx0board.h (contents, props changed) head/sys/arm/s3c2xx0/s3c2xx0reg.h (contents, props changed) head/sys/arm/s3c2xx0/s3c2xx0var.h (contents, props changed) head/sys/arm/s3c2xx0/std.ln2410sbc (contents, props changed) head/sys/arm/s3c2xx0/std.s3c2410 (contents, props changed) head/sys/arm/s3c2xx0/uart_bus_s3c2410.c (contents, props changed) head/sys/arm/s3c2xx0/uart_cpu_s3c2410.c (contents, props changed) head/sys/arm/s3c2xx0/uart_dev_s3c2410.c (contents, props changed) head/sys/arm/s3c2xx0/uart_dev_s3c2410.h (contents, props changed) head/sys/dev/usb/controller/ohci_s3c24x0.c (contents, props changed) Added: head/sys/arm/conf/LN2410SBC ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/LN2410SBC Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,87 @@ +# LN2410SBC -- Custom kernel configuration for the LN2410SBC +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +machine arm +ident LN2410SBC + +include "../s3c2xx0/std.ln2410sbc" +#To statically compile in device wiring instead of /boot/device.hints +#hints "GENERIC.hints" #Default places to look for devices. +makeoptions MODULES_OVERRIDE="" + +device board_ln2410sbc + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options HZ=100 +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +#options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +#options UFS_DIRHASH #Improve performance on big directories +#options MD_ROOT #MD is a potential root device +#options MD_ROOT_SIZE=4096 # 4MB ram disk +options ROOTDEVNAME=\"ufs:da0s1\" + +#options BOOTP +#options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info +#options NFSCLIENT #Network File System client +#options NFS_ROOT #NFS usable as root device + +options PSEUDOFS #Pseudo-filesystem framework +#options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options SX_NOINLINE + +options NO_FFS_SNAPSHOT +options NO_SWAPPING +device random +device pty + +device loop +device ether +device bpf + +device uart + +# Debugging for use in -current +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +device md + +device usb +device ohci +device umass +device scbus # SCSI bus (required for da) +device da # Direct Access (disks) + Added: head/sys/arm/s3c2xx0/board_ln2410sbc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/s3c2xx0/board_ln2410sbc.c Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2009 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include + +#include +#include + +extern vm_offset_t s3c2410_uart_vaddr; + +long +board_init(void) +{ + s3c2410_uart_vaddr = S3C24X0_UART_BASE(0); + + return (64 * 1024 * 1024); +} + Added: head/sys/arm/s3c2xx0/files.s3c2xx0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/s3c2xx0/files.s3c2xx0 Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,13 @@ +# $FreeBSD$ +arm/arm/cpufunc_asm_arm9.S standard +arm/arm/irq_dispatch.S standard +arm/s3c2xx0/board_ln2410sbc.c optional board_ln2410sbc +arm/s3c2xx0/s3c24x0_machdep.c standard +arm/s3c2xx0/s3c24x0.c standard +arm/s3c2xx0/s3c2xx0_space.c standard +arm/s3c2xx0/s3c24x0_clk.c standard +arm/s3c2xx0/uart_bus_s3c2410.c optional uart +arm/s3c2xx0/uart_cpu_s3c2410.c optional uart +arm/s3c2xx0/uart_dev_s3c2410.c optional uart + +dev/usb/controller/ohci_s3c24x0.c optional ohci Added: head/sys/arm/s3c2xx0/s3c2410reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/s3c2xx0/s3c2410reg.h Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,96 @@ +/* $NetBSD: s3c2410reg.h,v 1.6 2004/02/12 03:52:46 bsh Exp $ */ + +/*- + * Copyright (c) 2003, 2004 Genetec corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec corporation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of Genetec corporation may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORP. ``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 GENETEC CORP. + * 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$ + */ + + +/* + * Samsung S3C2410X processor is ARM920T based integrated CPU + * + * Reference: + * S3C2410X User's Manual + */ +#ifndef _ARM_S3C2XX0_S3C2410REG_H_ +#define _ARM_S3C2XX0_S3C2410REG_H_ + +/* common definitions for S3C2410 and S3C2440 */ +#include + +/* + * Memory Map + */ +#define S3C2410_BANK_SIZE 0x08000000 +#define S3C2410_BANK_START(n) (S3C2410_BANK_SIZE*(n)) +#define S3C2410_SDRAM_START S3C2410_BANK_START(6) + + +/* interrupt control */ +#define S3C2410_SUBIRQ_MAX (S3C24X0_SUBIRQ_MIN+10) + +/* Clock control */ +/* CLKMAN_CLKCON */ +#define S3C2410_CLKCON_SM (1<<0) /* 1=transition to SPECIAL mode */ +/* CLKMAN_CLKDIVN */ +#define S3C2410_CLKDIVN_HDIVN (1<<1) /* hclk=fclk/2 */ + +/* NAND Flash controller */ +#define S3C2410_NANDFC_SIZE 0x18 +/* NANDFC_NFCONF */ +#define S3C2410_NFCONF_ENABLE (1<<15) /* NAND controller enabled */ +#define S3C2410_NFCONF_ECC (1<<12) /* Initialize ECC decoder/encoder */ +#define S3C2410_NFCONF_FCE (1<<11) /* Flash chip enabled */ +#define S3C2410_NFCONF_TACLS (7<<8) /* CLE and ALE duration */ +#define S3C2410_NFCONF_TWRPH0 (7<<4) /* TWRPH0 duration */ +#define S3C2410_NFCONF_TWRPH1 (7<<0) /* TWRPH1 duration */ +#define S3C2410_NANDFC_NFCMD 0x04 /* command */ +#define S3C2410_NANDFC_NFADDR 0x08 /* address */ +#define S3C2410_NANDFC_NFDATA 0x0c /* data */ +#define S3C2410_NANDFC_NFSTAT 0x10 /* operation status */ +#define S3C2410_NANDFC_NFECC 0x14 /* ecc */ + +/* MMC/SD */ +/* SDI_CON */ +#define S3C2410_CON_FIFO_RESET (1<<1) + +/* GPIO */ +#define S3C2410_GPIO_SIZE 0xb4 + +/* SD interface */ +#define S3C2410_SDI_SIZE 0x44 +#define DCON_STOP (1<<14) /* Force the transfer to stop */ +#define S3C2410_SDI_DAT 0x3c +#define S3C2410_SDI_IMSK 0x40 /* Interrupt mask */ +#define S3C2410_SDI_IMASK_ALL 0x3ffdf + +/* ADC */ +#define S3C2410_ADC_SIZE 0x14 + +#endif /* _ARM_S3C2XX0_S3C2410REG_H_ */ Added: head/sys/arm/s3c2xx0/s3c2410var.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/s3c2xx0/s3c2410var.h Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,49 @@ +/* $NetBSD: s3c2410var.h,v 1.2 2003/08/29 12:57:50 bsh Exp $ */ + +/*- + * Copyright (c) 2003 Genetec corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec corporation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of Genetec corporation may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORP. ``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 GENETEC CORP. + * 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 _ARM_S3C2410VAR_H_ +#define _ARM_S3C2410VAR_H_ + +#include + +int s3c2410_sscom_cnattach(bus_space_tag_t, int, int, int, tcflag_t); +int s3c2410_sscom_kgdb_attach(bus_space_tag_t, int, int, int, tcflag_t); +void s3c2410_intr_init(struct s3c24x0_softc *); +void s3c2410_softreset(void); + +void s3c2410_mask_subinterrupts(int); +void s3c2410_unmask_subinterrupts(int); + +void *s3c2410_extint_establish(int, int, int, int (*)(void *), void *); +void s3c2410_setup_extint(int, int); +#endif /* _ARM_S3C2410VAR_H_ */ Added: head/sys/arm/s3c2xx0/s3c2440reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/s3c2xx0/s3c2440reg.h Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,109 @@ +/*- + * Copyright (C) 2009 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Samsung S3C2440X processor is ARM920T based integrated CPU + * + * Reference: + * S3C2440A/S3C2442B User's Manual + */ +#ifndef _ARM_S3C2XX0_S3C2440REG_H_ +#define _ARM_S3C2XX0_S3C2440REG_H_ + +/* common definitions for S3C2410 and S3C2440 */ +#include + +/* + * Memory Map + */ +#define S3C2440_BANK_SIZE 0x08000000 +#define S3C2440_BANK_START(n) (S3C2410_BANK_SIZE*(n)) +#define S3C2440_SDRAM_START S3C2410_BANK_START(6) + + +/* interrupt control */ +#define S3C2440_SUBIRQ_MAX (S3C24X0_SUBIRQ_MIN+10) + +/* Clock control */ +/* CLKMAN_CLKCON */ +#define S3C2440_CLKCON_STOP (1<<0) /* 1=transition to STOP mode */ +/* CLKMAN_CLKDIVN */ +#define S3C2440_CLKDIVN_HDIVN (3<<1) /* hclk */ +#define S3C2440_CLKMAN_CAMDIVN 0x18 +#define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) +#define S3C2440_CAMDIVN_HCLK3_HALF (1<<8) + +/* NAND Flash controller */ +#define S3C2440_NANDFC_SIZE 0x40 + +#define S3C2440_NANDFC_NFCONT 0x04 +#define S3C2440_NFCONT_LOCK_TIGHT (1<<13) /* Lock part of the NAND */ +#define S3C2440_NFCONT_SOFT_LOCK (1<<12) /* Soft lock part of the NAND */ +#define S3C2440_NFCONT_ILLEGAL_ACC_INT (1<<10) /* Illegal access interrupt */ +#define S3C2440_NFCONT_RNB_INT (1<<9) /* RnB transition interrupt */ +#define S3C2440_NFCONT_RNB_TRANS_MODE (1<<8) /* RnB transition mode */ +#define S3C2440_NFCONT_SPARE_ECC_LOCK (1<<6) /* Lock spare ECC generation */ +#define S3C2440_NFCONT_MAIN_ECC_LOCK (1<<5) /* Lock main ECC generation */ +#define S3C2440_NFCONT_INIT_ECC (1<<4) /* Init ECC encoder/decoder */ +#define S3C2440_NFCONT_NCE (1<<1) /* NAND Chip select */ +#define S3C2440_NFCONT_ENABLE (1<<0) /* Enable the controller */ +#define S3C2440_NANDFC_NFCMMD 0x08 +#define S3C2440_NANDFC_NFADDR 0x0c +#define S3C2440_NANDFC_NFDATA 0x10 +#define S3C2440_NANDFC_NFSTAT 0x20 + +/* MMC/SD */ +/* SDI_CON */ +#define S3C2440_CON_RESET (1<<8) +#define S3C2440_CON_CLOCK_TYPE (1<<5) +/* SDI_FSTA */ +#define S3c2440_FSTA_RESET (1<<16) +#define S3C2440_FSTA_FAIL_ERROR_MSK (3<<14) +#define S3C2440_FSTA_FAIL_NONE (0<<14) +#define S3C2440_FSTA_FAIL_FIFO (1<<14) +#define S3C2440_FSTA_FAIL_LAST_TRANS (2<<14) + +/* GPIO */ +#define S3C2440_GPIO_SIZE 0xd0 + +/* SD interface */ +#define S3C2410_SDI_SIZE 0x44 +#define DCON_START (1<<14) /* Start the data transfer */ +#define S3C2440_SDI_IMSK 0x3c /* Interrupt mask */ +#define S3C2440_SDI_IMASK_ALL 0x3C7C0 +#define S3C2440_SDI_DAT 0x40 + +/* ADC */ +#define ADCTSC_UD_SEN (1<<8) +#define S3C2440_ADC_SIZE 0x18 + +/* UART */ +#define S3C2440_UFSTAT_TXCOUNT (0x3f << 8) +#define S3C2440_UFSTAT_RXCOUNT (0x3f << 0) + +#endif /* _ARM_S3C2XX0_S3C2440REG_H_ */ Added: head/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/s3c2xx0/s3c24x0.c Sat Mar 20 03:39:35 2010 (r205354) @@ -0,0 +1,648 @@ +/* $NetBSD: s3c2410.c,v 1.4 2003/08/27 03:46:05 bsh Exp $ */ + +/* + * Copyright (c) 2003 Genetec corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec corporation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of Genetec corporation may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORP. ``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 GENETEC CORP. + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#define S3C2XX0_XTAL_CLK 12000000 + +#define IPL_LEVELS 13 +u_int irqmasks[IPL_LEVELS]; + +static struct { + uint32_t idcode; + const char *name; + s3c2xx0_cpu cpu; +} s3c2x0_cpu_id[] = { + { CHIPID_S3C2410A, "S3C2410A", CPU_S3C2410 }, + { CHIPID_S3C2440A, "S3C2440A", CPU_S3C2440 }, + { CHIPID_S3C2442B, "S3C2442B", CPU_S3C2440 }, + + { 0, NULL } +}; + +static struct { + const char *name; + int prio; + int unit; + struct { + int type; + u_long start; + u_long count; + } res[2]; +} s3c24x0_children[] = { + { "timer", 0, -1, { { 0 }, } }, + { "uart", 1, 0, { + { SYS_RES_IRQ, S3C24X0_INT_UART0, 1 }, + { SYS_RES_IOPORT, S3C24X0_UART_BASE(0), + S3C24X0_UART_BASE(1) - S3C24X0_UART_BASE(0) }, + } }, + { "uart", 1, 1, { + { SYS_RES_IRQ, S3C24X0_INT_UART1, 1 }, + { SYS_RES_IOPORT, S3C24X0_UART_BASE(1), + S3C24X0_UART_BASE(2) - S3C24X0_UART_BASE(1) }, + } }, + { "uart", 1, 2, { + { SYS_RES_IRQ, S3C24X0_INT_UART2, 1 }, + { SYS_RES_IOPORT, S3C24X0_UART_BASE(2), + S3C24X0_UART_BASE(3) - S3C24X0_UART_BASE(2) }, + } }, + { "ohci", 0, -1, { + { SYS_RES_IRQ, S3C24X0_INT_USBH, 0 }, + { SYS_RES_IOPORT, S3C24X0_USBHC_BASE, S3C24X0_USBHC_SIZE }, + } }, + { NULL }, +}; + + +/* prototypes */ +static device_t s3c24x0_add_child(device_t, int, const char *, int); + +static int s3c24x0_probe(device_t); +static int s3c24x0_attach(device_t); +static void s3c24x0_identify(driver_t *, device_t); +static int s3c24x0_setup_intr(device_t, device_t, struct resource *, int, + driver_filter_t *, driver_intr_t *, void *, void **); +static int s3c24x0_teardown_intr(device_t, device_t, struct resource *, + void *); +static struct resource *s3c24x0_alloc_resource(device_t, device_t, int, int *, + u_long, u_long, u_long, u_int); +static int s3c24x0_activate_resource(device_t, device_t, int, int, + struct resource *); +static int s3c24x0_release_resource(device_t, device_t, int, int, + struct resource *); +static struct resource_list *s3c24x0_get_resource_list(device_t, device_t); + +static void s3c24x0_identify_cpu(device_t); + +static device_method_t s3c24x0_methods[] = { + DEVMETHOD(device_probe, s3c24x0_probe), + DEVMETHOD(device_attach, s3c24x0_attach), + DEVMETHOD(device_identify, s3c24x0_identify), + DEVMETHOD(bus_setup_intr, s3c24x0_setup_intr), + DEVMETHOD(bus_teardown_intr, s3c24x0_teardown_intr), + DEVMETHOD(bus_alloc_resource, s3c24x0_alloc_resource), + DEVMETHOD(bus_activate_resource, s3c24x0_activate_resource), + DEVMETHOD(bus_release_resource, s3c24x0_release_resource), + DEVMETHOD(bus_get_resource_list,s3c24x0_get_resource_list), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + {0, 0}, +}; + +static driver_t s3c24x0_driver = { + "s3c24x0", + s3c24x0_methods, + sizeof(struct s3c24x0_softc), +}; +static devclass_t s3c24x0_devclass; + +DRIVER_MODULE(s3c24x0, nexus, s3c24x0_driver, s3c24x0_devclass, 0, 0); + +struct s3c2xx0_softc *s3c2xx0_softc = NULL; + +static device_t +s3c24x0_add_child(device_t bus, int prio, const char *name, int unit) +{ + device_t child; + struct s3c2xx0_ivar *ivar; + + child = device_add_child_ordered(bus, prio, name, unit); + if (child == NULL) + return (NULL); + + ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); + if (ivar == NULL) { + device_delete_child(bus, child); + printf("Can't add alloc ivar\n"); + return (NULL); + } + device_set_ivars(child, ivar); + resource_list_init(&ivar->resources); + + return (child); +} + +static int +s3c24x0_setup_intr(device_t dev, device_t child, + struct resource *ires, int flags, driver_filter_t *filt, + driver_intr_t *intr, void *arg, void **cookiep) +{ + int error, irq; + + error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, + intr, arg, cookiep); + if (error != 0) + return (error); + + for (irq = rman_get_start(ires); irq <= rman_get_end(ires); irq++) { + arm_unmask_irq(irq); + } + return (0); +} + +static int +s3c24x0_teardown_intr(device_t dev, device_t child, struct resource *res, + void *cookie) +{ + return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie)); +} + +static struct resource * +s3c24x0_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 resource_list_entry *rle; + struct s3c2xx0_ivar *ivar = device_get_ivars(child); + struct resource_list *rl = &ivar->resources; + struct resource *res = NULL; + + if (device_get_parent(child) != bus) + return (BUS_ALLOC_RESOURCE(device_get_parent(bus), child, + type, rid, start, end, count, flags)); + + rle = resource_list_find(rl, type, *rid); + if (rle != NULL) { + /* There is a resource list. Use it */ + if (rle->res) + panic("Resource rid %d type %d already in use", *rid, + type); + if (start == 0UL && end == ~0UL) { + start = rle->start; + count = ulmax(count, rle->count); + end = ulmax(rle->end, start + count - 1); + } + /* + * When allocating an irq with children irq's really + * allocate the children as it is those we are interested + * in receiving, not the parent. + */ + if (type == SYS_RES_IRQ && start == end) { + switch (start) { + case S3C24X0_INT_ADCTC: + start = S3C24X0_INT_TC; + end = S3C24X0_INT_ADC; + break; +#ifdef S3C2440_INT_CAM + case S3C2440_INT_CAM: + start = S3C2440_INT_CAM_C; + end = S3C2440_INT_CAM_P; + break; +#endif + default: + break; + } + count = end - start + 1; + } + } + + switch (type) { + case SYS_RES_IRQ: + res = rman_reserve_resource( + &s3c2xx0_softc->s3c2xx0_irq_rman, start, end, + count, flags, child); + break; + + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + res = rman_reserve_resource( + &s3c2xx0_softc->s3c2xx0_mem_rman, + start, end, count, flags, child); + rman_set_bustag(res, &s3c2xx0_bs_tag); + rman_set_bushandle(res, start); + break; + } + + if (res != NULL) { + rman_set_rid(res, *rid); + if (rle != NULL) { + rle->res = res; + rle->start = rman_get_start(res); + rle->end = rman_get_end(res); + rle->count = count; + } + } + + return (res); +} + +static int +s3c24x0_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + return (rman_activate_resource(r)); +} + +static int +s3c24x0_release_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + struct s3c2xx0_ivar *ivar = device_get_ivars(child); + struct resource_list *rl = &ivar->resources; + struct resource_list_entry *rle; + + if (rl == NULL) + return (EINVAL); + + rle = resource_list_find(rl, type, rid); + if (rle == NULL) + return (EINVAL); + + rman_release_resource(r); + rle->res = NULL; + + return 0; +} + +static struct resource_list * +s3c24x0_get_resource_list(device_t dev, device_t child) +{ + struct s3c2xx0_ivar *ivar; + + ivar = device_get_ivars(child); + return (&(ivar->resources)); +} + +void +s3c24x0_identify(driver_t *driver, device_t parent) +{ + + BUS_ADD_CHILD(parent, 0, "s3c24x0", 0); +} + +int +s3c24x0_probe(device_t dev) +{ + return 0; +} + +int +s3c24x0_attach(device_t dev) +{ + struct s3c24x0_softc *sc = device_get_softc(dev); + bus_space_tag_t iot; + device_t child; + unsigned int i, j; + + s3c2xx0_softc = &(sc->sc_sx); + sc->sc_sx.sc_iot = iot = &s3c2xx0_bs_tag; + + if (bus_space_map(iot, + S3C24X0_INTCTL_PA_BASE, S3C24X0_INTCTL_SIZE, + BUS_SPACE_MAP_LINEAR, &sc->sc_sx.sc_intctl_ioh)) + panic("Cannot map the interrupt controller"); + + /* Map the GPIO registers */ + if (bus_space_map(iot, S3C24X0_GPIO_PA_BASE, S3C2410_GPIO_SIZE, + 0, &sc->sc_sx.sc_gpio_ioh)) + panic("Cannot map the GPIO"); + /* Clock manager */ + if (bus_space_map(iot, S3C24X0_CLKMAN_PA_BASE, + S3C24X0_CLKMAN_SIZE, 0, &sc->sc_sx.sc_clkman_ioh)) + panic("cannot map the clock"); + + if (bus_space_map(iot, S3C24X0_TIMER_PA_BASE, + S3C24X0_TIMER_SIZE, 0, &sc->sc_timer_ioh)) + panic("cannot map the TIMER"); + + if (bus_space_map(iot, S3C24X0_USBHC_PA_BASE, + S3C24X0_USBHC_SIZE, 0, &sc->sc_sx.sc_ohci_ioh)) + panic("cannot map the USB Host"); + + if (bus_space_map(iot, S3C24X0_WDT_PA_BASE, + S3C24X0_WDT_SIZE, 0, &sc->sc_sx.sc_wdt_ioh)) + panic("cannot map the watchdog timer"); + + /* + * Identify the CPU + */ + s3c24x0_identify_cpu(dev); + + /* calculate current clock frequency */ + s3c24x0_clock_freq(&sc->sc_sx); + device_printf(dev, "fclk %d MHz hclk %d MHz pclk %d MHz\n", + sc->sc_sx.sc_fclk / 1000000, sc->sc_sx.sc_hclk / 1000000, + sc->sc_sx.sc_pclk / 1000000); + + /* + * Attach children devices + */ + s3c2xx0_softc->s3c2xx0_irq_rman.rm_type = RMAN_ARRAY; + s3c2xx0_softc->s3c2xx0_irq_rman.rm_descr = "S3C24X0 IRQs"; + s3c2xx0_softc->s3c2xx0_mem_rman.rm_type = RMAN_ARRAY; + s3c2xx0_softc->s3c2xx0_mem_rman.rm_descr = "S3C24X0 Memory"; + if (rman_init(&s3c2xx0_softc->s3c2xx0_irq_rman) != 0 || + rman_manage_region(&s3c2xx0_softc->s3c2xx0_irq_rman, 0, + S3C2410_SUBIRQ_MAX) != 0) + panic("s3c24x0_attach: failed to set up IRQ rman"); + /* Manage the registor memory space */ + if ((rman_init(&s3c2xx0_softc->s3c2xx0_mem_rman) != 0) || + (rman_manage_region(&s3c2xx0_softc->s3c2xx0_mem_rman, + S3C24X0_DEV_VA_OFFSET, + S3C24X0_DEV_VA_OFFSET + S3C24X0_DEV_VA_SIZE) != 0)) + panic("s3c24x0_attach: failed to set up register rman"); + + for (i = 0; s3c24x0_children[i].name != NULL; i++) { + child = s3c24x0_add_child(dev, s3c24x0_children[i].prio, + s3c24x0_children[i].name, s3c24x0_children[i].unit); + for (j = 0; j < sizeof(s3c24x0_children[i].res) / + sizeof(s3c24x0_children[i].res[0]) && + s3c24x0_children[i].res[j].type != 0; j++) { + bus_set_resource(child, + s3c24x0_children[i].res[j].type, 0, + s3c24x0_children[i].res[j].start, + s3c24x0_children[i].res[j].count); + } + } + + bus_generic_probe(dev); + bus_generic_attach(dev); + + return (0); +} + +static void +s3c24x0_identify_cpu(device_t dev) +{ + struct s3c24x0_softc *sc = device_get_softc(dev); + uint32_t idcode; + int i; + + idcode = bus_space_read_4(sc->sc_sx.sc_iot, sc->sc_sx.sc_gpio_ioh, + GPIO_GSTATUS1); + + for (i = 0; s3c2x0_cpu_id[i].name != NULL; i++) { + if (s3c2x0_cpu_id[i].idcode == idcode) + break; + } + if (s3c2x0_cpu_id[i].name == NULL) + panic("Unknown CPU detected ((Chip ID: %#X)", idcode); + device_printf(dev, "Found %s CPU (Chip ID: %#X)\n", + s3c2x0_cpu_id[i].name, idcode); + sc->sc_sx.sc_cpu = s3c2x0_cpu_id[i].cpu; +} + +/* + * fill sc_pclk, sc_hclk, sc_fclk from values of clock controller register. + * + * s3c24{1,4}0_clock_freq2() is meant to be called from kernel startup routines. + * s3c24x0_clock_freq() is for after kernel initialization is done. + * + * Because they can be called before bus_space is available we need to use + * volatile pointers rather than bus_space_read. + */ +void +s3c2410_clock_freq2(vm_offset_t clkman_base, int *fclk, int *hclk, int *pclk) +{ + uint32_t pllcon, divn; + unsigned int mdiv, pdiv, sdiv; + unsigned int f, h, p; + + pllcon = *(volatile uint32_t *)(clkman_base + CLKMAN_MPLLCON); + divn = *(volatile uint32_t *)(clkman_base + CLKMAN_CLKDIVN); + + mdiv = (pllcon & PLLCON_MDIV_MASK) >> PLLCON_MDIV_SHIFT; + pdiv = (pllcon & PLLCON_PDIV_MASK) >> PLLCON_PDIV_SHIFT; + sdiv = (pllcon & PLLCON_SDIV_MASK) >> PLLCON_SDIV_SHIFT; + + f = ((mdiv + 8) * S3C2XX0_XTAL_CLK) / ((pdiv + 2) * (1 << sdiv)); + h = f; + if (divn & S3C2410_CLKDIVN_HDIVN) + h /= 2; + p = h; + if (divn & CLKDIVN_PDIVN) + p /= 2; + + if (fclk) *fclk = f; + if (hclk) *hclk = h; + if (pclk) *pclk = p; +} + +void +s3c2440_clock_freq2(vm_offset_t clkman_base, int *fclk, int *hclk, int *pclk) +{ + uint32_t pllcon, divn, camdivn; + unsigned int mdiv, pdiv, sdiv; + unsigned int f, h, p; + + pllcon = *(volatile uint32_t *)(clkman_base + CLKMAN_MPLLCON); + divn = *(volatile uint32_t *)(clkman_base + CLKMAN_CLKDIVN); + camdivn = *(volatile uint32_t *)(clkman_base + S3C2440_CLKMAN_CAMDIVN); + + mdiv = (pllcon & PLLCON_MDIV_MASK) >> PLLCON_MDIV_SHIFT; + pdiv = (pllcon & PLLCON_PDIV_MASK) >> PLLCON_PDIV_SHIFT; + sdiv = (pllcon & PLLCON_SDIV_MASK) >> PLLCON_SDIV_SHIFT; + + f = (2 * (mdiv + 8) * S3C2XX0_XTAL_CLK) / ((pdiv + 2) * (1 << sdiv)); + h = f; + switch((divn >> 1) & 3) { + case 0: + break; + case 1: + h /= 2; + break; + case 2: + if ((camdivn & S3C2440_CAMDIVN_HCLK4_HALF) == + S3C2440_CAMDIVN_HCLK4_HALF) + h /= 8; + else + h /= 4; + break; + case 3: + if ((camdivn & S3C2440_CAMDIVN_HCLK3_HALF) == + S3C2440_CAMDIVN_HCLK3_HALF) + h /= 6; + else + h /= 3; + break; + } + p = h; + if (divn & CLKDIVN_PDIVN) + p /= 2; + + if (fclk) *fclk = f; + if (hclk) *hclk = h; + if (pclk) *pclk = p; +} + +void +s3c24x0_clock_freq(struct s3c2xx0_softc *sc) +{ + vm_offset_t va; + + va = sc->sc_clkman_ioh; + switch(sc->sc_cpu) { + case CPU_S3C2410: + s3c2410_clock_freq2(va, &sc->sc_fclk, &sc->sc_hclk, + &sc->sc_pclk); + break; + case CPU_S3C2440: + s3c2440_clock_freq2(va, &sc->sc_fclk, &sc->sc_hclk, + &sc->sc_pclk); + break; + } +} + +void +cpu_reset(void) +{ + (void) disable_interrupts(I32_bit|F32_bit); + + bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_wdt_ioh, WDT_WTCON, + WTCON_ENABLE | WTCON_CLKSEL_16 | WTCON_ENRST); + for(;;); +} + +void +s3c24x0_sleep(int mode __unused) +{ + int reg; + + reg = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_clkman_ioh, + CLKMAN_CLKCON); + bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_clkman_ioh, + CLKMAN_CLKCON, reg | CLKCON_IDLE); +} + + +int +arm_get_next_irq(int last __unused) +{ + uint32_t intpnd; + int irq, subirq; + + if ((irq = bus_space_read_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTOFFSET)) != 0) { + + /* Clear the pending bit */ + intpnd = bus_space_read_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTPND); + bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, + INTCTL_SRCPND, intpnd); + bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, + INTCTL_INTPND, intpnd); + + switch (irq) { + case S3C24X0_INT_ADCTC: + case S3C24X0_INT_UART0: + case S3C24X0_INT_UART1: + case S3C24X0_INT_UART2: + /* Find the sub IRQ */ + subirq = 0x7ff; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 03:58:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8664A1065673; Sat, 20 Mar 2010 03:58:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73ED18FC14; Sat, 20 Mar 2010 03:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K3w05n058436; Sat, 20 Mar 2010 03:58:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K3w0mB058434; Sat, 20 Mar 2010 03:58:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003200358.o2K3w0mB058434@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 03:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205356 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 03:58:00 -0000 Author: nwhitehorn Date: Sat Mar 20 03:58:00 2010 New Revision: 205356 URL: http://svn.freebsd.org/changeset/base/205356 Log: Let unin(4) attach to U3 controllers found on G5 machines. Submitted by: Andreas Tobler Modified: head/sys/powerpc/powermac/uninorth.c Modified: head/sys/powerpc/powermac/uninorth.c ============================================================================== --- head/sys/powerpc/powermac/uninorth.c Sat Mar 20 03:54:02 2010 (r205355) +++ head/sys/powerpc/powermac/uninorth.c Sat Mar 20 03:58:00 2010 (r205356) @@ -611,7 +611,7 @@ unin_chip_probe(device_t dev) if (name == NULL) return (ENXIO); - if (strcmp(name, "uni-n") != 0) + if (strcmp(name, "uni-n") != 0 && strcmp(name, "u3") != 0) return (ENXIO); device_set_desc(dev, "Apple UniNorth System Controller"); @@ -622,7 +622,8 @@ static int unin_chip_attach(device_t dev) { phandle_t node; - u_int reg[2]; + u_int reg[3]; + int i = 0; uncsc = device_get_softc(dev); node = ofw_bus_get_node(dev); @@ -630,14 +631,18 @@ unin_chip_attach(device_t dev) if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8) return (ENXIO); - uncsc->sc_physaddr = reg[0]; - uncsc->sc_size = reg[1]; + if (strcmp(ofw_bus_get_name(dev), "u3") == 0) + i = 1; /* #address-cells lies */ + + uncsc->sc_physaddr = reg[i]; + uncsc->sc_size = reg[i+1]; /* * Only map the first page, since that is where the registers * of interest lie. */ - uncsc->sc_addr = (vm_offset_t) pmap_mapdev(reg[0], PAGE_SIZE); + uncsc->sc_addr = (vm_offset_t) pmap_mapdev(uncsc->sc_physaddr, + PAGE_SIZE); uncsc->sc_version = *(u_int *)uncsc->sc_addr; device_printf(dev, "Version %d\n", uncsc->sc_version); From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 04:22:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6F9D106566B; Sat, 20 Mar 2010 04:22:22 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4D488FC08; Sat, 20 Mar 2010 04:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K4MM92063839; Sat, 20 Mar 2010 04:22:22 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K4MMYq063837; Sat, 20 Mar 2010 04:22:22 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201003200422.o2K4MMYq063837@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 20 Mar 2010 04:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205357 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 04:22:22 -0000 Author: marcel Date: Sat Mar 20 04:22:22 2010 New Revision: 205357 URL: http://svn.freebsd.org/changeset/base/205357 Log: Don't check for boot_verbose in the environment. The loader does that already and sets RB_VERBOSE. The loader has always done it. Modified: head/sys/ia64/ia64/machdep.c Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Sat Mar 20 03:58:00 2010 (r205356) +++ head/sys/ia64/ia64/machdep.c Sat Mar 20 04:22:22 2010 (r205357) @@ -718,16 +718,6 @@ ia64_init(void) */ boothowto = bootinfo.bi_boothowto; - /* - * Catch case of boot_verbose set in environment. - */ - if ((p = getenv("boot_verbose")) != NULL) { - if (strcmp(p, "yes") == 0 || strcmp(p, "YES") == 0) { - boothowto |= RB_VERBOSE; - } - freeenv(p); - } - if (boothowto & RB_VERBOSE) bootverbose = 1; @@ -796,7 +786,7 @@ ia64_init(void) init_param1(); p = getenv("kernelname"); - if (p) { + if (p != NULL) { strncpy(kernelname, p, sizeof(kernelname) - 1); freeenv(p); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 04:40:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 843D21065670; Sat, 20 Mar 2010 04:40:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 725EB8FC18; Sat, 20 Mar 2010 04:40:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K4eF5v067762; Sat, 20 Mar 2010 04:40:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K4eFD5067760; Sat, 20 Mar 2010 04:40:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003200440.o2K4eFD5067760@svn.freebsd.org> From: Alexander Motin Date: Sat, 20 Mar 2010 04:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205358 - head/sys/dev/siis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 04:40:15 -0000 Author: mav Date: Sat Mar 20 04:40:15 2010 New Revision: 205358 URL: http://svn.freebsd.org/changeset/base/205358 Log: Enable MSI by default for SiI3124. Modified: head/sys/dev/siis/siis.c Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sat Mar 20 04:22:22 2010 (r205357) +++ head/sys/dev/siis/siis.c Sat Mar 20 04:40:15 2010 (r205358) @@ -94,14 +94,15 @@ static struct { int ports; int quirks; #define SIIS_Q_SNTF 1 +#define SIIS_Q_NOMSI 2 } siis_ids[] = { {0x31241095, "SiI3124", 4, 0}, {0x31248086, "SiI3124", 4, 0}, - {0x31321095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x02421095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x02441095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x31311095, "SiI3131", 1, SIIS_Q_SNTF}, - {0x35311095, "SiI3531", 1, SIIS_Q_SNTF}, + {0x31321095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x02421095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x02441095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x31311095, "SiI3131", 1, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x35311095, "SiI3531", 1, SIIS_Q_SNTF|SIIS_Q_NOMSI}, {0, NULL, 0, 0} }; @@ -249,7 +250,7 @@ static int siis_setup_interrupt(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - int msi = 0; + int msi = ctlr->quirks & SIIS_Q_NOMSI ? 0 : 1; /* Process hints. */ resource_int_value(device_get_name(dev), From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 05:07:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FFE8106566B; Sat, 20 Mar 2010 05:07:16 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C32F8FC1E; Sat, 20 Mar 2010 05:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K57GpB073839; Sat, 20 Mar 2010 05:07:16 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K57GoJ073832; Sat, 20 Mar 2010 05:07:16 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201003200507.o2K57GoJ073832@svn.freebsd.org> From: Neel Natu Date: Sat, 20 Mar 2010 05:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205360 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 05:07:16 -0000 Author: neel Date: Sat Mar 20 05:07:15 2010 New Revision: 205360 URL: http://svn.freebsd.org/changeset/base/205360 Log: This change enables use of physical memory that is beyond the direct mapped kseg0 region. The basic idea is to use KVA from the kseg2 region for mapping page table pages that lie beyond the direct mapped region. The TLB miss handler can now recursively fault into the TLB invalid handler if it dereferences a kseg2 page table page address that is not in the TLB. Tested by: JC (c.jayachandran@gmail.com) Modified: head/sys/mips/include/db_machdep.h head/sys/mips/include/trap.h head/sys/mips/mips/db_trace.c head/sys/mips/mips/exception.S head/sys/mips/mips/pmap.c head/sys/mips/mips/trap.c Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Sat Mar 20 05:06:47 2010 (r205359) +++ head/sys/mips/include/db_machdep.h Sat Mar 20 05:07:15 2010 (r205360) @@ -92,7 +92,6 @@ db_addr_t next_instr_address(db_addr_t, #define DB_SMALL_VALUE_MIN (-0x400001) int db_inst_type(int); -void db_dump_tlb(int, int); db_addr_t branch_taken(int inst, db_addr_t pc); void stacktrace_subr(register_t pc, register_t sp, register_t ra, int (*)(const char *, ...)); int kdbpeek(int *); Modified: head/sys/mips/include/trap.h ============================================================================== --- head/sys/mips/include/trap.h Sat Mar 20 05:06:47 2010 (r205359) +++ head/sys/mips/include/trap.h Sat Mar 20 05:07:15 2010 (r205360) @@ -111,11 +111,10 @@ void trapDump(char *msg); void MipsFPTrap(u_int, u_int, u_int); void MipsKernGenException(void); void MipsKernIntr(void); -void MipsKernTLBInvalidException(void); +void MipsTLBInvalidException(void); void MipsTLBMissException(void); void MipsUserGenException(void); void MipsUserIntr(void); -void MipsUserTLBInvalidException(void); u_int trap(struct trapframe *); Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Sat Mar 20 05:06:47 2010 (r205359) +++ head/sys/mips/mips/db_trace.c Sat Mar 20 05:07:15 2010 (r205360) @@ -162,13 +162,10 @@ loop: subr = (uintptr_t)MipsUserGenException; else if (pcBetween(MipsKernIntr, MipsUserIntr)) subr = (uintptr_t)MipsKernIntr; - else if (pcBetween(MipsUserIntr, MipsKernTLBInvalidException)) + else if (pcBetween(MipsUserIntr, MipsTLBInvalidException)) subr = (uintptr_t)MipsUserIntr; - else if (pcBetween(MipsKernTLBInvalidException, - MipsUserTLBInvalidException)) - subr = (uintptr_t)MipsKernTLBInvalidException; - else if (pcBetween(MipsUserTLBInvalidException, MipsTLBMissException)) - subr = (uintptr_t)MipsUserTLBInvalidException; + else if (pcBetween(MipsTLBInvalidException, MipsTLBMissException)) + subr = (uintptr_t)MipsTLBInvalidException; else if (pcBetween(fork_trampoline, savectx)) subr = (uintptr_t)fork_trampoline; else if (pcBetween(savectx, mips_cpu_throw)) Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Sat Mar 20 05:06:47 2010 (r205359) +++ head/sys/mips/mips/exception.S Sat Mar 20 05:07:15 2010 (r205360) @@ -264,13 +264,13 @@ SlowFault: mfc0 a0, COP_0_STATUS_REG ;\ li a2, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) ; \ or a0, a0, a2 ; \ - li a2, ~(MIPS_SR_INT_IE|MIPS_SR_EXL) ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ mtc0 a0, COP_0_STATUS_REG #else #define CLEAR_STATUS \ mfc0 a0, COP_0_STATUS_REG ;\ - li a2, ~(MIPS_SR_INT_IE|MIPS_SR_EXL) ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ mtc0 a0, COP_0_STATUS_REG #endif @@ -827,177 +827,168 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE .set at END(MipsUserIntr) -NLEAF(MipsKernTLBInvalidException) - .set noat - mfc0 k0, COP_0_BAD_VADDR # get the fault address - +NLEAF(MipsTLBInvalidException) + .set push + .set noat + .set noreorder + mfc0 k0, COP_0_BAD_VADDR li k1, VM_MAXUSER_ADDRESS sltu k1, k0, k1 - beqz k1, 1f - nop - GET_CPU_PCPU(k1) - lw k1, PC_SEGBASE(k1) # works for single cpu???? - beqz k1, _C_LABEL(MipsKernGenException) # seg tab is null + bnez k1, 1f nop + + /* badvaddr = kernel address */ + lui k1, %hi(_C_LABEL(kernel_segmap)) b 2f - nop + lw k1, %lo(_C_LABEL(kernel_segmap))(k1) + 1: - li k1, (VM_MAX_KERNEL_ADDRESS) - bgez k0, _C_LABEL(MipsKernGenException) # full trap processing - sltu k1, k1, k0 # check fault address against - bnez k1, _C_LABEL(MipsKernGenException) # kernel_segmap upper bound - lui k1, %hi(_C_LABEL(kernel_segmap)) # k1=hi of segbase - lw k1, %lo(_C_LABEL(kernel_segmap))(k1) # k1=segment tab base - beqz k1, _C_LABEL(MipsKernGenException) # seg tab is null + /* badvaddr = user address */ + GET_CPU_PCPU(k1) + lw k1, PC_SEGBASE(k1) + 2: - srl k0, 20 # k0=seg offset (almost) - andi k0, k0, 0xffc # k0=seg offset (mask 0x3) -#xxx mips64 unsafe? - addu k1, k0, k1 # k1=seg entry address - lw k1, 0(k1) # k1=seg entry - mfc0 k0, COP_0_BAD_VADDR # k0=bad address (again) - beq k1, zero, _C_LABEL(MipsKernGenException) # ==0 -- no page table - srl k0, k0, PGSHIFT-2 - andi k0, k0, 0xffc # compute offset from index - tlbp # Probe the invalid entry -#xxx mips64 unsafe? + beqz k1, 3f /* invalid page directory pointer */ + nop + + srl k0, SEGSHIFT - 2 + andi k0, 0xffc addu k1, k1, k0 - and k0, k0, 4 # check even/odd page - nop # required for QED 5230 - bne k0, zero, KernTLBIOdd + lw k1, 0(k1) + beqz k1, 3f /* invalid page table page pointer */ nop - mfc0 k0, COP_0_TLB_INDEX + mfc0 k0, COP_0_BAD_VADDR + srl k0, PGSHIFT - 2 + andi k0, 0xffc + addu k1, k1, k0 + + lw k0, 0(k1) + andi k0, PTE_V + beqz k0, 3f /* invalid page table entry */ nop - bltz k0, sys_stk_chk - sltiu k0, k0, VMWIRED_ENTRIES # index below wired entries? - bne k0, zero, sys_stk_chk - lw k0, 0(k1) # get PTE entry + andi k0, k1, 4 + bnez k0, odd_page + nop - _SLL k0, k0, WIRED_SHIFT # get rid of "wired" bit +even_page: + lw k0, 0(k1) + _SLL k0, k0, WIRED_SHIFT _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO0 # load PTE entry - and k0, k0, PTE_V # check for valid entry - nop # required for QED5230 - beq k0, zero, _C_LABEL(MipsKernGenException) # PTE invalid - lw k0, 4(k1) # get odd PTE entry + _MTC0 k0, COP_0_TLB_LO0 + + lw k0, 4(k1) _SLL k0, k0, WIRED_SHIFT _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO1 # load PTE entry - HAZARD_DELAY - tlbwi # write TLB - HAZARD_DELAY - eret + _MTC0 k0, COP_0_TLB_LO1 -KernTLBIOdd: - mfc0 k0, COP_0_TLB_INDEX + b tlb_insert_entry nop - bltz k0, sys_stk_chk - sltiu k0, k0, VMWIRED_ENTRIES # index below wired entries? - bne k0, zero, sys_stk_chk - lw k0, 0(k1) # get PTE entry - - _SLL k0, k0, WIRED_SHIFT # get rid of wired bit +odd_page: + lw k0, 0(k1) + _SLL k0, k0, WIRED_SHIFT _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO1 # save PTE entry - and k0, k0, PTE_V # check for valid entry - nop # required for QED5230 - beq k0, zero, _C_LABEL(MipsKernGenException) # PTE invalid - lw k0, -4(k1) # get even PTE entry + _MTC0 k0, COP_0_TLB_LO1 + + lw k0, -4(k1) _SLL k0, k0, WIRED_SHIFT _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO0 # save PTE entry + _MTC0 k0, COP_0_TLB_LO0 + +tlb_insert_entry: + tlbp HAZARD_DELAY - tlbwi # update TLB + mfc0 k0, COP_0_TLB_INDEX HAZARD_DELAY + bltz k0, tlb_insert_random + nop + tlbwi eret + ssnop - .set at -END(MipsKernTLBInvalidException) - - -NLEAF(MipsUserTLBInvalidException) - .set noat - mfc0 k0, COP_0_BAD_VADDR # get the fault address +tlb_insert_random: + tlbwr + eret + ssnop - li k1, VM_MAXUSER_ADDRESS - sltu k1, k0, k1 - beqz k1, _C_LABEL(MipsUserGenException) +3: + /* + * Branch to the comprehensive exception processing. + */ + mfc0 k1, COP_0_STATUS_REG + andi k1, k1, SR_KSU_USER + bnez k1, _C_LABEL(MipsUserGenException) nop + + /* + * Check for kernel stack overflow. + */ GET_CPU_PCPU(k1) - lw k1, PC_SEGBASE(k1) # works for single cpu???? - beqz k1, _C_LABEL(MipsUserGenException) # seg tab is null - nop -2: - srl k0, 20 # k0=seg offset (almost) - andi k0, k0, 0xffc # k0=seg offset (mask 0x3) -#xxx mips64 unsafe? - addu k1, k0, k1 # k1=seg entry address - lw k1, 0(k1) # k1=seg entry - mfc0 k0, COP_0_BAD_VADDR # k0=bad address (again) - beq k1, zero, _C_LABEL(MipsUserGenException) # ==0 -- no page table - srl k0, k0, PGSHIFT-2 - andi k0, k0, 0xffc # compute offset from index - tlbp # Probe the invalid entry -#xxx mips64 unsafe? - addu k1, k1, k0 - and k0, k0, 4 # check even/odd page - nop # required for QED 5230 - bne k0, zero, UserTLBIOdd + lw k0, PC_CURTHREAD(k1) + lw k0, TD_REALKSTACK(k0) + sltu k0, k0, sp + bnez k0, _C_LABEL(MipsKernGenException) nop - mfc0 k0, COP_0_TLB_INDEX - nop - bltz k0, _C_LABEL(MipsUserGenException) + /* + * Kernel stack overflow. + * + * Move to a valid stack before we call panic. We use the boot stack + * for this purpose. + */ + GET_CPU_PCPU(k1) + lw k1, PC_CPUID(k1) + sll k1, k1, PAGE_SHIFT + 1 - sltiu k0, k0, VMWIRED_ENTRIES # index below wired entries? - bne k0, zero, _C_LABEL(MipsUserGenException) - lw k0, 0(k1) # get PTE entry + PTR_LA k0, _C_LABEL(pcpu_space) + addiu k0, (NBPG * 2) + addu k0, k0, k1 - _SLL k0, k0, WIRED_SHIFT # get rid of "wired" bit - _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO0 # load PTE entry - and k0, k0, PTE_V # check for valid entry - nop # required for QED5230 - beq k0, zero, _C_LABEL(MipsUserGenException) # PTE invalid - lw k0, 4(k1) # get odd PTE entry - _SLL k0, k0, WIRED_SHIFT - _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO1 # load PTE entry - HAZARD_DELAY - tlbwi # write TLB - HAZARD_DELAY - eret + /* + * Stash the original value of 'sp' so we can update trapframe later. + * We assume that SAVE_CPU does not trash 'k1'. + */ + move k1, sp -UserTLBIOdd: - mfc0 k0, COP_0_TLB_INDEX - nop - bltz k0, _C_LABEL(MipsUserGenException) - sltiu k0, k0, VMWIRED_ENTRIES # index below wired entries? + move sp, k0 + subu sp, sp, KERN_EXC_FRAME_SIZE - bne k0, zero, _C_LABEL(MipsUserGenException) - lw k0, 0(k1) # get PTE entry + move k0, ra + move ra, zero + sw ra, CALLFRAME_RA(sp) /* stop the ddb backtrace right here */ + sw zero, CALLFRAME_SP(sp) + move ra, k0 - _SLL k0, k0, WIRED_SHIFT # get rid of wired bit - _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO1 # save PTE entry - and k0, k0, PTE_V # check for valid entry - nop # required for QED5230 - beq k0, zero, _C_LABEL(MipsUserGenException) # PTE invalid - lw k0, -4(k1) # get even PTE entry - _SLL k0, k0, WIRED_SHIFT - _SRL k0, k0, WIRED_SHIFT - _MTC0 k0, COP_0_TLB_LO0 # save PTE entry - HAZARD_DELAY - tlbwi # update TLB - HAZARD_DELAY - eret + SAVE_CPU - .set at -END(MipsUserTLBInvalidException) + /* + * Now restore the value of 'sp' at the time of the tlb exception in + * the trapframe. + */ + SAVE_REG(k1, SP, sp) + + /* + * Squelch any more overflow checks by setting the stack base to 0. + */ + GET_CPU_PCPU(k1) + lw k0, PC_CURTHREAD(k1) + sw zero, TD_REALKSTACK(k0) + + move a1, a0 + PANIC("kernel stack overflow - trapframe at %p") + + /* + * This nop is necessary so that the 'ra' remains within the bounds + * of this handler. Otherwise the ddb backtrace code will think that + * the panic() was called from MipsTLBMissException. + */ + nop + + .set pop +END(MipsTLBInvalidException) /*---------------------------------------------------------------------------- * @@ -1048,68 +1039,6 @@ NLEAF(MipsTLBMissException) tlbwr # write to tlb HAZARD_DELAY eret # return from exception - -sys_stk_chk: - GET_CPU_PCPU(k0) - lw k0, PC_CURTHREAD(k0) - lw k0, TD_REALKSTACK(k0) - sltu k0, sp, k0 # check for stack overflow - beqz k0, _C_LABEL(MipsKernGenException) # not stack overflow - nop - -# stack overflow - PTR_LA a0, _C_LABEL(_start) - CALLFRAME_SIZ - 8 # set sp to a valid place - sw sp, 24(a0) - move sp, a0 - PTR_LA a0, 1f - mfc0 a2, COP_0_STATUS_REG - mfc0 a3, COP_0_CAUSE_REG - _MFC0 a1, COP_0_EXC_PC - sw a2, 16(sp) - sw a3, 20(sp) - move a2, ra - PTR_LA k0, _C_LABEL(printf) - jalr k0 - mfc0 a3, COP_0_BAD_VADDR - - PTR_LA sp, _C_LABEL(_start) - CALLFRAME_SIZ # set sp to a valid place - -#if !defined(SMP) && defined(DDB) - PTR_LA a0, 2f - PTR_LA k0, _C_LABEL(trapDump) - jalr k0 - nop - - li a0, 0 - lw a1, _C_LABEL(num_tlbentries) - PTR_LA k0, _C_LABEL(db_dump_tlb) - jalr k0 - addu a1, -1 - -3: - b 3b - nop -#endif - - PANIC("kernel stack overflow") - - .data - .globl lastktlbmiss -lastktlbmiss: - .word 0 -lastktlbmisspc: - .word 0 -lastutlbmiss: - .word 0 -lastutlbmisspc: - .word 0 - -1: - .asciiz "ktlbmiss: PC %x RA %x ADR %x\nSR %x CR %x SP %x\n" -2: - .asciiz "stack ovf" - .text - .set at END(MipsTLBMissException) Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Mar 20 05:06:47 2010 (r205359) +++ head/sys/mips/mips/pmap.c Sat Mar 20 05:07:15 2010 (r205360) @@ -949,10 +949,21 @@ pmap_unmap_fpage(vm_paddr_t pa, struct f static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m) { + vm_offset_t pteva; /* * unmap the page table page */ + pteva = (vm_offset_t)pmap->pm_segtab[m->pindex]; + if (pteva >= VM_MIN_KERNEL_ADDRESS) { + pmap_kremove(pteva); + kmem_free(kernel_map, pteva, PAGE_SIZE); + } else { + KASSERT(MIPS_IS_KSEG0_ADDR(pteva), + ("_pmap_unwire_pte_hold: 0x%0lx is not in kseg0", + (long)pteva)); + } + pmap->pm_segtab[m->pindex] = 0; --pmap->pm_stats.resident_count; @@ -997,7 +1008,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v mpte = pmap->pm_ptphint; } else { pteva = *pmap_pde(pmap, va); - mpte = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva)); + mpte = PHYS_TO_VM_PAGE(vtophys(pteva)); pmap->pm_ptphint = mpte; } } @@ -1029,6 +1040,8 @@ pmap_pinit0(pmap_t pmap) int pmap_pinit(pmap_t pmap) { + vm_offset_t ptdva; + vm_paddr_t ptdpa; vm_page_t ptdpg; int i; int req; @@ -1050,8 +1063,17 @@ pmap_pinit(pmap_t pmap) ptdpg->valid = VM_PAGE_BITS_ALL; - pmap->pm_segtab = (pd_entry_t *) - MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(ptdpg)); + ptdpa = VM_PAGE_TO_PHYS(ptdpg); + if (ptdpa < MIPS_KSEG0_LARGEST_PHYS) { + ptdva = MIPS_PHYS_TO_KSEG0(ptdpa); + } else { + ptdva = kmem_alloc_nofault(kernel_map, PAGE_SIZE); + if (ptdva == 0) + panic("pmap_pinit: unable to allocate kva"); + pmap_kenter(ptdva, ptdpa); + } + + pmap->pm_segtab = (pd_entry_t *)ptdva; if ((ptdpg->flags & PG_ZERO) == 0) bzero(pmap->pm_segtab, PAGE_SIZE); @@ -1118,7 +1140,15 @@ _pmap_allocpte(pmap_t pmap, unsigned pte pmap->pm_stats.resident_count++; ptepa = VM_PAGE_TO_PHYS(m); - pteva = MIPS_PHYS_TO_KSEG0(ptepa); + if (ptepa < MIPS_KSEG0_LARGEST_PHYS) { + pteva = MIPS_PHYS_TO_KSEG0(ptepa); + } else { + pteva = kmem_alloc_nofault(kernel_map, PAGE_SIZE); + if (pteva == 0) + panic("_pmap_allocpte: unable to allocate kva"); + pmap_kenter(pteva, ptepa); + } + pmap->pm_segtab[ptepindex] = (pd_entry_t)pteva; /* @@ -1172,7 +1202,7 @@ retry: (pmap->pm_ptphint->pindex == ptepindex)) { m = pmap->pm_ptphint; } else { - m = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva)); + m = PHYS_TO_VM_PAGE(vtophys(pteva)); pmap->pm_ptphint = m; } m->wire_count++; @@ -1212,13 +1242,24 @@ retry: void pmap_release(pmap_t pmap) { + vm_offset_t ptdva; vm_page_t ptdpg; KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); - ptdpg = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pmap->pm_segtab)); + ptdva = (vm_offset_t)pmap->pm_segtab; + ptdpg = PHYS_TO_VM_PAGE(vtophys(ptdva)); + + if (ptdva >= VM_MIN_KERNEL_ADDRESS) { + pmap_kremove(ptdva); + kmem_free(kernel_map, ptdva, PAGE_SIZE); + } else { + KASSERT(MIPS_IS_KSEG0_ADDR(ptdva), + ("pmap_release: 0x%0lx is not in kseg0", (long)ptdva)); + } + ptdpg->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(ptdpg); @@ -2030,7 +2071,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ (pmap->pm_ptphint->pindex == ptepindex)) { mpte = pmap->pm_ptphint; } else { - mpte = PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pteva)); + mpte = PHYS_TO_VM_PAGE(vtophys(pteva)); pmap->pm_ptphint = mpte; } mpte->wire_count++; @@ -3171,18 +3212,6 @@ pmap_asid_alloc(pmap) pmap->pm_asid[PCPU_GET(cpuid)].gen = PCPU_GET(asid_generation); PCPU_SET(next_asid, PCPU_GET(next_asid) + 1); } - -#ifdef DEBUG - if (pmapdebug & (PDB_FOLLOW | PDB_TLBPID)) { - if (curproc) - printf("pmap_asid_alloc: curproc %d '%s' ", - curproc->p_pid, curproc->p_comm); - else - printf("pmap_asid_alloc: curproc "); - printf("segtab %p asid %d\n", pmap->pm_segtab, - pmap->pm_asid[PCPU_GET(cpuid)].asid); - } -#endif } int @@ -3251,42 +3280,6 @@ pmap_set_modified(vm_offset_t pa) PHYS_TO_VM_PAGE(pa)->md.pv_flags |= (PV_TABLE_REF | PV_TABLE_MOD); } -#include - -/* - * Dump the translation buffer (TLB) in readable form. - */ - -void -db_dump_tlb(int first, int last) -{ - struct tlb tlb; - int tlbno; - - tlbno = first; - - while (tlbno <= last) { - MachTLBRead(tlbno, &tlb); - if (tlb.tlb_lo0 & PTE_V || tlb.tlb_lo1 & PTE_V) { - printf("TLB %2d vad 0x%08x ", tlbno, (tlb.tlb_hi & 0xffffff00)); - } else { - printf("TLB*%2d vad 0x%08x ", tlbno, (tlb.tlb_hi & 0xffffff00)); - } - printf("0=0x%08x ", pfn_to_vad(tlb.tlb_lo0)); - printf("%c", tlb.tlb_lo0 & PTE_M ? 'M' : ' '); - printf("%c", tlb.tlb_lo0 & PTE_G ? 'G' : ' '); - printf(" atr %x ", (tlb.tlb_lo0 >> 3) & 7); - printf("1=0x%08x ", pfn_to_vad(tlb.tlb_lo1)); - printf("%c", tlb.tlb_lo1 & PTE_M ? 'M' : ' '); - printf("%c", tlb.tlb_lo1 & PTE_G ? 'G' : ' '); - printf(" atr %x ", (tlb.tlb_lo1 >> 3) & 7); - printf(" sz=%x pid=%x\n", tlb.tlb_mask, - (tlb.tlb_hi & 0x000000ff) - ); - tlbno++; - } -} - /* * Routine: pmap_kextract * Function: Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Sat Mar 20 05:06:47 2010 (r205359) +++ head/sys/mips/mips/trap.c Sat Mar 20 05:07:15 2010 (r205360) @@ -118,8 +118,8 @@ void (*machExceptionTable[]) (void)= { */ MipsKernIntr, /* external interrupt */ MipsKernGenException, /* TLB modification */ - MipsKernTLBInvalidException, /* TLB miss (load or instr. fetch) */ - MipsKernTLBInvalidException, /* TLB miss (store) */ + MipsTLBInvalidException,/* TLB miss (load or instr. fetch) */ + MipsTLBInvalidException,/* TLB miss (store) */ MipsKernGenException, /* address error (load or I-fetch) */ MipsKernGenException, /* address error (store) */ MipsKernGenException, /* bus error (I-fetch) */ @@ -153,8 +153,8 @@ void (*machExceptionTable[]) (void)= { */ MipsUserIntr, /* 0 */ MipsUserGenException, /* 1 */ - MipsUserTLBInvalidException, /* 2 */ - MipsUserTLBInvalidException, /* 3 */ + MipsTLBInvalidException,/* 2 */ + MipsTLBInvalidException,/* 3 */ MipsUserGenException, /* 4 */ MipsUserGenException, /* 5 */ MipsUserGenException, /* 6 */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 05:10:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB6D6106564A; Sat, 20 Mar 2010 05:10:44 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99C7D8FC16; Sat, 20 Mar 2010 05:10:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K5AiXp074625; Sat, 20 Mar 2010 05:10:44 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K5AiUk074623; Sat, 20 Mar 2010 05:10:44 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201003200510.o2K5AiUk074623@svn.freebsd.org> From: Neel Natu Date: Sat, 20 Mar 2010 05:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205361 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 05:10:44 -0000 Author: neel Date: Sat Mar 20 05:10:44 2010 New Revision: 205361 URL: http://svn.freebsd.org/changeset/base/205361 Log: Get rid of unused macro MIPS_MEM_RID. Suggested by: Alexandr Rybalko (ray@dlink.ua) Modified: head/sys/mips/mips/nexus.c Modified: head/sys/mips/mips/nexus.c ============================================================================== --- head/sys/mips/mips/nexus.c Sat Mar 20 05:07:15 2010 (r205360) +++ head/sys/mips/mips/nexus.c Sat Mar 20 05:10:44 2010 (r205361) @@ -73,7 +73,6 @@ struct nexus_device { #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) #define NUM_MIPS_IRQS 6 -#define MIPS_MEM_RID 0x20 static struct rman irq_rman; static struct rman mem_rman; From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 05:21:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D10106566B; Sat, 20 Mar 2010 05:21:15 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 420558FC08; Sat, 20 Mar 2010 05:21:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K5LFit076999; Sat, 20 Mar 2010 05:21:15 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K5LFNX076997; Sat, 20 Mar 2010 05:21:15 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201003200521.o2K5LFNX076997@svn.freebsd.org> From: Neel Natu Date: Sat, 20 Mar 2010 05:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205363 - head/sys/mips/sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 05:21:15 -0000 Author: neel Date: Sat Mar 20 05:21:14 2010 New Revision: 205363 URL: http://svn.freebsd.org/changeset/base/205363 Log: Make sure that the registers 'v0' and 'v1' are properly sign-extended when sb_load64() returns. Some 32-bit arithmetic operations (e.g. subu) have unpredicatable results when operating on 64-bit registers that are not properly sign-extended. Modified: head/sys/mips/sibyte/sb_asm.S Modified: head/sys/mips/sibyte/sb_asm.S ============================================================================== --- head/sys/mips/sibyte/sb_asm.S Sat Mar 20 05:11:56 2010 (r205362) +++ head/sys/mips/sibyte/sb_asm.S Sat Mar 20 05:21:14 2010 (r205363) @@ -53,14 +53,14 @@ LEAF(sb_load64) move v0, v1 #if _BYTE_ORDER == _BIG_ENDIAN dsll32 v1, v1, 0 - dsrl32 v1, v1, 0 /* v1 = lower_uint32(result) */ + dsra32 v1, v1, 0 /* v1 = lower_uint32(result) */ jr ra - dsrl32 v0, v0, 0 /* v0 = upper_uint32(result) */ + dsra32 v0, v0, 0 /* v0 = upper_uint32(result) */ #else dsll32 v0, v0, 0 - dsrl32 v0, v0, 0 /* v0 = lower_uint32(result) */ + dsra32 v0, v0, 0 /* v0 = lower_uint32(result) */ jr ra - dsrl32 v1, v1, 0 /* v1 = upper_uint32(result) */ + dsra32 v1, v1, 0 /* v1 = upper_uint32(result) */ #endif END(sb_load64) From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 05:49:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AD35106566C; Sat, 20 Mar 2010 05:49:07 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 492288FC12; Sat, 20 Mar 2010 05:49:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K5n7FU083117; Sat, 20 Mar 2010 05:49:07 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K5n7QZ083111; Sat, 20 Mar 2010 05:49:07 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201003200549.o2K5n7QZ083111@svn.freebsd.org> From: Neel Natu Date: Sat, 20 Mar 2010 05:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205364 - in head/sys/mips: include mips sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 05:49:07 -0000 Author: neel Date: Sat Mar 20 05:49:06 2010 New Revision: 205364 URL: http://svn.freebsd.org/changeset/base/205364 Log: Sibyte provides a 64-bit read-only counter that counts at half the processor frequency. This counter can be accessed coherently from both cores. Use this as the preferred timecounter for the SWARM kernels. The CP0 COUNT register is unusable as the timecounter on SMP platforms because the COUNT registers on different CPUs are not guaranteed to be in sync. Modified: head/sys/mips/include/clock.h head/sys/mips/mips/tick.c head/sys/mips/sibyte/sb_machdep.c head/sys/mips/sibyte/sb_scd.c head/sys/mips/sibyte/sb_scd.h Modified: head/sys/mips/include/clock.h ============================================================================== --- head/sys/mips/include/clock.h Sat Mar 20 05:21:14 2010 (r205363) +++ head/sys/mips/include/clock.h Sat Mar 20 05:49:06 2010 (r205364) @@ -34,6 +34,14 @@ void mips_timer_init_params(uint64_t, in extern uint64_t counter_freq; extern int clocks_running; +/* + * The 'platform_timecounter' pointer may be used to register a + * platform-specific timecounter. + * + * A default timecounter based on the CP0 COUNT register is always registered. + */ +extern struct timecounter *platform_timecounter; + #endif #endif /* !_MACHINE_CLOCK_H_ */ Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Sat Mar 20 05:21:14 2010 (r205363) +++ head/sys/mips/mips/tick.c Sat Mar 20 05:49:06 2010 (r205364) @@ -54,6 +54,8 @@ __FBSDID("$FreeBSD$"); uint64_t counter_freq; +struct timecounter *platform_timecounter; + static uint64_t cycles_per_tick; static uint64_t cycles_per_usec; static uint64_t cycles_per_hz, cycles_per_stathz, cycles_per_profhz; @@ -103,6 +105,9 @@ platform_initclocks(void) { tc_init(&counter_timecounter); + + if (platform_timecounter != NULL) + tc_init(platform_timecounter); } static uint64_t Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Sat Mar 20 05:21:14 2010 (r205363) +++ head/sys/mips/sibyte/sb_machdep.c Sat Mar 20 05:49:06 2010 (r205364) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -364,6 +365,32 @@ platform_start_ap(int cpuid) } #endif /* SMP */ +static u_int +sb_get_timecount(struct timecounter *tc) +{ + + return ((u_int)sb_zbbus_cycle_count()); +} + +static void +sb_timecounter_init(void) +{ + static struct timecounter sb_timecounter = { + sb_get_timecount, + NULL, + ~0u, + 0, + "sibyte_zbbus_counter", + 2000 + }; + + /* + * The ZBbus cycle counter runs at half the cpu frequency. + */ + sb_timecounter.tc_frequency = sb_cpu_speed() / 2; + platform_timecounter = &sb_timecounter; +} + void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) @@ -378,6 +405,7 @@ platform_start(__register_t a0, __regist mips_postboot_fixup(); sb_intr_init(0); + sb_timecounter_init(); /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -400,4 +428,6 @@ platform_start(__register_t a0, __regist mips_init(); mips_timer_init_params(sb_cpu_speed(), 0); + + set_cputicker(sb_zbbus_cycle_count, sb_cpu_speed() / 2, 1); } Modified: head/sys/mips/sibyte/sb_scd.c ============================================================================== --- head/sys/mips/sibyte/sb_scd.c Sat Mar 20 05:21:14 2010 (r205363) +++ head/sys/mips/sibyte/sb_scd.c Sat Mar 20 05:49:06 2010 (r205364) @@ -56,6 +56,8 @@ extern uint64_t sb_load64(uint32_t addr) #define SYSCFG_ADDR MIPS_PHYS_TO_KSEG1(0x10020008) #define SYSCFG_PLLDIV(x) GET_VAL_64((x), 7, 5) +#define ZBBUS_CYCLE_COUNT_ADDR MIPS_PHYS_TO_KSEG1(0x10030000) + #define INTSRC_MASK_ADDR(cpu) \ (MIPS_PHYS_TO_KSEG1(0x10020028) | ((cpu) << 13)) @@ -83,6 +85,13 @@ sb_write_syscfg(uint64_t val) } uint64_t +sb_zbbus_cycle_count(void) +{ + + return (sb_load64(ZBBUS_CYCLE_COUNT_ADDR)); +} + +uint64_t sb_cpu_speed(void) { int plldiv; Modified: head/sys/mips/sibyte/sb_scd.h ============================================================================== --- head/sys/mips/sibyte/sb_scd.h Sat Mar 20 05:21:14 2010 (r205363) +++ head/sys/mips/sibyte/sb_scd.h Sat Mar 20 05:49:06 2010 (r205364) @@ -31,6 +31,7 @@ #define NUM_INTSRC 64 /* total number of interrupt sources */ +uint64_t sb_zbbus_cycle_count(void); uint64_t sb_cpu_speed(void); void sb_system_reset(void); From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 08:09:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EBBA106566B for ; Sat, 20 Mar 2010 08:09:54 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from hosting.nash.net.ua (hosting.nash.net.ua [193.151.252.10]) by mx1.freebsd.org (Postfix) with SMTP id 7D3EE8FC15 for ; Sat, 20 Mar 2010 08:09:53 +0000 (UTC) Received: (qmail 431 invoked by uid 509); 20 Mar 2010 08:09:51 -0000 Received: from ravenloft.kiev.ua (94.244.131.95) by hosting.nash.net.ua with SMTP; 20 Mar 2010 08:09:51 -0000 Date: Sat, 20 Mar 2010 10:09:20 +0200 From: Alex Kozlov To: Bruce Evans , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , spam@rm-rf.kiev.ua Message-ID: <20100320080920.GA80859@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: Subject: Re: svn commit: r205307 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 08:09:54 -0000 On Sat, Mar 20, 2010 at 01:27:24AM +1100, Bruce Evans wrote: > > No, this is wrong. Revert this. We do _not_ unconditionally use SSE in the > > kernel. GENERIC should run just fine on a 486. If it doesn't, that should be > > fixed, but I have not seen any reports to the contrary. > Indeed. This doesn't even break the non-SSE case, since it doesn't > remove I686_CPU or any of the code that dynamically chooses whether > to use SSE. > > Most 686's don't have SSE, since a 686 is an old name for a PentiumPro > or maybe a Pentium2 and these don't have SSE (not sure about the > Pentium2, but my old Celeron is Pentimum2-class and it only has FXSR). > However, we keep using this old name for all generations of i386's > after i586, even for generations that are really HAMMERs. Thus the > static configuration related to I*86_CPU is almost usless: it controls > only couple of options for i486 and i586, with the more complicated > and costly configuration for post-i586 being handled dynamically. > Omitting I486_CPU and I586_CPU thus has very little effect except > breaking i486 and i586, and having these options does little except > support this foot-shooting. The effect of I486_CPU is especially small. > It is: > - statically disable use of the TSC in the bogus get_cyclecount() API. > Although the TSC is dynamically configured elsewhere, this function > wants to use the TSC without any dynamic tests, so it is uses static > configuration for efficiency. > - avoid compiling in functions to initialize a 486. There is dynamic > code to use these functions as needed, but this optimization saves > a few hundred if not a few thousand bytes. > - panic if the CPU is an i486, since the necessary extra support for > an i486 (just the above 2 features) is not present. > I586_CPU gives a little more. E.g., support for fixing the F00F hardware > bug on some Pentium1's. Again there is dynamic configuration for this > but a few hundred bytes are saved by not compiling it in. To be more elaborate: i486: - use binuptime in get_cyclecount, but only if tsc_present not set - assign bzero_vector = i486_bzero if cpu family 486 - few initcpu functions for IBM Blue Lightning/Cyrix 486SLC,DLC/Cyrix 486DX/Cyrix 5x86/Cyrix 6x86 - don't panic on i486 i586: - f00f workaround - few initcpu functions for k5/k6/k6-2 to enable write alloc but only if CPU_WT_ALLOC defined - * few (i586_bzero,i586_bcopy,i586_copyout,i586_copyin,fastmove) unused functions in sys/i386/i386/support.s. Code which was supposed to initialize them were commented out in 2001 (http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/isa/npx.c.diff?r1=1.94;r2=1.95;f=h) This need to be fixed in any case. - don't panic on i586 i686: - define CPU_ENABLE_SSE - few initcpu functions for Cyrix 6x86MX/Pentium Pro/Mendocino celeron if CPU_PPRO2CELERON set - use sse2_pagezero if CPU_ENABLE_SSE set, i686_pagezero otherwise - don't panic on i686 So, yes I?86_CPU is practicaly noop. -- Adios From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 09:29:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3DAC1065670; Sat, 20 Mar 2010 09:29:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B43FD8FC12; Sat, 20 Mar 2010 09:29:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2K9TPvC031439; Sat, 20 Mar 2010 09:29:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2K9TPhN031438; Sat, 20 Mar 2010 09:29:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003200929.o2K9TPhN031438@svn.freebsd.org> From: Ed Schouten Date: Sat, 20 Mar 2010 09:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205365 - head/usr.sbin/lastlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 09:29:25 -0000 Author: ed Date: Sat Mar 20 09:29:25 2010 New Revision: 205365 URL: http://svn.freebsd.org/changeset/base/205365 Log: Chop off excessive long hostnames to keep the table structure intact. This makes lastlogin(8) use exactly the same printf format as last(1). Modified: head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/lastlogin.c ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.c Sat Mar 20 05:49:06 2010 (r205364) +++ head/usr.sbin/lastlogin/lastlogin.c Sat Mar 20 09:29:25 2010 (r205365) @@ -91,7 +91,7 @@ output(struct utmpx *u) { time_t t = u->ut_tv.tv_sec; - printf("%-10s %-8s %-22s %s", + printf("%-10s %-8s %-22.22s %s", u->ut_user, u->ut_line, u->ut_host, ctime(&t)); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 11:02:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA9D7106564A; Sat, 20 Mar 2010 11:02:31 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id E3BFE8FC0A; Sat, 20 Mar 2010 11:02:28 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id D167045EE5; Sat, 20 Mar 2010 12:02:26 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 8C84045683; Sat, 20 Mar 2010 12:02:20 +0100 (CET) Date: Sat, 20 Mar 2010 12:02:19 +0100 From: Pawel Jakub Dawidek To: Kip Macy Message-ID: <20100320110219.GD1733@garage.freebsd.pl> References: <201003162217.o2GMHMjU012285@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <201003162217.o2GMHMjU012285@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205231 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 11:02:31 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 16, 2010 at 10:17:22PM +0000, Kip Macy wrote: > Author: kmacy > Date: Tue Mar 16 22:17:21 2010 > New Revision: 205231 > URL: http://svn.freebsd.org/changeset/base/205231 >=20 > Log: > - reduce contention by breaking up ARC state locks in to 16 for data > and 16 for metadata > - export L2ARC tunables as sysctls > - add several kstats to track L2ARC state more precisely > - avoid holding a contended lock when atomically incrementing a > contended counter (no lock protection needed for atomics) Kip, don't get me wrong, I appreciate you're working on ZFS, but... I'm still working on ZFS, trying hard to bring it up-to-date and such invasive changes don't make it easier. I'm not against invasive changes in general, but I want them to be reviewed and tested properly. We discussed this multiple times and I thought the consensus was to provide hard number and workload examples that will prove the change really helps. And if it helps, present the finding to Sun/Oracle guys to get the changes into OpenSolaris, which is good for everyone: OpenSolaris gets faster ZFS, FreeBSD gets less pain in keeping ZFS up-to-date. Can I ask you to prepare description of the workload it helps, benchmark it and present the numbers on zfs-code@opensolaris.org? The ZFS team is built from really smart and mature developers. I'm sure that if the change is properly described with prove included they will accept it and the world will be a bit better place to live for everyone. Thanks. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkukqzoACgkQForvXbEpPzRn6wCeN3/JMA7uAv9igY1hH5C39DOu J70An0xF3J1Q/3cb9nnhULyFgIaHGBB2 =y6pk -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 11:05:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D6BB106566C; Sat, 20 Mar 2010 11:05:12 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C51B8FC08; Sat, 20 Mar 2010 11:05:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KB5BAY053531; Sat, 20 Mar 2010 11:05:11 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KB5Bx9053528; Sat, 20 Mar 2010 11:05:11 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003201105.o2KB5Bx9053528@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 20 Mar 2010 11:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205366 - in head: . usr.sbin/zic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 11:05:12 -0000 Author: gavin Date: Sat Mar 20 11:05:11 2010 New Revision: 205366 URL: http://svn.freebsd.org/changeset/base/205366 Log: wollman@ has OK'd dropping his maintainership of zic(8) Submitted by: linimon Approved by: wollman (via linimon) Modified: head/MAINTAINERS head/usr.sbin/zic/Makefile Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sat Mar 20 09:29:25 2010 (r205365) +++ head/MAINTAINERS Sat Mar 20 11:05:11 2010 (r205366) @@ -144,4 +144,3 @@ $ cd /usr/src; find */* -type f|xargs eg sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org -usr.sbin/zic/Makefile:MAINTAINER= wollman@FreeBSD.org Modified: head/usr.sbin/zic/Makefile ============================================================================== --- head/usr.sbin/zic/Makefile Sat Mar 20 09:29:25 2010 (r205365) +++ head/usr.sbin/zic/Makefile Sat Mar 20 11:05:11 2010 (r205366) @@ -1,7 +1,6 @@ # $FreeBSD$ # Vendor contact: tz@elsie.nci.nih.gov -MAINTAINER= wollman@FreeBSD.org SUBDIR= zic zdump From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 11:10:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88F081065673; Sat, 20 Mar 2010 11:10:31 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id D30568FC16; Sat, 20 Mar 2010 11:10:26 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id CB13445F1F; Sat, 20 Mar 2010 12:10:23 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 1F6EF45683; Sat, 20 Mar 2010 12:10:14 +0100 (CET) Date: Sat, 20 Mar 2010 12:10:13 +0100 From: Pawel Jakub Dawidek To: Kip Macy Message-ID: <20100320111013.GE1733@garage.freebsd.pl> References: <201003132141.o2DLfroC041203@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8NvZYKFJsRX2Djef" Content-Disposition: inline In-Reply-To: <201003132141.o2DLfroC041203@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205132 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 11:10:31 -0000 --8NvZYKFJsRX2Djef Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 13, 2010 at 09:41:53PM +0000, Kip Macy wrote: > Author: kmacy > Date: Sat Mar 13 21:41:52 2010 > New Revision: 205132 > URL: http://svn.freebsd.org/changeset/base/205132 >=20 > Log: > Don't bottleneck on acquiring the stream locks - this avoids a massive > drop off in throughput with large numbers of simultaneous reads This is another[1] change we agreed (I hoped) to properly evaluate first through zfs-code@opensolaris.org. 1) Message-ID: <20100320110219.GD1733@garage.freebsd.pl> --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --8NvZYKFJsRX2Djef Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkukrRUACgkQForvXbEpPzSXYQCeMeP3ehMjt8oKLNfOBkjKOT93 3zIAoOL0hrHaETFoOOsuc3mEIsoQ45oO =e4ml -----END PGP SIGNATURE----- --8NvZYKFJsRX2Djef-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 12:28:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D33BF106566C; Sat, 20 Mar 2010 12:28:27 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1ADCE8FC0C; Sat, 20 Mar 2010 12:28:26 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id DE15245E93; Sat, 20 Mar 2010 13:28:24 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9CD1D45CDC; Sat, 20 Mar 2010 13:28:16 +0100 (CET) Date: Sat, 20 Mar 2010 13:28:16 +0100 From: Pawel Jakub Dawidek To: Kip Macy Message-ID: <20100320122816.GG1733@garage.freebsd.pl> References: <201003162217.o2GMHMjU012285@svn.freebsd.org> <20100320110219.GD1733@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Lb0e7rgc7IsuDeGj" Content-Disposition: inline In-Reply-To: <20100320110219.GD1733@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205231 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 12:28:27 -0000 --Lb0e7rgc7IsuDeGj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 20, 2010 at 12:02:19PM +0100, Pawel Jakub Dawidek wrote: > On Tue, Mar 16, 2010 at 10:17:22PM +0000, Kip Macy wrote: > > Author: kmacy > > Date: Tue Mar 16 22:17:21 2010 > > New Revision: 205231 > > URL: http://svn.freebsd.org/changeset/base/205231 > >=20 > > Log: > > - reduce contention by breaking up ARC state locks in to 16 for data > > and 16 for metadata > > - export L2ARC tunables as sysctls > > - add several kstats to track L2ARC state more precisely > > - avoid holding a contended lock when atomically incrementing a > > contended counter (no lock protection needed for atomics) >=20 > Kip, don't get me wrong, I appreciate you're working on ZFS, but... >=20 > I'm still working on ZFS, trying hard to bring it up-to-date and such > invasive changes don't make it easier. >=20 > I'm not against invasive changes in general, but I want them to be > reviewed and tested properly. We discussed this multiple times and I > thought the consensus was to provide hard number and workload examples > that will prove the change really helps. And if it helps, present the > finding to Sun/Oracle guys to get the changes into OpenSolaris, which is > good for everyone: OpenSolaris gets faster ZFS, FreeBSD gets less pain > in keeping ZFS up-to-date. >=20 > Can I ask you to prepare description of the workload it helps, benchmark > it and present the numbers on zfs-code@opensolaris.org? >=20 > The ZFS team is built from really smart and mature developers. I'm sure > that if the change is properly described with prove included they will > accept it and the world will be a bit better place to live for everyone. Take a look at: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=3D6581122 --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Lb0e7rgc7IsuDeGj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkukv2AACgkQForvXbEpPzRzAACgywRHCXf3qa6Jaf4PAUob8pgL nOsAn3dX/uXbVmYUNtp2FuLr/lQ5pGB1 =b0zW -----END PGP SIGNATURE----- --Lb0e7rgc7IsuDeGj-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 12:39:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D42441065670; Sat, 20 Mar 2010 12:39:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85438FC2A; Sat, 20 Mar 2010 12:39:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KCdS5Q074259; Sat, 20 Mar 2010 12:39:28 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KCdSZw074257; Sat, 20 Mar 2010 12:39:28 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003201239.o2KCdSZw074257@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 20 Mar 2010 12:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205367 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 12:39:28 -0000 Author: gavin Date: Sat Mar 20 12:39:28 2010 New Revision: 205367 URL: http://svn.freebsd.org/changeset/base/205367 Log: Remove some stale entries from MAINTAINERS: - aradford@amcc.com bounces. - gad said to drop pkill(1) and ps(1). - jmallett said to drop libufs. - joerg said to drop fdc(4) and sppp(4) Submitted by: linimon Approved by: gad, jmallett, joerg (via linimon) Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sat Mar 20 11:05:11 2010 (r205366) +++ head/MAINTAINERS Sat Mar 20 12:39:28 2010 (r205367) @@ -36,8 +36,6 @@ pci bus imp,jhb Pre-commit review reque cdboot jhb Pre-commit review requested. pxeboot jhb Pre-commit review requested. witness jhb Pre-commit review requested. -twe aradford@amcc.com Pre-commit review requested -twa aradford@amcc.com Pre-commit review requested CAM gibbs, ken Pre-commit review requested. send to scsi@freebsd.org devstat(9) ken Pre-commit review requested. @@ -65,9 +63,6 @@ linprocfs des Advance notification reque lpr gad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. newsyslog(8) gad Heads-up appreciated. I'm going thru the PR's for it. -pkill gad Heads-up appreciated. -ps gad I am working on a number of changes to this. Would - like advance notice of major changes planned to it. cvs peter Heads-up appreciated, try not to break it. nvi peter Try not to break it. libz peter Try not to break it. @@ -76,9 +71,6 @@ share/mk ru This is a vital component of offer a pre-commit review for anything non-trivial. ipfw ipfw Pre-commit review preferred. send to ipfw@freebsd.org drm rnoland Just keep me informed of changes, try not to break it. -libufs jmallett Willing to handle problems, help with work. -fdc(4) joerg Just keep me informed of changes, try not to break it. -sppp(4) joerg Just keep me informed of changes, try not to break it. unifdef(1) fanf Pre-commit review requested. ntp roberto Pre-commit review requested. inetd dwmalone Recommends pre-commit review. From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:24:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F8141065670; Sat, 20 Mar 2010 14:24:19 +0000 (UTC) (envelope-from kmatthew.macy@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id F173F8FC26; Sat, 20 Mar 2010 14:24:18 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so643579qwi.7 for ; Sat, 20 Mar 2010 07:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=M/K7VeReEUyjPdDXlM3dHhd5LnXOcZ/AdzYQhIaEReA=; b=h3241JhNXhaQV2PmSiOw9wOhboZ3micUF7rTqiX4LUW28ylSMNTzDEbyhorRGYlpY8 Kh/QxpR1bPQ4Eywip5yooKyPF+cOb6rgT2e+UdXriyTlfGFx1eWp9ea6xogo8nS5MlZQ 0WEOgPDjIuyNeBe1xDiFOTBGHD08vB90tZQ6g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=PgidF71678ztXzHjIPq3UU8oTFoWAgG92mrLgaGisHWPNQvdkJu2HEQey9oSYtUahB GbFB9WYnMk+iGDQrLfKQTnHtoF3Aa+pFY9ytd8ko+kdYMfATuLLDWKgYgbWZJ8exC717 RhNo0lAU0gp4W5BHKHE9c3y/jC4gKQ8u38GRA= MIME-Version: 1.0 Sender: kmatthew.macy@gmail.com Received: by 10.229.219.203 with SMTP id hv11mr1820922qcb.46.1269095058131; Sat, 20 Mar 2010 07:24:18 -0700 (PDT) In-Reply-To: <20100320111013.GE1733@garage.freebsd.pl> References: <201003132141.o2DLfroC041203@svn.freebsd.org> <20100320111013.GE1733@garage.freebsd.pl> Date: Sat, 20 Mar 2010 07:24:18 -0700 X-Google-Sender-Auth: 99a661b1519ceb89 Message-ID: <82c4140e1003200724r924d6e0mf626406f4e252c07@mail.gmail.com> From: "K. Macy" To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kip Macy Subject: Re: svn commit: r205132 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:24:19 -0000 Be my guest. I've established the technical merits in production. Thanks, Kip On Mar 20, 2010 4:10 AM, "Pawel Jakub Dawidek" wrote: On Sat, Mar 13, 2010 at 09:41:53PM +0000, Kip Macy wrote: > Author: kmacy > Date: Sat Mar 13 21:41:5... This is another[1] change we agreed (I hoped) to properly evaluate first through zfs-code@opensolaris.org. 1) Message-ID: <20100320110219.GD1733@garage.freebsd.pl> -- Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:35:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90416106566B; Sat, 20 Mar 2010 14:35:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D52A8FC1F; Sat, 20 Mar 2010 14:35:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KEZOsE099801; Sat, 20 Mar 2010 14:35:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KEZOFj099799; Sat, 20 Mar 2010 14:35:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201435.o2KEZOFj099799@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 14:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205370 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:35:24 -0000 Author: nwhitehorn Date: Sat Mar 20 14:35:24 2010 New Revision: 205370 URL: http://svn.freebsd.org/changeset/base/205370 Log: Revisit locking in the 64-bit AIM PMAP. The PVO head for a page is generally protected by the VM page queue mutex. Instead of extending the table lock to cover the PVO heads, add some asserts that the page queue mutex is in fact held. This fixes several LORs and possible deadlocks. This also adds an optimization to moea64_kextract() useful for direct-mapped quantities, like UMA buffers. Being able to use this from inside UMA removes an additional LOR. Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 14:26:30 2010 (r205369) +++ head/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 14:35:24 2010 (r205370) @@ -1507,10 +1507,10 @@ moea64_remove_write(mmu_t mmu, vm_page_t return; lo = moea64_attr_fetch(m); SYNC(); - LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { pmap = pvo->pvo_pmap; PMAP_LOCK(pmap); + LOCK_TABLE(); if ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) != LPTE_BR) { pt = moea64_pvo_to_pte(pvo, -1); pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; @@ -1523,9 +1523,9 @@ moea64_remove_write(mmu_t mmu, vm_page_t pvo->pvo_pmap, PVO_VADDR(pvo)); } } + UNLOCK_TABLE(); PMAP_UNLOCK(pmap); } - UNLOCK_TABLE(); if ((lo & LPTE_CHG) != 0) { moea64_attr_clear(m, LPTE_CHG); vm_page_dirty(m); @@ -1604,6 +1604,13 @@ moea64_kextract(mmu_t mmu, vm_offset_t v struct pvo_entry *pvo; vm_paddr_t pa; + /* + * Shortcut the direct-mapped case when applicable. We never put + * anything but 1:1 mappings below VM_MIN_KERNEL_ADDRESS. + */ + if (va < VM_MIN_KERNEL_ADDRESS) + return (va); + PMAP_LOCK(kernel_pmap); pvo = moea64_pvo_find_va(kernel_pmap, va & ~ADDR_POFF, NULL); KASSERT(pvo != NULL, ("moea64_kextract: no addr found")); @@ -1661,17 +1668,15 @@ moea64_page_exists_quick(mmu_t mmu, pmap if (!moea64_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + loops = 0; - LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { - if (pvo->pvo_pmap == pmap) { - UNLOCK_TABLE(); + if (pvo->pvo_pmap == pmap) return (TRUE); - } if (++loops >= 16) break; } - UNLOCK_TABLE(); return (FALSE); } @@ -1690,11 +1695,9 @@ moea64_page_wired_mappings(mmu_t mmu, vm if (!moea64_initialized || (m->flags & PG_FICTITIOUS) != 0) return (count); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) if ((pvo->pvo_vaddr & PVO_WIRED) != 0) count++; - UNLOCK_TABLE(); return (count); } @@ -1913,7 +1916,6 @@ moea64_remove_all(mmu_t mmu, vm_page_t m mtx_assert(&vm_page_queue_mtx, MA_OWNED); pvo_head = vm_page_to_pvoh(m); - LOCK_TABLE(); for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { next_pvo = LIST_NEXT(pvo, pvo_vlink); @@ -1923,7 +1925,6 @@ moea64_remove_all(mmu_t mmu, vm_page_t m moea64_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } - UNLOCK_TABLE(); if ((m->flags & PG_WRITEABLE) && moea64_is_modified(mmu, m)) { moea64_attr_clear(m, LPTE_CHG); vm_page_dirty(m); @@ -2334,7 +2335,8 @@ moea64_query_bit(vm_page_t m, u_int64_t if (moea64_attr_fetch(m) & ptebit) return (TRUE); - LOCK_TABLE(); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ @@ -2344,7 +2346,6 @@ moea64_query_bit(vm_page_t m, u_int64_t */ if (pvo->pvo_pte.lpte.pte_lo & ptebit) { moea64_attr_save(m, ptebit); - UNLOCK_TABLE(); MOEA_PVO_CHECK(pvo); /* sanity check */ return (TRUE); } @@ -2364,6 +2365,7 @@ moea64_query_bit(vm_page_t m, u_int64_t * REF/CHG bits from the valid PTE. If the appropriate * ptebit is set, cache it and return success. */ + LOCK_TABLE(); pt = moea64_pvo_to_pte(pvo, -1); if (pt != NULL) { moea64_pte_synch(pt, &pvo->pvo_pte.lpte); @@ -2375,8 +2377,8 @@ moea64_query_bit(vm_page_t m, u_int64_t return (TRUE); } } + UNLOCK_TABLE(); } - UNLOCK_TABLE(); return (FALSE); } @@ -2389,6 +2391,8 @@ moea64_clear_bit(vm_page_t m, u_int64_t struct lpte *pt; uint64_t rv; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + /* * Clear the cached value. */ @@ -2409,10 +2413,10 @@ moea64_clear_bit(vm_page_t m, u_int64_t * valid pte clear the ptebit from the valid pte. */ count = 0; - LOCK_TABLE(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ + LOCK_TABLE(); pt = moea64_pvo_to_pte(pvo, -1); if (pt != NULL) { moea64_pte_synch(pt, &pvo->pvo_pte.lpte); @@ -2424,8 +2428,8 @@ moea64_clear_bit(vm_page_t m, u_int64_t rv |= pvo->pvo_pte.lpte.pte_lo; pvo->pvo_pte.lpte.pte_lo &= ~ptebit; MOEA_PVO_CHECK(pvo); /* sanity check */ + UNLOCK_TABLE(); } - UNLOCK_TABLE(); if (origbit != NULL) { *origbit = rv; From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:36:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C75F1065673; Sat, 20 Mar 2010 14:36:40 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0934B8FC20; Sat, 20 Mar 2010 14:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KEadQJ000235; Sat, 20 Mar 2010 14:36:39 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KEadam000232; Sat, 20 Mar 2010 14:36:39 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003201436.o2KEadam000232@svn.freebsd.org> From: Hiroki Sato Date: Sat, 20 Mar 2010 14:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205371 - in releng/7.3/release/doc: en_US.ISO8859-1/relnotes share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:36:40 -0000 Author: hrs Date: Sat Mar 20 14:36:39 2010 New Revision: 205371 URL: http://svn.freebsd.org/changeset/base/205371 Log: Update release notes: URL of Errata doc added[1], s/release candidate/release/[1], grammatical fixes[1], description on pc98 boot2 fixed[2], description on gstripe(8) improved[2], description on vfs.flushbufqtarget improved[2], and description on tzcode2009k improved[3]. Submitted by: dhw[1], ivoras[2], and edwin[3] Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml releng/7.3/release/doc/share/sgml/release.ent Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Mar 20 14:35:24 2010 (r205370) +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Mar 20 14:36:39 2010 (r205371) @@ -93,7 +93,7 @@ release cycle or after the release. Typically, it contains information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. + &release.current; can be found on . @@ -239,7 +239,7 @@ Also, the jail parameter ip4.saddrsel and ip6.saddrsel are boolean option to enable the source address selection for IPv4 and IPv6, respectively. - If another boolean parameters + If the boolean parameters ip4.nosaddrsel and ip6.nosaddrsel are set, the child jails do not inherit the address selection options of the @@ -249,7 +249,7 @@ been increased to 512GB. The &man.lindev.4; driver has been added. This is for - linux-specific pseudo devices and currently used only for + Linux-specific pseudo devices and currently used only for /dev/full. &os; Linux emulation layer now supports @@ -311,7 +311,7 @@ Boot Loader Changes A new boot loader gptzfsboot, which - support GPT and ZFS has been added. + supports GPT and ZFS has been added. The boot loader zfsboot now always uses 64-bit LBAs and supports more than seven drives in the @@ -330,7 +330,7 @@ and GPT and they are synchronized with each other. The boot2 program - has been replaced with the latest version for + has been reimplemented based on the latest version for &arch.i386;. @@ -379,7 +379,7 @@ Performance Monitoring Counter support has been added. This consists of the kernel driver, &man.pmc.3; interface library, and userland utilities &man.pmcannotate.8;, - pmccontrol.8;, and &man.pmcstat.8;, and allows applications + &man.pmccontrol.8;, and &man.pmcstat.8;, and allows applications to use hardware performance counters to gather performance data about specific processes or for the system as a whole. @@ -476,8 +476,8 @@ Several bugs in the &man.mxge.4; driver have been fixed and the firmware version is now 1.4.48b. It could - lost the promiscuous flag on resetting and a kernel panic - on the hardware fault. + lose the promiscuous flag on resetting and cause a kernel + panic on the hardware fault. A bug in the &man.nfe.4; driver has been fixed. It caused buffer allocation failure for jumbo frames. @@ -599,7 +599,12 @@ 92 bytes which is written by OpenSolaris. The default stripe size of &man.gstripe.8; GEOM class - has been changed from 4KB to 64KB. + has been changed from 4KB to 64KB. This change will affect + users preferring the create command over + the label command, which will now need to + explicitly specify the old stripe size ( + 4096) in order to use their old + &man.gstripe.8; volumes. The &man.hptrr.4; driver now supports a new loader tunable hw.hptrr.attach_generic to @@ -635,14 +640,15 @@ fixed. A new sysctl variable for the &man.VFS.9; subsystem - vfs.flushbufqtarget has been added. This - fixes issues in bufdaemon, a kernel - process responsible for flushing dirty buffers, which can - cause the process to deadlock in a certain workload. The - value of the variable determines the number of buffers will - be flushed before allocating a new buffer. The default - value of the variable is -1 - (disabled). + vfs.flushbufqtarget has been added. + This can fix issues in bufdaemon, a + kernel process responsible for flushing dirty buffers, which + can cause the process to deadlock in a certain workload. + The value of the variable determines the number of buffers + will be flushed before allocating a new buffer. The default + value of the variable on 7.3-RELEASE is + -1 (disabled). The &os; 8.0-RELEASE uses + 100 by default. ZFS has been updated from version 6 to version 13. This update includes numerous new ZFS features, such as @@ -979,8 +985,11 @@ static_arp_gw="192.168.1.1 00:01:02:03:0 The timezone database has been updated to the tzdata2010b release. - The timezone binary has been updated - to the tzcode2009k release. + The timezone libraries (stdtime part of + libc) and related binaries + (&man.zic.8; and &man.zdump.8;) have been updated to the + tzcode2009k release. Note that + &man.tzsetup.8; needs to be run after the installation. unifdef has been updated to version 1.188. Modified: releng/7.3/release/doc/share/sgml/release.ent ============================================================================== --- releng/7.3/release/doc/share/sgml/release.ent Sat Mar 20 14:35:24 2010 (r205370) +++ releng/7.3/release/doc/share/sgml/release.ent Sat Mar 20 14:36:39 2010 (r205371) @@ -21,10 +21,11 @@ + - + From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:42:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BECB51065748; Sat, 20 Mar 2010 14:42:16 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD2E08FC1D; Sat, 20 Mar 2010 14:42:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KEgGuV001536; Sat, 20 Mar 2010 14:42:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KEgGxn001534; Sat, 20 Mar 2010 14:42:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003201442.o2KEgGxn001534@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 20 Mar 2010 14:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205372 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:42:16 -0000 Author: gavin Date: Sat Mar 20 14:42:16 2010 New Revision: 205372 URL: http://svn.freebsd.org/changeset/base/205372 Log: Tweak language to make one point potentially clearer for non-native spekers PR: bin/121424 Submitted by: "Julian H. Stacey" Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Sat Mar 20 14:36:39 2010 (r205371) +++ head/sbin/ipfw/ipfw.8 Sat Mar 20 14:42:16 2010 (r205372) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2009 +.Dd March 20, 2010 .Dt IPFW 8 .Os .Sh NAME @@ -1501,7 +1501,7 @@ is invalid) whenever .Cm xmit is used. .Pp -A packet may not have a receive or transmit interface: packets +A packet might not have a receive or transmit interface: packets originating from the local host have no receive interface, while packets destined for the local host have no transmit interface. From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:49:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE83C106566B; Sat, 20 Mar 2010 14:49:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9C6C8FC16; Sat, 20 Mar 2010 14:49:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KEni1Y003259; Sat, 20 Mar 2010 14:49:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KEnip8003255; Sat, 20 Mar 2010 14:49:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201449.o2KEnip8003255@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 14:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205373 - in stable/8: share/man/man4/man4.powerpc sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:49:44 -0000 Author: nwhitehorn Date: Sat Mar 20 14:49:44 2010 New Revision: 205373 URL: http://svn.freebsd.org/changeset/base/205373 Log: MFC r204082,204179,204180,204218,204241,204247,204270,204692: Provide thermal management and monitoring features in smu(4). This allows fan control and thermal monitoring on SMU-based Apple G5 machines, as well as an led(4) interface to control the sleep LED. Added: stable/8/share/man/man4/man4.powerpc/smu.4 - copied, changed from r204241, head/share/man/man4/man4.powerpc/smu.4 Modified: stable/8/share/man/man4/man4.powerpc/Makefile stable/8/sys/powerpc/powermac/smu.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/man4.powerpc/Makefile ============================================================================== --- stable/8/share/man/man4/man4.powerpc/Makefile Sat Mar 20 14:42:16 2010 (r205372) +++ stable/8/share/man/man4/man4.powerpc/Makefile Sat Mar 20 14:49:44 2010 (r205373) @@ -7,6 +7,7 @@ MAN= adb.4 \ cuda.4 \ pmu.4 \ powermac_nvram.4 \ + smu.4 \ snd_ai2s.4 \ snd_davbus.4 \ tsec.4 Copied and modified: stable/8/share/man/man4/man4.powerpc/smu.4 (from r204241, head/share/man/man4/man4.powerpc/smu.4) ============================================================================== --- head/share/man/man4/man4.powerpc/smu.4 Tue Feb 23 04:56:06 2010 (r204241, copy source) +++ stable/8/share/man/man4/man4.powerpc/smu.4 Sat Mar 20 14:49:44 2010 (r205373) @@ -41,7 +41,7 @@ kernel configuration file: .Sh DESCRIPTION The .Nm -driver provides support for the System Management Unit (PMU) found in many +driver provides support for the System Management Unit (SMU) found in many Apple G5 systems. This includes most Power Macintosh G5 and all iMac G5 systems. .Pp @@ -75,6 +75,9 @@ The following sysctls can be used to con power management behavior and to examine current system power and thermal conditions. .Bl -tag -width indent +.It Va dev.smu.%d.server_mode +Restart after power failure behavior (1 causes system to reboot after power +cut, 0 causes system to remain off). .It Va dev.smu.%d.target_temp Target system temperature, in degrees Celsius. The .Nm @@ -112,7 +115,7 @@ annunciator interface at The .Nm device driver appeared in -.Fx 9.0 . +.Fx 8.0 . .Sh AUTHORS .An -nosplit The Modified: stable/8/sys/powerpc/powermac/smu.c ============================================================================== --- stable/8/sys/powerpc/powermac/smu.c Sat Mar 20 14:42:16 2010 (r205372) +++ stable/8/sys/powerpc/powermac/smu.c Sat Mar 20 14:49:44 2010 (r205373) @@ -34,21 +34,53 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include #include #include +#include #include +#include #include +#include #include #include #include struct smu_cmd { - uint8_t cmd; + volatile uint8_t cmd; uint8_t len; uint8_t data[254]; + + STAILQ_ENTRY(smu_cmd) cmd_q; +}; + +STAILQ_HEAD(smu_cmdq, smu_cmd); + +struct smu_fan { + cell_t reg; + cell_t min_rpm; + cell_t max_rpm; + cell_t unmanaged_rpm; + char location[32]; + + int old_style; + int setpoint; +}; + +struct smu_sensor { + cell_t reg; + char location[32]; + enum { + SMU_CURRENT_SENSOR, + SMU_VOLTAGE_SENSOR, + SMU_POWER_SENSOR, + SMU_TEMP_SENSOR + } type; }; struct smu_softc { @@ -62,9 +94,40 @@ struct smu_softc { bus_space_tag_t sc_bt; bus_space_handle_t sc_mailbox; - struct smu_cmd *sc_cmd; + struct smu_cmd *sc_cmd, *sc_cur_cmd; bus_addr_t sc_cmd_phys; bus_dmamap_t sc_cmd_dmamap; + struct smu_cmdq sc_cmdq; + + struct smu_fan *sc_fans; + int sc_nfans; + struct smu_sensor *sc_sensors; + int sc_nsensors; + + int sc_doorbellirqid; + struct resource *sc_doorbellirq; + void *sc_doorbellirqcookie; + + struct proc *sc_fanmgt_proc; + time_t sc_lastuserchange; + + /* Calibration data */ + uint16_t sc_cpu_diode_scale; + int16_t sc_cpu_diode_offset; + + uint16_t sc_cpu_volt_scale; + int16_t sc_cpu_volt_offset; + uint16_t sc_cpu_curr_scale; + int16_t sc_cpu_curr_offset; + + uint16_t sc_slots_pow_scale; + int16_t sc_slots_pow_offset; + + /* Thermal management parameters */ + int sc_target_temp; /* Default 55 C */ + int sc_critical_temp; /* Default 90 C */ + + struct cdev *sc_leddev; }; /* regular bus attachment functions */ @@ -77,6 +140,18 @@ static int smu_attach(device_t); static void smu_cpufreq_pre_change(device_t, const struct cf_level *level); static void smu_cpufreq_post_change(device_t, const struct cf_level *level); +/* utility functions */ +static int smu_run_cmd(device_t dev, struct smu_cmd *cmd, int wait); +static int smu_get_datablock(device_t dev, int8_t id, uint8_t *buf, + size_t len); +static void smu_attach_fans(device_t dev, phandle_t fanroot); +static void smu_attach_sensors(device_t dev, phandle_t sensroot); +static void smu_fan_management_proc(void *xdev); +static void smu_manage_fans(device_t smu); +static void smu_set_sleepled(void *xdev, int onoff); +static int smu_server_mode(SYSCTL_HANDLER_ARGS); +static void smu_doorbell_intr(void *xdev); + /* where to find the doorbell GPIO */ static device_t smu_doorbell = NULL; @@ -97,11 +172,43 @@ static driver_t smu_driver = { static devclass_t smu_devclass; DRIVER_MODULE(smu, nexus, smu_driver, smu_devclass, 0, 0); +MALLOC_DEFINE(M_SMU, "smu", "SMU Sensor Information"); -#define SMU_MAILBOX 0x860c +#define SMU_MAILBOX 0x8000860c +#define SMU_FANMGT_INTERVAL 1000 /* ms */ /* Command types */ -#define SMU_POWER 0xaa +#define SMU_ADC 0xd8 +#define SMU_FAN 0x4a +#define SMU_I2C 0x9a +#define SMU_I2C_SIMPLE 0x00 +#define SMU_I2C_NORMAL 0x01 +#define SMU_I2C_COMBINED 0x02 +#define SMU_MISC 0xee +#define SMU_MISC_GET_DATA 0x02 +#define SMU_MISC_LED_CTRL 0x04 +#define SMU_POWER 0xaa +#define SMU_POWER_EVENTS 0x8f +#define SMU_PWR_GET_POWERUP 0x00 +#define SMU_PWR_SET_POWERUP 0x01 +#define SMU_PWR_CLR_POWERUP 0x02 + +/* Power event types */ +#define SMU_WAKEUP_KEYPRESS 0x01 +#define SMU_WAKEUP_AC_INSERT 0x02 +#define SMU_WAKEUP_AC_CHANGE 0x04 +#define SMU_WAKEUP_RING 0x10 + +/* Data blocks */ +#define SMU_CPUTEMP_CAL 0x18 +#define SMU_CPUVOLT_CAL 0x21 +#define SMU_SLOTPW_CAL 0x78 + +/* Partitions */ +#define SMU_PARTITION 0x3e +#define SMU_PARTITION_LATEST 0x01 +#define SMU_PARTITION_BASE 0x02 +#define SMU_PARTITION_UPDATE 0x03 static int smu_probe(device_t dev) @@ -127,10 +234,14 @@ static int smu_attach(device_t dev) { struct smu_softc *sc; + phandle_t node, child; + uint8_t data[12]; sc = device_get_softc(dev); mtx_init(&sc->sc_mtx, "smu", NULL, MTX_DEF); + sc->sc_cur_cmd = NULL; + sc->sc_doorbellirqid = -1; /* * Map the mailbox area. This should be determined from firmware, @@ -139,7 +250,7 @@ smu_attach(device_t dev) bus_dma_tag_create(NULL, 16, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, PAGE_SIZE, 1, PAGE_SIZE, 0, NULL, NULL, &(sc->sc_dmatag)); - sc->sc_bt = &bs_be_tag; + sc->sc_bt = &bs_le_tag; bus_space_map(sc->sc_bt, SMU_MAILBOX, 4, 0, &sc->sc_mailbox); /* @@ -150,6 +261,7 @@ smu_attach(device_t dev) BUS_DMA_ZERO, &sc->sc_cmd_dmamap); bus_dmamap_load(sc->sc_dmatag, sc->sc_cmd_dmamap, sc->sc_cmd, PAGE_SIZE, smu_phys_callback, sc, 0); + STAILQ_INIT(&sc->sc_cmdq); /* * Set up handlers to change CPU voltage when CPU frequency is changed. @@ -159,51 +271,241 @@ smu_attach(device_t dev) EVENTHANDLER_REGISTER(cpufreq_post_change, smu_cpufreq_post_change, dev, EVENTHANDLER_PRI_ANY); + /* + * Detect and attach child devices. + */ + node = ofw_bus_get_node(dev); + for (child = OF_child(node); child != 0; child = OF_peer(child)) { + char name[32]; + memset(name, 0, sizeof(name)); + OF_getprop(child, "name", name, sizeof(name)); + + if (strncmp(name, "rpm-fans", 9) == 0 || + strncmp(name, "fans", 5) == 0) + smu_attach_fans(dev, child); + + if (strncmp(name, "sensors", 8) == 0) + smu_attach_sensors(dev, child); + } + + /* + * Collect calibration constants. + */ + smu_get_datablock(dev, SMU_CPUTEMP_CAL, data, sizeof(data)); + sc->sc_cpu_diode_scale = (data[4] << 8) + data[5]; + sc->sc_cpu_diode_offset = (data[6] << 8) + data[7]; + + smu_get_datablock(dev, SMU_CPUVOLT_CAL, data, sizeof(data)); + sc->sc_cpu_volt_scale = (data[4] << 8) + data[5]; + sc->sc_cpu_volt_offset = (data[6] << 8) + data[7]; + sc->sc_cpu_curr_scale = (data[8] << 8) + data[9]; + sc->sc_cpu_curr_offset = (data[10] << 8) + data[11]; + + smu_get_datablock(dev, SMU_SLOTPW_CAL, data, sizeof(data)); + sc->sc_slots_pow_scale = (data[4] << 8) + data[5]; + sc->sc_slots_pow_offset = (data[6] << 8) + data[7]; + + /* + * Set up simple-minded thermal management. + */ + sc->sc_target_temp = 55; + sc->sc_critical_temp = 90; + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "target_temp", CTLTYPE_INT | CTLFLAG_RW, &sc->sc_target_temp, + sizeof(int), "Target temperature (C)"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "critical_temp", CTLTYPE_INT | CTLFLAG_RW, + &sc->sc_critical_temp, sizeof(int), "Critical temperature (C)"); + + kproc_create(smu_fan_management_proc, dev, &sc->sc_fanmgt_proc, + RFHIGHPID, 0, "smu_thermal"); + + /* + * Set up LED interface + */ + sc->sc_leddev = led_create(smu_set_sleepled, dev, "sleepled"); + + /* + * Reset on power loss behavior + */ + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "server_mode", CTLTYPE_INT | CTLFLAG_RW, dev, 0, + smu_server_mode, "I", "Enable reboot after power failure"); + + /* + * Set up doorbell interrupt. + */ + sc->sc_doorbellirqid = 0; + sc->sc_doorbellirq = bus_alloc_resource_any(smu_doorbell, SYS_RES_IRQ, + &sc->sc_doorbellirqid, RF_ACTIVE); + bus_setup_intr(smu_doorbell, sc->sc_doorbellirq, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, smu_doorbell_intr, dev, + &sc->sc_doorbellirqcookie); + powerpc_config_intr(rman_get_start(sc->sc_doorbellirq), + INTR_TRIGGER_EDGE, INTR_POLARITY_LOW); + return (0); } -static int -smu_run_cmd(device_t dev, struct smu_cmd *cmd) +static void +smu_send_cmd(device_t dev, struct smu_cmd *cmd) { struct smu_softc *sc; - int doorbell_ack, result; sc = device_get_softc(dev); - mtx_lock(&sc->sc_mtx); + mtx_assert(&sc->sc_mtx, MA_OWNED); + + powerpc_pow_enabled = 0; /* SMU cannot work if we go to NAP */ + sc->sc_cur_cmd = cmd; /* Copy the command to the mailbox */ - memcpy(sc->sc_cmd, cmd, sizeof(*cmd)); + sc->sc_cmd->cmd = cmd->cmd; + sc->sc_cmd->len = cmd->len; + memcpy(sc->sc_cmd->data, cmd->data, sizeof(cmd->data)); bus_dmamap_sync(sc->sc_dmatag, sc->sc_cmd_dmamap, BUS_DMASYNC_PREWRITE); bus_space_write_4(sc->sc_bt, sc->sc_mailbox, 0, sc->sc_cmd_phys); - /* Invalidate the cacheline it is in -- SMU bypasses the cache */ - __asm __volatile("dcbst 0,%0; sync" :: "r"(sc->sc_cmd): "memory"); + /* Flush the cacheline it is in -- SMU bypasses the cache */ + __asm __volatile("sync; dcbf 0,%0; sync" :: "r"(sc->sc_cmd): "memory"); /* Ring SMU doorbell */ macgpio_write(smu_doorbell, GPIO_DDR_OUTPUT); +} - /* Wait for the doorbell GPIO to go high, signaling completion */ - do { - /* XXX: timeout */ - DELAY(50); - doorbell_ack = macgpio_read(smu_doorbell); - } while (!doorbell_ack); +static void +smu_doorbell_intr(void *xdev) +{ + device_t smu; + struct smu_softc *sc; + int doorbell_ack; + + smu = xdev; + doorbell_ack = macgpio_read(smu_doorbell); + sc = device_get_softc(smu); + + if (doorbell_ack != (GPIO_DDR_OUTPUT | GPIO_LEVEL_RO | GPIO_DATA)) + return; + + mtx_lock(&sc->sc_mtx); + + if (sc->sc_cur_cmd == NULL) /* spurious */ + goto done; /* Check result. First invalidate the cache again... */ __asm __volatile("dcbf 0,%0; sync" :: "r"(sc->sc_cmd) : "memory"); bus_dmamap_sync(sc->sc_dmatag, sc->sc_cmd_dmamap, BUS_DMASYNC_POSTREAD); + sc->sc_cur_cmd->cmd = sc->sc_cmd->cmd; + sc->sc_cur_cmd->len = sc->sc_cmd->len; + memcpy(sc->sc_cur_cmd->data, sc->sc_cmd->data, + sizeof(sc->sc_cmd->data)); + wakeup(sc->sc_cur_cmd); + sc->sc_cur_cmd = NULL; + powerpc_pow_enabled = 1; + + done: + /* Queue next command if one is pending */ + if (STAILQ_FIRST(&sc->sc_cmdq) != NULL) { + sc->sc_cur_cmd = STAILQ_FIRST(&sc->sc_cmdq); + STAILQ_REMOVE_HEAD(&sc->sc_cmdq, cmd_q); + smu_send_cmd(smu, sc->sc_cur_cmd); + } + + mtx_unlock(&sc->sc_mtx); +} + +static int +smu_run_cmd(device_t dev, struct smu_cmd *cmd, int wait) +{ + struct smu_softc *sc; + uint8_t cmd_code; + int error; + + sc = device_get_softc(dev); + cmd_code = cmd->cmd; + + mtx_lock(&sc->sc_mtx); + if (sc->sc_cur_cmd != NULL) { + STAILQ_INSERT_TAIL(&sc->sc_cmdq, cmd, cmd_q); + } else + smu_send_cmd(dev, cmd); + mtx_unlock(&sc->sc_mtx); + + if (!wait) + return (0); + + if (sc->sc_doorbellirqid < 0) { + /* Poll if the IRQ has not been set up yet */ + do { + DELAY(50); + smu_doorbell_intr(dev); + } while (sc->sc_cur_cmd != NULL); + } else { + /* smu_doorbell_intr will wake us when the command is ACK'ed */ + error = tsleep(cmd, 0, "smu", 800 * hz / 1000); + if (error != 0) + smu_doorbell_intr(dev); /* One last chance */ + + if (error != 0) { + mtx_lock(&sc->sc_mtx); + if (cmd->cmd == cmd_code) { /* Never processed */ + /* Abort this command if we timed out */ + if (sc->sc_cur_cmd == cmd) + sc->sc_cur_cmd = NULL; + else + STAILQ_REMOVE(&sc->sc_cmdq, cmd, smu_cmd, + cmd_q); + mtx_unlock(&sc->sc_mtx); + return (error); + } + error = 0; + mtx_unlock(&sc->sc_mtx); + } + } + /* SMU acks the command by inverting the command bits */ - if (sc->sc_cmd->cmd == ~cmd->cmd) - result = 0; + if (cmd->cmd == ((~cmd_code) & 0xff)) + error = 0; else - result = EIO; + error = EIO; - mtx_unlock(&sc->sc_mtx); + return (error); +} + +static int +smu_get_datablock(device_t dev, int8_t id, uint8_t *buf, size_t len) +{ + struct smu_cmd cmd; + uint8_t addr[4]; - return (result); + cmd.cmd = SMU_PARTITION; + cmd.len = 2; + cmd.data[0] = SMU_PARTITION_LATEST; + cmd.data[1] = id; + + smu_run_cmd(dev, &cmd, 1); + + addr[0] = addr[1] = 0; + addr[2] = cmd.data[0]; + addr[3] = cmd.data[1]; + + cmd.cmd = SMU_MISC; + cmd.len = 7; + cmd.data[0] = SMU_MISC_GET_DATA; + cmd.data[1] = sizeof(addr); + memcpy(&cmd.data[2], addr, sizeof(addr)); + cmd.data[6] = len; + + smu_run_cmd(dev, &cmd, 1); + memcpy(buf, cmd.data, len); + return (0); } static void @@ -222,7 +524,7 @@ smu_slew_cpu_voltage(device_t dev, int t cmd.data[6] = 1; cmd.data[7] = to; - smu_run_cmd(dev, &cmd); + smu_run_cmd(dev, &cmd, 1); } static void @@ -286,3 +588,458 @@ doorbell_attach(device_t dev) smu_doorbell = dev; return (0); } + +/* + * Sensor and fan management + */ + +static int +smu_fan_set_rpm(device_t smu, struct smu_fan *fan, int rpm) +{ + struct smu_cmd cmd; + int error; + + cmd.cmd = SMU_FAN; + error = EIO; + + /* Clamp to allowed range */ + rpm = max(fan->min_rpm, rpm); + rpm = min(fan->max_rpm, rpm); + + /* + * Apple has two fan control mechanisms. We can't distinguish + * them except by seeing if the new one fails. If the new one + * fails, use the old one. + */ + + if (!fan->old_style) { + cmd.len = 4; + cmd.data[0] = 0x30; + cmd.data[1] = fan->reg; + cmd.data[2] = (rpm >> 8) & 0xff; + cmd.data[3] = rpm & 0xff; + + error = smu_run_cmd(smu, &cmd, 1); + if (error) + fan->old_style = 1; + } + + if (fan->old_style) { + cmd.len = 14; + cmd.data[0] = 0; + cmd.data[1] = 1 << fan->reg; + cmd.data[2 + 2*fan->reg] = (rpm >> 8) & 0xff; + cmd.data[3 + 2*fan->reg] = rpm & 0xff; + error = smu_run_cmd(smu, &cmd, 1); + } + + if (error == 0) + fan->setpoint = rpm; + + return (error); +} + +static int +smu_fan_read_rpm(device_t smu, struct smu_fan *fan) +{ + struct smu_cmd cmd; + + cmd.cmd = SMU_FAN; + cmd.len = 1; + cmd.data[0] = 1; + + smu_run_cmd(smu, &cmd, 1); + + return ((cmd.data[fan->reg*2+1] << 8) | cmd.data[fan->reg*2+2]); +} + +static int +smu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t smu; + struct smu_softc *sc; + struct smu_fan *fan; + int rpm, error; + + smu = arg1; + sc = device_get_softc(smu); + fan = &sc->sc_fans[arg2]; + + rpm = smu_fan_read_rpm(smu, fan); + error = sysctl_handle_int(oidp, &rpm, 0, req); + + if (error || !req->newptr) + return (error); + + sc->sc_lastuserchange = time_uptime; + + return (smu_fan_set_rpm(smu, fan, rpm)); +} + +static void +smu_attach_fans(device_t dev, phandle_t fanroot) +{ + struct smu_fan *fan; + struct smu_softc *sc; + struct sysctl_oid *oid, *fanroot_oid; + struct sysctl_ctx_list *ctx; + phandle_t child; + char type[32], sysctl_name[32]; + int i; + + sc = device_get_softc(dev); + sc->sc_nfans = 0; + + for (child = OF_child(fanroot); child != 0; child = OF_peer(child)) + sc->sc_nfans++; + + if (sc->sc_nfans == 0) { + device_printf(dev, "WARNING: No fans detected!\n"); + return; + } + + sc->sc_fans = malloc(sc->sc_nfans * sizeof(struct smu_fan), M_SMU, + M_WAITOK | M_ZERO); + + fan = sc->sc_fans; + sc->sc_nfans = 0; + + ctx = device_get_sysctl_ctx(dev); + fanroot_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fans", + CTLFLAG_RD, 0, "SMU Fan Information"); + + for (child = OF_child(fanroot); child != 0; child = OF_peer(child)) { + OF_getprop(child, "device_type", type, sizeof(type)); + if (strcmp(type, "fan-rpm-control") != 0) + continue; + + fan->old_style = 0; + OF_getprop(child, "reg", &fan->reg, sizeof(cell_t)); + OF_getprop(child, "min-value", &fan->min_rpm, sizeof(cell_t)); + OF_getprop(child, "max-value", &fan->max_rpm, sizeof(cell_t)); + + if (OF_getprop(child, "unmanaged-value", &fan->unmanaged_rpm, + sizeof(cell_t)) != sizeof(cell_t)) + fan->unmanaged_rpm = fan->max_rpm; + + fan->setpoint = smu_fan_read_rpm(dev, fan); + + OF_getprop(child, "location", fan->location, + sizeof(fan->location)); + + /* Add sysctls */ + for (i = 0; i < strlen(fan->location); i++) { + sysctl_name[i] = tolower(fan->location[i]); + if (isspace(sysctl_name[i])) + sysctl_name[i] = '_'; + } + sysctl_name[i] = 0; + + oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), + OID_AUTO, sysctl_name, CTLFLAG_RD, 0, "Fan Information"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "minrpm", + CTLTYPE_INT | CTLFLAG_RD, &fan->min_rpm, sizeof(cell_t), + "Minimum allowed RPM"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "maxrpm", + CTLTYPE_INT | CTLFLAG_RD, &fan->max_rpm, sizeof(cell_t), + "Maximum allowed RPM"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "rpm", + CTLTYPE_INT | CTLFLAG_RW, dev, sc->sc_nfans, + smu_fanrpm_sysctl, "I", "Fan RPM"); + + fan++; + sc->sc_nfans++; + } +} + +static int +smu_sensor_read(device_t smu, struct smu_sensor *sens, int *val) +{ + struct smu_cmd cmd; + struct smu_softc *sc; + int64_t value; + int error; + + cmd.cmd = SMU_ADC; + cmd.len = 1; + cmd.data[0] = sens->reg; + error = 0; + + error = smu_run_cmd(smu, &cmd, 1); + if (error != 0) + return (error); + + sc = device_get_softc(smu); + value = (cmd.data[0] << 8) | cmd.data[1]; + + switch (sens->type) { + case SMU_TEMP_SENSOR: + value *= sc->sc_cpu_diode_scale; + value >>= 3; + value += ((int64_t)sc->sc_cpu_diode_offset) << 9; + value <<= 1; + + /* Convert from 16.16 fixed point degC into integer C. */ + value >>= 16; + break; + case SMU_VOLTAGE_SENSOR: + value *= sc->sc_cpu_volt_scale; + value += sc->sc_cpu_volt_offset; + value <<= 4; + + /* Convert from 16.16 fixed point V into mV. */ + value *= 15625; + value /= 1024; + value /= 1000; + break; + case SMU_CURRENT_SENSOR: + value *= sc->sc_cpu_curr_scale; + value += sc->sc_cpu_curr_offset; + value <<= 4; + + /* Convert from 16.16 fixed point A into mA. */ + value *= 15625; + value /= 1024; + value /= 1000; + break; + case SMU_POWER_SENSOR: + value *= sc->sc_slots_pow_scale; + value += sc->sc_slots_pow_offset; + value <<= 4; + + /* Convert from 16.16 fixed point W into mW. */ + value *= 15625; + value /= 1024; + value /= 1000; + break; + } + + *val = value; + return (0); +} + +static int +smu_sensor_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t smu; + struct smu_softc *sc; + struct smu_sensor *sens; + int value, error; + + smu = arg1; + sc = device_get_softc(smu); + sens = &sc->sc_sensors[arg2]; + + error = smu_sensor_read(smu, sens, &value); + if (error != 0) + return (error); + + error = sysctl_handle_int(oidp, &value, 0, req); + + return (error); +} + +static void +smu_attach_sensors(device_t dev, phandle_t sensroot) +{ + struct smu_sensor *sens; + struct smu_softc *sc; + struct sysctl_oid *sensroot_oid; + struct sysctl_ctx_list *ctx; + phandle_t child; + char type[32]; + int i; + + sc = device_get_softc(dev); + sc->sc_nsensors = 0; + + for (child = OF_child(sensroot); child != 0; child = OF_peer(child)) + sc->sc_nsensors++; + + if (sc->sc_nsensors == 0) { + device_printf(dev, "WARNING: No sensors detected!\n"); + return; + } + + sc->sc_sensors = malloc(sc->sc_nsensors * sizeof(struct smu_sensor), + M_SMU, M_WAITOK | M_ZERO); + + sens = sc->sc_sensors; + sc->sc_nsensors = 0; + + ctx = device_get_sysctl_ctx(dev); + sensroot_oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "sensors", + CTLFLAG_RD, 0, "SMU Sensor Information"); + + for (child = OF_child(sensroot); child != 0; child = OF_peer(child)) { + char sysctl_name[40], sysctl_desc[40]; + const char *units; + + OF_getprop(child, "device_type", type, sizeof(type)); + + if (strcmp(type, "current-sensor") == 0) { + sens->type = SMU_CURRENT_SENSOR; + units = "mA"; + } else if (strcmp(type, "temp-sensor") == 0) { + sens->type = SMU_TEMP_SENSOR; + units = "C"; + } else if (strcmp(type, "voltage-sensor") == 0) { + sens->type = SMU_VOLTAGE_SENSOR; + units = "mV"; + } else if (strcmp(type, "power-sensor") == 0) { + sens->type = SMU_POWER_SENSOR; + units = "mW"; + } else { + continue; + } + + OF_getprop(child, "reg", &sens->reg, sizeof(cell_t)); + OF_getprop(child, "location", sens->location, + sizeof(sens->location)); + + for (i = 0; i < strlen(sens->location); i++) { + sysctl_name[i] = tolower(sens->location[i]); + if (isspace(sysctl_name[i])) + sysctl_name[i] = '_'; + } + sysctl_name[i] = 0; + + sprintf(sysctl_desc,"%s (%s)", sens->location, units); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(sensroot_oid), OID_AUTO, + sysctl_name, CTLTYPE_INT | CTLFLAG_RD, dev, sc->sc_nsensors, + smu_sensor_sysctl, "I", sysctl_desc); + + sens++; + sc->sc_nsensors++; + } +} + +static void +smu_fan_management_proc(void *xdev) +{ + device_t smu = xdev; + + while(1) { + smu_manage_fans(smu); + pause("smu", SMU_FANMGT_INTERVAL * hz / 1000); + } +} + +static void +smu_manage_fans(device_t smu) +{ + struct smu_softc *sc; + int i, maxtemp, temp, factor, error; + + sc = device_get_softc(smu); + + maxtemp = 0; + for (i = 0; i < sc->sc_nsensors; i++) { + if (sc->sc_sensors[i].type != SMU_TEMP_SENSOR) + continue; + + error = smu_sensor_read(smu, &sc->sc_sensors[i], &temp); + if (error == 0 && temp > maxtemp) + maxtemp = temp; + } + + if (maxtemp < 10) { /* Bail if no good sensors */ + for (i = 0; i < sc->sc_nfans; i++) + smu_fan_set_rpm(smu, &sc->sc_fans[i], + sc->sc_fans[i].unmanaged_rpm); + return; + } + + if (maxtemp > sc->sc_critical_temp) { + device_printf(smu, "WARNING: Current system temperature (%d C) " + "exceeds critical temperature (%d C)! Shutting down!\n", + maxtemp, sc->sc_critical_temp); + shutdown_nice(RB_POWEROFF); + } + + if (maxtemp - sc->sc_target_temp > 20) + device_printf(smu, "WARNING: Current system temperature (%d C) " + "more than 20 degrees over target temperature (%d C)!\n", + maxtemp, sc->sc_target_temp); + + if (time_uptime - sc->sc_lastuserchange < 3) { + /* + * If we have heard from a user process in the last 3 seconds, + * go away. + */ + + return; + } + + if (maxtemp - sc->sc_target_temp > 4) + factor = 110; + else if (maxtemp - sc->sc_target_temp > 1) + factor = 105; + else if (sc->sc_target_temp - maxtemp > 4) + factor = 90; + else if (sc->sc_target_temp - maxtemp > 1) + factor = 95; + else + factor = 100; + + for (i = 0; i < sc->sc_nfans; i++) + smu_fan_set_rpm(smu, &sc->sc_fans[i], + (sc->sc_fans[i].setpoint * factor) / 100); +} + +static void +smu_set_sleepled(void *xdev, int onoff) +{ + static struct smu_cmd cmd; + device_t smu = xdev; + + cmd.cmd = SMU_MISC; + cmd.len = 3; + cmd.data[0] = SMU_MISC_LED_CTRL; + cmd.data[1] = 0; + cmd.data[2] = onoff; + + smu_run_cmd(smu, &cmd, 0); +} + +static int +smu_server_mode(SYSCTL_HANDLER_ARGS) +{ + struct smu_cmd cmd; + u_int server_mode; + device_t smu = arg1; + int error; + + cmd.cmd = SMU_POWER_EVENTS; + cmd.len = 1; + cmd.data[0] = SMU_PWR_GET_POWERUP; + + error = smu_run_cmd(smu, &cmd, 1); + + if (error) + return (error); + + server_mode = (cmd.data[1] & SMU_WAKEUP_AC_INSERT) ? 1 : 0; + + error = sysctl_handle_int(oidp, &server_mode, 0, req); + + if (error || !req->newptr) + return (error); + + if (server_mode == 1) + cmd.data[0] = SMU_PWR_SET_POWERUP; + else if (server_mode == 0) + cmd.data[0] = SMU_PWR_CLR_POWERUP; + else + return (EINVAL); + + cmd.len = 3; + cmd.data[1] = 0; + cmd.data[2] = SMU_WAKEUP_AC_INSERT; + + return (smu_run_cmd(smu, &cmd, 1)); +} + From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:55:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DE59106564A; Sat, 20 Mar 2010 14:55:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B32D8FC0C; Sat, 20 Mar 2010 14:55:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KEtMet004610; Sat, 20 Mar 2010 14:55:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KEtMjn004607; Sat, 20 Mar 2010 14:55:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201455.o2KEtMjn004607@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 14:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205375 - in stable/8/sys/powerpc: aim booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:55:22 -0000 Author: nwhitehorn Date: Sat Mar 20 14:55:22 2010 New Revision: 205375 URL: http://svn.freebsd.org/changeset/base/205375 Log: MFC r204903: Place interrupt handling in a critical section and remove double counting in incrementing the interrupt nesting level. This fixes a number of bugs in which the interrupt thread could be preempted by an IPI, indefinitely delaying acknowledgement of the interrupt to the PIC, causing interrupt starvation and hangs. Reported by: linimon Reviewed by: marcel, jhb Modified: stable/8/sys/powerpc/aim/interrupt.c stable/8/sys/powerpc/booke/interrupt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/interrupt.c ============================================================================== --- stable/8/sys/powerpc/aim/interrupt.c Sat Mar 20 14:53:52 2010 (r205374) +++ stable/8/sys/powerpc/aim/interrupt.c Sat Mar 20 14:55:22 2010 (r205375) @@ -80,15 +80,17 @@ powerpc_interrupt(struct trapframe *fram switch (framep->exc) { case EXC_EXI: - atomic_add_int(&td->td_intr_nesting_level, 1); + critical_enter(); PIC_DISPATCH(pic, framep); - atomic_subtract_int(&td->td_intr_nesting_level, 1); + critical_exit(); break; case EXC_DECR: + critical_enter(); atomic_add_int(&td->td_intr_nesting_level, 1); decr_intr(framep); atomic_subtract_int(&td->td_intr_nesting_level, 1); + critical_exit(); break; default: Modified: stable/8/sys/powerpc/booke/interrupt.c ============================================================================== --- stable/8/sys/powerpc/booke/interrupt.c Sat Mar 20 14:53:52 2010 (r205374) +++ stable/8/sys/powerpc/booke/interrupt.c Sat Mar 20 14:55:22 2010 (r205375) @@ -118,9 +118,11 @@ powerpc_decr_interrupt(struct trapframe struct thread *td; td = PCPU_GET(curthread); + critical_enter(); atomic_add_int(&td->td_intr_nesting_level, 1); decr_intr(framep); atomic_subtract_int(&td->td_intr_nesting_level, 1); + critical_exit(); } /* @@ -129,10 +131,8 @@ powerpc_decr_interrupt(struct trapframe void powerpc_extr_interrupt(struct trapframe *framep) { - struct thread *td; - td = PCPU_GET(curthread); - atomic_add_int(&td->td_intr_nesting_level, 1); + critical_enter(); PIC_DISPATCH(pic, framep); - atomic_subtract_int(&td->td_intr_nesting_level, 1); + critical_exit(); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 14:57:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ADA9106564A; Sat, 20 Mar 2010 14:57:24 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68F428FC1A; Sat, 20 Mar 2010 14:57:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KEvOu4005088; Sat, 20 Mar 2010 14:57:24 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KEvO5v005086; Sat, 20 Mar 2010 14:57:24 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003201457.o2KEvO5v005086@svn.freebsd.org> From: Hiroki Sato Date: Sat, 20 Mar 2010 14:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205376 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 14:57:24 -0000 Author: hrs Date: Sat Mar 20 14:57:24 2010 New Revision: 205376 URL: http://svn.freebsd.org/changeset/base/205376 Log: Remove an entry of "superpages enabled by default on amd64" because it has been reverted on releng/7.3. Spotted by: ivoras Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Mar 20 14:55:22 2010 (r205375) +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Mar 20 14:57:24 2010 (r205376) @@ -293,10 +293,6 @@ shims. The old functions remain as the old names to provide backward compatibility for older kernel modules. - The superpages in - the &os; virtual memory subsystem is now enabled by - default. - A new sysctl variable security.bsd.map_at_zero has been added and set to 1 (allow) by default. This controls From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:05:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC232106566C; Sat, 20 Mar 2010 15:05:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984078FC08; Sat, 20 Mar 2010 15:05:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KF5iCJ007027; Sat, 20 Mar 2010 15:05:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KF5iX2007024; Sat, 20 Mar 2010 15:05:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201505.o2KF5iX2007024@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205377 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:05:44 -0000 Author: nwhitehorn Date: Sat Mar 20 15:05:44 2010 New Revision: 205377 URL: http://svn.freebsd.org/changeset/base/205377 Log: Fix a bug where pages being removed from memory entirely no longer have PVOs, and so the modified state of the page can no longer be communicated to the VM layer, causing pages not to be flushed to swap when needed, in turn causing memory corruption. Also make several correctness adjustments to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs. Obtained from: projects/ppc64 Discussed with: grehan Modified: stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea.c Sat Mar 20 14:57:24 2010 (r205376) +++ stable/8/sys/powerpc/aim/mmu_oea.c Sat Mar 20 15:05:44 2010 (r205377) @@ -1729,6 +1729,10 @@ moea_remove_all(mmu_t mmu, vm_page_t m) moea_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } + if ((m->flags & PG_WRITEABLE) && moea_is_modified(mmu, m)) { + moea_attr_clear(m, LPTE_CHG); + vm_page_dirty(m); + } vm_page_flag_clear(m, PG_WRITEABLE); } @@ -2203,10 +2207,8 @@ moea_query_bit(vm_page_t m, int ptebit) struct pvo_entry *pvo; struct pte *pt; -#if 0 if (moea_attr_fetch(m) & ptebit) return (TRUE); -#endif LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 14:57:24 2010 (r205376) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:05:44 2010 (r205377) @@ -172,6 +172,7 @@ va_to_vsid(pmap_t pm, vm_offset_t va) return ((pm->pm_sr[(uintptr_t)va >> ADDR_SR_SHFT]) & SR_VSID_MASK); } +#define PTESYNC() __asm __volatile("ptesync"); #define TLBSYNC() __asm __volatile("tlbsync; ptesync"); #define SYNC() __asm __volatile("sync"); #define EIEIO() __asm __volatile("eieio"); @@ -194,6 +195,7 @@ TLBIE(pmap_t pmap, vm_offset_t va) { vpn = (uint64_t)(va & ADDR_PIDX); if (pmap != NULL) vpn |= (va_to_vsid(pmap,va) << 28); + vpn &= ~(0xffffULL << 48); vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; @@ -201,8 +203,7 @@ TLBIE(pmap_t pmap, vm_offset_t va) { mtx_lock_spin(&tlbie_mutex); __asm __volatile("\ mfmsr %0; \ - clrldi %1,%0,49; \ - mtmsr %1; \ + mr %1, %0; \ insrdi %1,%5,1,0; \ mtmsrd %1; \ ptesync; \ @@ -215,7 +216,8 @@ TLBIE(pmap_t pmap, vm_offset_t va) { eieio; \ tlbsync; \ ptesync;" - : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1)); + : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1) + : "memory"); mtx_unlock_spin(&tlbie_mutex); } @@ -226,13 +228,13 @@ TLBIE(pmap_t pmap, vm_offset_t va) { #define VSID_TO_SR(vsid) ((vsid) & 0xf) #define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff) -#define PVO_PTEGIDX_MASK 0x007 /* which PTEG slot */ -#define PVO_PTEGIDX_VALID 0x008 /* slot is valid */ -#define PVO_WIRED 0x010 /* PVO entry is wired */ -#define PVO_MANAGED 0x020 /* PVO entry is managed */ -#define PVO_BOOTSTRAP 0x080 /* PVO entry allocated during +#define PVO_PTEGIDX_MASK 0x007UL /* which PTEG slot */ +#define PVO_PTEGIDX_VALID 0x008UL /* slot is valid */ +#define PVO_WIRED 0x010UL /* PVO entry is wired */ +#define PVO_MANAGED 0x020UL /* PVO entry is managed */ +#define PVO_BOOTSTRAP 0x080UL /* PVO entry allocated during bootstrap */ -#define PVO_FAKE 0x100 /* fictitious phys page */ +#define PVO_FAKE 0x100UL /* fictitious phys page */ #define PVO_VADDR(pvo) ((pvo)->pvo_vaddr & ~ADDR_POFF) #define PVO_ISFAKE(pvo) ((pvo)->pvo_vaddr & PVO_FAKE) #define PVO_PTEGIDX_GET(pvo) ((pvo)->pvo_vaddr & PVO_PTEGIDX_MASK) @@ -512,23 +514,6 @@ moea64_attr_save(vm_page_t m, u_int64_t m->md.mdpg_attrs |= ptebit; } -static __inline int -moea64_pte_compare(const struct lpte *pt, const struct lpte *pvo_pt) -{ - if (pt->pte_hi == pvo_pt->pte_hi) - return (1); - - return (0); -} - -static __inline int -moea64_pte_match(struct lpte *pt, uint64_t vsid, vm_offset_t va, int which) -{ - return (pt->pte_hi & ~LPTE_VALID) == - ((vsid << LPTE_VSID_SHIFT) | - ((uint64_t)(va >> ADDR_API_SHFT64) & LPTE_API) | which); -} - static __inline void moea64_pte_create(struct lpte *pt, uint64_t vsid, vm_offset_t va, uint64_t pte_lo) @@ -583,7 +568,7 @@ moea64_pte_set(struct lpte *pt, struct l pt->pte_lo = pvo_pt->pte_lo; EIEIO(); pt->pte_hi = pvo_pt->pte_hi; - SYNC(); + PTESYNC(); moea64_pte_valid++; } @@ -602,7 +587,6 @@ moea64_pte_unset(struct lpte *pt, struct * Invalidate the pte. */ pt->pte_hi &= ~LPTE_VALID; - TLBIE(pmap,va); /* @@ -621,6 +605,8 @@ moea64_pte_change(struct lpte *pt, struc */ moea64_pte_unset(pt, pvo_pt, pmap, va); moea64_pte_set(pt, pvo_pt); + if (pmap == kernel_pmap) + isync(); } static __inline uint64_t @@ -701,7 +687,7 @@ moea64_bridge_cpu_bootstrap(mmu_t mmup, for (i = 0; i < 16; i++) { mtsrin(i << ADDR_SR_SHFT, kernel_pmap->pm_sr[i]); } - __asm __volatile ("sync; mtsdr1 %0; isync" + __asm __volatile ("ptesync; mtsdr1 %0; isync" :: "r"((u_int)moea64_pteg_table | (32 - cntlzw(moea64_pteg_mask >> 11)))); tlbia(); @@ -1135,7 +1121,7 @@ void moea64_set_scratchpage_pa(int which EIEIO(); moea64_scratchpage_pte[which]->pte_hi |= LPTE_VALID; - TLBIE(kernel_pmap, moea64_scratchpage_va[which]); + PTESYNC(); isync(); } void @@ -1155,8 +1141,6 @@ moea64_copy_page(mmu_t mmu, vm_page_t ms kcopy((void *)moea64_scratchpage_va[0], (void *)moea64_scratchpage_va[1], PAGE_SIZE); - __syncicache((void *)moea64_scratchpage_va[1],PAGE_SIZE); - mtx_unlock(&moea64_scratchpage_mtx); } @@ -1174,8 +1158,6 @@ moea64_zero_page_area(mmu_t mmu, vm_page moea64_set_scratchpage_pa(0,pa); bzero((caddr_t)moea64_scratchpage_va[0] + off, size); - __syncicache((void *)moea64_scratchpage_va[0],PAGE_SIZE); - mtx_unlock(&moea64_scratchpage_mtx); } @@ -1266,9 +1248,6 @@ moea64_enter_locked(pmap_t pmap, vm_offs error = moea64_pvo_enter(pmap, zone, pvo_head, va, VM_PAGE_TO_PHYS(m), pte_lo, pvo_flags); - if (pmap == kernel_pmap) - TLBIE(pmap, va); - /* * Flush the page from the instruction cache if this page is * mapped executable and cacheable. @@ -1281,6 +1260,7 @@ moea64_enter_locked(pmap_t pmap, vm_offs static void moea64_syncicache(pmap_t pmap, vm_offset_t va, vm_offset_t pa) { + /* * This is much trickier than on older systems because * we can't sync the icache on physical addresses directly @@ -1441,8 +1421,6 @@ moea64_uma_page_alloc(uma_zone_t zone, i &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, PVO_WIRED | PVO_BOOTSTRAP); - TLBIE(kernel_pmap, va); - if (needed_lock) PMAP_UNLOCK(kernel_pmap); @@ -1531,7 +1509,7 @@ moea64_remove_write(mmu_t mmu, vm_page_t lo |= pvo->pvo_pte.lpte.pte_lo; pvo->pvo_pte.lpte.pte_lo &= ~LPTE_CHG; moea64_pte_change(pt, &pvo->pvo_pte.lpte, - pvo->pvo_pmap, pvo->pvo_vaddr); + pvo->pvo_pmap, PVO_VADDR(pvo)); } UNLOCK_TABLE(); } @@ -1590,8 +1568,6 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, &moea64_pvo_kunmanaged, va, pa, pte_lo, PVO_WIRED | VM_PROT_EXECUTE); - TLBIE(kernel_pmap, va); - if (error != 0 && error != ENOENT) panic("moea64_kenter: failed to enter va %#x pa %#x: %d", va, pa, error); @@ -1823,7 +1799,7 @@ moea64_protect(mmu_t mmu, pmap_t pm, vm_ */ if (pt != NULL) { moea64_pte_change(pt, &pvo->pvo_pte.lpte, - pvo->pvo_pmap, pvo->pvo_vaddr); + pvo->pvo_pmap, PVO_VADDR(pvo)); if ((pvo->pvo_pte.lpte.pte_lo & (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { moea64_syncicache(pm, sva, @@ -1926,6 +1902,10 @@ moea64_remove_all(mmu_t mmu, vm_page_t m moea64_pvo_remove(pvo, -1); PMAP_UNLOCK(pmap); } + if ((m->flags & PG_WRITEABLE) && moea64_is_modified(mmu, m)) { + moea64_attr_clear(m, LPTE_CHG); + vm_page_dirty(m); + } vm_page_flag_clear(m, PG_WRITEABLE); } @@ -2106,7 +2086,7 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z first = 1; LIST_INSERT_HEAD(pvo_head, pvo, pvo_vlink); - if (pvo->pvo_pte.lpte.pte_lo & PVO_WIRED) + if (pvo->pvo_vaddr & PVO_WIRED) pm->pm_stats.wired_count++; pm->pm_stats.resident_count++; @@ -2121,6 +2101,9 @@ moea64_pvo_enter(pmap_t pm, uma_zone_t z moea64_pte_overflow++; } + if (pm == kernel_pmap) + isync(); + UNLOCK_TABLE(); return (first ? ENOENT : 0); @@ -2139,7 +2122,7 @@ moea64_pvo_remove(struct pvo_entry *pvo, pt = moea64_pvo_to_pte(pvo, pteidx); if (pt != NULL) { moea64_pte_unset(pt, &pvo->pvo_pte.lpte, pvo->pvo_pmap, - pvo->pvo_vaddr); + PVO_VADDR(pvo)); PVO_PTEGIDX_CLR(pvo); } else { moea64_pte_overflow--; @@ -2150,7 +2133,7 @@ moea64_pvo_remove(struct pvo_entry *pvo, * Update our statistics. */ pvo->pvo_pmap->pm_stats.resident_count--; - if (pvo->pvo_pte.lpte.pte_lo & PVO_WIRED) + if (pvo->pvo_vaddr & PVO_WIRED) pvo->pvo_pmap->pm_stats.wired_count--; /* @@ -2177,7 +2160,7 @@ moea64_pvo_remove(struct pvo_entry *pvo, */ LIST_REMOVE(pvo, pvo_olink); if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP)) - uma_zfree(pvo->pvo_vaddr & PVO_MANAGED ? moea64_mpvo_zone : + uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone : moea64_upvo_zone, pvo); moea64_pvo_entries--; moea64_pvo_remove_calls++; @@ -2236,8 +2219,8 @@ moea64_pvo_to_pte(const struct pvo_entry int ptegidx; uint64_t vsid; - vsid = va_to_vsid(pvo->pvo_pmap, pvo->pvo_vaddr); - ptegidx = va_to_pteg(vsid, pvo->pvo_vaddr); + vsid = va_to_vsid(pvo->pvo_pmap, PVO_VADDR(pvo)); + ptegidx = va_to_pteg(vsid, PVO_VADDR(pvo)); pteidx = moea64_pvo_pte_index(pvo, ptegidx); } @@ -2324,10 +2307,8 @@ moea64_query_bit(vm_page_t m, u_int64_t struct pvo_entry *pvo; struct lpte *pt; -#if 0 if (moea64_attr_fetch(m) & ptebit) return (TRUE); -#endif LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { MOEA_PVO_CHECK(pvo); /* sanity check */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:15:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98618106566B; Sat, 20 Mar 2010 15:15:54 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84CD98FC1F; Sat, 20 Mar 2010 15:15:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFFs3a009318; Sat, 20 Mar 2010 15:15:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFFsBL009311; Sat, 20 Mar 2010 15:15:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201515.o2KFFsBL009311@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205378 - in stable/8/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:15:54 -0000 Author: nwhitehorn Date: Sat Mar 20 15:15:54 2010 New Revision: 205378 URL: http://svn.freebsd.org/changeset/base/205378 Log: MFC r204128: Reduce KVA pressure on OEA64 systems running in bridge mode by mapping UMA segments at their physical addresses instead of into KVA. This emulates the direct mapping behavior of OEA32 in an ad-hoc way. To make this work properly required sharing the entire kernel PMAP with Open Firmware, so ofw_pmap is transformed into a stub on 64-bit CPUs. Also implement some more tweaks to get more mileage out of our limited amount of KVA, principally by extending KVA into segment 16 until the beginning of the first OFW mapping. Reported by: linimon Modified: stable/8/sys/powerpc/aim/machdep.c stable/8/sys/powerpc/aim/mmu_oea.c stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/aim/uma_machdep.c stable/8/sys/powerpc/include/sr.h stable/8/sys/powerpc/include/vmparam.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/machdep.c Sat Mar 20 15:05:44 2010 (r205377) +++ stable/8/sys/powerpc/aim/machdep.c Sat Mar 20 15:15:54 2010 (r205378) @@ -198,6 +198,11 @@ cpu_startup(void *dummy) ptoa(physmem) / 1048576); realmem = physmem; + if (bootverbose) + printf("available KVA = %zd (%zd MB)\n", + virtual_end - virtual_avail, + (virtual_end - virtual_avail) / 1048576); + /* * Display any holes after the first chunk of extended memory. */ Modified: stable/8/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea.c Sat Mar 20 15:05:44 2010 (r205377) +++ stable/8/sys/powerpc/aim/mmu_oea.c Sat Mar 20 15:15:54 2010 (r205378) @@ -909,7 +909,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k * Set the start and end of kva. */ virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = VM_MAX_KERNEL_ADDRESS; + virtual_end = VM_MAX_SAFE_KERNEL_ADDRESS; /* * Allocate a kernel stack with a guard page for thread0 and map it @@ -2419,7 +2419,7 @@ moea_unmapdev(mmu_t mmu, vm_offset_t va, * If this is outside kernel virtual space, then it's a * battable entry and doesn't require unmapping */ - if ((va >= VM_MIN_KERNEL_ADDRESS) && (va <= VM_MAX_KERNEL_ADDRESS)) { + if ((va >= VM_MIN_KERNEL_ADDRESS) && (va <= virtual_end)) { base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:05:44 2010 (r205377) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:15:54 2010 (r205378) @@ -297,9 +297,6 @@ struct pvo_head moea64_pvo_unmanaged = uma_zone_t moea64_upvo_zone; /* zone for pvo entries for unmanaged pages */ uma_zone_t moea64_mpvo_zone; /* zone for pvo entries for managed pages */ -vm_offset_t pvo_allocator_start; -vm_offset_t pvo_allocator_end; - #define BPVO_POOL_SIZE 327680 static struct pvo_entry *moea64_bpvo_pool; static int moea64_bpvo_pool_index = 0; @@ -699,6 +696,7 @@ moea64_add_ofw_mappings(mmu_t mmup, phan struct ofw_map translations[sz/sizeof(struct ofw_map)]; register_t msr; vm_offset_t off; + vm_paddr_t pa_base; int i, ofw_mappings; bzero(translations, sz); @@ -720,33 +718,18 @@ moea64_add_ofw_mappings(mmu_t mmup, phan if (translations[i].om_pa_hi) panic("OFW translations above 32-bit boundary!"); + pa_base = translations[i].om_pa_lo; + /* Now enter the pages for this mapping */ - /* - * Lock the ofw pmap. pmap_kenter(), which we use for the - * pages the kernel also needs, does its own locking. - */ - PMAP_LOCK(&ofw_pmap); DISABLE_TRANS(msr); for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { - struct vm_page m; - - /* Map low memory mappings into the kernel pmap, too. - * These are typically mappings made by the loader, - * so we need them if we want to keep executing. */ - - if (translations[i].om_va + off < SEGMENT_LENGTH) - moea64_kenter(mmup, translations[i].om_va + off, - translations[i].om_va + off); - - m.phys_addr = translations[i].om_pa_lo + off; - moea64_enter_locked(&ofw_pmap, - translations[i].om_va + off, &m, VM_PROT_ALL, 1); + moea64_kenter(mmup, translations[i].om_va + off, + pa_base + off); ofw_mappings++; } ENABLE_TRANS(msr); - PMAP_UNLOCK(&ofw_pmap); } } @@ -926,8 +909,8 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o */ moea64_pinit(mmup, &ofw_pmap); - ofw_pmap.pm_sr[KERNEL_SR] = kernel_pmap->pm_sr[KERNEL_SR]; - ofw_pmap.pm_sr[KERNEL2_SR] = kernel_pmap->pm_sr[KERNEL2_SR]; + for (i = 0; i < 16; i++) + ofw_pmap.pm_sr[i] = kernel_pmap->pm_sr[i]; if ((chosen = OF_finddevice("/chosen")) == -1) panic("moea64_bootstrap: can't find /chosen"); @@ -965,15 +948,20 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o * Set the start and end of kva. */ virtual_avail = VM_MIN_KERNEL_ADDRESS; - virtual_end = VM_MAX_KERNEL_ADDRESS; + virtual_end = VM_MAX_SAFE_KERNEL_ADDRESS; /* - * Allocate some stupid buffer regions. + * Figure out how far we can extend virtual_end into segment 16 + * without running into existing mappings. Segment 16 is guaranteed + * to contain neither RAM nor devices (at least on Apple hardware), + * but will generally contain some OFW mappings we should not + * step on. */ - pvo_allocator_start = virtual_avail; - virtual_avail += SEGMENT_LENGTH/4; - pvo_allocator_end = virtual_avail; + PMAP_LOCK(kernel_pmap); + while (moea64_pvo_find_va(kernel_pmap, virtual_end+1, NULL) == NULL) + virtual_end += PAGE_SIZE; + PMAP_UNLOCK(kernel_pmap); /* * Allocate some things for page zeroing @@ -1014,26 +1002,20 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o * Allocate virtual address space for the message buffer. */ pa = msgbuf_phys = moea64_bootstrap_alloc(MSGBUF_SIZE, PAGE_SIZE); - msgbufp = (struct msgbuf *)virtual_avail; - va = virtual_avail; - virtual_avail += round_page(MSGBUF_SIZE); - while (va < virtual_avail) { - moea64_kenter(mmup, va, pa); + msgbufp = (struct msgbuf *)msgbuf_phys; + while (pa - msgbuf_phys < MSGBUF_SIZE) { + moea64_kenter(mmup, pa, pa); pa += PAGE_SIZE; - va += PAGE_SIZE; } /* * Allocate virtual address space for the dynamic percpu area. */ pa = moea64_bootstrap_alloc(DPCPU_SIZE, PAGE_SIZE); - dpcpu = (void *)virtual_avail; - va = virtual_avail; - virtual_avail += DPCPU_SIZE; - while (va < virtual_avail) { - moea64_kenter(mmup, va, pa); + dpcpu = (void *)pa; + while (pa - (vm_offset_t)dpcpu < DPCPU_SIZE) { + moea64_kenter(mmup, pa, pa); pa += PAGE_SIZE; - va += PAGE_SIZE; } dpcpu_init(dpcpu, 0); } @@ -1411,14 +1393,10 @@ moea64_uma_page_alloc(uma_zone_t zone, i break; } - va = pvo_allocator_start; - pvo_allocator_start += PAGE_SIZE; - - if (pvo_allocator_start >= pvo_allocator_end) - panic("Ran out of PVO allocator buffer space!"); + va = VM_PAGE_TO_PHYS(m); moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, - &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, + &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, PVO_WIRED | PVO_BOOTSTRAP); if (needed_lock) @@ -1556,10 +1534,12 @@ moea64_kenter(mmu_t mmu, vm_offset_t va, uint64_t pte_lo; int error; +#if 0 if (!pmap_bootstrapped) { - if (va >= VM_MIN_KERNEL_ADDRESS && va < VM_MAX_KERNEL_ADDRESS) + if (va >= VM_MIN_KERNEL_ADDRESS && va < virtual_end) panic("Trying to enter an address in KVA -- %#x!\n",pa); } +#endif pte_lo = moea64_calc_wimg(pa); Modified: stable/8/sys/powerpc/aim/uma_machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/uma_machdep.c Sat Mar 20 15:05:44 2010 (r205377) +++ stable/8/sys/powerpc/aim/uma_machdep.c Sat Mar 20 15:15:54 2010 (r205378) @@ -56,13 +56,6 @@ uma_small_alloc(uma_zone_t zone, int byt vm_page_t m; int pflags; - if (!hw_direct_map) { - *flags = UMA_SLAB_KMEM; - va = (void *)kmem_malloc(kmem_map, bytes, wait); - - return va; - } - *flags = UMA_SLAB_PRIV; if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; @@ -82,6 +75,10 @@ uma_small_alloc(uma_zone_t zone, int byt } va = (void *) VM_PAGE_TO_PHYS(m); + + if (!hw_direct_map) + pmap_kenter((vm_offset_t)va, VM_PAGE_TO_PHYS(m)); + if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) bzero(va, PAGE_SIZE); atomic_add_int(&hw_uma_mdpages, 1); @@ -94,13 +91,11 @@ uma_small_free(void *mem, int size, u_in { vm_page_t m; - if (!hw_direct_map) { - kmem_free(kmem_map, (vm_offset_t)mem, size); - - return; - } + if (!hw_direct_map) + pmap_remove(kernel_pmap,(vm_offset_t)mem, + (vm_offset_t)mem + PAGE_SIZE); - m = PHYS_TO_VM_PAGE((u_int32_t)mem); + m = PHYS_TO_VM_PAGE((vm_offset_t)mem); m->wire_count--; vm_page_free(m); atomic_subtract_int(&cnt.v_wire_count, 1); Modified: stable/8/sys/powerpc/include/sr.h ============================================================================== --- stable/8/sys/powerpc/include/sr.h Sat Mar 20 15:05:44 2010 (r205377) +++ stable/8/sys/powerpc/include/sr.h Sat Mar 20 15:15:54 2010 (r205378) @@ -45,6 +45,7 @@ #define USER_SR 12 #define KERNEL_SR 13 #define KERNEL2_SR 14 +#define KERNEL3_SR 15 #define KERNEL_VSIDBITS 0xfffff #define KERNEL_SEGMENT (0xfffff0 + KERNEL_SR) #define KERNEL2_SEGMENT (0xfffff0 + KERNEL2_SR) Modified: stable/8/sys/powerpc/include/vmparam.h ============================================================================== --- stable/8/sys/powerpc/include/vmparam.h Sat Mar 20 15:05:44 2010 (r205377) +++ stable/8/sys/powerpc/include/vmparam.h Sat Mar 20 15:15:54 2010 (r205378) @@ -98,7 +98,8 @@ #define KERNBASE 0x00100000 /* start of kernel virtual */ #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) -#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH - 1) +#define VM_MAX_SAFE_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH -1) +#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 3*SEGMENT_LENGTH - 1) /* * Use the direct-mapped BAT registers for UMA small allocs. This @@ -106,13 +107,6 @@ */ #define UMA_MD_SMALL_ALLOC -/* - * On 64-bit systems in bridge mode, we have no direct map, so we fake - * the small_alloc() calls. But we need the VM to be in a reasonable - * state first. - */ -#define UMA_MD_SMALL_ALLOC_NEEDS_VM - #else /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:19:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACE23106564A; Sat, 20 Mar 2010 15:19:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3FB8FC12; Sat, 20 Mar 2010 15:19:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFJvxD010248; Sat, 20 Mar 2010 15:19:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFJvuY010245; Sat, 20 Mar 2010 15:19:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201519.o2KFJvuY010245@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205379 - in stable/8/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:19:57 -0000 Author: nwhitehorn Date: Sat Mar 20 15:19:57 2010 New Revision: 205379 URL: http://svn.freebsd.org/changeset/base/205379 Log: MFC r204268: Close a race involving the OEA64 scratchpage. When the scratch page's physical address is changed, there is a brief window during which its PTE is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold the page table lock, it was possible for another CPU to insert a new PTE into the scratch page's PTEG slot during this interval, corrupting both mappings. Solve this by creating a new flag, LPTE_LOCKED, such that moea64_pte_insert will avoid claiming locked PTEG slots even if they are invalid. This change also incorporates some additional paranoia added to solve things I thought might be this bug. Reported by: linimon Modified: stable/8/sys/powerpc/aim/mmu_oea64.c stable/8/sys/powerpc/include/pte.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:15:54 2010 (r205378) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:19:57 2010 (r205379) @@ -227,6 +227,7 @@ TLBIE(pmap_t pmap, vm_offset_t va) { #define VSID_MAKE(sr, hash) ((sr) | (((hash) & 0xfffff) << 4)) #define VSID_TO_SR(vsid) ((vsid) & 0xf) #define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff) +#define VSID_HASH_MASK 0x0000007fffffffffULL #define PVO_PTEGIDX_MASK 0x007UL /* which PTEG slot */ #define PVO_PTEGIDX_VALID 0x008UL /* slot is valid */ @@ -458,9 +459,9 @@ MMU_DEF(oea64_bridge_mmu); static __inline u_int va_to_pteg(uint64_t vsid, vm_offset_t addr) { - u_int hash; + uint64_t hash; - hash = vsid ^ (((uint64_t)addr & ADDR_PIDX) >> + hash = (vsid & VSID_HASH_MASK) ^ (((uint64_t)addr & ADDR_PIDX) >> ADDR_PIDX_SHFT); return (hash & moea64_pteg_mask); } @@ -979,6 +980,7 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o moea64_scratchpage_va[i],&j); moea64_scratchpage_pte[i] = moea64_pvo_to_pte( moea64_scratchpage_pvo[i],j); + moea64_scratchpage_pte[i]->pte_hi |= LPTE_LOCKED; UNLOCK_TABLE(); } @@ -1090,8 +1092,10 @@ moea64_zero_page(mmu_t mmu, vm_page_t m) static __inline void moea64_set_scratchpage_pa(int which, vm_offset_t pa) { + mtx_assert(&moea64_scratchpage_mtx, MA_OWNED); + moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo &= - (~LPTE_WIMG & ~LPTE_RPGN); + ~(LPTE_WIMG | LPTE_RPGN); moea64_scratchpage_pvo[which]->pvo_pte.lpte.pte_lo |= moea64_calc_wimg(pa) | (uint64_t)pa; @@ -2149,18 +2153,16 @@ moea64_pvo_remove(struct pvo_entry *pvo, static __inline int moea64_pvo_pte_index(const struct pvo_entry *pvo, int ptegidx) { - int pteidx; /* * We can find the actual pte entry without searching by grabbing - * the PTEG index from 3 unused bits in pte_lo[11:9] and by + * the PTEG index from 3 unused bits in pvo_vaddr and by * noticing the HID bit. */ - pteidx = ptegidx * 8 + PVO_PTEGIDX_GET(pvo); if (pvo->pvo_pte.lpte.pte_hi & LPTE_HID) - pteidx ^= moea64_pteg_mask * 8; + ptegidx ^= moea64_pteg_mask; - return (pteidx); + return ((ptegidx << 3) | PVO_PTEGIDX_GET(pvo)); } static struct pvo_entry * @@ -2257,7 +2259,8 @@ moea64_pte_insert(u_int ptegidx, struct * First try primary hash. */ for (pt = moea64_pteg_table[ptegidx].pt, i = 0; i < 8; i++, pt++) { - if ((pt->pte_hi & LPTE_VALID) == 0) { + if ((pt->pte_hi & LPTE_VALID) == 0 && + (pt->pte_hi & LPTE_LOCKED) == 0) { pvo_pt->pte_hi &= ~LPTE_HID; moea64_pte_set(pt, pvo_pt); return (i); @@ -2270,7 +2273,8 @@ moea64_pte_insert(u_int ptegidx, struct ptegidx ^= moea64_pteg_mask; for (pt = moea64_pteg_table[ptegidx].pt, i = 0; i < 8; i++, pt++) { - if ((pt->pte_hi & LPTE_VALID) == 0) { + if ((pt->pte_hi & LPTE_VALID) == 0 && + (pt->pte_hi & LPTE_LOCKED) == 0) { pvo_pt->pte_hi |= LPTE_HID; moea64_pte_set(pt, pvo_pt); return (i); Modified: stable/8/sys/powerpc/include/pte.h ============================================================================== --- stable/8/sys/powerpc/include/pte.h Sat Mar 20 15:15:54 2010 (r205378) +++ stable/8/sys/powerpc/include/pte.h Sat Mar 20 15:19:57 2010 (r205379) @@ -95,6 +95,7 @@ struct lpteg { /* High quadword: */ #define LPTE_VSID_SHIFT 12 #define LPTE_API 0x0000000000000F80ULL +#define LPTE_LOCKED 0x0000000000000008ULL #define LPTE_BIG 0x0000000000000004ULL /* 4kb/16Mb page */ #define LPTE_HID 0x0000000000000002ULL #define LPTE_VALID 0x0000000000000001ULL From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:21:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FC86106566B; Sat, 20 Mar 2010 15:21:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 333358FC25; Sat, 20 Mar 2010 15:21:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFLEDf010596; Sat, 20 Mar 2010 15:21:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFLE6o010594; Sat, 20 Mar 2010 15:21:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201521.o2KFLE6o010594@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205380 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:21:14 -0000 Author: nwhitehorn Date: Sat Mar 20 15:21:13 2010 New Revision: 205380 URL: http://svn.freebsd.org/changeset/base/205380 Log: MFC r204269: Use dcbz instead of word stores for page zeroing, providing a factor of 3-4 speedup. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:19:57 2010 (r205379) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:21:13 2010 (r205380) @@ -1075,15 +1075,6 @@ moea64_change_wiring(mmu_t mmu, pmap_t p } /* - * Zero a page of physical memory by temporarily mapping it into the tlb. - */ -void -moea64_zero_page(mmu_t mmu, vm_page_t m) -{ - moea64_zero_page_area(mmu,m,0,PAGE_SIZE); -} - -/* * This goes through and sets the physical address of our * special scratch PTE to the PA we want to zero or copy. Because * of locking issues (this can get called in pvo_enter() by @@ -1147,6 +1138,27 @@ moea64_zero_page_area(mmu_t mmu, vm_page mtx_unlock(&moea64_scratchpage_mtx); } +/* + * Zero a page of physical memory by temporarily mapping it + */ +void +moea64_zero_page(mmu_t mmu, vm_page_t m) +{ + vm_offset_t pa = VM_PAGE_TO_PHYS(m); + vm_offset_t off; + + if (!moea64_initialized) + panic("moea64_zero_page: can't zero pa %#x", pa); + + mtx_lock(&moea64_scratchpage_mtx); + + moea64_set_scratchpage_pa(0,pa); + for (off = 0; off < PAGE_SIZE; off += cacheline_size) + __asm __volatile("dcbz 0,%0" :: + "r"(moea64_scratchpage_va[0] + off)); + mtx_unlock(&moea64_scratchpage_mtx); +} + void moea64_zero_page_idle(mmu_t mmu, vm_page_t m) { From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:23:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E320C1065686; Sat, 20 Mar 2010 15:23:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0FAB8FC1A; Sat, 20 Mar 2010 15:23:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFN6gw011096; Sat, 20 Mar 2010 15:23:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFN6OG011094; Sat, 20 Mar 2010 15:23:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201523.o2KFN6OG011094@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205381 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:23:07 -0000 Author: nwhitehorn Date: Sat Mar 20 15:23:06 2010 New Revision: 205381 URL: http://svn.freebsd.org/changeset/base/205381 Log: MFC r204296: Provide an implementation of pmap_dev_direct_mapped() on OEA64. This is required in order to be able to mmap the running kernel, which is turn required to avoid fstat returning gibberish. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:21:13 2010 (r205380) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:23:06 2010 (r205381) @@ -2408,7 +2408,22 @@ moea64_clear_bit(vm_page_t m, u_int64_t boolean_t moea64_dev_direct_mapped(mmu_t mmu, vm_offset_t pa, vm_size_t size) { - return (EFAULT); + struct pvo_entry *pvo; + vm_offset_t ppa; + int error = 0; + + PMAP_LOCK(kernel_pmap); + for (ppa = pa & ~ADDR_POFF; ppa < pa + size; ppa += PAGE_SIZE) { + pvo = moea64_pvo_find_va(kernel_pmap, ppa, NULL); + if (pvo == NULL || + (pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) != ppa) { + error = EFAULT; + break; + } + } + PMAP_UNLOCK(kernel_pmap); + + return (error); } boolean_t From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:27:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C27A106564A; Sat, 20 Mar 2010 15:27:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB908FC0C; Sat, 20 Mar 2010 15:27:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFR2c0012210; Sat, 20 Mar 2010 15:27:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFR25l012208; Sat, 20 Mar 2010 15:27:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201527.o2KFR25l012208@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205382 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:27:02 -0000 Author: nwhitehorn Date: Sat Mar 20 15:27:01 2010 New Revision: 205382 URL: http://svn.freebsd.org/changeset/base/205382 Log: MFC r204297: Move the OEA64 scratchpage to the end of KVA from the beginning, and set its PVO to map physical address 0 instead of kernelstart. This fixes a situation in which a user process could attempt to return this address via KVM, have it fault while being modified, and then panic the kernel because (a) it is supposed to map a valid address and (b) it lies in the no-fault region between VM_MIN_KERNEL_ADDRESS and virtual_avail. While here, move msgbuf and dpcpu back into regular KVA space for consistency with other implementations. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:23:06 2010 (r205381) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Sat Mar 20 15:27:01 2010 (r205382) @@ -970,10 +970,10 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o mtx_init(&moea64_scratchpage_mtx, "pvo zero page", NULL, MTX_DEF); for (i = 0; i < 2; i++) { - moea64_scratchpage_va[i] = virtual_avail; - virtual_avail += PAGE_SIZE; + moea64_scratchpage_va[i] = (virtual_end+1) - PAGE_SIZE; + virtual_end -= PAGE_SIZE; - moea64_kenter(mmup,moea64_scratchpage_va[i],kernelstart); + moea64_kenter(mmup,moea64_scratchpage_va[i],0); LOCK_TABLE(); moea64_scratchpage_pvo[i] = moea64_pvo_find_va(kernel_pmap, @@ -1004,20 +1004,25 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o * Allocate virtual address space for the message buffer. */ pa = msgbuf_phys = moea64_bootstrap_alloc(MSGBUF_SIZE, PAGE_SIZE); - msgbufp = (struct msgbuf *)msgbuf_phys; - while (pa - msgbuf_phys < MSGBUF_SIZE) { - moea64_kenter(mmup, pa, pa); + msgbufp = (struct msgbuf *)virtual_avail; + va = virtual_avail; + virtual_avail += round_page(MSGBUF_SIZE); + while (va < virtual_avail) { + moea64_kenter(mmup, va, pa); pa += PAGE_SIZE; + va += PAGE_SIZE; } /* * Allocate virtual address space for the dynamic percpu area. */ pa = moea64_bootstrap_alloc(DPCPU_SIZE, PAGE_SIZE); - dpcpu = (void *)pa; - while (pa - (vm_offset_t)dpcpu < DPCPU_SIZE) { - moea64_kenter(mmup, pa, pa); + dpcpu = (void *)virtual_avail; + virtual_avail += DPCPU_SIZE; + while (va < virtual_avail) { + moea64_kenter(mmup, va, pa); pa += PAGE_SIZE; + va += PAGE_SIZE; } dpcpu_init(dpcpu, 0); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:28:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2076C106566B; Sat, 20 Mar 2010 15:28:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7DD08FC0A; Sat, 20 Mar 2010 15:28:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFSdl1012717; Sat, 20 Mar 2010 15:28:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFSdlh012713; Sat, 20 Mar 2010 15:28:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003201528.o2KFSdlh012713@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 20 Mar 2010 15:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205383 - stable/8/libexec/rtld-elf/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:28:41 -0000 Author: nwhitehorn Date: Sat Mar 20 15:28:39 2010 New Revision: 205383 URL: http://svn.freebsd.org/changeset/base/205383 Log: MFC r204211: Support the extended PLT format used when objects have more than 8192 PLT relocations on PPC32. Modified: stable/8/libexec/rtld-elf/powerpc/reloc.c stable/8/libexec/rtld-elf/powerpc/rtld_machdep.h stable/8/libexec/rtld-elf/powerpc/rtld_start.S Directory Properties: stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/8/libexec/rtld-elf/powerpc/reloc.c Sat Mar 20 15:27:01 2010 (r205382) +++ stable/8/libexec/rtld-elf/powerpc/reloc.c Sat Mar 20 15:28:39 2010 (r205383) @@ -47,6 +47,13 @@ ((u_int32_t)(x) + 0x10000) : (u_int32_t)(x)) >> 16) #define _ppc_la(x) ((u_int32_t)(x) & 0xffff) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define max(a,b) (((a) > (b)) ? (a) : (b)) + +#define PLT_EXTENDED_BEGIN (1 << 13) +#define JMPTAB_BASE(N) (18 + N*2 + ((N > PLT_EXTENDED_BEGIN) ? \ + (N - PLT_EXTENDED_BEGIN)*2 : 0)) + /* * Process the R_PPC_COPY relocations */ @@ -313,7 +320,6 @@ done: return (r); } - /* * Initialise a PLT slot to the resolving trampoline */ @@ -321,27 +327,43 @@ static int reloc_plt_object(Obj_Entry *obj, const Elf_Rela *rela) { Elf_Word *where = (Elf_Word *)(obj->relocbase + rela->r_offset); - Elf_Addr *pltresolve; + Elf_Addr *pltresolve, *pltlongresolve, *jmptab; Elf_Addr distance; + int N = obj->pltrelasize / sizeof(Elf_Rela); int reloff; reloff = rela - obj->pltrela; - if ((reloff < 0) || (reloff >= 0x8000)) { + if (reloff < 0) return (-1); - } - pltresolve = obj->pltgot + 8; + pltlongresolve = obj->pltgot + 5; + pltresolve = pltlongresolve + 5; distance = (Elf_Addr)pltresolve - (Elf_Addr)(where + 1); dbg(" reloc_plt_object: where=%p,pltres=%p,reloff=%x,distance=%x", (void *)where, (void *)pltresolve, reloff, distance); - /* li r11,reloff */ - /* b pltresolve */ - where[0] = 0x39600000 | reloff; - where[1] = 0x48000000 | (distance & 0x03fffffc); + if (reloff < PLT_EXTENDED_BEGIN) { + /* li r11,reloff */ + /* b pltresolve */ + where[0] = 0x39600000 | reloff; + where[1] = 0x48000000 | (distance & 0x03fffffc); + } else { + jmptab = obj->pltgot + JMPTAB_BASE(N); + jmptab[reloff] = (u_int)pltlongresolve; + + /* lis r11,jmptab[reloff]@ha */ + /* lwzu r12,jmptab[reloff]@l(r11) */ + /* mtctr r12 */ + /* bctr */ + where[0] = 0x3d600000 | _ppc_ha(&jmptab[reloff]); + where[1] = 0x858b0000 | _ppc_la(&jmptab[reloff]); + where[2] = 0x7d8903a6; + where[3] = 0x4e800420; + } + /* * The icache will be sync'd in init_pltgot, which is called @@ -453,25 +475,28 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr int N = obj->pltrelasize / sizeof(Elf_Rela); int reloff = rela - obj->pltrela; - if ((reloff < 0) || (reloff >= 0x8000)) { + if (reloff < 0) return (-1); - } pltcall = obj->pltgot; - dbg(" reloc_jmpslot: indir, reloff=%d, N=%d\n", + dbg(" reloc_jmpslot: indir, reloff=%x, N=%x\n", reloff, N); - jmptab = obj->pltgot + 18 + N * 2; + jmptab = obj->pltgot + JMPTAB_BASE(N); jmptab[reloff] = target; - distance = (Elf_Addr)pltcall - (Elf_Addr)(wherep + 1); + if (reloff < PLT_EXTENDED_BEGIN) { + /* for extended PLT entries, we keep the old code */ + + distance = (Elf_Addr)pltcall - (Elf_Addr)(wherep + 1); - /* li r11,reloff */ - /* b pltcall # use indirect pltcall routine */ - wherep[0] = 0x39600000 | reloff; - wherep[1] = 0x48000000 | (distance & 0x03fffffc); - __syncicache(wherep, 8); + /* li r11,reloff */ + /* b pltcall # use indirect pltcall routine */ + wherep[0] = 0x39600000 | reloff; + wherep[1] = 0x48000000 | (distance & 0x03fffffc); + __syncicache(wherep, 8); + } } return (target); @@ -481,13 +506,14 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr /* * Setup the plt glue routines. */ -#define PLTCALL_SIZE 20 -#define PLTRESOLVE_SIZE 24 +#define PLTCALL_SIZE 20 +#define PLTLONGRESOLVE_SIZE 20 +#define PLTRESOLVE_SIZE 24 void init_pltgot(Obj_Entry *obj) { - Elf_Word *pltcall, *pltresolve; + Elf_Word *pltcall, *pltresolve, *pltlongresolve; Elf_Word *jmptab; int N = obj->pltrelasize / sizeof(Elf_Rela); @@ -524,18 +550,27 @@ init_pltgot(Obj_Entry *obj) * of the jumptable into the absolute-call assembler code so it * can determine this address. */ - jmptab = pltcall + 18 + N * 2; + jmptab = obj->pltgot + JMPTAB_BASE(N); pltcall[1] |= _ppc_ha(jmptab); /* addis 11,11,jmptab@ha */ pltcall[2] |= _ppc_la(jmptab); /* lwz 11,jmptab@l(11) */ /* - * Skip down 32 bytes into the initial reserved area and copy + * Skip down 20 bytes into the initial reserved area and copy * in the standard resolving assembler call. Into this assembler, * insert the absolute address of the _rtld_bind_start routine * and the address of the relocation object. + * + * We place pltlongresolve first, so it can fix up its arguments + * and then fall through to the regular PLT resolver. */ - pltresolve = obj->pltgot + 8; + pltlongresolve = obj->pltgot + 5; + + memcpy(pltlongresolve, _rtld_powerpc_pltlongresolve, + PLTLONGRESOLVE_SIZE); + pltlongresolve[0] |= _ppc_ha(jmptab); /* lis 12,jmptab@ha */ + pltlongresolve[1] |= _ppc_la(jmptab); /* addi 12,12,jmptab@l */ + pltresolve = pltlongresolve + PLTLONGRESOLVE_SIZE/sizeof(uint32_t); memcpy(pltresolve, _rtld_powerpc_pltresolve, PLTRESOLVE_SIZE); pltresolve[0] |= _ppc_ha(_rtld_bind_start); pltresolve[1] |= _ppc_la(_rtld_bind_start); Modified: stable/8/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- stable/8/libexec/rtld-elf/powerpc/rtld_machdep.h Sat Mar 20 15:27:01 2010 (r205382) +++ stable/8/libexec/rtld-elf/powerpc/rtld_machdep.h Sat Mar 20 15:28:39 2010 (r205383) @@ -57,6 +57,7 @@ void _rtld_bind_start(void); * PLT functions. Not really correct prototypes, but the * symbol values are needed. */ +void _rtld_powerpc_pltlongresolve(void); void _rtld_powerpc_pltresolve(void); void _rtld_powerpc_pltcall(void); Modified: stable/8/libexec/rtld-elf/powerpc/rtld_start.S ============================================================================== --- stable/8/libexec/rtld-elf/powerpc/rtld_start.S Sat Mar 20 15:27:01 2010 (r205382) +++ stable/8/libexec/rtld-elf/powerpc/rtld_start.S Sat Mar 20 15:28:39 2010 (r205383) @@ -163,6 +163,12 @@ _ENTRY(_rtld_bind_start) * The ELF object is shifted into %r11, and _rtld_bind_start is called * to complete the binding. */ +_ENTRY(_rtld_powerpc_pltlongresolve) + lis %r12,0 # lis 12,jmptab@ha + addi %r12,%r12,0 # addi 12,12,jmptab@l + subf %r11,%r12,%r11 # reloff + li %r12,2 + srw %r11,%r11,%r12 # index = reloff/sizeof(Elf_Addr) _ENTRY(_rtld_powerpc_pltresolve) lis %r12,0 # lis 12,_rtld_bind_start@ha addi %r12,%r12,0 # addi 12,12,_rtld_bind_start@l From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:30:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC0E106567B; Sat, 20 Mar 2010 15:30:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3498FC15; Sat, 20 Mar 2010 15:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KFUQsH013246; Sat, 20 Mar 2010 15:30:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KFUQ64013244; Sat, 20 Mar 2010 15:30:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201003201530.o2KFUQ64013244@svn.freebsd.org> From: Alexander Motin Date: Sat, 20 Mar 2010 15:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205384 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:30:27 -0000 Author: mav Date: Sat Mar 20 15:30:26 2010 New Revision: 205384 URL: http://svn.freebsd.org/changeset/base/205384 Log: Correct MAXPHYS and DFLTPHYS description. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sat Mar 20 15:28:39 2010 (r205383) +++ head/sys/conf/NOTES Sat Mar 20 15:30:26 2010 (r205384) @@ -122,10 +122,10 @@ options BLKDEV_IOSIZE=8192 # # MAXPHYS and DFLTPHYS # -# These are the max and default 'raw' I/O block device access sizes. -# Reads and writes will be split into DFLTPHYS chunks. Some applications -# have better performance with larger raw I/O access sizes. Typically -# MAXPHYS should be twice the size of DFLTPHYS. Note that certain VM +# These are the maximal and safe 'raw' I/O block device access sizes. +# Reads and writes will be split into MAXPHYS chunks for known good +# devices and DFLTPHYS for the rest. Some applications have better +# performance with larger raw I/O access sizes. Note that certain VM # parameters are derived from these values and making them too large # can make an an unbootable kernel. # From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:32:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09E78106566C; Sat, 20 Mar 2010 15:32:30 +0000 (UTC) (envelope-from kmatthew.macy@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 77A668FC18; Sat, 20 Mar 2010 15:32:29 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so653028qwi.7 for ; Sat, 20 Mar 2010 08:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=kKW/OMtM6DSWBAAWxws76B3cvdnM3sRrs0QJry8HBoM=; b=ZSTxOS9soGhUg7xGds42STV/ksHNYlZhdsIXxXDBbJQwlgSrc5SIi6NedU2ff0Rycc IW+QsPMkh+vzQ5abF6mq/hQSxoIuZ5F3q9zLV59x4y/Z1Lf9eeVJZUjLZTEnHlB1UeOI 3EmPDS/EYIUXA1WXt0Zs1EYxfvw7xn9jELMWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=P5D29nHGqHfhr3fUIetK9wk7NMsOkZwvO0K0r/kI9uaxYV62LNAZa6tH43XeCHNKKk rfS3tCy6HLHzKaueVL7qXemsHjnCMhoaEUFhde90D86bO2RC251byMlOt/DWtlqz2cGU lNPaNbv97YpDcatS5T2CQUg/0HeGieE2M/nag= MIME-Version: 1.0 Sender: kmatthew.macy@gmail.com Received: by 10.229.224.149 with SMTP id io21mr1101704qcb.94.1269099147867; Sat, 20 Mar 2010 08:32:27 -0700 (PDT) In-Reply-To: <20100320111013.GE1733@garage.freebsd.pl> References: <201003132141.o2DLfroC041203@svn.freebsd.org> <20100320111013.GE1733@garage.freebsd.pl> Date: Sat, 20 Mar 2010 07:32:27 -0800 X-Google-Sender-Auth: 03c37bc5120408e5 Message-ID: <82c4140e1003200832h116dee34p56022c100ff65b74@mail.gmail.com> From: "K. Macy" To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r205132 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:32:30 -0000 On Sat, Mar 20, 2010 at 3:10 AM, Pawel Jakub Dawidek wrot= e: > On Sat, Mar 13, 2010 at 09:41:53PM +0000, Kip Macy wrote: >> Author: kmacy >> Date: Sat Mar 13 21:41:52 2010 >> New Revision: 205132 >> URL: http://svn.freebsd.org/changeset/base/205132 >> >> Log: >> =A0 Don't bottleneck on acquiring the stream locks - this avoids a massi= ve >> =A0 drop off in throughput with large numbers of simultaneous reads > > This is another[1] change we agreed (I hoped) to properly evaluate first > through zfs-code@opensolaris.org. > Hi pjd - I ran it by zfs-code@ a year ago. I never got any meaningful feedback. I'm not being flippant when I say that I would like you to interact with them. One thing you need to also bear in mind is that Opensolaris !=3D FreeBSD. I don't mean that in the phk "this is the wrong mailing list" sense, but rather the two have different behavioral properties. The deadlock that I had to track down by hand because you had disabled witness on ZFS locks occurred within 10 minutes on a modest web serving load and within 2 minutes under fsstress. It had been in ZFS quite some time when they finally patched it and yet it was a very serious problem on FreeBSD. Web serving throughput would drop from 2.5Gbps to a few hundred megabits per second without this change. I can only guess that sx locks do not behave the same as Solaris' mutexes to such a large extent that we get very different behaviors and you'll have to keep an open mind to local changes that cope with that fact. Thanks, Kip From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 15:33:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E7241065672; Sat, 20 Mar 2010 15:33:53 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id CEABC8FC17; Sat, 20 Mar 2010 15:33:52 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0KZL0040078G7400@smtpauth1.wiscmail.wisc.edu>; Sat, 20 Mar 2010 10:33:52 -0500 (CDT) Received: from comporellon.tachypleus.net (adsl-76-208-68-235.dsl.mdsnwi.sbcglobal.net [76.208.68.235]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0KZL00AQ278EDY50@smtpauth1.wiscmail.wisc.edu>; Sat, 20 Mar 2010 10:33:51 -0500 (CDT) Date: Sat, 20 Mar 2010 10:33:49 -0500 From: Nathan Whitehorn In-reply-to: <201003201505.o2KF5iX2007024@svn.freebsd.org> To: Nathan Whitehorn Message-id: <4BA4EADD.9030606@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.208.68.235 X-Spam-PmxInfo: Server=avs-14, Version=5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.3.20.152725, SenderIP=76.208.68.235 References: <201003201505.o2KF5iX2007024@svn.freebsd.org> User-Agent: Thunderbird 2.0.0.23 (X11/20100206) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205377 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:33:53 -0000 Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sat Mar 20 15:05:44 2010 > New Revision: 205377 > URL: http://svn.freebsd.org/changeset/base/205377 > > Log: > Fix a bug where pages being removed from memory entirely no longer have > PVOs, and so the modified state of the page can no longer be communicated > to the VM layer, causing pages not to be flushed to swap when needed, in > turn causing memory corruption. Also make several correctness adjustments > to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs. > This was an MFC of r204042. -Nathan From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 16:16:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 477431065750; Sat, 20 Mar 2010 16:16:14 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C7508FC08; Sat, 20 Mar 2010 16:16:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KGGEhn024079; Sat, 20 Mar 2010 16:16:14 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KGGDIK024077; Sat, 20 Mar 2010 16:16:13 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201003201616.o2KGGDIK024077@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 20 Mar 2010 16:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205385 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 16:16:14 -0000 Author: jh Date: Sat Mar 20 16:16:13 2010 New Revision: 205385 URL: http://svn.freebsd.org/changeset/base/205385 Log: Escape characters unsafe for XML output in GEOM class, instance and provider names. - Characters in range 0x01-0x1f except '\t', '\n', and '\r' are replaced with '?'. Those characters are disallowed in XML. - '&', '<', '>', '\'', '"' and characters in range 0x7f-0xff are replaced with XML numeric character reference. If the kern.geom.confxml sysctl provides invalid XML, libgeom geom_xml2tree() fails and utilities using it do not work. Unsafe characters are common in msdosfs and cd9660 labels. PR: kern/104389 Submitted by: Doug Steinwand (original version) Reviewed by: pjd Discussed on: freebsd-geom MFC after: 3 weeks Modified: head/sys/geom/geom_dump.c Modified: head/sys/geom/geom_dump.c ============================================================================== --- head/sys/geom/geom_dump.c Sat Mar 20 15:30:26 2010 (r205384) +++ head/sys/geom/geom_dump.c Sat Mar 20 16:16:13 2010 (r205385) @@ -154,6 +154,28 @@ g_conftxt(void *p, int flag) static void +g_conf_print_escaped(struct sbuf *sb, const char *fmt, const char *str) +{ + struct sbuf *s; + const u_char *c; + + s = sbuf_new_auto(); + + for (c = str; *c != '\0'; c++) { + if (*c == '&' || *c == '<' || *c == '>' || + *c == '\'' || *c == '"' || *c > 0x7e) + sbuf_printf(s, "&#x%X;", *c); + else if (*c == '\t' || *c == '\n' || *c == '\r' || *c > 0x1f) + sbuf_putc(s, *c); + else + sbuf_putc(s, '?'); + } + sbuf_finish(s); + sbuf_printf(sb, fmt, sbuf_data(s)); + sbuf_delete(s); +} + +static void g_conf_consumer(struct sbuf *sb, struct g_consumer *cp) { @@ -181,7 +203,7 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t \n", pp->geom); sbuf_printf(sb, "\t r%dw%de%d\n", pp->acr, pp->acw, pp->ace); - sbuf_printf(sb, "\t %s\n", pp->name); + g_conf_print_escaped(sb, "\t %s\n", pp->name); sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); @@ -208,7 +230,7 @@ g_conf_geom(struct sbuf *sb, struct g_ge sbuf_printf(sb, " \n", gp); sbuf_printf(sb, " \n", gp->class); - sbuf_printf(sb, " %s\n", gp->name); + g_conf_print_escaped(sb, " %s\n", gp->name); sbuf_printf(sb, " %d\n", gp->rank); if (gp->flags & G_GEOM_WITHER) sbuf_printf(sb, " \n"); @@ -237,7 +259,7 @@ g_conf_class(struct sbuf *sb, struct g_c struct g_geom *gp2; sbuf_printf(sb, " \n", mp); - sbuf_printf(sb, " %s\n", mp->name); + g_conf_print_escaped(sb, " %s\n", mp->name); LIST_FOREACH(gp2, &mp->geom, geom) { if (gp != NULL && gp != gp2) continue; From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 16:34:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49F70106566C; Sat, 20 Mar 2010 16:34:52 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 394C18FC15; Sat, 20 Mar 2010 16:34:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KGYqu3028218; Sat, 20 Mar 2010 16:34:52 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KGYqAB028216; Sat, 20 Mar 2010 16:34:52 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201003201634.o2KGYqAB028216@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 20 Mar 2010 16:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205386 - head/usr.bin/biff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 16:34:52 -0000 Author: gavin Date: Sat Mar 20 16:34:51 2010 New Revision: 205386 URL: http://svn.freebsd.org/changeset/base/205386 Log: Fix command example, presumed leftovers of old markup. MFC after: 1 week Modified: head/usr.bin/biff/biff.1 Modified: head/usr.bin/biff/biff.1 ============================================================================== --- head/usr.bin/biff/biff.1 Sat Mar 20 16:16:13 2010 (r205385) +++ head/usr.bin/biff/biff.1 Sat Mar 20 16:34:51 2010 (r205386) @@ -32,7 +32,7 @@ .\" @(#)biff.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 9, 2002 +.Dd March 20, 2010 .Dt BIFF 1 .Os .Sh NAME @@ -67,7 +67,7 @@ Enable bell notification. When header notification is enabled, the header and first few lines of the message will be printed on your terminal whenever mail arrives. A -.Dq "Li biff y" +.Dq "biff y" command is often included in the file .Pa .login or From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 16:39:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5EB1065672; Sat, 20 Mar 2010 16:39:28 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49FAE8FC13; Sat, 20 Mar 2010 16:39:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KGdSJv029272; Sat, 20 Mar 2010 16:39:28 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KGdSp8029270; Sat, 20 Mar 2010 16:39:28 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201003201639.o2KGdSp8029270@svn.freebsd.org> From: Hiroki Sato Date: Sat, 20 Mar 2010 16:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205387 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 16:39:28 -0000 Author: hrs Date: Sat Mar 20 16:39:28 2010 New Revision: 205387 URL: http://svn.freebsd.org/changeset/base/205387 Log: Update release notes: merge two SysV IPC entries into one, rtld(1) entries revised: - dynamic string token subst - PIE support improvement - ELF object mapping change Suggested by: kib Approved by: re (implicitly) Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Mar 20 16:34:51 2010 (r205386) +++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Mar 20 16:39:28 2010 (r205387) @@ -275,17 +275,14 @@ fixed. For more details, see EN-10:02.sched_ule. - &os; now supports shared memory segments for System V IPC - which is larger than 2GB on 64-bit platforms. For more - details, see /usr/src/UPDATING - file. - The &man.sglist.9; API to manage scatter/gather lists of physical addresses has been added. &os; ABI of some of the structures used by the System V - IPC API has been changed internally. For new kernel modules, - the kern_msgctl(), + IPC API has been changed internally, and it now supports + shared memory segments for System V IPC which is larger than + 2GB on 64-bit platforms. For new kernel modules, the + kern_msgctl(), kern_semctl(), and kern_shmctl() functions will be transparently renamed to the new @@ -850,13 +847,54 @@ database. The &man.su.1; utility fails for the long names. - The &os; runtime linker, &man.rtld.1; now supports a new - environment variable LD_ELF_HINTS_PATH for - overriding the rtld hints file. This feature gives a - convenient way of using a custom set of shared library that is - not located in the default location and switch back. This - environment variable is automatically unset if the process is - tainted with setuid/setgid. + The &os; runtime linker, &man.rtld.1; has been improved. + The changes include: + + + + The dynamic string token substitution in the + rpath and soname has + been implemented. This can be enabled by setting + + option of &man.ld.1;. Currently, it recognizes + $OSNAME, $PLATFORM, + $OSREL, and + $ORIGIN tokens. This translation is + unconditionally disabled for setuid/setgid + processes. + + + + PIE (Position Independent Executables) support has + been improved. The runtime linker now calculates + relocation base for the main object, and applies the + relocation adjustment for all virtual addresses encoded + into the ELF structures of it in order to make it possible + to load PIE binaries at a non-zero base address. + + + + The way the mapping of the ELF objects has been + changed to make wiring of the address space possible. It + now maps PROT_NONE anonymous memory + over the whole range first, and then mapping the segments + of the object over it. It allocates + .bss by changing the protection of the + range instead of remapping, and unnecessary clearing of + the text segment when its end is not page-aligned has been + eliminated. + + + + A new environment variable + LD_ELF_HINTS_PATH for overriding the + rtld hints file has been supported. This feature gives a + convenient way of using a custom set of shared library + that is not located in the default location and switch + back. This environment variable is automatically unset if + the process is tainted with setuid/setgid. + + The &man.strptime.3; function now supports %z format specifier. From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 19:47:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CFB11065673; Sat, 20 Mar 2010 19:47:31 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F043D8FC1B; Sat, 20 Mar 2010 19:47:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KJlUtM070547; Sat, 20 Mar 2010 19:47:30 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KJlUUA070546; Sat, 20 Mar 2010 19:47:30 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003201947.o2KJlUUA070546@svn.freebsd.org> From: Kip Macy Date: Sat, 20 Mar 2010 19:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205391 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 19:47:31 -0000 Author: kmacy Date: Sat Mar 20 19:47:30 2010 New Revision: 205391 URL: http://svn.freebsd.org/changeset/base/205391 Log: - spread tcp timer callout load evenly across cpus if net.inet.tcp.per_cpu_timers is set to 1 - don't default to acquiring tcbinfo lock exclusively in rexmt MFC after: 7 days Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Sat Mar 20 18:55:54 2010 (r205390) +++ head/sys/netinet/tcp_timer.c Sat Mar 20 19:47:30 2010 (r205391) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -117,6 +118,13 @@ int tcp_maxpersistidle; /* max idle time in persist */ int tcp_maxidle; +static int per_cpu_timers = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, per_cpu_timers, CTLFLAG_RW, + &per_cpu_timers , 0, "run tcp timers on all cpus"); + +#define INP_CPU(inp) (per_cpu_timers ? (!CPU_ABSENT(((inp)->inp_flowid % (mp_maxid+1))) ? \ + ((inp)->inp_flowid % (mp_maxid+1)) : curcpu) : 0) + /* * Tcp protocol timeout routine called every 500 ms. * Updates timestamps used for TCP @@ -248,8 +256,8 @@ tcp_timer_2msl(void *xtp) } else { if (tp->t_state != TCPS_TIME_WAIT && ticks - tp->t_rcvtime <= tcp_maxidle) - callout_reset(&tp->t_timers->tt_2msl, tcp_keepintvl, - tcp_timer_2msl, tp); + callout_reset_on(&tp->t_timers->tt_2msl, tcp_keepintvl, + tcp_timer_2msl, tp, INP_CPU(inp)); else tp = tcp_close(tp); } @@ -332,9 +340,9 @@ tcp_timer_keep(void *xtp) tp->rcv_nxt, tp->snd_una - 1, 0); free(t_template, M_TEMP); } - callout_reset(&tp->t_timers->tt_keep, tcp_keepintvl, tcp_timer_keep, tp); + callout_reset_on(&tp->t_timers->tt_keep, tcp_keepintvl, tcp_timer_keep, tp, INP_CPU(inp)); } else - callout_reset(&tp->t_timers->tt_keep, tcp_keepidle, tcp_timer_keep, tp); + callout_reset_on(&tp->t_timers->tt_keep, tcp_keepidle, tcp_timer_keep, tp, INP_CPU(inp)); #ifdef TCPDEBUG if (inp->inp_socket->so_options & SO_DEBUG) @@ -444,8 +452,7 @@ tcp_timer_rexmt(void * xtp) ostate = tp->t_state; #endif - INP_INFO_WLOCK(&V_tcbinfo); - headlocked = 1; + INP_INFO_RLOCK(&V_tcbinfo); inp = tp->t_inpcb; /* * XXXRW: While this assert is in fact correct, bugs in the tcpcb @@ -456,7 +463,7 @@ tcp_timer_rexmt(void * xtp) */ if (inp == NULL) { tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); + INP_INFO_RUNLOCK(&V_tcbinfo); CURVNET_RESTORE(); return; } @@ -464,7 +471,7 @@ tcp_timer_rexmt(void * xtp) if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_rexmt) || !callout_active(&tp->t_timers->tt_rexmt)) { INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); + INP_INFO_RUNLOCK(&V_tcbinfo); CURVNET_RESTORE(); return; } @@ -478,11 +485,22 @@ tcp_timer_rexmt(void * xtp) if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) { tp->t_rxtshift = TCP_MAXRXTSHIFT; TCPSTAT_INC(tcps_timeoutdrop); + in_pcbref(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + INP_WUNLOCK(inp); + INP_INFO_WLOCK(&V_tcbinfo); + INP_WLOCK(inp); + if (in_pcbrele(inp)) { + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } tp = tcp_drop(tp, tp->t_softerror ? tp->t_softerror : ETIMEDOUT); + headlocked = 1; goto out; } - INP_INFO_WUNLOCK(&V_tcbinfo); + INP_INFO_RUNLOCK(&V_tcbinfo); headlocked = 0; if (tp->t_rxtshift == 1) { /* @@ -598,6 +616,8 @@ tcp_timer_activate(struct tcpcb *tp, int { struct callout *t_callout; void *f_callout; + struct inpcb *inp = tp->t_inpcb; + int cpu = INP_CPU(inp); switch (timer_type) { case TT_DELACK: @@ -626,7 +646,7 @@ tcp_timer_activate(struct tcpcb *tp, int if (delta == 0) { callout_stop(t_callout); } else { - callout_reset(t_callout, delta, f_callout, tp); + callout_reset_on(t_callout, delta, f_callout, tp, cpu); } } From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 21:04:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BE601065670; Sat, 20 Mar 2010 21:04:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB358FC1C; Sat, 20 Mar 2010 21:04:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KL4mft087749; Sat, 20 Mar 2010 21:04:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KL4mTo087746; Sat, 20 Mar 2010 21:04:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003202104.o2KL4mTo087746@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Mar 2010 21:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205393 - head/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 21:04:48 -0000 Author: marius Date: Sat Mar 20 21:04:47 2010 New Revision: 205393 URL: http://svn.freebsd.org/changeset/base/205393 Log: - Remove a bogus forward declaration. - Fix whitespace. Modified: head/lib/libc/sparc64/fpu/fpu_extern.h head/lib/libc/sparc64/fpu/fpu_implode.c Modified: head/lib/libc/sparc64/fpu/fpu_extern.h ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_extern.h Sat Mar 20 20:58:08 2010 (r205392) +++ head/lib/libc/sparc64/fpu/fpu_extern.h Sat Mar 20 21:04:47 2010 (r205393) @@ -34,7 +34,6 @@ #define _SPARC64_FPU_FPU_EXTERN_H_ struct utrapframe; -union instr; struct fpemu; struct fpn; @@ -54,9 +53,9 @@ struct fpn *__fpu_div(struct fpemu *); int __fpu_itof(struct fpn *, u_int); int __fpu_xtof(struct fpn *, u_int64_t); int __fpu_stof(struct fpn *, u_int); -int __fpu_dtof(struct fpn *, u_int, u_int ); -int __fpu_qtof(struct fpn *, u_int, u_int , u_int , u_int ); -void __fpu_explode(struct fpemu *, struct fpn *, int, int ); +int __fpu_dtof(struct fpn *, u_int, u_int); +int __fpu_qtof(struct fpn *, u_int, u_int, u_int, u_int); +void __fpu_explode(struct fpemu *, struct fpn *, int, int); /* fpu_implode.c */ u_int __fpu_ftoi(struct fpemu *, struct fpn *); Modified: head/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 20:58:08 2010 (r205392) +++ head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:04:47 2010 (r205393) @@ -198,7 +198,6 @@ __fpu_ftoi(fe, fp) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: return (0); @@ -248,7 +247,6 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { - case FPC_ZERO: res[1] = 0; return (0); @@ -504,7 +502,6 @@ __fpu_implode(fe, fp, type, space) { switch (type) { - case FTYPE_LNG: space[0] = __fpu_ftox(fe, fp, space); break; From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 21:15:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62BB31065672; Sat, 20 Mar 2010 21:15:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51CB08FC0C; Sat, 20 Mar 2010 21:15:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KLFuAq090245; Sat, 20 Mar 2010 21:15:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KLFuhH090243; Sat, 20 Mar 2010 21:15:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003202115.o2KLFuhH090243@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Mar 2010 21:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205394 - head/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 21:15:56 -0000 Author: marius Date: Sat Mar 20 21:15:56 2010 New Revision: 205394 URL: http://svn.freebsd.org/changeset/base/205394 Log: Ensure that __fpu_ftox() both returns the high bits and res[1] contains the low bits also in the default case. PR: 144900 Obtained from: OpenBSD MFC after: 3 days Modified: head/lib/libc/sparc64/fpu/fpu_implode.c Modified: head/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:04:47 2010 (r205393) +++ head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:15:56 2010 (r205394) @@ -248,8 +248,8 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { case FPC_ZERO: - res[1] = 0; - return (0); + i = 0; + goto done; case FPC_NUM: /* @@ -273,15 +273,17 @@ __fpu_ftox(fe, fp, res) break; if (sign) i = -i; - res[1] = (int)i; - return (i >> 32); + goto done; default: /* Inf, qNaN, sNaN */ break; } /* overflow: replace any inexact exception with invalid */ fe->fe_cx = (fe->fe_cx & ~FSR_NX) | FSR_NV; - return (0x7fffffffffffffffLL + sign); + i = 0x7fffffffffffffffLL + sign; +done: + res[1] = i & 0xffffffff; + return (i >> 32); } /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 21:27:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F575106564A; Sat, 20 Mar 2010 21:27:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3A28FC08; Sat, 20 Mar 2010 21:27:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KLRiUm092887; Sat, 20 Mar 2010 21:27:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KLRiQH092883; Sat, 20 Mar 2010 21:27:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003202127.o2KLRiQH092883@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Mar 2010 21:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205395 - head/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 21:27:44 -0000 Author: marius Date: Sat Mar 20 21:27:44 2010 New Revision: 205395 URL: http://svn.freebsd.org/changeset/base/205395 Log: FPU_DEBUG requires . PR: 144900 Submitted by: Peter Jeremy MFC after: 3 days Modified: head/lib/libc/sparc64/fpu/fpu.c head/lib/libc/sparc64/fpu/fpu_explode.c head/lib/libc/sparc64/fpu/fpu_implode.c Modified: head/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu.c Sat Mar 20 21:15:56 2010 (r205394) +++ head/lib/libc/sparc64/fpu/fpu.c Sat Mar 20 21:27:44 2010 (r205395) @@ -69,9 +69,12 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include -#include #include +#ifdef FPU_DEBUG +#include +#endif #include +#include #include "un-namespace.h" #include "libc_private.h" Modified: head/lib/libc/sparc64/fpu/fpu_explode.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_explode.c Sat Mar 20 21:15:56 2010 (r205394) +++ head/lib/libc/sparc64/fpu/fpu_explode.c Sat Mar 20 21:27:44 2010 (r205395) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include Modified: head/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:15:56 2010 (r205394) +++ head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:27:44 2010 (r205395) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include +#ifdef FPU_DEBUG +#include +#endif + #include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 22:12:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A581106566C; Sat, 20 Mar 2010 22:12:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 390D98FC0C; Sat, 20 Mar 2010 22:12:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KMCGNQ002945; Sat, 20 Mar 2010 22:12:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KMCGJL002943; Sat, 20 Mar 2010 22:12:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003202212.o2KMCGJL002943@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Mar 2010 22:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205396 - head/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 22:12:16 -0000 Author: marius Date: Sat Mar 20 22:12:15 2010 New Revision: 205396 URL: http://svn.freebsd.org/changeset/base/205396 Log: Division should take both arguments' signs into account when the the dividend is infinity or zero and the divisor is not the same. PR: 144900 Submitted by: Peter Jeremy MFC after: 3 days Modified: head/lib/libc/sparc64/fpu/fpu_div.c Modified: head/lib/libc/sparc64/fpu/fpu_div.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_div.c Sat Mar 20 21:27:44 2010 (r205395) +++ head/lib/libc/sparc64/fpu/fpu_div.c Sat Mar 20 22:12:15 2010 (r205396) @@ -167,14 +167,16 @@ __fpu_div(fe) * return it. Otherwise we have the following cases: * * Inf / Inf = NaN, plus NV exception - * Inf / num = Inf [i.e., return x] - * Inf / 0 = Inf [i.e., return x] - * 0 / Inf = 0 [i.e., return x] - * 0 / num = 0 [i.e., return x] + * Inf / num = Inf [i.e., return x #] + * Inf / 0 = Inf [i.e., return x #] + * 0 / Inf = 0 [i.e., return x #] + * 0 / num = 0 [i.e., return x #] * 0 / 0 = NaN, plus NV exception - * num / Inf = 0 + * num / Inf = 0 # * num / num = num (do the divide) - * num / 0 = Inf, plus DZ exception + * num / 0 = Inf #, plus DZ exception + * + * # Sign of result is XOR of operand signs. */ if (ISNAN(x) || ISNAN(y)) { ORDER(x, y); @@ -183,10 +185,10 @@ __fpu_div(fe) if (ISINF(x) || ISZERO(x)) { if (x->fp_class == y->fp_class) return (__fpu_newnan(fe)); + x->fp_sign ^= y->fp_sign; return (x); } - /* all results at this point use XOR of operand signs */ x->fp_sign ^= y->fp_sign; if (ISINF(y)) { x->fp_class = FPC_ZERO; From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 22:32:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50322106566C; Sat, 20 Mar 2010 22:32:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33C598FC0C; Sat, 20 Mar 2010 22:32:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KMWD7I007312; Sat, 20 Mar 2010 22:32:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KMWDeE007310; Sat, 20 Mar 2010 22:32:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003202232.o2KMWDeE007310@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Mar 2010 22:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205397 - head/lib/libc/sparc64/fpu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 22:32:14 -0000 Author: marius Date: Sat Mar 20 22:32:13 2010 New Revision: 205397 URL: http://svn.freebsd.org/changeset/base/205397 Log: - While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tinyness is detected before rounding, therefore rounding up to the smallest normalised number should set the underflow flag. - If an infinite result is rounded down, the result should have an exponent 1 less than the value for infinity. PR: 144900 Submitted by: Peter Jeremy MFC after: 3 days Modified: head/lib/libc/sparc64/fpu/fpu_implode.c Modified: head/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 22:12:15 2010 (r205396) +++ head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 22:32:13 2010 (r205397) @@ -329,8 +329,9 @@ __fpu_ftos(fe, fp) * right to introduce leading zeroes. Rounding then acts * differently for normals and subnormals: the largest subnormal * may round to the smallest normal (1.0 x 2^minexp), or may - * remain subnormal. In the latter case, signal an underflow - * if the result was inexact or if underflow traps are enabled. + * remain subnormal. A number that is subnormal before rounding + * will signal an underflow if the result is inexact or if underflow + * traps are enabled. * * Rounding a normal, on the other hand, always produces another * normal (although either way the result might be too big for @@ -345,8 +346,10 @@ __fpu_ftos(fe, fp) if ((exp = fp->fp_exp + SNG_EXP_BIAS) <= 0) { /* subnormal */ /* -NG for g,r; -SNG_FRACBITS-exp for fraction */ (void) __fpu_shr(fp, FP_NMANT - FP_NG - SNG_FRACBITS - exp); - if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) + if (fpround(fe, fp) && fp->fp_mant[3] == SNG_EXP(1)) { + fe->fe_cx |= FSR_UF; return (sign | SNG_EXP(1) | 0); + } if ((fe->fe_cx & FSR_NX) || (fe->fe_fsr & (FSR_UF << FSR_TEM_SHIFT))) fe->fe_cx |= FSR_UF; @@ -407,6 +410,7 @@ zero: res[1] = 0; if ((exp = fp->fp_exp + DBL_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - DBL_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[2] == DBL_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = 0; return (sign | DBL_EXP(1) | 0); } @@ -426,7 +430,7 @@ zero: res[1] = 0; return (sign | DBL_EXP(DBL_EXP_INFNAN) | 0); } res[1] = ~0; - return (sign | DBL_EXP(DBL_EXP_INFNAN) | DBL_MASK); + return (sign | DBL_EXP(DBL_EXP_INFNAN - 1) | DBL_MASK); } done: res[1] = fp->fp_mant[3]; @@ -468,6 +472,7 @@ zero: res[1] = res[2] = res[3] = 0; if ((exp = fp->fp_exp + EXT_EXP_BIAS) <= 0) { (void) __fpu_shr(fp, FP_NMANT - FP_NG - EXT_FRACBITS - exp); if (fpround(fe, fp) && fp->fp_mant[0] == EXT_EXP(1)) { + fe->fe_cx |= FSR_UF; res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(1) | 0); } @@ -487,7 +492,7 @@ zero: res[1] = res[2] = res[3] = 0; return (sign | EXT_EXP(EXT_EXP_INFNAN) | 0); } res[1] = res[2] = res[3] = ~0; - return (sign | EXT_EXP(EXT_EXP_INFNAN) | EXT_MASK); + return (sign | EXT_EXP(EXT_EXP_INFNAN - 1) | EXT_MASK); } done: res[1] = fp->fp_mant[1]; From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 22:58:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19AA9106566B; Sat, 20 Mar 2010 22:58:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7E2C8FC1C; Sat, 20 Mar 2010 22:58:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KMwsM6013199; Sat, 20 Mar 2010 22:58:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KMwsHH013197; Sat, 20 Mar 2010 22:58:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201003202258.o2KMwsHH013197@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Mar 2010 22:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205398 - head/lib/csu/i386-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 22:58:55 -0000 Author: jilles Date: Sat Mar 20 22:58:54 2010 New Revision: 205398 URL: http://svn.freebsd.org/changeset/base/205398 Log: Do not create *.gmon files for PIE executables on i386. Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o. This problem is i386-specific, the other architectures are OK. If you have problems with PIE executables such as samba and cups leaving behind gmon files, rebuild them after installing this change. PR: ports/143924 Reviewed by: kib MFC after: 3 days Modified: head/lib/csu/i386-elf/Makefile Modified: head/lib/csu/i386-elf/Makefile ============================================================================== --- head/lib/csu/i386-elf/Makefile Sat Mar 20 22:32:13 2010 (r205397) +++ head/lib/csu/i386-elf/Makefile Sat Mar 20 22:58:54 2010 (r205398) @@ -23,7 +23,7 @@ crt1.o: crt1_c.o crt1_s.o objcopy --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 23:00:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 367E01065673; Sat, 20 Mar 2010 23:00:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 259818FC20; Sat, 20 Mar 2010 23:00:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KN0igS013652; Sat, 20 Mar 2010 23:00:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KN0inE013650; Sat, 20 Mar 2010 23:00:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201003202300.o2KN0inE013650@svn.freebsd.org> From: Marius Strobl Date: Sat, 20 Mar 2010 23:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205399 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 23:00:44 -0000 Author: marius Date: Sat Mar 20 23:00:43 2010 New Revision: 205399 URL: http://svn.freebsd.org/changeset/base/205399 Log: Improve the KVA space sizing of 186682; on machines with large dTLBs we can actually use all of the available lockable entries of the tiny dTLB for the kernel TSB. With this change the KVA space sizing happens to be more in line with the MI one so up to at least 24GB machines KVA doesn't need to be limited manually. This is just another stopgap though, the real solution is to take advantage of ASI_ATOMIC_QUAD_LDD_PHYS on CPUs providing it so we don't need to lock the kernel TSB pages into the dTLB in the first place. Modified: head/sys/sparc64/sparc64/pmap.c Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Sat Mar 20 22:58:54 2010 (r205398) +++ head/sys/sparc64/sparc64/pmap.c Sat Mar 20 23:00:43 2010 (r205399) @@ -236,6 +236,8 @@ PMAP_STATS_VAR(pmap_ncopy_page_soc); PMAP_STATS_VAR(pmap_nnew_thread); PMAP_STATS_VAR(pmap_nnew_thread_oc); +static inline u_long dtlb_get_data(u_int slot); + /* * Quick sort callout for comparing memory regions */ @@ -274,6 +276,18 @@ om_cmp(const void *a, const void *b) return (0); } +static inline u_long +dtlb_get_data(u_int slot) +{ + + /* + * We read ASI_DTLB_DATA_ACCESS_REG twice in order to work + * around errata of USIII and beyond. + */ + (void)ldxa(TLB_DAR_SLOT(slot), ASI_DTLB_DATA_ACCESS_REG); + return (ldxa(TLB_DAR_SLOT(slot), ASI_DTLB_DATA_ACCESS_REG)); +} + /* * Bootstrap the system enough to run with virtual memory. */ @@ -287,11 +301,13 @@ pmap_bootstrap(u_int cpu_impl) vm_paddr_t pa; vm_size_t physsz; vm_size_t virtsz; + u_long data; phandle_t pmem; phandle_t vmem; - int sz; + u_int dtlb_slots_avail; int i; int j; + int sz; /* * Find out what physical memory is available from the PROM and @@ -336,22 +352,30 @@ pmap_bootstrap(u_int cpu_impl) /* * Calculate the size of kernel virtual memory, and the size and mask * for the kernel TSB based on the phsyical memory size but limited - * by letting the kernel TSB take up no more than half of the dTLB - * slots available for locked entries. - */ + * by the amount of dTLB slots available for locked entries (given + * that for spitfire-class CPUs all of the dt64 slots can hold locked + * entries but there is no large dTLB for unlocked ones, we don't use + * more than half of it for locked entries). + */ + dtlb_slots_avail = 0; + for (i = 0; i < dtlb_slots; i++) { + data = dtlb_get_data(i); + if ((data & (TD_V | TD_L)) != (TD_V | TD_L)) + dtlb_slots_avail++; + } +#ifdef SMP + dtlb_slots_avail -= PCPU_PAGES; +#endif + if (cpu_impl >= CPU_IMPL_ULTRASPARCI && + cpu_impl < CPU_IMPL_ULTRASPARCIII) + dtlb_slots_avail /= 2; virtsz = roundup(physsz, PAGE_SIZE_4M << (PAGE_SHIFT - TTE_SHIFT)); virtsz = MIN(virtsz, - (dtlb_slots / 2 * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); + (dtlb_slots_avail * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); vm_max_kernel_address = VM_MIN_KERNEL_ADDRESS + virtsz; tsb_kernel_size = virtsz >> (PAGE_SHIFT - TTE_SHIFT); tsb_kernel_mask = (tsb_kernel_size >> TTE_SHIFT) - 1; - if (kernel_tlb_slots + PCPU_PAGES + tsb_kernel_size / PAGE_SIZE_4M + - 1 /* PROM page */ + 1 /* spare */ > dtlb_slots) - panic("pmap_bootstrap: insufficient dTLB entries"); - if (kernel_tlb_slots + 1 /* PROM page */ + 1 /* spare */ > itlb_slots) - panic("pmap_bootstrap: insufficient iTLB entries"); - /* * Allocate the kernel TSB and lock it in the TLB. */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 20 23:50:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51F8D106564A; Sat, 20 Mar 2010 23:50:56 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40B5E8FC08; Sat, 20 Mar 2010 23:50:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2KNouN2024607; Sat, 20 Mar 2010 23:50:56 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2KNouvH024605; Sat, 20 Mar 2010 23:50:56 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201003202350.o2KNouvH024605@svn.freebsd.org> From: Ken Smith Date: Sat, 20 Mar 2010 23:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205400 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 23:50:56 -0000 Author: kensmith Date: Sat Mar 20 23:50:55 2010 New Revision: 205400 URL: http://svn.freebsd.org/changeset/base/205400 Log: Guess at the date the 7.3-RELEASE builds will be finished and everything will be in place for the announcement. Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Sat Mar 20 23:00:43 2010 (r205399) +++ stable/7/UPDATING Sat Mar 20 23:50:55 2010 (r205400) @@ -8,6 +8,9 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20100323: + FreeBSD 7.3-RELEASE + 20091129: PECOFF image activator support removed.