From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 01:04:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4EFC1065672; Sun, 9 Sep 2012 01:04:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF5848FC0A; Sun, 9 Sep 2012 01:04:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8914M68081786; Sun, 9 Sep 2012 01:04:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8914MKf081778; Sun, 9 Sep 2012 01:04:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209090104.q8914MKf081778@svn.freebsd.org> From: Eitan Adler Date: Sun, 9 Sep 2012 01:04: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: r240252 - in head/share: examples examples/cvsup examples/etc man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 01:04:23 -0000 Author: eadler Date: Sun Sep 9 01:04:22 2012 New Revision: 240252 URL: http://svn.freebsd.org/changeset/base/240252 Log: Remove documentation and www cvsup files as they are no longer useful with the switch to subversion. Approved by: gjb (man pages) Approved by: cperciva (example files, implicit) MFC after: 1 week Deleted: head/share/examples/cvsup/doc-supfile head/share/examples/cvsup/www-supfile Modified: head/share/examples/Makefile head/share/examples/cvsup/cvs-supfile head/share/examples/cvsup/refuse head/share/examples/cvsup/refuse.README head/share/examples/cvsup/stable-supfile head/share/examples/etc/make.conf head/share/man/man5/make.conf.5 Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/examples/Makefile Sun Sep 9 01:04:22 2012 (r240252) @@ -54,14 +54,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ csh/dot.cshrc \ cvsup/README \ cvsup/cvs-supfile \ - cvsup/doc-supfile \ cvsup/gnats-supfile \ cvsup/ports-supfile \ cvsup/refuse \ cvsup/refuse.README \ cvsup/stable-supfile \ cvsup/standard-supfile \ - cvsup/www-supfile \ diskless/ME \ diskless/README.BOOTP \ diskless/README.TEMPLATING \ Modified: head/share/examples/cvsup/cvs-supfile ============================================================================== --- head/share/examples/cvsup/cvs-supfile Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/examples/cvsup/cvs-supfile Sun Sep 9 01:04:22 2012 (r240252) @@ -169,19 +169,6 @@ ports-all #ports-x11-toolkits #ports-x11-wm -## Documentation -# -# The easiest way to get the doc tree is to use the "doc-all" -# mega-collection. It includes all of the individual "doc-*" -# collections, -doc-all - -## Website -# -# This collection retrieves the www tree of the FreeBSD -# repository -www - ## Projects # # This collection retrieves the projects tree of the FreeBSD @@ -200,4 +187,3 @@ cvsroot-all #cvsroot-common #cvsroot-src #cvsroot-ports -#cvsroot-doc Modified: head/share/examples/cvsup/refuse ============================================================================== --- head/share/examples/cvsup/refuse Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/examples/cvsup/refuse Sun Sep 9 01:04:22 2012 (r240252) @@ -1,23 +1,3 @@ -doc/bn_* -doc/da_* -doc/de_* -doc/el_* -doc/es_* -doc/fr_* -doc/hu_* -doc/id_* -doc/it_* -doc/ja_* -doc/mn_* -doc/nl_* -doc/no_* -doc/pl_* -doc/pt_* -doc/ro_* -doc/ru_* -doc/sr_* -doc/tr_* -doc/zh_* ports/arabic ports/chinese ports/french Modified: head/share/examples/cvsup/refuse.README ============================================================================== --- head/share/examples/cvsup/refuse.README Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/examples/cvsup/refuse.README Sun Sep 9 01:04:22 2012 (r240252) @@ -21,28 +21,8 @@ you modified that file. However, this w buildworld. Modify /etc/mail/`hostname`.mc instead. If you are an English speaker and don't wish to receive the -foreign-language documentation or ports, use the following patterns: +or ports, use the following patterns: - doc/bn_* - doc/da_* - doc/de_* - doc/el_* - doc/es_* - doc/fr_* - doc/hu_* - doc/id_* - doc/it_* - doc/ja_* - doc/mn_* - doc/nl_* - doc/no_* - doc/pl_* - doc/pt_* - doc/ro_* - doc/ru_* - doc/sr_* - doc/tr_* - doc/zh_* ports/arabic ports/chinese ports/french Modified: head/share/examples/cvsup/stable-supfile ============================================================================== --- head/share/examples/cvsup/stable-supfile Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/examples/cvsup/stable-supfile Sun Sep 9 01:04:22 2012 (r240252) @@ -43,14 +43,13 @@ # # DANGER! WARNING! LOOK OUT! VORSICHT! # -# If you add any of the ports or doc collections to this file, be sure to +# If you add any of the ports collections to this file, be sure to # specify them with a "tag" value set to ".", like this: # # ports-all tag=. -# doc-all tag=. # # If you leave out the "tag=." portion, CVSup will delete all of -# the files in your ports or doc tree. That is because the ports and doc +# the files in your ports. That is because the ports # collections do not use the same tags as the main part of the FreeBSD # source tree. # Modified: head/share/examples/etc/make.conf ============================================================================== --- head/share/examples/etc/make.conf Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/examples/etc/make.conf Sun Sep 9 01:04:22 2012 (r240252) @@ -187,8 +187,6 @@ #SUPHOST= cvsup.uk.FreeBSD.org #SUPFILE= /usr/share/examples/cvsup/standard-supfile #PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile -#DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile -#WWWSUPFILE= /usr/share/examples/cvsup/www-supfile # # top(1) uses a hash table for the user names. The size of this hash # can be tuned to match the number of local users. The table size should Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Sat Sep 8 21:38:05 2012 (r240251) +++ head/share/man/man5/make.conf.5 Sun Sep 9 01:04:22 2012 (r240252) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 2012 +.Dd September 9, 2012 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -200,14 +200,6 @@ value, use .Dq Li += instead of .Dq Li = . -.It Va DOCSUPFILE -.Pq Vt str -The documentation -.Ar supfile -to use when doing a -.Dq Li "make update" . -For example, -.Pa /usr/share/examples/cvsup/doc-supfile . .It Va INSTALL .Pq Vt str the default install command. @@ -320,9 +312,9 @@ The hostname of the sup server to use wh Set this to use .Xr csup 1 to update your -.Pa src , ports , doc +.Pa src , and -.Pa www +.Pa ports trees with .Dq Li "make update" . .It Va SVN_UPDATE @@ -339,14 +331,6 @@ you will need to set to the full path of a .Xr svn 1 binary. -.It Va WWWSUPFILE -.Pq Vt str -The www -.Ar supfile -to use when doing a -.Dq Li "make update" . -For example, -.Pa /usr/share/examples/cvsup/www-supfile . .El .Ss "BUILDING THE KERNEL" The following list provides a name and short description for variables From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 01:22:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 073FA1065670; Sun, 9 Sep 2012 01:22:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E773F8FC08; Sun, 9 Sep 2012 01:22:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q891MWYu084204; Sun, 9 Sep 2012 01:22:32 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q891MW45084202; Sun, 9 Sep 2012 01:22:32 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209090122.q891MW45084202@svn.freebsd.org> From: Eitan Adler Date: Sun, 9 Sep 2012 01:22: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: r240253 - head/share/examples/cvsup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 01:22:33 -0000 Author: eadler Date: Sun Sep 9 01:22:32 2012 New Revision: 240253 URL: http://svn.freebsd.org/changeset/base/240253 Log: Minor English grammar fixes. Specifically document that an incomplete ports tree is not supported. Remove useless comment about sendmail. Reviewed by: yuri.pankov@gmail.com Approved by: cperciva (implicit) MFC after: 1 week X-MFC-With: r240252 Modified: head/share/examples/cvsup/refuse.README Modified: head/share/examples/cvsup/refuse.README ============================================================================== --- head/share/examples/cvsup/refuse.README Sun Sep 9 01:04:22 2012 (r240252) +++ head/share/examples/cvsup/refuse.README Sun Sep 9 01:22:32 2012 (r240253) @@ -16,12 +16,8 @@ CVSup's base directory to "/var/db". Th directory; i.e., it is "/var/db/sup". If you have changed your base directory, your sup directory is /path/to/base/sup. -This file used to contain /usr/src/etc/sendmail/freebsd.mc in case -you modified that file. However, this was removed as it can break -buildworld. Modify /etc/mail/`hostname`.mc instead. - If you are an English speaker and don't wish to receive the -or ports, use the following patterns: +non-English ports, use the following patterns: ports/arabic ports/chinese @@ -37,6 +33,9 @@ or ports, use the following patterns: ports/ukrainian ports/vietnamese +Note that this is *not* a supported configuration and may result +in ports builds breaking. + Use refuse files with care. Some parts of the src distribution depend on files in completely different parts. From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 04:53:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96AF71065670; Sun, 9 Sep 2012 04:53:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81E6D8FC08; Sun, 9 Sep 2012 04:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q894rBCW008820; Sun, 9 Sep 2012 04:53:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q894rBZu008818; Sun, 9 Sep 2012 04:53:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209090453.q894rBZu008818@svn.freebsd.org> From: Adrian Chadd Date: Sun, 9 Sep 2012 04:53: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: r240254 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 04:53:11 -0000 Author: adrian Date: Sun Sep 9 04:53:10 2012 New Revision: 240254 URL: http://svn.freebsd.org/changeset/base/240254 Log: Remove TDMA #define entries from if_ath.c; they now exist in if_ath_tdma.h. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Sep 9 01:22:32 2012 (r240253) +++ head/sys/dev/ath/if_ath.c Sun Sep 9 04:53:10 2012 (r240254) @@ -204,22 +204,6 @@ static void ath_dfs_tasklet(void *, int) #include #endif -#if 0 -#define TDMA_EP_MULTIPLIER (1<<10) /* pow2 to optimize out * and / */ -#define TDMA_LPF_LEN 6 -#define TDMA_DUMMY_MARKER 0x127 -#define TDMA_EP_MUL(x, mul) ((x) * (mul)) -#define TDMA_IN(x) (TDMA_EP_MUL((x), TDMA_EP_MULTIPLIER)) -#define TDMA_LPF(x, y, len) \ - ((x != TDMA_DUMMY_MARKER) ? (((x) * ((len)-1) + (y)) / (len)) : (y)) -#define TDMA_SAMPLE(x, y) do { \ - x = TDMA_LPF((x), TDMA_IN(y), TDMA_LPF_LEN); \ -} while (0) -#define TDMA_EP_RND(x,mul) \ - ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) -#define TDMA_AVG(x) TDMA_EP_RND(x, TDMA_EP_MULTIPLIER) -#endif /* IEEE80211_SUPPORT_TDMA */ - SYSCTL_DECL(_hw_ath); /* XXX validate sysctl values */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 05:06:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37C92106566C; Sun, 9 Sep 2012 05:06:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09B028FC0C; Sun, 9 Sep 2012 05:06:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8956G7M010396; Sun, 9 Sep 2012 05:06:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8956GCM010394; Sun, 9 Sep 2012 05:06:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209090506.q8956GCM010394@svn.freebsd.org> From: Adrian Chadd Date: Sun, 9 Sep 2012 05:06: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: r240255 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 05:06:17 -0000 Author: adrian Date: Sun Sep 9 05:06:16 2012 New Revision: 240255 URL: http://svn.freebsd.org/changeset/base/240255 Log: Make sure the aggregate fields are properly cleared - both in the ath_buf and when forming a non-aggregate frame. The non-11n setds function is called when TXing aggregate frames (and yes, I should fix this!) and the non-11n TX aggregation code doesn't clear the delimiter field. I figure it's nicer to do that. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sun Sep 9 04:53:10 2012 (r240254) +++ head/sys/dev/ath/if_ath_tx.c Sun Sep 9 05:06:16 2012 (r240255) @@ -377,6 +377,11 @@ ath_tx_chaindesclist(struct ath_softc *s , i == bf->bf_nseg - 1 /* last segment */ , (struct ath_desc *) ds0 /* first descriptor */ ); + + /* Make sure the 11n aggregate fields are cleared */ + if (ath_tx_is_11n(sc)) + ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); + isFirstDesc = 0; #ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_XMIT) @@ -3459,6 +3464,7 @@ ath_tx_retry_subframe(struct ath_softc * ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[atid->ac]); + /* XXX clr11naggr should be done for all subframes */ ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); ath_hal_set11nburstduration(sc->sc_ah, bf->bf_desc, 0); /* ath_hal_set11n_virtualmorefrag(sc->sc_ah, bf->bf_desc, 0); */ @@ -3499,6 +3505,11 @@ ath_tx_retry_subframe(struct ath_softc * ath_tx_set_retry(sc, bf); bf->bf_next = NULL; /* Just to make sure */ + /* Clear the aggregate state */ + bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_ndelim = 0; /* ??? needed? */ + bf->bf_state.bfs_nframes = 1; + TAILQ_INSERT_TAIL(bf_q, bf, bf_list); return 0; } @@ -4127,6 +4138,7 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: single-frame aggregate\n", __func__); bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_ndelim = 0; ath_tx_setds(sc, bf); ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); if (status == ATH_AGGR_BAW_CLOSED) From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 06:54:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3C98106564A; Sun, 9 Sep 2012 06:54:42 +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 A086E8FC0A; Sun, 9 Sep 2012 06:54:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q896sgSw021930; Sun, 9 Sep 2012 06:54:42 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q896sgoU021928; Sun, 9 Sep 2012 06:54:42 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209090654.q896sgoU021928@svn.freebsd.org> From: Joel Dahl Date: Sun, 9 Sep 2012 06:54: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: r240256 - head/usr.bin/sort X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 06:54:42 -0000 Author: joel (doc committer) Date: Sun Sep 9 06:54:42 2012 New Revision: 240256 URL: http://svn.freebsd.org/changeset/base/240256 Log: Remove trailing whitespace. Modified: head/usr.bin/sort/sort.1.in Modified: head/usr.bin/sort/sort.1.in ============================================================================== --- head/usr.bin/sort/sort.1.in Sun Sep 9 05:06:16 2012 (r240255) +++ head/usr.bin/sort/sort.1.in Sun Sep 9 06:54:42 2012 (r240256) @@ -313,8 +313,8 @@ without arguments. When called with argument .Fl d it must decompress standard input to standard output. -If PROGRAM fails, -.Nm +If PROGRAM fails, +.Nm must exit with error. An example of PROGRAM that can be used here is bzip2. .It Fl Fl random-source Ns = Ns Ar filename From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 07:23:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 125A41065670; Sun, 9 Sep 2012 07:23:16 +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 F1E9F8FC08; Sun, 9 Sep 2012 07:23:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q897NF35025050; Sun, 9 Sep 2012 07:23:15 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q897NFs8025048; Sun, 9 Sep 2012 07:23:15 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209090723.q897NFs8025048@svn.freebsd.org> From: Joel Dahl Date: Sun, 9 Sep 2012 07: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: r240257 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 07:23:16 -0000 Author: joel (doc committer) Date: Sun Sep 9 07:23:15 2012 New Revision: 240257 URL: http://svn.freebsd.org/changeset/base/240257 Log: Remove clause 3 and 4 from the NetBSD Foundation copyright header, missed in r203971. Modified: head/usr.bin/xlint/lint1/makeman Modified: head/usr.bin/xlint/lint1/makeman ============================================================================== --- head/usr.bin/xlint/lint1/makeman Sun Sep 9 06:54:42 2012 (r240256) +++ head/usr.bin/xlint/lint1/makeman Sun Sep 9 07:23:15 2012 (r240257) @@ -46,13 +46,6 @@ cat << \__EOF .\" 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 the NetBSD -.\" Foundation, Inc. and its contributors. -.\" 4. Neither the name of The NetBSD Foundation nor the names of its -.\" contributors may be used to endorse or promote products derived -.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 08:14:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2475B106564A; Sun, 9 Sep 2012 08:14:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F29C8FC0A; Sun, 9 Sep 2012 08:14:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q898E45C031561; Sun, 9 Sep 2012 08:14:04 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q898E42F031559; Sun, 9 Sep 2012 08:14:04 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209090814.q898E42F031559@svn.freebsd.org> From: Michael Tuexen Date: Sun, 9 Sep 2012 08:14: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: r240263 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 08:14:05 -0000 Author: tuexen Date: Sun Sep 9 08:14:04 2012 New Revision: 240263 URL: http://svn.freebsd.org/changeset/base/240263 Log: Whitespace changes. MFC after: 10 days Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Sep 9 07:52:13 2012 (r240262) +++ head/sys/netinet/sctp_pcb.c Sun Sep 9 08:14:04 2012 (r240263) @@ -2757,7 +2757,6 @@ sctp_inpcb_bind(struct socket *so, struc return (EINVAL); } lport = sin6->sin6_port; - /* * For LOOPBACK the prison_local_ip6() call * will transmute the ipv6 address to the @@ -2795,7 +2794,7 @@ sctp_inpcb_bind(struct socket *so, struc SCTP_INP_INCR_REF(inp); if (lport) { /* - * Did the caller specify a port? if so we must see if a ep + * Did the caller specify a port? if so we must see if an ep * already has this one bound. */ /* got to be root to get at low ports */ @@ -2876,8 +2875,7 @@ continue_anyway: if (bindall) { /* verify that no lport is not used by a singleton */ if ((port_reuse_active == 0) && - (inp_tmp = sctp_isport_inuse(inp, lport, vrf_id)) - ) { + (inp_tmp = sctp_isport_inuse(inp, lport, vrf_id))) { /* Sorry someone already has this one bound */ if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) && (sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) { @@ -3043,9 +3041,9 @@ continue_anyway: * zero out the port to find the address! yuck! can't do * this earlier since need port for sctp_pcb_findep() */ - if (sctp_ifap != NULL) + if (sctp_ifap != NULL) { ifa = sctp_ifap; - else { + } else { /* * Note for BSD we hit here always other O/S's will * pass things in via the sctp_ifap argument From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 08:14:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54346106568F; Sun, 9 Sep 2012 08:14:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FEDE8FC08; Sun, 9 Sep 2012 08:14:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q898EmGV031706; Sun, 9 Sep 2012 08:14:48 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q898EmHi031704; Sun, 9 Sep 2012 08:14:48 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209090814.q898EmHi031704@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 9 Sep 2012 08:14: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: r240264 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 08:14:48 -0000 Author: glebius Date: Sun Sep 9 08:14:47 2012 New Revision: 240264 URL: http://svn.freebsd.org/changeset/base/240264 Log: Add removed if_pflow.h. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Sep 9 08:14:04 2012 (r240263) +++ head/ObsoleteFiles.inc Sun Sep 9 08:14:47 2012 (r240264) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20120908: pf cleanup +OLD_FILES+=usr/include/net/if_pflow.h # 20120816: new clang import which bumps version from 3.1 to 3.2 OLD_FILES+=usr/bin/llvm-ld OLD_FILES+=usr/bin/llvm-stub From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 09:46:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93C3D106564A; Sun, 9 Sep 2012 09:46:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E3A88FC12; Sun, 9 Sep 2012 09:46:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q899knkE045289; Sun, 9 Sep 2012 09:46:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q899kncP045285; Sun, 9 Sep 2012 09:46:49 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209090946.q899kncP045285@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 9 Sep 2012 09:46: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: r240271 - head/contrib/bsnmp/snmpd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 09:46:49 -0000 Author: glebius Date: Sun Sep 9 09:46:48 2012 New Revision: 240271 URL: http://svn.freebsd.org/changeset/base/240271 Log: For UDP transport set IP_RECVDSTADDR sockopt on the socket, and provide IP_SENDSRCADDR control with datagram message we reply with. This makes bsnmpd reply from exactly same address that request was sent to, thus successfully bypassing stateful firewalls or other kinds of strict checking. PR: bin/171279 Modified: head/contrib/bsnmp/snmpd/main.c head/contrib/bsnmp/snmpd/trans_udp.c Modified: head/contrib/bsnmp/snmpd/main.c ============================================================================== --- head/contrib/bsnmp/snmpd/main.c Sun Sep 9 08:40:44 2012 (r240270) +++ head/contrib/bsnmp/snmpd/main.c Sun Sep 9 09:46:48 2012 (r240271) @@ -1106,10 +1106,11 @@ recv_stream(struct port_input *pi) * Each receive should return one datagram. */ static int -recv_dgram(struct port_input *pi) +recv_dgram(struct port_input *pi, struct in_addr *laddr) { u_char embuf[1000]; - char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX))]; + char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + + CMSG_SPACE(sizeof(struct in_addr))]; struct msghdr msg; struct iovec iov[1]; ssize_t len; @@ -1159,6 +1160,9 @@ recv_dgram(struct port_input *pi) for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { + if (cmsg->cmsg_level == IPPROTO_IP && + cmsg->cmsg_type == IP_RECVDSTADDR) + memcpy(laddr, CMSG_DATA(cmsg), sizeof(struct in_addr)); if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_CREDS) cred = (struct sockcred *)CMSG_DATA(cmsg); @@ -1187,12 +1191,27 @@ snmpd_input(struct port_input *pi, struc #ifdef USE_TCPWRAPPERS char client[16]; #endif + struct msghdr msg; + struct iovec iov[1]; + char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; + struct cmsghdr *cmsgp; /* get input depending on the transport */ if (pi->stream) { + msg.msg_control = NULL; + msg.msg_controllen = 0; + ret = recv_stream(pi); } else { - ret = recv_dgram(pi); + memset(cbuf, 0, CMSG_SPACE(sizeof(struct in_addr))); + msg.msg_control = cbuf; + msg.msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); + cmsgp = CMSG_FIRSTHDR(&msg); + cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); + cmsgp->cmsg_level = IPPROTO_IP; + cmsgp->cmsg_type = IP_SENDSRCADDR; + + ret = recv_dgram(pi, (struct in_addr *)CMSG_DATA(cmsgp)); } if (ret == -1) @@ -1337,11 +1356,19 @@ snmpd_input(struct port_input *pi, struc sndbuf, &sndlen, "SNMP", ierr, vi, NULL); if (ferr == SNMPD_INPUT_OK) { - slen = sendto(pi->fd, sndbuf, sndlen, 0, pi->peer, pi->peerlen); + msg.msg_name = pi->peer; + msg.msg_namelen = pi->peerlen; + msg.msg_iov = iov; + msg.msg_iovlen = 1; + msg.msg_flags = 0; + iov[0].iov_base = sndbuf; + iov[0].iov_len = sndlen; + + slen = sendmsg(pi->fd, &msg, 0); if (slen == -1) - syslog(LOG_ERR, "sendto: %m"); + syslog(LOG_ERR, "sendmsg: %m"); else if ((size_t)slen != sndlen) - syslog(LOG_ERR, "sendto: short write %zu/%zu", + syslog(LOG_ERR, "sendmsg: short write %zu/%zu", sndlen, (size_t)slen); } snmp_pdu_free(&pdu); Modified: head/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_udp.c Sun Sep 9 08:40:44 2012 (r240270) +++ head/contrib/bsnmp/snmpd/trans_udp.c Sun Sep 9 09:46:48 2012 (r240271) @@ -103,11 +103,19 @@ udp_init_port(struct tport *tp) struct udp_port *p = (struct udp_port *)tp; struct sockaddr_in addr; u_int32_t ip; + const int on = 1; if ((p->input.fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { syslog(LOG_ERR, "creating UDP socket: %m"); return (SNMP_ERR_RES_UNAVAIL); } + if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); + close(p->input.fd); + p->input.fd = -1; + return (SNMP_ERR_GENERR); + } ip = (p->addr[0] << 24) | (p->addr[1] << 16) | (p->addr[2] << 8) | p->addr[3]; memset(&addr, 0, sizeof(addr)); From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 11:30:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F28CE106566B; Sun, 9 Sep 2012 11:30:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE20C8FC14; Sun, 9 Sep 2012 11:30:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89BUjlV064461; Sun, 9 Sep 2012 11:30:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89BUjYX064459; Sun, 9 Sep 2012 11:30:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209091130.q89BUjYX064459@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 9 Sep 2012 11:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240272 - head/sys/boot/uboot/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 11:30:46 -0000 Author: ae Date: Sun Sep 9 11:30:45 2012 New Revision: 240272 URL: http://svn.freebsd.org/changeset/base/240272 Log: Make struct uboot_devdesc compatible with struct disk_devdesc. Modified: head/sys/boot/uboot/lib/libuboot.h Modified: head/sys/boot/uboot/lib/libuboot.h ============================================================================== --- head/sys/boot/uboot/lib/libuboot.h Sun Sep 9 09:46:48 2012 (r240271) +++ head/sys/boot/uboot/lib/libuboot.h Sun Sep 9 11:30:45 2012 (r240272) @@ -35,18 +35,15 @@ struct uboot_devdesc union { struct { void *data; - int pnum; - int ptype; + int slice; + int partition; + off_t offset; } disk; } d_kind; }; #define d_disk d_kind.disk -#define PTYPE_BSDLABEL 1 -#define PTYPE_GPT 2 -#define PTYPE_MBR 3 - /* * Default network packet alignment in memory */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 11:32:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3B70106564A; Sun, 9 Sep 2012 11:32:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4E698FC0A; Sun, 9 Sep 2012 11:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89BW6SG064745; Sun, 9 Sep 2012 11:32:06 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89BW6xw064743; Sun, 9 Sep 2012 11:32:06 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209091132.q89BW6xw064743@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 9 Sep 2012 11:32: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: r240273 - head/sys/boot/uboot/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 11:32:07 -0000 Author: ae Date: Sun Sep 9 11:32:06 2012 New Revision: 240273 URL: http://svn.freebsd.org/changeset/base/240273 Log: Use disk_fmtdev() and disk_parsedev() functions from the new DISK API. Modified: head/sys/boot/uboot/lib/devicename.c Modified: head/sys/boot/uboot/lib/devicename.c ============================================================================== --- head/sys/boot/uboot/lib/devicename.c Sun Sep 9 11:30:45 2012 (r240272) +++ head/sys/boot/uboot/lib/devicename.c Sun Sep 9 11:32:06 2012 (r240273) @@ -27,12 +27,11 @@ #include __FBSDID("$FreeBSD$"); -#include - #include #include #include "bootstrap.h" +#include "disk.h" #include "libuboot.h" static int uboot_parsedev(struct uboot_devdesc **dev, const char *devspec, @@ -90,7 +89,7 @@ uboot_parsedev(struct uboot_devdesc **de struct devsw *dv; char *cp; const char *np; - int i, unit, pnum, ptype, err; + int i, unit, err; /* minimum length check */ if (strlen(devspec) < 2) @@ -114,51 +113,13 @@ uboot_parsedev(struct uboot_devdesc **de case DEVT_NONE: break; +#ifdef LOADER_DISK_SUPPORT case DEVT_DISK: - unit = -1; - pnum = -1; - ptype = -1; - if (*np && (*np != ':')) { - /* next comes the unit number */ - unit = strtol(np, &cp, 10); - if (cp == np) { - err = EUNIT; - goto fail; - } - if (*cp && (*cp != ':')) { - /* get partition */ - if (*cp == 'p' && *(cp + 1) && - *(cp + 1) != ':') { - pnum = strtol(cp + 1, &cp, 10); - ptype = PTYPE_GPT; - } else if (*cp == 's' && *(cp + 1) && - *(cp + 1) != ':') { - pnum = strtol(cp + 1, &cp, 10); - ptype = PTYPE_MBR; - } else { - pnum = *cp - 'a'; - ptype = PTYPE_BSDLABEL; - if ((pnum < 0) || - (pnum >= MAXPARTITIONS)) { - err = EPART; - goto fail; - } - cp++; - } - } - } - if (*cp && (*cp != ':')) { - err = EINVAL; + err = disk_parsedev((struct disk_devdesc *)idev, np, path); + if (err != 0) goto fail; - } - - idev->d_unit = unit; - idev->d_disk.pnum = pnum; - idev->d_disk.ptype = ptype; - idev->d_disk.data = NULL; - if (path != NULL) - *path = (*cp == 0) ? cp : cp + 1; break; +#endif case DEVT_NET: unit = 0; @@ -204,7 +165,6 @@ char * uboot_fmtdev(void *vdev) { struct uboot_devdesc *dev = (struct uboot_devdesc *)vdev; - char *cp; static char buf[128]; switch(dev->d_type) { @@ -213,22 +173,9 @@ uboot_fmtdev(void *vdev) break; case DEVT_DISK: - cp = buf; - cp += sprintf(cp, "%s%d", dev->d_dev->dv_name, dev->d_unit); - if (dev->d_kind.disk.pnum >= 0) { - if (dev->d_kind.disk.ptype == PTYPE_BSDLABEL) - cp += sprintf(cp, "%c", - dev->d_kind.disk.pnum + 'a'); - else if (dev->d_kind.disk.ptype == PTYPE_GPT) - cp += sprintf(cp, "p%i", - dev->d_kind.disk.pnum); - else if (dev->d_kind.disk.ptype == PTYPE_MBR) - cp += sprintf(cp, "s%i", - dev->d_kind.disk.pnum); - } - - strcat(cp, ":"); - break; +#ifdef LOADER_DISK_SUPPORT + return (disk_fmtdev(vdev)); +#endif case DEVT_NET: sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 11:33:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 580E8106564A; Sun, 9 Sep 2012 11:33:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40C688FC14; Sun, 9 Sep 2012 11:33:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89BX7Rq064955; Sun, 9 Sep 2012 11:33:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89BX7sh064953; Sun, 9 Sep 2012 11:33:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209091133.q89BX7sh064953@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 9 Sep 2012 11:33: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: r240274 - head/sys/boot/uboot/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 11:33:07 -0000 Author: ae Date: Sun Sep 9 11:33:06 2012 New Revision: 240274 URL: http://svn.freebsd.org/changeset/base/240274 Log: Update uboot's disk driver to use new DISK API. Modified: head/sys/boot/uboot/lib/disk.c Modified: head/sys/boot/uboot/lib/disk.c ============================================================================== --- head/sys/boot/uboot/lib/disk.c Sun Sep 9 11:32:06 2012 (r240273) +++ head/sys/boot/uboot/lib/disk.c Sun Sep 9 11:33:06 2012 (r240274) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2008 Semihalf, Rafal Jaworowski * Copyright (c) 2009 Semihalf, Piotr Ziecik + * Copyright (c) 2012 Andrey V. Elsukov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,20 +35,13 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include +#include #include #include -#include - -#define FSTYPENAMES -#include -#include -#include #include "api_public.h" #include "bootstrap.h" +#include "disk.h" #include "glue.h" #include "libuboot.h" @@ -66,51 +60,28 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -struct gpt_part { - int gp_index; - uuid_t gp_type; - uint64_t gp_start; - uint64_t gp_end; -}; +static struct { + int opened; /* device is opened */ + int handle; /* storage device handle */ + int type; /* storage type */ + off_t blocks; /* block count */ + u_int bsize; /* block size */ +} stor_info[UB_MAX_DEV]; -struct open_dev { - int od_bsize; /* block size */ - int od_bstart; /* start block offset from beginning of disk */ - union { - struct { - struct disklabel bsdlabel; - } _bsd; - struct { - struct gpt_part *gpt_partitions; - int gpt_nparts; - } _gpt; - } _data; -}; +#define SI(dev) (stor_info[(dev)->d_unit]) -#define od_bsdlabel _data._bsd.bsdlabel -#define od_nparts _data._gpt.gpt_nparts -#define od_partitions _data._gpt.gpt_partitions - -static uuid_t efi = GPT_ENT_TYPE_EFI; -static uuid_t freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; -static uuid_t freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS; -static uuid_t freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP; -static uuid_t freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; -static uuid_t ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; - -static int stor_info[UB_MAX_DEV]; static int stor_info_no = 0; -static int stor_opendev(struct open_dev **, struct uboot_devdesc *); -static int stor_closedev(struct uboot_devdesc *); -static int stor_readdev(struct uboot_devdesc *, daddr_t, size_t, char *); -static int stor_open_count = 0; +static int stor_opendev(struct disk_devdesc *); +static int stor_readdev(struct disk_devdesc *, daddr_t, size_t, char *); /* devsw I/F */ static int stor_init(void); static int stor_strategy(void *, int, daddr_t, size_t, char *, size_t *); static int stor_open(struct open_file *, ...); static int stor_close(struct open_file *); +static int stor_ioctl(struct open_file *f, u_long cmd, void *data); static void stor_print(int); +static void stor_cleanup(void); struct devsw uboot_storage = { "disk", @@ -119,24 +90,16 @@ struct devsw uboot_storage = { stor_strategy, stor_open, stor_close, - noioctl, - stor_print + stor_ioctl, + stor_print, + stor_cleanup }; -static void -uuid_letoh(uuid_t *uuid) -{ - - uuid->time_low = le32toh(uuid->time_low); - uuid->time_mid = le16toh(uuid->time_mid); - uuid->time_hi_and_version = le16toh(uuid->time_hi_and_version); -} - static int stor_init(void) { struct device_info *di; - int i, found = 0; + int i; if (devs_no == 0) { printf("No U-Boot devices! Really enumerated?\n"); @@ -151,12 +114,18 @@ stor_init(void) stor_info_no); return (-1); } - stor_info[stor_info_no++] = i; - found = 1; + stor_info[stor_info_no].handle = i; + stor_info[stor_info_no].opened = 0; + stor_info[stor_info_no].type = di->type; + stor_info[stor_info_no].blocks = + di->di_stor.block_count; + stor_info[stor_info_no].bsize = + di->di_stor.block_size; + stor_info_no++; } } - if (!found) { + if (!stor_info_no) { debugf("No storage devices\n"); return (-1); } @@ -165,32 +134,39 @@ stor_init(void) return (0); } +static void +stor_cleanup(void) +{ + int i; + + for (i = 0; i < stor_info_no; i++) + if (stor_info[i].opened > 0) + ub_dev_close(stor_info[i].handle); +} + static int stor_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, size_t *rsize) { - struct uboot_devdesc *dev = (struct uboot_devdesc *)devdata; - struct open_dev *od = (struct open_dev *)dev->d_disk.data; - int bcount, err; - - debugf("od=%p, size=%d, bsize=%d\n", od, size, od->od_bsize); + struct disk_devdesc *dev = (struct disk_devdesc *)devdata; + daddr_t bcount; + int err; if (rw != F_READ) { stor_printf("write attempt, operation not supported!\n"); return (EROFS); } - if (size % od->od_bsize) { + if (size % SI(dev).bsize) { stor_printf("size=%d not multiple of device block size=%d\n", - size, od->od_bsize); + size, SI(dev).bsize); return (EIO); } - bcount = size / od->od_bsize; - + bcount = size / SI(dev).bsize; if (rsize) *rsize = 0; - err = stor_readdev(dev, blk + od->od_bstart, bcount, buf); + err = stor_readdev(dev, blk + dev->d_offset, bcount, buf); if (!err && rsize) *rsize = size; @@ -201,340 +177,54 @@ static int stor_open(struct open_file *f, ...) { va_list ap; - struct open_dev *od; - struct uboot_devdesc *dev; - int err; + struct disk_devdesc *dev; va_start(ap, f); - dev = va_arg(ap, struct uboot_devdesc *); + dev = va_arg(ap, struct disk_devdesc *); va_end(ap); - if ((err = stor_opendev(&od, dev)) != 0) - return (err); - - ((struct uboot_devdesc *)(f->f_devdata))->d_disk.data = od; - - return (0); -} - -static int -stor_close(struct open_file *f) -{ - struct uboot_devdesc *dev; - - dev = (struct uboot_devdesc *)(f->f_devdata); - - return (stor_closedev(dev)); -} - -static int -stor_open_gpt(struct open_dev *od, struct uboot_devdesc *dev) -{ - char *buf; - struct dos_partition *dp; - struct gpt_hdr *hdr; - struct gpt_ent *ent; - daddr_t slba, lba, elba; - int eps, part, i; - int err = 0; - - od->od_nparts = 0; - od->od_partitions = NULL; - - /* Devices with block size smaller than 512 bytes cannot use GPT */ - if (od->od_bsize < 512) - return (ENXIO); - - /* Allocate 1 block */ - buf = malloc(od->od_bsize); - if (!buf) { - stor_printf("could not allocate memory for GPT\n"); - return (ENOMEM); - } - - /* Read MBR */ - err = stor_readdev(dev, 0, 1, buf); - if (err) { - stor_printf("GPT read error=%d\n", err); - err = EIO; - goto out; - } - - /* Check the slice table magic. */ - if (le16toh(*((uint16_t *)(buf + DOSMAGICOFFSET))) != DOSMAGIC) { - err = ENXIO; - goto out; - } - - /* Check GPT slice */ - dp = (struct dos_partition *)(buf + DOSPARTOFF); - part = 0; - - for (i = 0; i < NDOSPART; i++) { - if (dp[i].dp_typ == 0xee) - part += 1; - else if (dp[i].dp_typ != 0x00) { - err = EINVAL; - goto out; - } - } - - if (part != 1) { - err = EINVAL; - goto out; - } - - /* Read primary GPT header */ - err = stor_readdev(dev, 1, 1, buf); - if (err) { - stor_printf("GPT read error=%d\n", err); - err = EIO; - goto out; - } - - hdr = (struct gpt_hdr *)buf; - - /* Check GPT header */ - if (bcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0 || - le64toh(hdr->hdr_lba_self) != 1 || - le32toh(hdr->hdr_revision) < 0x00010000 || - le32toh(hdr->hdr_entsz) < sizeof(*ent) || - od->od_bsize % le32toh(hdr->hdr_entsz) != 0) { - debugf("Invalid GPT header!\n"); - err = EINVAL; - goto out; - } - - /* Count number of valid partitions */ - part = 0; - eps = od->od_bsize / le32toh(hdr->hdr_entsz); - slba = le64toh(hdr->hdr_lba_table); - elba = slba + le32toh(hdr->hdr_entries) / eps; - - for (lba = slba; lba < elba; lba++) { - err = stor_readdev(dev, lba, 1, buf); - if (err) { - stor_printf("GPT read error=%d\n", err); - err = EIO; - goto out; - } - - ent = (struct gpt_ent *)buf; - - for (i = 0; i < eps; i++) { - if (uuid_is_nil(&ent[i].ent_type, NULL) || - le64toh(ent[i].ent_lba_start) == 0 || - le64toh(ent[i].ent_lba_end) < - le64toh(ent[i].ent_lba_start)) - continue; - - part += 1; - } - } - - /* Save information about partitions */ - if (part != 0) { - od->od_nparts = part; - od->od_partitions = malloc(part * sizeof(struct gpt_part)); - if (!od->od_partitions) { - stor_printf("could not allocate memory for GPT\n"); - err = ENOMEM; - goto out; - } - - part = 0; - for (lba = slba; lba < elba; lba++) { - err = stor_readdev(dev, lba, 1, buf); - if (err) { - stor_printf("GPT read error=%d\n", err); - err = EIO; - goto out; - } - - ent = (struct gpt_ent *)buf; - - for (i = 0; i < eps; i++) { - if (uuid_is_nil(&ent[i].ent_type, NULL) || - le64toh(ent[i].ent_lba_start) == 0 || - le64toh(ent[i].ent_lba_end) < - le64toh(ent[i].ent_lba_start)) - continue; - - od->od_partitions[part].gp_index = (lba - slba) - * eps + i + 1; - od->od_partitions[part].gp_type = - ent[i].ent_type; - od->od_partitions[part].gp_start = - le64toh(ent[i].ent_lba_start); - od->od_partitions[part].gp_end = - le64toh(ent[i].ent_lba_end); - - uuid_letoh(&od->od_partitions[part].gp_type); - part += 1; - } - } - } - - dev->d_disk.ptype = PTYPE_GPT; - /* - * If index of partition to open (dev->d_disk.pnum) is not defined - * we set it to the index of the first existing partition. This - * handles cases when only a disk device is specified (without full - * partition information) by the caller. - */ - if ((od->od_nparts > 0) && (dev->d_disk.pnum == 0)) - dev->d_disk.pnum = od->od_partitions[0].gp_index; - - for (i = 0; i < od->od_nparts; i++) - if (od->od_partitions[i].gp_index == dev->d_disk.pnum) - od->od_bstart = od->od_partitions[i].gp_start; - -out: - if (err && od->od_partitions) - free(od->od_partitions); - - free(buf); - return (err); + return (stor_opendev(dev)); } static int -stor_open_mbr(struct open_dev *od, struct uboot_devdesc *dev) +stor_opendev(struct disk_devdesc *dev) { - char *buf = NULL; - struct dos_partition *dp; - int err, i, part; - - od->od_nparts = 0; - od->od_partitions = NULL; - - /* Block size must be at least 512 bytes. */ - if (od->od_bsize < 512) - return (ENXIO); - - /* Read MBR */ - buf = malloc(od->od_bsize); - if (!buf) { - stor_printf("could not allocate memory for MBR\n"); - return (ENOMEM); - } - err = stor_readdev(dev, 0, 1, buf); - if (err) { - stor_printf("MBR read error=%d\n", err); - err = EIO; - goto out; - } - - /* Check the slice table magic. */ - if (le16toh(*((uint16_t *)(buf + DOSMAGICOFFSET))) != DOSMAGIC) { - err = ENXIO; - goto out; - } - - /* Save information about partitions. */ - dp = (struct dos_partition *)(buf + DOSPARTOFF); - od->od_partitions = calloc(NDOSPART, sizeof(struct gpt_part)); - if (!od->od_partitions) { - stor_printf("could not allocate memory for MBR partitions\n"); - err = ENOMEM; - goto out; - } + int err; - part = 0; - for (i = 0; i < NDOSPART; i++) { - u_int32_t start = le32dec(&dp[i].dp_start); - u_int32_t size = le32dec(&dp[i].dp_size); - uuid_t *u = NULL; - - /* Map MBR partition types to GPT partition types. */ - switch (dp[i].dp_typ) { - case DOSPTYP_386BSD: - u = &freebsd_ufs; - break; - /* XXX Other types XXX */ - } + if (dev->d_unit < 0 || dev->d_unit >= stor_info_no) + return (EIO); - if (u) { - od->od_partitions[part].gp_type = *u; - od->od_partitions[part].gp_index = i + 1; - od->od_partitions[part].gp_start = start; - od->od_partitions[part].gp_end = start + size; - part += 1; + if (SI(dev).opened == 0) { + err = ub_dev_open(SI(dev).handle); + if (err != 0) { + stor_printf("device open failed with error=%d, " + "handle=%d\n", err, SI(dev).handle); + return (ENXIO); } + SI(dev).opened++; } - od->od_nparts = part; - - if (od->od_nparts == 0) { - err = EINVAL; - goto out; - } - - dev->d_disk.ptype = PTYPE_MBR; - - /* XXX Be smarter here? XXX */ - if (dev->d_disk.pnum == 0) - dev->d_disk.pnum = od->od_partitions[0].gp_index; - - for (i = 0; i < od->od_nparts; i++) - if (od->od_partitions[i].gp_index == dev->d_disk.pnum) - od->od_bstart = od->od_partitions[i].gp_start; - -out: - if (err && od->od_partitions) - free(od->od_partitions); - free(buf); - return (err); + return (disk_open(dev, SI(dev).blocks * SI(dev).bsize, + SI(dev).bsize)); } static int -stor_open_bsdlabel(struct open_dev *od, struct uboot_devdesc *dev) +stor_close(struct open_file *f) { - char *buf; - struct disklabel *dl; - int err = 0; - - /* Allocate 1 block */ - buf = malloc(od->od_bsize); - if (!buf) { - stor_printf("could not allocate memory for disklabel\n"); - return (ENOMEM); - } - - /* Read disklabel */ - err = stor_readdev(dev, LABELSECTOR, 1, buf); - if (err) { - stor_printf("disklabel read error=%d\n", err); - err = ERDLAB; - goto out; - } - bcopy(buf + LABELOFFSET, &od->od_bsdlabel, sizeof(struct disklabel)); - dl = &od->od_bsdlabel; - - if (dl->d_magic != DISKMAGIC) { - stor_printf("no disklabel magic!\n"); - err = EUNLAB; - goto out; - } - - od->od_bstart = dl->d_partitions[dev->d_disk.pnum].p_offset; - dev->d_disk.ptype = PTYPE_BSDLABEL; - - debugf("bstart=%d\n", od->od_bstart); + struct disk_devdesc *dev; -out: - free(buf); - return (err); + dev = (struct disk_devdesc *)(f->f_devdata); + return (disk_close(dev)); } static int -stor_readdev(struct uboot_devdesc *dev, daddr_t blk, size_t size, char *buf) +stor_readdev(struct disk_devdesc *dev, daddr_t blk, size_t size, char *buf) { lbasize_t real_size; - int err, handle; + int err; debugf("reading blk=%d size=%d @ 0x%08x\n", (int)blk, size, (uint32_t)buf); - handle = stor_info[dev->d_unit]; - err = ub_dev_read(handle, buf, size, blk, &real_size); + err = ub_dev_read(SI(dev).handle, buf, size, blk, &real_size); if (err != 0) { stor_printf("read failed, error=%d\n", err); return (EIO); @@ -548,229 +238,45 @@ stor_readdev(struct uboot_devdesc *dev, return (err); } - -static int -stor_opendev(struct open_dev **odp, struct uboot_devdesc *dev) -{ - struct device_info *di; - struct open_dev *od; - int err, h; - - h = stor_info[dev->d_unit]; - - debugf("refcount=%d\n", stor_open_count); - - /* - * There can be recursive open calls from the infrastructure, but at - * U-Boot level open the device only the first time. - */ - if (stor_open_count > 0) - stor_open_count++; - else if ((err = ub_dev_open(h)) != 0) { - stor_printf("device open failed with error=%d, handle=%d\n", - err, h); - *odp = NULL; - return (ENXIO); - } - - if ((di = ub_dev_get(h)) == NULL) - panic("could not retrieve U-Boot device_info, handle=%d", h); - - if ((od = malloc(sizeof(struct open_dev))) == NULL) { - stor_printf("could not allocate memory for open_dev\n"); - return (ENOMEM); - } - od->od_bsize = di->di_stor.block_size; - od->od_bstart = 0; - - err = stor_open_gpt(od, dev); - if (err != 0) - err = stor_open_mbr(od, dev); - if (err != 0) - err = stor_open_bsdlabel(od, dev); - - if (err != 0) - free(od); - else { - stor_open_count = 1; - *odp = od; - } - - return (err); -} - -static int -stor_closedev(struct uboot_devdesc *dev) -{ - struct open_dev *od; - int err, h; - - od = (struct open_dev *)dev->d_disk.data; - if (dev->d_disk.ptype == PTYPE_GPT && od->od_nparts != 0) - free(od->od_partitions); - if (dev->d_disk.ptype == PTYPE_MBR && od->od_nparts != 0) - free(od->od_partitions); - - free(od); - dev->d_disk.data = NULL; - - if (--stor_open_count == 0) { - h = stor_info[dev->d_unit]; - if ((err = ub_dev_close(h)) != 0) { - stor_printf("device close failed with error=%d, " - "handle=%d\n", err, h); - return (ENXIO); - } - } - - return (0); -} - -/* Given a size in 512 byte sectors, convert it to a human-readable number. */ -/* XXX stolen from sys/boot/i386/libi386/biosdisk.c, should really be shared */ -static char * -display_size(uint64_t size) -{ - static char buf[80]; - char unit; - - size /= 2; - unit = 'K'; - if (size >= 10485760000LL) { - size /= 1073741824; - unit = 'T'; - } else if (size >= 10240000) { - size /= 1048576; - unit = 'G'; - } else if (size >= 10000) { - size /= 1024; - unit = 'M'; - } - sprintf(buf, "%.6ld%cB", (long)size, unit); - return (buf); -} - -static void -stor_print_bsdlabel(struct uboot_devdesc *dev, char *prefix, int verbose) -{ - char buf[512], line[80]; - struct disklabel *dl; - uint32_t off, size; - int err, i, t; - - /* Read disklabel */ - err = stor_readdev(dev, LABELSECTOR, 1, buf); - if (err) { - sprintf(line, "%s%d: disklabel read error=%d\n", - dev->d_dev->dv_name, dev->d_unit, err); - pager_output(line); - return; - } - dl = (struct disklabel *)buf; - - if (dl->d_magic != DISKMAGIC) { - sprintf(line, "%s%d: no disklabel magic!\n", - dev->d_dev->dv_name, dev->d_unit); - pager_output(line); - return; - } - - /* Print partitions info */ - for (i = 0; i < dl->d_npartitions; i++) { - if ((t = dl->d_partitions[i].p_fstype) < FSMAXTYPES) { - - off = dl->d_partitions[i].p_offset; - size = dl->d_partitions[i].p_size; - if (fstypenames[t] == NULL || size == 0) - continue; - - if ((('a' + i) == 'c') && (!verbose)) - continue; - - sprintf(line, " %s%c: %s %s (%d - %d)\n", prefix, - 'a' + i, fstypenames[t], display_size(size), - off, off + size); - - pager_output(line); - } - } -} - static void -stor_print_gpt(struct uboot_devdesc *dev, char *prefix, int verbose) +stor_print(int verbose) { - struct open_dev *od = (struct open_dev *)dev->d_disk.data; - struct gpt_part *gp; - char line[80]; - char *fs; + struct disk_devdesc dev; + static char line[80]; int i; - for (i = 0; i < od->od_nparts; i++) { - gp = &od->od_partitions[i]; - - if (uuid_equal(&gp->gp_type, &efi, NULL)) - fs = "EFI"; - else if (uuid_equal(&gp->gp_type, &ms_basic_data, NULL)) - fs = "FAT/NTFS"; - else if (uuid_equal(&gp->gp_type, &freebsd_boot, NULL)) - fs = "FreeBSD Boot"; - else if (uuid_equal(&gp->gp_type, &freebsd_ufs, NULL)) - fs = "FreeBSD UFS"; - else if (uuid_equal(&gp->gp_type, &freebsd_swap, NULL)) - fs = "FreeBSD Swap"; - else if (uuid_equal(&gp->gp_type, &freebsd_zfs, NULL)) - fs = "FreeBSD ZFS"; - else - fs = "unknown"; - - sprintf(line, " %sp%u: %s %s (%lld - %lld)\n", prefix, - gp->gp_index, fs, - display_size(gp->gp_end + 1 - gp->gp_start), gp->gp_start, - gp->gp_end); - + for (i = 0; i < stor_info_no; i++) { + dev.d_dev = &uboot_storage; + dev.d_unit = i; + dev.d_slice = -1; + dev.d_partition = -1; + sprintf(line, "\tdisk%d (%s)\n", i, + ub_stor_type(SI(&dev).type)); pager_output(line); - } -} - -static void -stor_print_one(int i, struct device_info *di, int verbose) -{ - struct uboot_devdesc dev; - struct open_dev *od; - char line[80]; - - sprintf(line, "\tdisk%d (%s)\n", i, ub_stor_type(di->type)); - pager_output(line); - - dev.d_dev = &uboot_storage; - dev.d_unit = i; - dev.d_disk.pnum = -1; - dev.d_disk.data = NULL; - - if (stor_opendev(&od, &dev) == 0) { - dev.d_disk.data = od; - - if (dev.d_disk.ptype == PTYPE_GPT) { - sprintf(line, "\t\tdisk%d", i); - stor_print_gpt(&dev, line, verbose); - } else if (dev.d_disk.ptype == PTYPE_BSDLABEL) { - sprintf(line, "\t\tdisk%d", i); - stor_print_bsdlabel(&dev, line, verbose); + if (stor_opendev(&dev) == 0) { + sprintf(line, "\tdisk%d", i); + disk_print(&dev, line, verbose); + disk_close(&dev); } - - stor_closedev(&dev); } } -static void -stor_print(int verbose) +static int +stor_ioctl(struct open_file *f, u_long cmd, void *data) { - struct device_info *di; - int i; + struct disk_devdesc *dev; - for (i = 0; i < stor_info_no; i++) { - di = ub_dev_get(stor_info[i]); - if (di != NULL) - stor_print_one(i, di, verbose); + dev = (struct disk_devdesc *)f->f_devdata; + switch (cmd) { + case DIOCGSECTORSIZE: + *(u_int *)data = SI(dev).bsize; + break; + case DIOCGMEDIASIZE: + *(off_t *)data = SI(dev).bsize * SI(dev).blocks; + break; + default: + return (ENOTTY); } + return (0); } + From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 11:34:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90768106566B; Sun, 9 Sep 2012 11:34:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5198FC0A; Sun, 9 Sep 2012 11:34:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89BYSqc065210; Sun, 9 Sep 2012 11:34:28 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89BYSIX065208; Sun, 9 Sep 2012 11:34:28 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209091134.q89BYSIX065208@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 9 Sep 2012 11:34: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: r240275 - head/sys/boot/uboot/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 11:34:28 -0000 Author: ae Date: Sun Sep 9 11:34:27 2012 New Revision: 240275 URL: http://svn.freebsd.org/changeset/base/240275 Log: Build disk.c only when DISK_SUPPORT is enabled. Modified: head/sys/boot/uboot/lib/Makefile Modified: head/sys/boot/uboot/lib/Makefile ============================================================================== --- head/sys/boot/uboot/lib/Makefile Sun Sep 9 11:33:06 2012 (r240274) +++ head/sys/boot/uboot/lib/Makefile Sun Sep 9 11:34:27 2012 (r240275) @@ -6,13 +6,18 @@ LIB= uboot INTERNALLIB= WARNS?= 2 -SRCS= crc32.c console.c copy.c devicename.c disk.c elf_freebsd.c glue.c +SRCS= crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c SRCS+= module.c net.c reboot.c time.c CFLAGS+= -ffreestanding -msoft-float CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ +.if !defined(LOADER_NO_DISK_SUPPORT) +SRCS+= disk.c +CFLAGS+= -DLOADER_DISK_SUPPORT +.endif + # Pick up FDT includes CFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/ From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 11:37:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5DB7106566C; Sun, 9 Sep 2012 11:37:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21F08FC14; Sun, 9 Sep 2012 11:37:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89BbHrR065703; Sun, 9 Sep 2012 11:37:17 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89BbHIb065701; Sun, 9 Sep 2012 11:37:17 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209091137.q89BbHIb065701@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 9 Sep 2012 11:37: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: r240276 - head/sys/boot/uboot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 11:37:18 -0000 Author: ae Date: Sun Sep 9 11:37:17 2012 New Revision: 240276 URL: http://svn.freebsd.org/changeset/base/240276 Log: Update according to the change of struct uboot_devdesc. Modified: head/sys/boot/uboot/common/main.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sun Sep 9 11:34:27 2012 (r240275) +++ head/sys/boot/uboot/common/main.c Sun Sep 9 11:37:17 2012 (r240276) @@ -185,7 +185,7 @@ main(void) if (strncmp(devsw[i]->dv_name, "disk", strlen(devsw[i]->dv_name)) == 0) { f.f_devdata = &currdev; - currdev.d_disk.pnum = 0; + currdev.d_disk.slice = 0; if (devsw[i]->dv_open(&f,&currdev) == 0) break; } From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 11:40:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B48CB106566B; Sun, 9 Sep 2012 11:40:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A06708FC23; Sun, 9 Sep 2012 11:40:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89BebQG066267; Sun, 9 Sep 2012 11:40:37 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89Bebt0066264; Sun, 9 Sep 2012 11:40:37 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209091140.q89Bebt0066264@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 9 Sep 2012 11:40: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: r240277 - in head/sys/boot: arm/uboot powerpc/uboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 11:40:37 -0000 Author: ae Date: Sun Sep 9 11:40:37 2012 New Revision: 240277 URL: http://svn.freebsd.org/changeset/base/240277 Log: Handle LOADER_NO_DISK_SUPPORT knob in the arm and powerpc ubldr. Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/powerpc/uboot/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sun Sep 9 11:37:17 2012 (r240276) +++ head/sys/boot/arm/uboot/Makefile Sun Sep 9 11:40:37 2012 (r240277) @@ -14,7 +14,11 @@ UBLDR_LOADADDR?= 0x1000000 # Architecture-specific loader code SRCS= start.S conf.c vers.c +.if !defined(LOADER_NO_DISK_SUPPORT) LOADER_DISK_SUPPORT?= yes +.else +LOADER_DISK_SUPPORT= no +.endif LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no Modified: head/sys/boot/powerpc/uboot/Makefile ============================================================================== --- head/sys/boot/powerpc/uboot/Makefile Sun Sep 9 11:37:17 2012 (r240276) +++ head/sys/boot/powerpc/uboot/Makefile Sun Sep 9 11:40:37 2012 (r240277) @@ -12,7 +12,11 @@ NO_MAN= SRCS= start.S conf.c vers.c SRCS+= ucmpdi2.c +.if !defined(LOADER_NO_DISK_SUPPORT) LOADER_DISK_SUPPORT?= yes +.else +LOADER_DISK_SUPPORT= no +.endif LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no LOADER_EXT2FS_SUPPORT?= no From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 13:18:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1607A106566B; Sun, 9 Sep 2012 13:18:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 013098FC0C; Sun, 9 Sep 2012 13:18:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89DIDKT082287; Sun, 9 Sep 2012 13:18:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89DIDJd082285; Sun, 9 Sep 2012 13:18:13 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209091318.q89DIDJd082285@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sun, 9 Sep 2012 13:18: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: r240278 - head/usr.bin/find X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 13:18:14 -0000 Author: des Date: Sun Sep 9 13:18:13 2012 New Revision: 240278 URL: http://svn.freebsd.org/changeset/base/240278 Log: Document -quit, four and a half years after it was implemented. MFC after: 3 days Pointy hat to: imp@ Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Sun Sep 9 11:40:37 2012 (r240277) +++ head/usr.bin/find/find.1 Sun Sep 9 13:18:13 2012 (r240278) @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd July 25, 2012 +.Dd September 9, 2012 .Dt FIND 1 .Os .Sh NAME @@ -741,6 +741,10 @@ Note, the primary has no effect if the .Fl d option was specified. +.It Ic -quit +Causes +.Nm +to immediately terminate. .It Ic -regex Ar pattern True if the whole path of the file matches .Ar pattern From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 14:41:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDAC1106564A; Sun, 9 Sep 2012 14:41:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6DBB8FC12; Sun, 9 Sep 2012 14:41:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89EfYX4092584; Sun, 9 Sep 2012 14:41:34 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89EfYV8092581; Sun, 9 Sep 2012 14:41:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209091441.q89EfYV8092581@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 9 Sep 2012 14:41: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: r240279 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 14:41:34 -0000 Author: hselasky Date: Sun Sep 9 14:41:34 2012 New Revision: 240279 URL: http://svn.freebsd.org/changeset/base/240279 Log: Add support for host mode to the DWC OTG controller driver. The DWC OTG host mode support should still be considered experimental. Isochronous support for DWC OTG is not fully implemented. Some code added derives from Aleksandr Rybalko's dotg.c driver. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h head/sys/dev/usb/controller/dwc_otgreg.h Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Sun Sep 9 13:18:13 2012 (r240278) +++ head/sys/dev/usb/controller/dwc_otg.c Sun Sep 9 14:41:34 2012 (r240279) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2010-2011 Aleksandr Rybalko. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,8 +26,7 @@ /* * This file contains the driver for the DesignWare series USB 2.0 OTG - * Controller. This driver currently only supports the device mode of - * the USB hardware. + * Controller. */ /* @@ -91,12 +91,15 @@ __FBSDID("$FreeBSD$"); DWC_OTG_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) #define DWC_OTG_MSK_GINT_ENABLED \ - (GINTSTS_ENUMDONE | \ - GINTSTS_USBRST | \ - GINTSTS_USBSUSP | \ - GINTSTS_IEPINT | \ - GINTSTS_RXFLVL | \ - GINTSTS_SESSREQINT) + (GINTSTS_ENUMDONE | \ + GINTSTS_USBRST | \ + GINTSTS_USBSUSP | \ + GINTSTS_IEPINT | \ + GINTSTS_RXFLVL | \ + GINTSTS_SESSREQINT | \ + GINTMSK_OTGINTMSK | \ + GINTMSK_HCHINTMSK | \ + GINTSTS_PRTINT) #define DWC_OTG_USE_HSIC 0 @@ -114,12 +117,18 @@ SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, de struct usb_bus_methods dwc_otg_bus_methods; struct usb_pipe_methods dwc_otg_device_non_isoc_methods; -struct usb_pipe_methods dwc_otg_device_isoc_fs_methods; +struct usb_pipe_methods dwc_otg_device_isoc_methods; static dwc_otg_cmd_t dwc_otg_setup_rx; static dwc_otg_cmd_t dwc_otg_data_rx; static dwc_otg_cmd_t dwc_otg_data_tx; static dwc_otg_cmd_t dwc_otg_data_tx_sync; + +static dwc_otg_cmd_t dwc_otg_host_setup_tx; +static dwc_otg_cmd_t dwc_otg_host_data_tx; +static dwc_otg_cmd_t dwc_otg_host_data_rx; +static dwc_otg_cmd_t dwc_otg_host_data_tx_sync; + static void dwc_otg_device_done(struct usb_xfer *, usb_error_t); static void dwc_otg_do_poll(struct usb_bus *); static void dwc_otg_standard_done(struct usb_xfer *); @@ -153,7 +162,7 @@ dwc_otg_get_hw_ep_profile(struct usb_dev } static int -dwc_otg_init_fifo(struct dwc_otg_softc *sc) +dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mode) { struct dwc_otg_profile *pf; uint32_t fifo_size; @@ -193,7 +202,21 @@ dwc_otg_init_fifo(struct dwc_otg_softc * /* setup control endpoint profile */ sc->sc_hw_ep_profile[0].usb = dwc_otg_ep_profile[0]; - for (x = 1; x != sc->sc_dev_ep_max; x++) { + if (mode == DWC_MODE_HOST) { + + /* reset active endpoints */ + sc->sc_active_rx_ep = 0; + + DWC_OTG_WRITE_4(sc, DOTG_HPTXFSIZ, + ((fifo_size / 4) << 16) | + (tx_start / 4)); + } + if (mode == DWC_MODE_DEVICE) { + + /* reset active endpoints */ + sc->sc_active_rx_ep = 1; + + for (x = 1; x != sc->sc_dev_ep_max; x++) { pf = sc->sc_hw_ep_profile + x; @@ -240,17 +263,22 @@ dwc_otg_init_fifo(struct dwc_otg_softc * DPRINTF("FIFO%d = IN:%d / OUT:%d\n", x, pf->usb.max_in_frame_size, pf->usb.max_out_frame_size); + } } /* reset RX FIFO */ DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, GRSTCTL_RXFFLSH); - /* reset all TX FIFOs */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, - GRSTCTL_TXFIFO(0x10) | - GRSTCTL_TXFFLSH); - + if (mode != DWC_MODE_OTG) { + /* reset all TX FIFOs */ + DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + GRSTCTL_TXFIFO(0x10) | + GRSTCTL_TXFFLSH); + } else { + /* reset active endpoints */ + sc->sc_active_rx_ep = 0; + } return (0); } @@ -322,13 +350,15 @@ dwc_otg_resume_irq(struct dwc_otg_softc sc->sc_flags.status_suspend = 0; sc->sc_flags.change_suspend = 1; - /* - * Disable resume interrupt and enable suspend - * interrupt: - */ - sc->sc_irq_mask &= ~GINTSTS_WKUPINT; - sc->sc_irq_mask |= GINTSTS_USBSUSP; - DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + if (sc->sc_flags.status_device_mode) { + /* + * Disable resume interrupt and enable suspend + * interrupt: + */ + sc->sc_irq_mask &= ~GINTSTS_WKUPINT; + sc->sc_irq_mask |= GINTSTS_USBSUSP; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + } /* complete root HUB interrupt endpoint */ dwc_otg_root_intr(sc); @@ -336,25 +366,70 @@ dwc_otg_resume_irq(struct dwc_otg_softc } static void -dwc_otg_wakeup_peer(struct dwc_otg_softc *sc) +dwc_otg_suspend_irq(struct dwc_otg_softc *sc) { - uint32_t temp; + if (!sc->sc_flags.status_suspend) { + /* update status bits */ + sc->sc_flags.status_suspend = 1; + sc->sc_flags.change_suspend = 1; + + if (sc->sc_flags.status_device_mode) { + /* + * Disable suspend interrupt and enable resume + * interrupt: + */ + sc->sc_irq_mask &= ~GINTSTS_USBSUSP; + sc->sc_irq_mask |= GINTSTS_WKUPINT; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + } + /* complete root HUB interrupt endpoint */ + dwc_otg_root_intr(sc); + } +} + +static void +dwc_otg_wakeup_peer(struct dwc_otg_softc *sc) +{ if (!sc->sc_flags.status_suspend) return; DPRINTFN(5, "Remote wakeup\n"); - /* enable remote wakeup signalling */ - temp = DWC_OTG_READ_4(sc, DOTG_DCTL); - temp |= DCTL_RMTWKUPSIG; - DWC_OTG_WRITE_4(sc, DOTG_DCTL, temp); + if (sc->sc_flags.status_device_mode) { + uint32_t temp; + + /* enable remote wakeup signalling */ + temp = DWC_OTG_READ_4(sc, DOTG_DCTL); + temp |= DCTL_RMTWKUPSIG; + DWC_OTG_WRITE_4(sc, DOTG_DCTL, temp); + + /* Wait 8ms for remote wakeup to complete. */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); + + temp &= ~DCTL_RMTWKUPSIG; + DWC_OTG_WRITE_4(sc, DOTG_DCTL, temp); + } else { + /* enable USB port */ + DWC_OTG_WRITE_4(sc, DOTG_PCGCCTL, 0); + + /* wait 10ms */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100); - /* Wait 8ms for remote wakeup to complete. */ - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); + /* resume port */ + sc->sc_hprt_val |= HPRT_PRTRES; + DWC_OTG_WRITE_4(sc, DOTG_HPRT, sc->sc_hprt_val); - temp &= ~DCTL_RMTWKUPSIG; - DWC_OTG_WRITE_4(sc, DOTG_DCTL, temp); + /* Wait 100ms for resume signalling to complete. */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 10); + + /* clear suspend and resume */ + sc->sc_hprt_val &= ~(HPRT_PRTSUSP | HPRT_PRTRES); + DWC_OTG_WRITE_4(sc, DOTG_HPRT, sc->sc_hprt_val); + + /* Wait 4ms */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 250); + } /* need to fake resume IRQ */ dwc_otg_resume_irq(sc); @@ -387,6 +462,128 @@ dwc_otg_common_rx_ack(struct dwc_otg_sof } static uint8_t +dwc_otg_host_channel_alloc(struct dwc_otg_td *td) +{ + struct dwc_otg_softc *sc; + uint32_t temp; + uint8_t x; + uint8_t max_channel; + + if (td->channel < DWC_OTG_MAX_CHANNELS) + return (0); /* already allocated */ + + /* get pointer to softc */ + sc = DWC_OTG_PC2SC(td->pc); + + if ((td->hcchar & HCCHAR_EPNUM_MASK) == 0) { + max_channel = 1; + x = 0; + } else { + max_channel = sc->sc_host_ch_max; + x = 1; + } + + for (; x != max_channel; x++) { + if (sc->sc_hcchar[x] == 0) { + + /* check if channel is enabled */ + temp = DWC_OTG_READ_4(sc, DOTG_HCCHAR(x)); + if (temp & HCCHAR_CHENA) + continue; + + sc->sc_hcchar[x] = td->hcchar; + + DPRINTF("HCCHAR=0x%08x HCSPLT=0x%08x\n", + td->hcchar, td->hcsplt); + + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); + DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt); + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0); + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), 0); + + /* set channel */ + td->channel = x; + + /* set active EP */ + sc->sc_active_rx_ep |= (1 << x); + + return (0); /* allocated */ + } + } + return (1); /* busy */ +} + +static uint8_t +dwc_otg_host_setup_tx(struct dwc_otg_td *td) +{ + struct usb_device_request req __aligned(4); + struct dwc_otg_softc *sc; + uint32_t temp; + uint32_t max_buffer; + uint8_t max_frames; + + if (dwc_otg_host_channel_alloc(td)) + return (1); /* busy */ + + /* get pointer to softc */ + sc = DWC_OTG_PC2SC(td->pc); + + temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS); + + DPRINTF("HPTXSTS=0x%08x\n", temp); + + max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK); + max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) >> HPTXSTS_PTXQSPCAVAIL_SHIFT; + + max_buffer = max_buffer - (max_buffer % td->max_packet_size); + if (max_buffer == 0 || max_frames == 0) + return (1); /* busy */ + + if (sizeof(req) != td->remainder) { + td->error_any = 1; + return (0); /* complete */ + } + + usbd_copy_out(td->pc, 0, &req, sizeof(req)); + + td->offset = sizeof(req); + td->remainder = 0; + + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), + (sizeof(req) << HCTSIZ_XFERSIZE_SHIFT) | + (1 << HCTSIZ_PKTCNT_SHIFT) | + (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT)); + + temp = sc->sc_hcchar[td->channel]; + temp &= ~HCCHAR_EPDIR_IN; + temp |= HCCHAR_CHENA; + + /* must enable channel before writing data to FIFO */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); + + /* enable interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), + HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL); + + sc->sc_haint_mask |= (1 << td->channel); + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + + /* transfer data into FIFO */ + bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, + DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4); + + td->toggle = 1; + + /* need to sync before complete */ + td->func = &dwc_otg_host_data_tx_sync; + + /* check status */ + return (dwc_otg_host_data_tx_sync(td)); +} + +static uint8_t dwc_otg_setup_rx(struct dwc_otg_td *td) { struct dwc_otg_softc *sc; @@ -518,6 +715,178 @@ not_complete: } static uint8_t +dwc_otg_host_data_rx(struct dwc_otg_td *td) +{ + struct dwc_otg_softc *sc; + uint32_t temp; + uint16_t count; + uint8_t got_short; + uint8_t is_isoc; + + if (dwc_otg_host_channel_alloc(td)) + return (1); /* busy */ + + got_short = 0; + + /* get pointer to softc */ + sc = DWC_OTG_PC2SC(td->pc); + + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp); + + DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + td->channel, + temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + + if (temp & HCINT_STALL) { + td->error_stall = 1; + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & (HCINT_DATATGLERR | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD)) { + td->error_any = 1; + return (0); /* complete */ + } + + /* check endpoint status */ + if (sc->sc_last_rx_status == 0) + goto not_complete; + + if (GRXSTSRD_CHNUM_GET(sc->sc_last_rx_status) != td->channel) + goto not_complete; + + switch (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) { + case GRXSTSRH_IN_DATA: + + DPRINTF("DATA\n"); + + td->npkt = 0; + + if ((sc->sc_last_rx_status & + GRXSTSRD_DPID_MASK) == GRXSTSRD_DPID_DATA0) { + if (td->toggle == 1) { + /* release FIFO - wrong toggle */ + DPRINTF("Wrong DT\n"); + dwc_otg_common_rx_ack(sc); + goto not_complete; + } + td->toggle = 1; + } else { + if (td->toggle == 0) { + /* release FIFO - wrong toggle */ + DPRINTF("Wrong DT\n"); + dwc_otg_common_rx_ack(sc); + goto not_complete; + } + td->toggle = 0; + } + break; + + default: + DPRINTF("OTHER\n"); + + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + goto not_complete; + } + + /* get the packet byte count */ + count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); + + /* verify the packet byte count */ + if (count != td->max_packet_size) { + if (count < td->max_packet_size) { + /* we have a short packet */ + td->short_pkt = 1; + got_short = 1; + } else { + /* invalid USB packet */ + td->error_any = 1; + + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + return (0); /* we are complete */ + } + } + + /* verify the packet byte count */ + if (count > td->remainder) { + /* invalid USB packet */ + td->error_any = 1; + + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + return (0); /* we are complete */ + } + + usbd_copy_in(td->pc, td->offset, sc->sc_rx_bounce_buffer, count); + td->remainder -= count; + td->offset += count; + + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + + /* check if we are complete */ + if ((td->remainder == 0) || got_short) { + if (td->short_pkt) { + /* we are complete */ + return (0); + } + /* else need to receive a zero length packet */ + } + +not_complete: + + if (td->npkt != 0) + return (1); /* busy */ + + temp = sc->sc_hcchar[td->channel]; + + is_isoc = (((temp & HCCHAR_EPTYPE_MASK) >> + HCCHAR_EPTYPE_SHIFT) == UE_ISOCHRONOUS); + + if (is_isoc != 0) { + if ((sc->sc_sof_val & 0xFF) != td->sof_val) + return (1); /* busy */ + if (td->sof_val & 1) + temp |= HCCHAR_ODDFRM; + td->sof_val += td->sof_res; + /* DATA 0 */ + td->toggle = 0; + } else if (td->set_toggle) { + td->set_toggle = 0; + td->toggle = 1; + } + + /* receive one packet at a time */ + td->npkt = 1; + + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), + (td->max_packet_size << HCTSIZ_XFERSIZE_SHIFT) | + (td->npkt << HCTSIZ_PKTCNT_SHIFT) | + (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) : + (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT))); + + /* enable interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), + HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL); + + sc->sc_haint_mask |= (1 << td->channel); + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + + temp |= HCCHAR_CHENA | HCCHAR_EPDIR_IN; + + /* must enable channel before data can be received */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); + + return (1); /* not complete */ +} + +static uint8_t dwc_otg_data_rx(struct dwc_otg_td *td) { struct dwc_otg_softc *sc; @@ -551,7 +920,7 @@ dwc_otg_data_rx(struct dwc_otg_td *td) /* * USB Host Aborted the transfer. */ - td->error = 1; + td->error_any = 1; return (0); /* complete */ } @@ -573,7 +942,7 @@ dwc_otg_data_rx(struct dwc_otg_td *td) got_short = 1; } else { /* invalid USB packet */ - td->error = 1; + td->error_any = 1; /* release FIFO */ dwc_otg_common_rx_ack(sc); @@ -583,7 +952,7 @@ dwc_otg_data_rx(struct dwc_otg_td *td) /* verify the packet byte count */ if (count > td->remainder) { /* invalid USB packet */ - td->error = 1; + td->error_any = 1; /* release FIFO */ dwc_otg_common_rx_ack(sc); @@ -610,8 +979,7 @@ not_complete: temp = sc->sc_out_ctl[td->ep_no]; - temp |= DOEPCTL_EPENA | - DOEPCTL_CNAK; + temp |= DOEPCTL_EPENA | DOEPCTL_CNAK; DWC_OTG_WRITE_4(sc, DOTG_DOEPCTL(td->ep_no), temp); @@ -632,6 +1000,163 @@ not_complete: } static uint8_t +dwc_otg_host_data_tx(struct dwc_otg_td *td) +{ + struct dwc_otg_softc *sc; + uint32_t max_buffer; + uint32_t count; + uint32_t mpkt; + uint32_t temp; + uint8_t is_isoc; + uint8_t max_frames; + + if (dwc_otg_host_channel_alloc(td)) + return (1); /* busy */ + + /* get pointer to softc */ + sc = DWC_OTG_PC2SC(td->pc); + + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp); + + DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + td->channel, + temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + + if (temp & HCINT_STALL) { + td->error_stall = 1; + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & (HCINT_DATATGLERR | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD)) { + td->error_any = 1; + return (0); /* complete */ + } + + temp = sc->sc_hcchar[td->channel]; + + is_isoc = (((temp & HCCHAR_EPTYPE_MASK) >> + HCCHAR_EPTYPE_SHIFT) == UE_ISOCHRONOUS); + + if (is_isoc != 0) { + if ((sc->sc_sof_val & 0xFF) != td->sof_val) + return (1); /* busy */ + if (td->sof_val & 1) + sc->sc_hcchar[td->channel] |= HCCHAR_ODDFRM; + else + sc->sc_hcchar[td->channel] &= ~HCCHAR_ODDFRM; + td->sof_val += td->sof_res; + td->toggle = 0; + + } else if (td->set_toggle) { + td->set_toggle = 0; + td->toggle = 1; + } + + /* check if all packets have been transferred */ + temp = DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)); + if (temp & HCTSIZ_PKTCNT_MASK) { + DPRINTFN(5, "busy ch=%d npkt=%d HCTSIZ=0x%08x\n", + td->channel, (temp & HCTSIZ_PKTCNT_MASK) >> + HCTSIZ_PKTCNT_SHIFT, temp); + return (1); /* busy */ + } + + temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS); + + max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK); + max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) >> HPTXSTS_PTXQSPCAVAIL_SHIFT; + + max_buffer = max_buffer - (max_buffer % td->max_packet_size); + if (max_buffer == 0 || max_frames < 2) + return (1); /* busy */ + + /* try to optimise by sending more data */ + if (td->channel != 0 && + (td->max_packet_size & 3) == 0 && is_isoc == 0) { + + count = td->remainder; + if (count > max_buffer) + count = max_buffer; + + mpkt = count / td->max_packet_size; + + if (mpkt > max_frames) { + mpkt = max_frames; + count = td->max_packet_size * mpkt; + } else if ((count == 0) || (count % td->max_packet_size)) { + /* we are transmitting a short packet */ + mpkt++; + td->short_pkt = 1; + } + } else { + /* send one packet at a time */ + mpkt = 1; + count = td->max_packet_size; + if (td->remainder < count) { + /* we have a short packet */ + td->short_pkt = 1; + count = td->remainder; + } + } + + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), + (count << HCTSIZ_XFERSIZE_SHIFT) | + (mpkt << HCTSIZ_PKTCNT_SHIFT) | + (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) : + (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT))); + + td->toggle ^= (mpkt & 1); + + /* TODO: HCTSIZ_DOPNG */ + + temp = sc->sc_hcchar[td->channel]; + temp &= ~(HCCHAR_EPDIR_IN); + temp |= HCCHAR_CHENA; + + /* must enable before writing data to FIFO */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); + + /* enable interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), + HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL); + + sc->sc_haint_mask |= (1 << td->channel); + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + + if (count != 0) { + + /* clear topmost word before copy */ + sc->sc_tx_bounce_buffer[(count - 1) / 4] = 0; + + /* copy out data */ + usbd_copy_out(td->pc, td->offset, + sc->sc_tx_bounce_buffer, count); + + /* transfer data into FIFO */ + bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, + DOTG_DFIFO(td->channel), + sc->sc_tx_bounce_buffer, (count + 3) / 4); + + td->remainder -= count; + td->offset += count; + } + + /* check remainder */ + if (td->remainder == 0) { + if (td->short_pkt) + return (0); /* complete */ + + /* else we need to transmit a short packet */ + } + return (1); /* not complete */ +} + +static uint8_t dwc_otg_data_tx(struct dwc_otg_td *td) { struct dwc_otg_softc *sc; @@ -667,7 +1192,7 @@ repeat: * The current transfer was cancelled * by the USB Host: */ - td->error = 1; + td->error_any = 1; return (0); /* complete */ } } @@ -819,8 +1344,46 @@ repeat: } goto repeat; -not_complete: - return (1); /* not complete */ +not_complete: + return (1); /* not complete */ +} + +static uint8_t +dwc_otg_host_data_tx_sync(struct dwc_otg_td *td) +{ + struct dwc_otg_softc *sc; + uint32_t temp; + + if (dwc_otg_host_channel_alloc(td)) + return (1); /* busy */ + + /* get pointer to softc */ + sc = DWC_OTG_PC2SC(td->pc); + + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp); + + DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + td->channel, + temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + + if (temp & HCINT_STALL) { + td->error_stall = 1; + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & (HCINT_DATATGLERR | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD)) { + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & HCINT_XFERCOMPL) + return (0); /* complete */ + + return (1); /* busy */ } static uint8_t @@ -872,6 +1435,10 @@ static uint8_t dwc_otg_xfer_do_fifo(struct usb_xfer *xfer) { struct dwc_otg_td *td; + uint8_t toggle; + uint8_t channel; + uint8_t sof_val; + uint8_t sof_res; DPRINTFN(9, "\n"); @@ -884,7 +1451,7 @@ dwc_otg_xfer_do_fifo(struct usb_xfer *xf if (((void *)td) == xfer->td_transfer_last) { goto done; } - if (td->error) { + if (td->error_any) { goto done; } else if (td->remainder > 0) { /* @@ -899,8 +1466,16 @@ dwc_otg_xfer_do_fifo(struct usb_xfer *xf * Fetch the next transfer descriptor and transfer * some flags to the next transfer descriptor */ + sof_res = td->sof_res; + sof_val = td->sof_val; + toggle = td->toggle; + channel = td->channel; td = td->obj_next; xfer->td_transfer_cache = td; + td->toggle = toggle; /* transfer toggle */ + td->channel = channel; /* transfer channel */ + td->sof_res = sof_res; + td->sof_val = sof_val; } return (1); /* not complete */ @@ -956,7 +1531,7 @@ repeat: } /* check if we should dump the data */ - if (!(sc->sc_active_out_ep & (1U << ep_no))) { + if (!(sc->sc_active_rx_ep & (1U << ep_no))) { dwc_otg_common_rx_ack(sc); goto repeat; } @@ -978,7 +1553,7 @@ repeat: sc->sc_last_rx_status); /* check if we should dump the data */ - if (!(sc->sc_active_out_ep & (1U << ep_no))) { + if (!(sc->sc_active_rx_ep & (1U << ep_no))) { dwc_otg_common_rx_ack(sc); goto repeat; } @@ -994,9 +1569,16 @@ repeat: } if (got_rx_status) { + /* check if data was consumed */ if (sc->sc_last_rx_status == 0) goto repeat; + /* if no host listener - dump data */ + if (sc->sc_flags.status_device_mode == 0) { + dwc_otg_common_rx_ack(sc); + goto repeat; + } + /* disable RX FIFO level interrupt */ sc->sc_irq_mask &= ~GINTSTS_RXFLVL; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); @@ -1044,9 +1626,17 @@ dwc_otg_interrupt(struct dwc_otg_softc * DPRINTFN(14, "GINTSTS=0x%08x\n", status); + if (status & GINTSTS_HCHINT) { + uint32_t temp = DWC_OTG_READ_4(sc, DOTG_HAINT); + DWC_OTG_WRITE_4(sc, DOTG_HAINT, temp); + DPRINTFN(14, "HAINT=0x%08x HFNUM=0x%08x\n", + temp, DWC_OTG_READ_4(sc, DOTG_HFNUM)); + } + if (status & GINTSTS_USBRST) { /* set correct state */ + sc->sc_flags.status_device_mode = 1; sc->sc_flags.status_bus_reset = 0; sc->sc_flags.status_suspend = 0; sc->sc_flags.change_suspend = 0; @@ -1064,24 +1654,23 @@ dwc_otg_interrupt(struct dwc_otg_softc * DPRINTFN(5, "end of reset\n"); /* set correct state */ + sc->sc_flags.status_device_mode = 1; sc->sc_flags.status_bus_reset = 1; sc->sc_flags.status_suspend = 0; sc->sc_flags.change_suspend = 0; sc->sc_flags.change_connect = 1; + sc->sc_flags.status_low_speed = 0; + sc->sc_flags.port_enabled = 1; /* reset FIFOs */ - dwc_otg_init_fifo(sc); + dwc_otg_init_fifo(sc, DWC_MODE_DEVICE); /* reset function address */ dwc_otg_set_address(sc, 0); - /* reset active endpoints */ - sc->sc_active_out_ep = 1; - /* figure out enumeration speed */ temp = DWC_OTG_READ_4(sc, DOTG_DSTS); - if (DSTS_ENUMSPD_GET(temp) == - DSTS_ENUMSPD_HI) + if (DSTS_ENUMSPD_GET(temp) == DSTS_ENUMSPD_HI) sc->sc_flags.status_high_speed = 1; else sc->sc_flags.status_high_speed = 0; @@ -1095,6 +1684,72 @@ dwc_otg_interrupt(struct dwc_otg_softc * /* complete root HUB interrupt endpoint */ dwc_otg_root_intr(sc); } + + if (status & GINTSTS_PRTINT) { + uint32_t hprt; + + hprt = DWC_OTG_READ_4(sc, DOTG_HPRT); + + /* clear change bits */ + DWC_OTG_WRITE_4(sc, DOTG_HPRT, (hprt & ( + HPRT_PRTPWR | HPRT_PRTENCHNG | + HPRT_PRTCONNDET | HPRT_PRTOVRCURRCHNG)) | + sc->sc_hprt_val); + + DPRINTFN(12, "GINTSTS=0x%08x, HPRT=0x%08x\n", status, hprt); + + sc->sc_flags.status_device_mode = 0; + + if (hprt & HPRT_PRTCONNSTS) + sc->sc_flags.status_bus_reset = 1; + else + sc->sc_flags.status_bus_reset = 0; + + if (hprt & HPRT_PRTENCHNG) + sc->sc_flags.change_enabled = 1; + + if (hprt & HPRT_PRTENA) + sc->sc_flags.port_enabled = 1; + else + sc->sc_flags.port_enabled = 0; + + if (hprt & HPRT_PRTOVRCURRCHNG) + sc->sc_flags.change_over_current = 1; + + if (hprt & HPRT_PRTOVRCURRACT) + sc->sc_flags.port_over_current = 1; + else + sc->sc_flags.port_over_current = 0; + + if (hprt & HPRT_PRTPWR) + sc->sc_flags.port_powered = 1; + else + sc->sc_flags.port_powered = 0; + + if (((hprt & HPRT_PRTSPD_MASK) + >> HPRT_PRTSPD_SHIFT) == HPRT_PRTSPD_LOW) + sc->sc_flags.status_low_speed = 1; + else + sc->sc_flags.status_low_speed = 0; + + if (((hprt & HPRT_PRTSPD_MASK) + >> HPRT_PRTSPD_SHIFT) == HPRT_PRTSPD_HIGH) + sc->sc_flags.status_high_speed = 1; + else + sc->sc_flags.status_high_speed = 0; + + if (hprt & HPRT_PRTCONNDET) + sc->sc_flags.change_connect = 1; + + if (hprt & HPRT_PRTSUSP) + dwc_otg_suspend_irq(sc); + else + dwc_otg_resume_irq(sc); + + /* complete root HUB interrupt endpoint */ + dwc_otg_root_intr(sc); + } + /* * If resume and suspend is set at the same time we interpret * that like RESUME. Resume is set when there is at least 3 @@ -1110,26 +1765,12 @@ dwc_otg_interrupt(struct dwc_otg_softc * DPRINTFN(5, "suspend interrupt\n"); - if (!sc->sc_flags.status_suspend) { - /* update status bits */ - sc->sc_flags.status_suspend = 1; - sc->sc_flags.change_suspend = 1; - - /* - * Disable suspend interrupt and enable resume - * interrupt: - */ - sc->sc_irq_mask &= ~GINTSTS_USBSUSP; - sc->sc_irq_mask |= GINTSTS_WKUPINT; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 14:51:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D050F106564A; Sun, 9 Sep 2012 14:51:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAB1E8FC0C; Sun, 9 Sep 2012 14:51:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89Epc7f093759; Sun, 9 Sep 2012 14:51:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89EpckQ093758; Sun, 9 Sep 2012 14:51:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209091451.q89EpckQ093758@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 9 Sep 2012 14:51: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: r240280 - head/sys/arm/broadcom/bcm2835 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 14:51:38 -0000 Author: hselasky Date: Sun Sep 9 14:51:38 2012 New Revision: 240280 URL: http://svn.freebsd.org/changeset/base/240280 Log: Add support for DWC OTG. Added: head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c (contents, props changed) Added: head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/dwc_otg_brcm.c Sun Sep 9 14:51:38 2012 (r240280) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2012 Hans Petter Selasky. 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include + +static device_probe_t dwc_otg_probe; +static device_attach_t dwc_otg_attach; +static device_detach_t dwc_otg_detach; + +struct dwc_otg_super_softc { + struct dwc_otg_softc sc_otg; /* must be first */ +}; + +static int +dwc_otg_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2")) + return (ENXIO); + + device_set_desc(dev, "DWC OTG 2.0 integrated USB controller"); + + return (0); +} + +static int +dwc_otg_attach(device_t dev) +{ + struct dwc_otg_super_softc *sc = device_get_softc(dev); + int err; + int rid; + + /* initialise some bus fields */ + sc->sc_otg.sc_bus.parent = dev; + sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; + sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES; + + /* get all DMA memory */ + if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, + USB_GET_DMA_TAG(dev), NULL)) { + return (ENOMEM); + } + rid = 0; + sc->sc_otg.sc_io_res = + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + + if (!(sc->sc_otg.sc_io_res)) { + err = ENOMEM; + goto error; + } + sc->sc_otg.sc_io_tag = rman_get_bustag(sc->sc_otg.sc_io_res); + sc->sc_otg.sc_io_hdl = rman_get_bushandle(sc->sc_otg.sc_io_res); + sc->sc_otg.sc_io_size = rman_get_size(sc->sc_otg.sc_io_res); + + rid = 0; + sc->sc_otg.sc_irq_res = + bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); + if (sc->sc_otg.sc_irq_res == NULL) + goto error; + + sc->sc_otg.sc_bus.bdev = device_add_child(dev, "usbus", -1); + if (sc->sc_otg.sc_bus.bdev == NULL) + goto error; + + device_set_ivars(sc->sc_otg.sc_bus.bdev, &sc->sc_otg.sc_bus); + + err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)dwc_otg_interrupt, sc, &sc->sc_otg.sc_intr_hdl); + if (err) { + sc->sc_otg.sc_intr_hdl = NULL; + goto error; + } + err = dwc_otg_init(&sc->sc_otg); + if (err == 0) { + err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev); + } + if (err) + goto error; + + + return (0); + +error: + dwc_otg_detach(dev); + return (ENXIO); +} + +static int +dwc_otg_detach(device_t dev) +{ + struct dwc_otg_super_softc *sc = device_get_softc(dev); + device_t bdev; + int err; + + if (sc->sc_otg.sc_bus.bdev) { + bdev = sc->sc_otg.sc_bus.bdev; + device_detach(bdev); + device_delete_child(dev, bdev); + } + /* during module unload there are lots of children leftover */ + device_delete_children(dev); + + if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) { + /* + * only call dwc_otg_uninit() after dwc_otg_init() + */ + dwc_otg_uninit(&sc->sc_otg); + + err = bus_teardown_intr(dev, sc->sc_otg.sc_irq_res, + sc->sc_otg.sc_intr_hdl); + sc->sc_otg.sc_intr_hdl = NULL; + } + /* free IRQ channel, if any */ + if (sc->sc_otg.sc_irq_res) { + bus_release_resource(dev, SYS_RES_IRQ, 0, + sc->sc_otg.sc_irq_res); + sc->sc_otg.sc_irq_res = NULL; + } + /* free memory resource, if any */ + if (sc->sc_otg.sc_io_res) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, + sc->sc_otg.sc_io_res); + sc->sc_otg.sc_io_res = NULL; + } + usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL); + + return (0); +} + +static device_method_t dwc_otg_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dwc_otg_probe), + DEVMETHOD(device_attach, dwc_otg_attach), + DEVMETHOD(device_detach, dwc_otg_detach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + DEVMETHOD_END +}; + +static driver_t dwc_otg_driver = { + .name = "dwcotg", + .methods = dwc_otg_methods, + .size = sizeof(struct dwc_otg_super_softc), +}; + +static devclass_t dwc_otg_devclass; + +DRIVER_MODULE(dwcotg, simplebus, dwc_otg_driver, dwc_otg_devclass, 0, 0); +MODULE_DEPEND(dwcotg, usb, 1, 1, 1); From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 14:53:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB9D510656D2; Sun, 9 Sep 2012 14:53:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74918FC0A; Sun, 9 Sep 2012 14:53:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89ErYfC094001; Sun, 9 Sep 2012 14:53:34 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89ErYbt093999; Sun, 9 Sep 2012 14:53:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209091453.q89ErYbt093999@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 9 Sep 2012 14:53: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: r240281 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 14:53:35 -0000 Author: hselasky Date: Sun Sep 9 14:53:34 2012 New Revision: 240281 URL: http://svn.freebsd.org/changeset/base/240281 Log: Add support for DWC OTG. Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Sun Sep 9 14:51:38 2012 (r240280) +++ head/sys/dev/usb/controller/usb_controller.c Sun Sep 9 14:53:34 2012 (r240281) @@ -129,6 +129,9 @@ DRIVER_MODULE(usbus, musbotg, usb_driver DRIVER_MODULE(usbus, uss820, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0); +/* Dual Mode Drivers */ +DRIVER_MODULE(usbus, dwcotg, usb_driver, usb_devclass, 0, 0); + /*------------------------------------------------------------------------* * usb_probe * From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 17:23:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2A74106564A; Sun, 9 Sep 2012 17:23:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7377E8FC08; Sun, 9 Sep 2012 17:23:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89HNw4Y012480; Sun, 9 Sep 2012 17:23:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89HNwUl012477; Sun, 9 Sep 2012 17:23:58 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209091723.q89HNwUl012477@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 9 Sep 2012 17:23: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: r240282 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 17:23:59 -0000 Author: hselasky Date: Sun Sep 9 17:23:57 2012 New Revision: 240282 URL: http://svn.freebsd.org/changeset/base/240282 Log: Implement missing USB suspend and resume support for DWC OTG driver. Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Sun Sep 9 14:53:34 2012 (r240281) +++ head/sys/dev/usb/controller/dwc_otg.c Sun Sep 9 17:23:57 2012 (r240282) @@ -557,7 +557,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td temp = sc->sc_hcchar[td->channel]; temp &= ~HCCHAR_EPDIR_IN; - temp |= HCCHAR_CHENA; /* must enable channel before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); @@ -878,7 +877,7 @@ not_complete: sc->sc_haint_mask |= (1 << td->channel); DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); - temp |= HCCHAR_CHENA | HCCHAR_EPDIR_IN; + temp |= HCCHAR_EPDIR_IN; /* must enable channel before data can be received */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); @@ -1114,8 +1113,7 @@ dwc_otg_host_data_tx(struct dwc_otg_td * /* TODO: HCTSIZ_DOPNG */ temp = sc->sc_hcchar[td->channel]; - temp &= ~(HCCHAR_EPDIR_IN); - temp |= HCCHAR_CHENA; + temp &= ~HCCHAR_EPDIR_IN; /* must enable before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); @@ -2066,7 +2064,8 @@ dwc_otg_setup_standard_chain(struct usb_ (xfer->address << HCCHAR_DEVADDR_SHIFT) | (xfer_type << HCCHAR_EPTYPE_SHIFT) | ((xfer->endpointno & UE_ADDR) << HCCHAR_EPNUM_SHIFT) | - (xfer->max_packet_size << HCCHAR_MPS_SHIFT); + (xfer->max_packet_size << HCCHAR_MPS_SHIFT) | + HCCHAR_CHENA; if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_LOW) td->hcchar |= HCCHAR_LSPDDEV; @@ -2281,7 +2280,6 @@ dwc_otg_device_done(struct usb_xfer *xfe sc->sc_haint_mask &= ~(1 << td->channel); DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); - DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), 0); DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), HCCHAR_CHENA | HCCHAR_CHDIS); @@ -3565,13 +3563,69 @@ dwc_otg_get_dma_delay(struct usb_device static void dwc_otg_device_resume(struct usb_device *udev) { + struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(udev->bus); + struct usb_xfer *xfer; + struct dwc_otg_td *td; + DPRINTF("\n"); + + /* Disable relevant Host channels before going to suspend */ + + USB_BUS_LOCK(udev->bus); + + TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { + + if (xfer->xroot->udev == udev) { + + td = xfer->td_transfer_cache; + if (td != NULL && + td->channel < DWC_OTG_MAX_CHANNELS) { + + sc->sc_hcchar[td->channel] = + (sc->sc_hcchar[td->channel] & ~HCCHAR_CHDIS) | + HCCHAR_CHENA; + + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), + sc->sc_hcchar[td->channel]); + } + } + } + + USB_BUS_UNLOCK(udev->bus); } static void dwc_otg_device_suspend(struct usb_device *udev) { + struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(udev->bus); + struct usb_xfer *xfer; + struct dwc_otg_td *td; + DPRINTF("\n"); + + /* Disable relevant Host channels before going to suspend */ + + USB_BUS_LOCK(udev->bus); + + TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { + + if (xfer->xroot->udev == udev) { + + td = xfer->td_transfer_cache; + if (td != NULL && + td->channel < DWC_OTG_MAX_CHANNELS) { + + sc->sc_hcchar[td->channel] = + (DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)) | + HCCHAR_CHDIS) & ~HCCHAR_CHENA; + + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), + sc->sc_hcchar[td->channel]); + } + } + } + + USB_BUS_UNLOCK(udev->bus); } struct usb_bus_methods dwc_otg_bus_methods = From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 19:11:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0739106564A; Sun, 9 Sep 2012 19:11: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 DB7F98FC0A; Sun, 9 Sep 2012 19:11:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89JBq7K024534; Sun, 9 Sep 2012 19:11:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89JBqXH024531; Sun, 9 Sep 2012 19:11:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209091911.q89JBqXH024531@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 9 Sep 2012 19:11: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: r240283 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 19:11:53 -0000 Author: kib Date: Sun Sep 9 19:11:52 2012 New Revision: 240283 URL: http://svn.freebsd.org/changeset/base/240283 Log: Add MNTK_LOOKUP_EXCL_DOTDOT struct mount flag, which specifies to the lookup code that dotdot lookups shall override any shared lock requests with the exclusive one. The flag is useful for filesystems which sometimes need to upgrade shared lock to exclusive inside the VOP_LOOKUP or later, which cannot be done safely for dotdot, due to dvp also locked and causing LOR. In collaboration with: pho MFC after: 3 weeks Modified: head/sys/kern/vfs_lookup.c head/sys/sys/mount.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Sep 9 17:23:57 2012 (r240282) +++ head/sys/kern/vfs_lookup.c Sun Sep 9 19:11:52 2012 (r240283) @@ -406,11 +406,13 @@ namei(struct nameidata *ndp) } static int -compute_cn_lkflags(struct mount *mp, int lkflags) +compute_cn_lkflags(struct mount *mp, int lkflags, int cnflags) { - if (mp == NULL || - ((lkflags & LK_SHARED) && !(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED))) { + if (mp == NULL || ((lkflags & LK_SHARED) && + (!(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED) || + ((cnflags & ISDOTDOT) && + (mp->mnt_kern_flag & MNTK_LOOKUP_EXCL_DOTDOT))))) { lkflags &= ~LK_SHARED; lkflags |= LK_EXCLUSIVE; } @@ -539,7 +541,8 @@ lookup(struct nameidata *ndp) dp = ndp->ni_startdir; ndp->ni_startdir = NULLVP; vn_lock(dp, - compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | LK_RETRY)); + compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | LK_RETRY, + cnp->cn_flags)); dirloop: /* @@ -700,7 +703,7 @@ dirloop: VFS_UNLOCK_GIANT(tvfslocked); vn_lock(dp, compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | - LK_RETRY)); + LK_RETRY, ISDOTDOT)); } } @@ -738,7 +741,8 @@ unionlookup: vprint("lookup in", dp); #endif lkflags_save = cnp->cn_lkflags; - cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags); + cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags, + cnp->cn_flags); if ((error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp)) != 0) { cnp->cn_lkflags = lkflags_save; KASSERT(ndp->ni_vp == NULL, ("leaf should be empty")); @@ -757,7 +761,7 @@ unionlookup: VFS_UNLOCK_GIANT(tvfslocked); vn_lock(dp, compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags | - LK_RETRY)); + LK_RETRY, cnp->cn_flags)); goto unionlookup; } @@ -829,8 +833,8 @@ unionlookup: dvfslocked = 0; vref(vp_crossmp); ndp->ni_dvp = vp_crossmp; - error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags), - &tdp); + error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags, + cnp->cn_flags), &tdp); vfs_unbusy(mp); if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) panic("vp_crossmp exclusively locked or reclaimed"); Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sun Sep 9 17:23:57 2012 (r240282) +++ head/sys/sys/mount.h Sun Sep 9 19:11:52 2012 (r240283) @@ -373,6 +373,7 @@ void __mnt_vnode_markerfree(str #define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads and writes. Filesystem shall properly handle i/o state on EFAULT. */ +#define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 19:17:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B94C106566B; Sun, 9 Sep 2012 19:17:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4E58FC08; Sun, 9 Sep 2012 19:17:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89JHG1J025164; Sun, 9 Sep 2012 19:17:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89JHGXX025160; Sun, 9 Sep 2012 19:17:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209091917.q89JHGXX025160@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 9 Sep 2012 19:17: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: r240284 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 19:17:16 -0000 Author: kib Date: Sun Sep 9 19:17:15 2012 New Revision: 240284 URL: http://svn.freebsd.org/changeset/base/240284 Log: Add a facility for vgone() to inform the set of subscribed mounts about vnode reclamation. Typical use is for the bypass mounts like nullfs to get a notification about lower vnode going away. Now, vgone() calls new VFS op vfs_reclaim_lowervp() with an argument lowervp which is reclaimed. It is possible to register several reclamation event listeners, to correctly handle the case of several nullfs mounts over the same directory. For the filesystem not having nullfs mounts over it, the overhead added is a single mount interlock lock/unlock in the vnode reclamation path. In collaboration with: pho MFC after: 3 weeks Modified: head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/sys/mount.h Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sun Sep 9 19:11:52 2012 (r240283) +++ head/sys/kern/vfs_mount.c Sun Sep 9 19:17:15 2012 (r240284) @@ -481,6 +481,7 @@ vfs_mount_alloc(struct vnode *vp, struct mac_mount_create(cred, mp); #endif arc4rand(&mp->mnt_hashseed, sizeof mp->mnt_hashseed, 0); + TAILQ_INIT(&mp->mnt_uppers); return (mp); } @@ -514,6 +515,7 @@ vfs_mount_destroy(struct mount *mp) vprint("", vp); panic("unmount: dangling vnode"); } + KASSERT(TAILQ_EMPTY(&mp->mnt_uppers), ("mnt_uppers")); if (mp->mnt_nvnodelistsize != 0) panic("vfs_mount_destroy: nonzero nvnodelistsize"); if (mp->mnt_activevnodelistsize != 0) @@ -1275,7 +1277,8 @@ dounmount(mp, flags, td) } MNT_ILOCK(mp); - if (mp->mnt_kern_flag & MNTK_UNMOUNT) { + if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 || + !TAILQ_EMPTY(&mp->mnt_uppers)) { MNT_IUNLOCK(mp); if (coveredvp) VOP_UNLOCK(coveredvp, 0); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Sep 9 19:11:52 2012 (r240283) +++ head/sys/kern/vfs_subr.c Sun Sep 9 19:17:15 2012 (r240284) @@ -2688,6 +2688,58 @@ vgone(struct vnode *vp) VI_UNLOCK(vp); } +static void +vgonel_reclaim_lowervp_vfs(struct mount *mp __unused, + struct vnode *lowervp __unused) +{ +} + +/* + * Notify upper mounts about reclaimed vnode. + */ +static void +vgonel_reclaim_lowervp(struct vnode *vp) +{ + static struct vfsops vgonel_vfsops = { + .vfs_reclaim_lowervp = vgonel_reclaim_lowervp_vfs + }; + struct mount *mp, *ump, *mmp; + + mp = vp->v_mount; + if (mp == NULL) + return; + + MNT_ILOCK(mp); + if (TAILQ_EMPTY(&mp->mnt_uppers)) + goto unlock; + MNT_IUNLOCK(mp); + mmp = malloc(sizeof(struct mount), M_TEMP, M_WAITOK | M_ZERO); + mmp->mnt_op = &vgonel_vfsops; + mmp->mnt_kern_flag |= MNTK_MARKER; + MNT_ILOCK(mp); + mp->mnt_kern_flag |= MNTK_VGONE_UPPER; + for (ump = TAILQ_FIRST(&mp->mnt_uppers); ump != NULL;) { + if ((ump->mnt_kern_flag & MNTK_MARKER) != 0) { + ump = TAILQ_NEXT(ump, mnt_upper_link); + continue; + } + TAILQ_INSERT_AFTER(&mp->mnt_uppers, ump, mmp, mnt_upper_link); + MNT_IUNLOCK(mp); + VFS_RECLAIM_LOWERVP(ump, vp); + MNT_ILOCK(mp); + ump = TAILQ_NEXT(mmp, mnt_upper_link); + TAILQ_REMOVE(&mp->mnt_uppers, mmp, mnt_upper_link); + } + free(mmp, M_TEMP); + mp->mnt_kern_flag &= ~MNTK_VGONE_UPPER; + if ((mp->mnt_kern_flag & MNTK_VGONE_WAITER) != 0) { + mp->mnt_kern_flag &= ~MNTK_VGONE_WAITER; + wakeup(&mp->mnt_uppers); + } +unlock: + MNT_IUNLOCK(mp); +} + /* * vgone, with the vp interlock held. */ @@ -2712,6 +2764,7 @@ vgonel(struct vnode *vp) if (vp->v_iflag & VI_DOOMED) return; vp->v_iflag |= VI_DOOMED; + /* * Check to see if the vnode is in use. If so, we have to call * VOP_CLOSE() and VOP_INACTIVE(). @@ -2719,6 +2772,8 @@ vgonel(struct vnode *vp) active = vp->v_usecount; oweinact = (vp->v_iflag & VI_OWEINACT); VI_UNLOCK(vp); + vgonel_reclaim_lowervp(vp); + /* * Clean out any buffers associated with the vnode. * If the flush fails, just toss the buffers. Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sun Sep 9 19:11:52 2012 (r240283) +++ head/sys/sys/mount.h Sun Sep 9 19:17:15 2012 (r240284) @@ -188,6 +188,8 @@ struct mount { #define mnt_endzero mnt_gjprovider char *mnt_gjprovider; /* gjournal provider name */ struct lock mnt_explock; /* vfs_export walkers lock */ + TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */ + TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/ }; /* @@ -373,6 +375,9 @@ void __mnt_vnode_markerfree(str #define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads and writes. Filesystem shall properly handle i/o state on EFAULT. */ +#define MNTK_VGONE_UPPER 0x00000200 +#define MNTK_VGONE_WAITER 0x00000200 +#define MNTK_MARKER 0x00000400 #define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ @@ -629,6 +634,7 @@ typedef int vfs_mount_t(struct mount *mp typedef int vfs_sysctl_t(struct mount *mp, fsctlop_t op, struct sysctl_req *req); typedef void vfs_susp_clean_t(struct mount *mp); +typedef void vfs_reclaim_lowervp_t(struct mount *mp, struct vnode *lowervp); struct vfsops { vfs_mount_t *vfs_mount; @@ -646,6 +652,7 @@ struct vfsops { vfs_extattrctl_t *vfs_extattrctl; vfs_sysctl_t *vfs_sysctl; vfs_susp_clean_t *vfs_susp_clean; + vfs_reclaim_lowervp_t *vfs_reclaim_lowervp; }; vfs_statfs_t __vfs_statfs; @@ -671,6 +678,9 @@ vfs_statfs_t __vfs_statfs; #define VFS_SUSP_CLEAN(MP) \ ({if (*(MP)->mnt_op->vfs_susp_clean != NULL) \ (*(MP)->mnt_op->vfs_susp_clean)(MP); }) +#define VFS_RECLAIM_LOWERVP(MP, VP) \ + ({if (*(MP)->mnt_op->vfs_reclaim_lowervp != NULL) \ + (*(MP)->mnt_op->vfs_reclaim_lowervp)((MP), (VP)); }) #define VFS_NEEDSGIANT_(MP) \ ((MP) != NULL && ((MP)->mnt_kern_flag & MNTK_MPSAFE) == 0) From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 19:20:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64EAA106566B; Sun, 9 Sep 2012 19:20: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 4F45D8FC14; Sun, 9 Sep 2012 19:20:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89JKORn025621; Sun, 9 Sep 2012 19:20:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89JKO47025616; Sun, 9 Sep 2012 19:20:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209091920.q89JKO47025616@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 9 Sep 2012 19:20: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: r240285 - head/sys/fs/nullfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 19:20:24 -0000 Author: kib Date: Sun Sep 9 19:20:23 2012 New Revision: 240285 URL: http://svn.freebsd.org/changeset/base/240285 Log: Allow shared lookups for nullfs mounts, if lower filesystem supports it. There are two problems which shall be addressed for shared lookups use to have measurable effect on nullfs scalability: 1. When vfs_lookup() calls VOP_LOOKUP() for nullfs, which passes lookup operation to lower fs, resulting vnode is often only shared-locked. Then null_nodeget() cannot instantiate covering vnode for lower vnode, since insmntque1() and null_hashins() require exclusive lock on the lower. Change the assert that lower vnode is exclusively locked to only require any lock. If null hash failed to find pre-existing nullfs vnode for lower vnode and the vnode is shared-locked, the lower vnode lock is upgraded. 2. Nullfs reclaims its vnodes on deactivation. This is due to nullfs inability to detect reclamation of the lower vnode. Reclamation of a nullfs vnode at deactivation time prevents a reference to the lower vnode to become stale. Change nullfs VOP_INACTIVE to not reclaim the vnode, instead use the VFS_RECLAIM_LOWERVP to get notification and reclaim upper vnode together with the reclamation of the lower vnode. Note that nullfs reclamation procedure calls vput() on the lowervp vnode, temporary unlocking the vnode being reclaimed. This seems to be fine for MPSAFE filesystems, but not-MPSAFE code often put partially initialized vnode on some globally visible list, and later can decide that half-constructed vnode is not needed. If nullfs mount is created above such filesystem, then other threads might catch such not properly initialized vnode. Instead of trying to overcome this case, e.g. by recursing the lower vnode lock in null_reclaim_lowervp(), I decided to rely on nearby removal of the support for non-MPSAFE filesystems. In collaboration with: pho MFC after: 3 weeks Modified: head/sys/fs/nullfs/null.h head/sys/fs/nullfs/null_subr.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/nullfs/null_vnops.c Modified: head/sys/fs/nullfs/null.h ============================================================================== --- head/sys/fs/nullfs/null.h Sun Sep 9 19:17:15 2012 (r240284) +++ head/sys/fs/nullfs/null.h Sun Sep 9 19:20:23 2012 (r240285) @@ -56,6 +56,7 @@ struct null_node { int nullfs_init(struct vfsconf *vfsp); int nullfs_uninit(struct vfsconf *vfsp); int null_nodeget(struct mount *mp, struct vnode *target, struct vnode **vpp); +struct vnode *null_hashget(struct mount *mp, struct vnode *lowervp); void null_hashrem(struct null_node *xp); int null_bypass(struct vop_generic_args *ap); Modified: head/sys/fs/nullfs/null_subr.c ============================================================================== --- head/sys/fs/nullfs/null_subr.c Sun Sep 9 19:17:15 2012 (r240284) +++ head/sys/fs/nullfs/null_subr.c Sun Sep 9 19:20:23 2012 (r240285) @@ -67,7 +67,6 @@ struct mtx null_hashmtx; static MALLOC_DEFINE(M_NULLFSHASH, "nullfs_hash", "NULLFS hash table"); MALLOC_DEFINE(M_NULLFSNODE, "nullfs_node", "NULLFS vnode private part"); -static struct vnode * null_hashget(struct mount *, struct vnode *); static struct vnode * null_hashins(struct mount *, struct null_node *); /* @@ -98,7 +97,7 @@ nullfs_uninit(vfsp) * Return a VREF'ed alias for lower vnode if already exists, else 0. * Lower vnode should be locked on entry and will be left locked on exit. */ -static struct vnode * +struct vnode * null_hashget(mp, lowervp) struct mount *mp; struct vnode *lowervp; @@ -209,14 +208,10 @@ null_nodeget(mp, lowervp, vpp) struct vnode *vp; int error; - /* - * The insmntque1() call below requires the exclusive lock on - * the nullfs vnode. - */ - ASSERT_VOP_ELOCKED(lowervp, "lowervp"); - KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp)); + ASSERT_VOP_LOCKED(lowervp, "lowervp"); + KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p", lowervp)); - /* Lookup the hash firstly */ + /* Lookup the hash firstly. */ *vpp = null_hashget(mp, lowervp); if (*vpp != NULL) { vrele(lowervp); @@ -224,6 +219,19 @@ null_nodeget(mp, lowervp, vpp) } /* + * The insmntque1() call below requires the exclusive lock on + * the nullfs vnode. Upgrade the lock now if hash failed to + * provide ready to use vnode. + */ + if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) { + vn_lock(lowervp, LK_UPGRADE | LK_RETRY); + if ((lowervp->v_iflag & VI_DOOMED) != 0) { + vput(lowervp); + return (ENOENT); + } + } + + /* * We do not serialize vnode creation, instead we will check for * duplicates later, when adding new vnode to hash. * Note that duplicate can only appear in hash if the lowervp is @@ -233,8 +241,7 @@ null_nodeget(mp, lowervp, vpp) * might cause a bogus v_data pointer to get dereferenced * elsewhere if MALLOC should block. */ - xp = malloc(sizeof(struct null_node), - M_NULLFSNODE, M_WAITOK); + xp = malloc(sizeof(struct null_node), M_NULLFSNODE, M_WAITOK); error = getnewvnode("null", mp, &null_vnodeops, &vp); if (error) { Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Sun Sep 9 19:17:15 2012 (r240284) +++ head/sys/fs/nullfs/null_vfsops.c Sun Sep 9 19:20:23 2012 (r240285) @@ -65,6 +65,7 @@ static vfs_statfs_t nullfs_statfs; static vfs_unmount_t nullfs_unmount; static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; +static vfs_reclaim_lowervp_t nullfs_reclaim_lowervp; /* * Mount null layer @@ -121,8 +122,10 @@ nullfs_mount(struct mount *mp) */ NDINIT(ndp, LOOKUP, FOLLOW|LOCKLEAF, UIO_SYSSPACE, target, curthread); error = namei(ndp); + /* * Re-lock vnode. + * XXXKIB This is deadlock-prone as well. */ if (isvnunlocked) vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY); @@ -146,7 +149,7 @@ nullfs_mount(struct mount *mp) } xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_NULLFSMNT, M_WAITOK); /* XXX */ + M_NULLFSMNT, M_WAITOK); /* * Save reference to underlying FS @@ -186,10 +189,15 @@ nullfs_mount(struct mount *mp) } MNT_ILOCK(mp); mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & - (MNTK_MPSAFE | MNTK_SHARED_WRITES); + (MNTK_MPSAFE | MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | + MNTK_EXTENDED_SHARED); + mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT; MNT_IUNLOCK(mp); mp->mnt_data = xmp; vfs_getnewfsid(mp); + MNT_ILOCK(xmp->nullm_vfs); + TAILQ_INSERT_TAIL(&xmp->nullm_vfs->mnt_uppers, mp, mnt_upper_link); + MNT_IUNLOCK(xmp->nullm_vfs); vfs_mountedfrom(mp, target); @@ -206,14 +214,16 @@ nullfs_unmount(mp, mntflags) struct mount *mp; int mntflags; { - void *mntdata; - int error; - int flags = 0; + struct null_mount *mntdata; + struct mount *ump; + int error, flags; NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp); if (mntflags & MNT_FORCE) - flags |= FORCECLOSE; + flags = FORCECLOSE; + else + flags = 0; /* There is 1 extra root vnode reference (nullm_rootvp). */ error = vflush(mp, 1, flags, curthread); @@ -224,9 +234,17 @@ nullfs_unmount(mp, mntflags) * Finally, throw away the null_mount structure */ mntdata = mp->mnt_data; + ump = mntdata->nullm_vfs; + MNT_ILOCK(ump); + while ((ump->mnt_kern_flag & MNTK_VGONE_UPPER) != 0) { + ump->mnt_kern_flag |= MNTK_VGONE_WAITER; + msleep(&ump->mnt_uppers, &ump->mnt_mtx, 0, "vgnupw", 0); + } + TAILQ_REMOVE(&ump->mnt_uppers, mp, mnt_upper_link); + MNT_IUNLOCK(ump); mp->mnt_data = NULL; free(mntdata, M_NULLFSMNT); - return 0; + return (0); } static int @@ -316,13 +334,10 @@ nullfs_vget(mp, ino, flags, vpp) KASSERT((flags & LK_TYPE_MASK) != 0, ("nullfs_vget: no lock requested")); - flags &= ~LK_TYPE_MASK; - flags |= LK_EXCLUSIVE; error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp); - if (error) + if (error != 0) return (error); - return (null_nodeget(mp, *vpp, vpp)); } @@ -334,11 +349,11 @@ nullfs_fhtovp(mp, fidp, flags, vpp) struct vnode **vpp; { int error; - error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, LK_EXCLUSIVE, + + error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, flags, vpp); - if (error) + if (error != 0) return (error); - return (null_nodeget(mp, *vpp, vpp)); } @@ -350,10 +365,22 @@ nullfs_extattrctl(mp, cmd, filename_vp, int namespace; const char *attrname; { - return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp, - namespace, attrname); + + return (VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, + filename_vp, namespace, attrname)); } +static void +nullfs_reclaim_lowervp(struct mount *mp, struct vnode *lowervp) +{ + struct vnode *vp; + + vp = null_hashget(mp, lowervp); + if (vp == NULL) + return; + vgone(vp); + vn_lock(lowervp, LK_EXCLUSIVE | LK_RETRY); +} static struct vfsops null_vfsops = { .vfs_extattrctl = nullfs_extattrctl, @@ -367,6 +394,7 @@ static struct vfsops null_vfsops = { .vfs_uninit = nullfs_uninit, .vfs_unmount = nullfs_unmount, .vfs_vget = nullfs_vget, + .vfs_reclaim_lowervp = nullfs_reclaim_lowervp, }; VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK | VFCF_JAIL); Modified: head/sys/fs/nullfs/null_vnops.c ============================================================================== --- head/sys/fs/nullfs/null_vnops.c Sun Sep 9 19:17:15 2012 (r240284) +++ head/sys/fs/nullfs/null_vnops.c Sun Sep 9 19:20:23 2012 (r240285) @@ -665,33 +665,18 @@ null_unlock(struct vop_unlock_args *ap) } /* - * There is no way to tell that someone issued remove/rmdir operation - * on the underlying filesystem. For now we just have to release lowervp - * as soon as possible. - * - * Note, we can't release any resources nor remove vnode from hash before - * appropriate VXLOCK stuff is done because other process can find this - * vnode in hash during inactivation and may be sitting in vget() and waiting - * for null_inactive to unlock vnode. Thus we will do all those in VOP_RECLAIM. + * XXXKIB */ static int -null_inactive(struct vop_inactive_args *ap) +null_inactive(struct vop_inactive_args *ap __unused) { - struct vnode *vp = ap->a_vp; - - vp->v_object = NULL; - - /* - * If this is the last reference, then free up the vnode - * so as not to tie up the lower vnodes. - */ - vrecycle(vp); return (0); } /* - * Now, the VXLOCK is in force and we're free to destroy the null vnode. + * Now, the nullfs vnode and, due to the sharing lock, the lower + * vnode, are exclusively locked, and we shall destroy the null vnode. */ static int null_reclaim(struct vop_reclaim_args *ap) From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 20:00:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D3DA106566C; Sun, 9 Sep 2012 20:00:01 +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 7FDB28FC08; Sun, 9 Sep 2012 20:00:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89K01p5029948; Sun, 9 Sep 2012 20:00:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89K01II029945; Sun, 9 Sep 2012 20:00:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209092000.q89K01II029945@svn.freebsd.org> From: Alexander Motin Date: Sun, 9 Sep 2012 20:00: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: r240286 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 20:00:01 -0000 Author: mav Date: Sun Sep 9 20:00:00 2012 New Revision: 240286 URL: http://svn.freebsd.org/changeset/base/240286 Log: At least from A70M FCH chipsets AMD started to use their real vendor ID (1022) in HPET. But according to report they still haven't fixed problem with level-triggered interrupts. Make workaround used for earlier chipsets apply to this new ID also. PR: amd64/171355 MFC after: 3 days Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Sun Sep 9 19:20:23 2012 (r240285) +++ head/sys/dev/acpica/acpi_hpet.c Sun Sep 9 20:00:00 2012 (r240286) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #endif #define HPET_VENDID_AMD 0x4353 +#define HPET_VENDID_AMD2 0x1022 #define HPET_VENDID_INTEL 0x8086 #define HPET_VENDID_NVIDIA 0x10de #define HPET_VENDID_SW 0x1166 @@ -505,7 +506,7 @@ hpet_attach(device_t dev) * properly, that makes it very unreliable - it freezes after any * interrupt loss. Avoid legacy IRQs for AMD. */ - if (vendor == HPET_VENDID_AMD) + if (vendor == HPET_VENDID_AMD || vendor == HPET_VENDID_AMD2) sc->allowed_irqs = 0x00000000; /* * NVidia MCP5x chipsets have number of unexplained interrupt From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 21:00:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E33B1065745; Sun, 9 Sep 2012 21:00:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D503D8FC0A; Sun, 9 Sep 2012 21:00:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q89L0jOc037167; Sun, 9 Sep 2012 21:00:45 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89L0j1D037163; Sun, 9 Sep 2012 21:00:45 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201209092100.q89L0j1D037163@svn.freebsd.org> From: Rick Macklem Date: Sun, 9 Sep 2012 21:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240289 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 21:00:46 -0000 Author: rmacklem Date: Sun Sep 9 21:00:45 2012 New Revision: 240289 URL: http://svn.freebsd.org/changeset/base/240289 Log: Add a simple printf() based debug facility to the new nfs client. Use it for a printf() that can be harmlessly generated for mmap()'d files. It will be used extensively for the NFSv4.1 client. Debugging printf()s are enabled by setting vfs.nfs.debuglevel to a non-zero value. The higher the value, the more debugging printf()s. Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfscl.h head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Sun Sep 9 20:26:19 2012 (r240288) +++ head/sys/fs/nfs/nfs_commonport.c Sun Sep 9 21:00:45 2012 (r240289) @@ -60,6 +60,7 @@ struct mount nfsv4root_mnt; int newnfs_numnfsd = 0; struct nfsstats newnfsstats; int nfs_numnfscbd = 0; +int nfscl_debuglevel = 0; char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; struct callout newnfsd_callout; void (*nfsd_call_servertimer)(void) = NULL; @@ -76,6 +77,8 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_c SYSCTL_STRING(_vfs_nfs, OID_AUTO, callback_addr, CTLFLAG_RW, nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), "NFSv4 callback addr for server to use"); +SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nfscl_debuglevel, + 0, "Debug level for new nfs client"); /* * Defines for malloc Modified: head/sys/fs/nfs/nfscl.h ============================================================================== --- head/sys/fs/nfs/nfscl.h Sun Sep 9 20:26:19 2012 (r240288) +++ head/sys/fs/nfs/nfscl.h Sun Sep 9 21:00:45 2012 (r240289) @@ -68,4 +68,10 @@ struct nfsv4node { #define NFSSATTR_SIZENEG1 0x4 #define NFSSATTR_SIZERDEV 0x8 +/* Use this macro for debug printfs. */ +#define NFSCL_DEBUG(level, ...) do { \ + if (nfscl_debuglevel >= (level)) \ + printf(__VA_ARGS__); \ + } while (0) + #endif /* _NFS_NFSCL_H */ Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Sep 9 20:26:19 2012 (r240288) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Sep 9 21:00:45 2012 (r240289) @@ -56,6 +56,7 @@ extern u_int32_t newnfs_false, newnfs_tr extern nfstype nfsv34_type[9]; extern int nfsrv_useacl; extern char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; +extern int nfscl_debuglevel; NFSCLSTATEMUTEX; int nfstest_outofseq = 0; int nfscl_assumeposixlocks = 1; @@ -1398,7 +1399,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio if (stateid.other[0] == 0 && stateid.other[1] == 0 && stateid.other[2] == 0) { nostateid = 1; - printf("stateid0 in write\n"); + NFSCL_DEBUG(1, "stateid0 in write\n"); } } From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 01:15:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6A9C106564A; Mon, 10 Sep 2012 01:15:52 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9121D8FC14; Mon, 10 Sep 2012 01:15:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A1FqN6066555; Mon, 10 Sep 2012 01:15:52 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A1FqBo066553; Mon, 10 Sep 2012 01:15:52 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201209100115.q8A1FqBo066553@svn.freebsd.org> From: Gregory Neil Shapiro Date: Mon, 10 Sep 2012 01:15: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: r240292 - head/contrib/sendmail/include/libmilter X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 01:15:52 -0000 Author: gshapiro Date: Mon Sep 10 01:15:51 2012 New Revision: 240292 URL: http://svn.freebsd.org/changeset/base/240292 Log: Properly define true/false when defining __bool_true_false_are_defined for filters which pull in mfapi.h before stdbool.h. Issue reported by Petr Rehor, maintainer of amavisd-milter port. MFC after: 3 days Modified: head/contrib/sendmail/include/libmilter/mfapi.h Modified: head/contrib/sendmail/include/libmilter/mfapi.h ============================================================================== --- head/contrib/sendmail/include/libmilter/mfapi.h Sun Sep 9 22:12:15 2012 (r240291) +++ head/contrib/sendmail/include/libmilter/mfapi.h Mon Sep 10 01:15:51 2012 (r240292) @@ -96,6 +96,8 @@ typedef int sfsistat; # ifndef bool # ifndef __bool_true_false_are_defined typedef int bool; +# define false 0 +# define true 1 # define __bool_true_false_are_defined 1 # endif /* ! __bool_true_false_are_defined */ # endif /* bool */ From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 02:40:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E811F106566B; Mon, 10 Sep 2012 02:40:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D27B38FC08; Mon, 10 Sep 2012 02:40:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A2e21l077739; Mon, 10 Sep 2012 02:40:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A2e2bO077734; Mon, 10 Sep 2012 02:40:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209100240.q8A2e2bO077734@svn.freebsd.org> From: Eitan Adler Date: Mon, 10 Sep 2012 02:40: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: r240293 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 02:40:03 -0000 Author: eadler Date: Mon Sep 10 02:40:02 2012 New Revision: 240293 URL: http://svn.freebsd.org/changeset/base/240293 Log: Sync access file date recommendation Change from CVS to svn for canconical source of information MFC after: 3 days Modified: head/share/misc/committers-doc.dot head/share/misc/committers-ports.dot head/share/misc/committers-src.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Mon Sep 10 01:15:51 2012 (r240292) +++ head/share/misc/committers-doc.dot Mon Sep 10 02:40:02 2012 (r240293) @@ -15,7 +15,7 @@ digraph doc { # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??"] # # ????/??/?? is the date when the commit bit was obtained, usually the one you -# can find looking at CVS logs for the access (or avail) file under CVSROOT. +# can find looking at svn logs for the svnadmin/access file. # Use YYYY/MM/DD format. # # For returned commit bits, the node definition will follow this example: @@ -23,7 +23,7 @@ digraph doc { # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??\n????/??/??"] # # The first date is the same as for an active committer, the second date is -# the date when the commit bit has been returned. Again, check CVS logs. +# the date when the commit bit has been returned. Again, check svn logs. node [color=grey62, style=filled, bgcolor=black]; Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon Sep 10 01:15:51 2012 (r240292) +++ head/share/misc/committers-ports.dot Mon Sep 10 02:40:02 2012 (r240293) @@ -15,14 +15,15 @@ digraph ports { # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??"] # # ????/??/?? is the date when the commit bit was obtained, usually the one you -# can find looking at CVS logs for the access (or avail) file under CVSROOT. +# can find looking at svn logs for the svnadmin/access file. +# Use YYYY/MM/DD format. # # For returned commit bits, the node definition will follow this example: # # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??\n????/??/??"] # # The first date is the same as for an active committer, the second date is -# the date when the commit bit has been returned. Again, check CVS logs. +# the date when the commit bit has been returned. Again, check svn logs. node [color=grey62, style=filled, bgcolor=black]; Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Sep 10 01:15:51 2012 (r240292) +++ head/share/misc/committers-src.dot Mon Sep 10 02:40:02 2012 (r240293) @@ -15,14 +15,15 @@ digraph src { # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??"] # # ????/??/?? is the date when the commit bit was obtained, usually the one you -# can find looking at CVS logs for the access (or avail) file under CVSROOT. +# can find looking at svn logs for the svnadmin/access file. +# Use YYYY/MM/DD format. # # For returned commit bits, the node definition will follow this example: # # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??\n????/??/??"] # # The first date is the same as for an active committer, the second date is -# the date when the commit bit has been returned. Again, check CVS logs. +# the date when the commit bit has been returned. Again, check svn logs. node [color=grey62, style=filled, bgcolor=black]; From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 02:40:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A4D410657BE; Mon, 10 Sep 2012 02:40:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1416B8FC14; Mon, 10 Sep 2012 02:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A2eHYe077802; Mon, 10 Sep 2012 02:40:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A2eHfM077800; Mon, 10 Sep 2012 02:40:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209100240.q8A2eHfM077800@svn.freebsd.org> From: Eitan Adler Date: Mon, 10 Sep 2012 02:40: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: r240294 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 02:40:18 -0000 Author: eadler Date: Mon Sep 10 02:40:17 2012 New Revision: 240294 URL: http://svn.freebsd.org/changeset/base/240294 Log: Keep this file relatively up to date (taken from f.b.o/adminstration) MFC after: 3 days Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Sep 10 02:40:02 2012 (r240293) +++ head/share/misc/organization.dot Mon Sep 10 02:40:17 2012 (r240294) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, flz, miwi"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nmux, bmah, hrs, kensmith,\nmurray, rwatson, dwhite"] realpha [label="FreeBSD/alpha Release Engineering Team\nre-alpha@FreeBSD.org\nwilko, murray, rwatson"] @@ -41,6 +41,7 @@ repc98 [label="FreeBSD/pc98 Release Engi reppc [label="FreeBSD/ppc Release Engineering Team\nre-ppc@FreeBSD.org\ngrehan"] resparc64 [label="FreeBSD/sparc64 Release Engineering Team\nre-sparc64@FreeBSD.org\njake, phk, tmm, obrien,\nkensmith, murray, rwatson"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] +portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\n"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] @@ -49,24 +50,23 @@ srccommitters [label="Src Committers\nsr accounts [label="Accounts Team\naccounts@FreeBSD.org\nmarkm, simon, kensmith,\ndhw"] backups [label="Backup Administrators\nbackups@FreeBSD.org\nsimon, kensmith,\ndhw"] -bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\nceri, linimon, remko"] -clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nbillf, simon, ps,\nkensmith, peter"] +bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo, linimon"] +clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nbrd, simon, ps,\nkensmith, peter"] cvsupmaster [label="CVSup Mirror Site Coordinators\ncvsup-master@FreeBSD.org\nkuriyama, jdp,\nkensmith"] -dcvs [label="CVS doc/www Repository Managers\ndcvs@FreeBSD.org\njoe, kuriyama, markm,\nsimon"] dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nbillf, dg, ps,\nkensmith, peter"] mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] ncvs [label="CVS src Repository Managers\nncvs@FreeBSD.org\njoe, kuriyama, markm,\nsimon, peter"] pcvs [label="CVS ports Repository Managers\npcvs@FreeBSD.org\nmarcus, joe, kuriyama,\nmarkm, simon"] perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] -postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, dhw"] +postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, sahil, dhw"] refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\nnik, kuriyama, simon,\njesusr, wosch"] # Misc hats go here alphabetically sorted -donations [label="Donations Team\ndonations@FreeBSD.org\nwilko, brueffer,\nobrien, trhodes, ds,\nrwatson"] +donations [label="Donations Team\ndonations@FreeBSD.org\ngjb, wilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] -vendorrelations [label="Vendor Relations Team\nvendor-relations@FreeBSD.org\nbrueffer, gioria, jmg, rik,\nphilip, hmp, marks,\nmurray"] +vendorrelations [label="Vendor Relations Team\nvendor-relations@FreeBSD.org\ngioria, jmg, rik,\nphilip, hmp, marks,\nmurray"] # Here are the team relationships. # Group together all the entries for the superior team. @@ -114,6 +114,7 @@ re -> reppc re -> resparc64 securityofficer -> secteam +securityofficer -> portssecteam secteam -> secteamsecretary From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 05:00:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3645C106566B; Mon, 10 Sep 2012 05:00:30 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 218E68FC14; Mon, 10 Sep 2012 05:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A50TW9095724; Mon, 10 Sep 2012 05:00:29 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A50T9w095722; Mon, 10 Sep 2012 05:00:29 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201209100500.q8A50T9w095722@svn.freebsd.org> From: David Xu Date: Mon, 10 Sep 2012 05:00: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: r240295 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 05:00:30 -0000 Author: davidxu Date: Mon Sep 10 05:00:29 2012 New Revision: 240295 URL: http://svn.freebsd.org/changeset/base/240295 Log: Add missing prototype for clock_getcpuclockid. Modified: head/include/time.h Modified: head/include/time.h ============================================================================== --- head/include/time.h Mon Sep 10 02:40:17 2012 (r240294) +++ head/include/time.h Mon Sep 10 05:00:29 2012 (r240295) @@ -88,6 +88,13 @@ typedef __timer_t timer_t; #include #endif /* __POSIX_VISIBLE >= 199309 */ +#if __POSIX_VISIBLE >= 200112 +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif +#endif + /* These macros are also in sys/time.h. */ #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 #define CLOCK_REALTIME 0 @@ -165,6 +172,10 @@ int clock_settime(clockid_t, const struc int nanosleep(const struct timespec *, struct timespec *); #endif /* __POSIX_VISIBLE >= 199309 */ +#if __POSIX_VISIBLE >= 200112 +int clock_getcpuclockid(pid_t, clockid_t *); +#endif + #if __POSIX_VISIBLE >= 199506 char *asctime_r(const struct tm *, char *); char *ctime_r(const time_t *, char *); From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 05:09:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E78311065670; Mon, 10 Sep 2012 05:09:39 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3B6E8FC0A; Mon, 10 Sep 2012 05:09:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A59dFK096935; Mon, 10 Sep 2012 05:09:39 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A59db5096933; Mon, 10 Sep 2012 05:09:39 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201209100509.q8A59db5096933@svn.freebsd.org> From: David Xu Date: Mon, 10 Sep 2012 05:09: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: r240296 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 05:09:40 -0000 Author: davidxu Date: Mon Sep 10 05:09:39 2012 New Revision: 240296 URL: http://svn.freebsd.org/changeset/base/240296 Log: Process CPU-Time Clocks option is supported, define _POSIX_CPUTIME. Modified: head/include/unistd.h Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Mon Sep 10 05:00:29 2012 (r240295) +++ head/include/unistd.h Mon Sep 10 05:09:39 2012 (r240296) @@ -100,6 +100,7 @@ typedef __useconds_t useconds_t; * returns -1, the functions may be stubbed out. */ #define _POSIX_BARRIERS 200112L +#define _POSIX_CPUTIME 200112L #define _POSIX_READER_WRITER_LOCKS 200112L #define _POSIX_REGEXP 1 #define _POSIX_SHELL 1 From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 05:12:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 420A3106566B; Mon, 10 Sep 2012 05:12:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13D7C8FC0C; Mon, 10 Sep 2012 05:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A5CjQw097357; Mon, 10 Sep 2012 05:12:45 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A5CjFk097355; Mon, 10 Sep 2012 05:12:45 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201209100512.q8A5CjFk097355@svn.freebsd.org> From: David Xu Date: Mon, 10 Sep 2012 05:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240297 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 05:12:46 -0000 Author: davidxu Date: Mon Sep 10 05:12:45 2012 New Revision: 240297 URL: http://svn.freebsd.org/changeset/base/240297 Log: POSIX requires sigevent to be visible after mqueue.h is included. Modified: head/include/mqueue.h Modified: head/include/mqueue.h ============================================================================== --- head/include/mqueue.h Mon Sep 10 05:09:39 2012 (r240296) +++ head/include/mqueue.h Mon Sep 10 05:12:45 2012 (r240297) @@ -32,8 +32,8 @@ #include #include #include +#include -struct sigevent; struct timespec; __BEGIN_DECLS From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 06:07:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B6DB106566C; Mon, 10 Sep 2012 06:07:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36C158FC0C; Mon, 10 Sep 2012 06:07:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A67ThA003677; Mon, 10 Sep 2012 06:07:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A67SpT003675; Mon, 10 Sep 2012 06:07:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209100607.q8A67SpT003675@svn.freebsd.org> From: Adrian Chadd Date: Mon, 10 Sep 2012 06:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240298 - head/tools/tools/ath/athratestats X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 06:07:29 -0000 Author: adrian Date: Mon Sep 10 06:07:28 2012 New Revision: 240298 URL: http://svn.freebsd.org/changeset/base/240298 Log: Add some colour to make it easy (well, easier) to see what the current selected rates and current sample rates are. (Note: when run under high traffic and with -s 0.1 the display becomes very mesmerising. You've been warned.) Modified: head/tools/tools/ath/athratestats/main.c Modified: head/tools/tools/ath/athratestats/main.c ============================================================================== --- head/tools/tools/ath/athratestats/main.c Mon Sep 10 05:12:45 2012 (r240297) +++ head/tools/tools/ath/athratestats/main.c Mon Sep 10 06:07:28 2012 (r240298) @@ -74,6 +74,17 @@ static int do_loop = 0; printw(__VA_ARGS__); \ } while (0) +#define PRINTATTR_ON(_x) do { \ + if (do_loop) \ + attron(_x); \ + } while(0) + + +#define PRINTATTR_OFF(_x) do { \ + if (do_loop) \ + attroff(_x); \ + } while(0) + struct ath_ratestats { int s; struct ath_rateioctl re; @@ -112,6 +123,7 @@ ath_sample_stats(struct ath_ratestats *r sn->ratemask); for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { + PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD); PRINTMSG("[%4u] cur rate %d %s since switch: " "packets %d ticks %u\n", bin_to_size(y), @@ -128,11 +140,15 @@ ath_sample_stats(struct ath_ratestats *r dot11rate(rt, sn->current_sample_rix[y]), dot11str(rt, sn->current_sample_rix[y]), sn->packets_sent[y]); - + PRINTATTR_OFF(COLOR_PAIR(y+4) | A_BOLD); + + PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD); PRINTMSG("[%4u] packets since sample %d sample tt %u\n", bin_to_size(y), sn->packets_since_sample[y], sn->sample_tt[y]); + PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD); + PRINTMSG("\n"); } PRINTMSG(" TX Rate TXTOTAL:TXOK EWMA T/ F" " avg last xmit\n"); @@ -142,6 +158,16 @@ ath_sample_stats(struct ath_ratestats *r for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { if (sn->stats[y][rix].total_packets == 0) continue; + if (rix == sn->current_rix[y]) + PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD); + else if (rix == sn->last_sample_rix[y]) + PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD); +#if 0 + else if (sn->stats[y][rix].ewma_pct / 10 < 50) + PRINTATTR_ON(COLOR_PAIR(2) | A_BOLD); + else if (sn->stats[y][rix].ewma_pct / 10 < 75) + PRINTATTR_ON(COLOR_PAIR(1) | A_BOLD); +#endif PRINTMSG("[%2u %s:%4u] %8ju:%-8ju " "(%3d.%1d%%) %8ju/%4d %5uuS %u\n", dot11rate(rt, rix), @@ -155,6 +181,16 @@ ath_sample_stats(struct ath_ratestats *r sn->stats[y][rix].successive_failures, sn->stats[y][rix].average_tx_time, sn->stats[y][rix].last_tx); + if (rix == sn->current_rix[y]) + PRINTATTR_OFF(COLOR_PAIR(y+4) | A_BOLD); + else if (rix == sn->last_sample_rix[y]) + PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD); +#if 0 + else if (sn->stats[y][rix].ewma_pct / 10 < 50) + PRINTATTR_OFF(COLOR_PAIR(2) | A_BOLD); + else if (sn->stats[y][rix].ewma_pct / 10 < 75) + PRINTATTR_OFF(COLOR_PAIR(1) | A_BOLD); +#endif } } } @@ -269,6 +305,7 @@ main(int argc, char *argv[]) uint8_t *buf; useconds_t sleep_period; float f; + short cf, cb; ifname = getenv("ATH"); if (ifname == NULL) @@ -331,6 +368,17 @@ main(int argc, char *argv[]) initscr(); start_color(); use_default_colors(); + pair_content(0, &cf, &cb); + /* Error - medium */ + init_pair(1, COLOR_YELLOW, cb); + /* Error - high */ + init_pair(2, COLOR_RED, cb); + /* Sample */ + init_pair(3, COLOR_CYAN, cb); + /* 250 byte frames */ + init_pair(4, COLOR_BLUE, cb); + /* 1600 byte frames */ + init_pair(5, COLOR_MAGENTA, cb); cbreak(); noecho(); nonl(); From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 07:57:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B6C106564A; Mon, 10 Sep 2012 07:57:00 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CB7F8FC0C; Mon, 10 Sep 2012 07:57:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A7v0td016416; Mon, 10 Sep 2012 07:57:00 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A7v0xC016414; Mon, 10 Sep 2012 07:57:00 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209100757.q8A7v0xC016414@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 10 Sep 2012 07:57: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: r240299 - head/usr.bin/find X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 07:57:00 -0000 Author: des Date: Mon Sep 10 07:56:59 2012 New Revision: 240299 URL: http://svn.freebsd.org/changeset/base/240299 Log: Note that -quit terminates successfully. Requested by: jmg@ Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Mon Sep 10 06:07:28 2012 (r240298) +++ head/usr.bin/find/find.1 Mon Sep 10 07:56:59 2012 (r240299) @@ -744,7 +744,7 @@ option was specified. .It Ic -quit Causes .Nm -to immediately terminate. +to immediately terminate successfully. .It Ic -regex Ar pattern True if the whole path of the file matches .Ar pattern From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 08:16:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0988106564A; Mon, 10 Sep 2012 08:16:45 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2ECC8FC0A; Mon, 10 Sep 2012 08:16:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A8GjjT019037; Mon, 10 Sep 2012 08:16:45 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A8GjxL019035; Mon, 10 Sep 2012 08:16:45 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209100816.q8A8GjxL019035@svn.freebsd.org> From: Kevin Lo Date: Mon, 10 Sep 2012 08:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240301 - head/lib/libkvm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 08:16:46 -0000 Author: kevlo Date: Mon Sep 10 08:16:45 2012 New Revision: 240301 URL: http://svn.freebsd.org/changeset/base/240301 Log: If the IdlePDPT is not present, PAE is not active Modified: head/lib/libkvm/kvm_i386.c Modified: head/lib/libkvm/kvm_i386.c ============================================================================== --- head/lib/libkvm/kvm_i386.c Mon Sep 10 08:14:58 2012 (r240300) +++ head/lib/libkvm/kvm_i386.c Mon Sep 10 08:16:45 2012 (r240301) @@ -238,7 +238,6 @@ _kvm_initvtop(kvm_t *kd) return (-1); } kd->vmst->PTD = PTD; - return (0); kd->vmst->pae = 0; } return (0); From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 08:23:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12700106564A; Mon, 10 Sep 2012 08:23:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F08088FC14; Mon, 10 Sep 2012 08:23:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8A8NuN9019931; Mon, 10 Sep 2012 08:23:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8A8Nued019928; Mon, 10 Sep 2012 08:23:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209100823.q8A8Nued019928@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 10 Sep 2012 08:23: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: r240302 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 08:23:57 -0000 Author: hselasky Date: Mon Sep 10 08:23:56 2012 New Revision: 240302 URL: http://svn.freebsd.org/changeset/base/240302 Log: Cleanup interrupt handling in Host Mode. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Mon Sep 10 08:16:45 2012 (r240301) +++ head/sys/dev/usb/controller/dwc_otg.c Mon Sep 10 08:23:56 2012 (r240302) @@ -488,13 +488,15 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* check if channel is enabled */ temp = DWC_OTG_READ_4(sc, DOTG_HCCHAR(x)); - if (temp & HCCHAR_CHENA) + if (temp & HCCHAR_CHENA) { + DPRINTF("CH=%d is BUSY\n", x); continue; + } sc->sc_hcchar[x] = td->hcchar; - DPRINTF("HCCHAR=0x%08x HCSPLT=0x%08x\n", - td->hcchar, td->hcsplt); + DPRINTF("HCCHAR=0x%08x(0x%08x) HCSPLT=0x%08x\n", + td->hcchar, temp, td->hcsplt); temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); @@ -502,6 +504,11 @@ dwc_otg_host_channel_alloc(struct dwc_ot DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0); DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), 0); + /* reset TX FIFO */ + DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, + GRSTCTL_TXFIFO(x) | + GRSTCTL_TXFFLSH); + /* set channel */ td->channel = x; @@ -534,7 +541,8 @@ dwc_otg_host_setup_tx(struct dwc_otg_td DPRINTF("HPTXSTS=0x%08x\n", temp); max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK); - max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) >> HPTXSTS_PTXQSPCAVAIL_SHIFT; + max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) + >> HPTXSTS_PTXQSPCAVAIL_SHIFT; max_buffer = max_buffer - (max_buffer % td->max_packet_size); if (max_buffer == 0 || max_frames == 0) @@ -563,11 +571,9 @@ dwc_otg_host_setup_tx(struct dwc_otg_td /* enable interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), - HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL); - - sc->sc_haint_mask |= (1 << td->channel); - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + HCINT_STALL | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | + HCINT_XFERCOMPL); /* transfer data into FIFO */ bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, @@ -744,8 +750,8 @@ dwc_otg_host_data_rx(struct dwc_otg_td * return (0); /* complete */ } - if (temp & (HCINT_DATATGLERR | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD)) { + if (temp & (HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { td->error_any = 1; return (0); /* complete */ } @@ -871,11 +877,9 @@ not_complete: /* enable interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), - HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL); - - sc->sc_haint_mask |= (1 << td->channel); - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + HCINT_STALL | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | + HCINT_XFERCOMPL); temp |= HCCHAR_EPDIR_IN; @@ -1029,8 +1033,8 @@ dwc_otg_host_data_tx(struct dwc_otg_td * return (0); /* complete */ } - if (temp & (HCINT_DATATGLERR | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD)) { + if (temp & (HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { td->error_any = 1; return (0); /* complete */ } @@ -1067,7 +1071,8 @@ dwc_otg_host_data_tx(struct dwc_otg_td * temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS); max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK); - max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) >> HPTXSTS_PTXQSPCAVAIL_SHIFT; + max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) + >> HPTXSTS_PTXQSPCAVAIL_SHIFT; max_buffer = max_buffer - (max_buffer % td->max_packet_size); if (max_buffer == 0 || max_frames < 2) @@ -1120,11 +1125,9 @@ dwc_otg_host_data_tx(struct dwc_otg_td * /* enable interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), - HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL); - - sc->sc_haint_mask |= (1 << td->channel); - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + HCINT_STALL | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | + HCINT_XFERCOMPL); if (count != 0) { @@ -1372,8 +1375,8 @@ dwc_otg_host_data_tx_sync(struct dwc_otg return (0); /* complete */ } - if (temp & (HCINT_DATATGLERR | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD)) { + if (temp & (HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { td->error_any = 1; return (0); /* complete */ } @@ -1615,6 +1618,7 @@ void dwc_otg_interrupt(struct dwc_otg_softc *sc) { uint32_t status; + uint32_t haint; USB_BUS_LOCK(&sc->sc_bus); @@ -1622,13 +1626,13 @@ dwc_otg_interrupt(struct dwc_otg_softc * status = DWC_OTG_READ_4(sc, DOTG_GINTSTS); DWC_OTG_WRITE_4(sc, DOTG_GINTSTS, status); - DPRINTFN(14, "GINTSTS=0x%08x\n", status); + haint = DWC_OTG_READ_4(sc, DOTG_HAINT); + + DPRINTFN(14, "GINTSTS=0x%08x HAINT=0x%08x HFNUM=0x%08x\n", + status, haint, DWC_OTG_READ_4(sc, DOTG_HFNUM)); + + if (haint != 0) { - if (status & GINTSTS_HCHINT) { - uint32_t temp = DWC_OTG_READ_4(sc, DOTG_HAINT); - DWC_OTG_WRITE_4(sc, DOTG_HAINT, temp); - DPRINTFN(14, "HAINT=0x%08x HFNUM=0x%08x\n", - temp, DWC_OTG_READ_4(sc, DOTG_HFNUM)); } if (status & GINTSTS_USBRST) { @@ -2208,8 +2212,7 @@ dwc_otg_standard_done_sub(struct usb_xfe xfer->td_transfer_cache = td; - return (error ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION); + return (error); } static void @@ -2278,8 +2281,7 @@ dwc_otg_device_done(struct usb_xfer *xfe struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus); - sc->sc_haint_mask &= ~(1 << td->channel); - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask); + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), 0); DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), HCCHAR_CHENA | HCCHAR_CHDIS); @@ -2627,16 +2629,15 @@ dwc_otg_init(struct dwc_otg_softc *sc) uint8_t x; for (x = 0; x != sc->sc_host_ch_max; x++) { - /* disable interrupt */ + /* disable channel interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), 0); - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), HCCHAR_CHENA | HCCHAR_CHDIS); - temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); - DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), + HCCHAR_CHENA | HCCHAR_CHDIS); } - /* disable host channel interrupts */ - sc->sc_haint_mask = 0; - DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, 0); + /* enable host channel interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, + (1 << sc->sc_host_ch_max) - 1); /* setup clocks */ temp = DWC_OTG_READ_4(sc, DOTG_HCFG); @@ -3569,7 +3570,7 @@ dwc_otg_device_resume(struct usb_device DPRINTF("\n"); - /* Disable relevant Host channels before going to suspend */ + /* Enable relevant Host channels before resuming */ USB_BUS_LOCK(udev->bus); Modified: head/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.h Mon Sep 10 08:16:45 2012 (r240301) +++ head/sys/dev/usb/controller/dwc_otg.h Mon Sep 10 08:23:56 2012 (r240302) @@ -151,7 +151,6 @@ struct dwc_otg_softc { uint32_t sc_sof_refs; uint32_t sc_sof_val; uint32_t sc_hprt_val; - uint32_t sc_haint_mask; uint16_t sc_active_rx_ep; From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 10:24:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B51181065672; Mon, 10 Sep 2012 10:24:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5438FC08; Mon, 10 Sep 2012 10:24:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AAOvkF035346; Mon, 10 Sep 2012 10:24:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AAOvqJ035341; Mon, 10 Sep 2012 10:24:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209101024.q8AAOvqJ035341@svn.freebsd.org> From: Martin Matuska Date: Mon, 10 Sep 2012 10:24: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: r240303 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 10:24:57 -0000 Author: mm Date: Mon Sep 10 10:24:57 2012 New Revision: 240303 URL: http://svn.freebsd.org/changeset/base/240303 Log: Add assfail() and assfail3() to the opensolaris module. Remove obsoleted intermediate cddl/compat/opensolaris/sys/debug.h. MFC after: 2 weeks Added: head/sys/cddl/compat/opensolaris/sys/assfail.h (contents, props changed) Deleted: head/sys/cddl/compat/opensolaris/sys/debug.h Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Sep 10 08:23:56 2012 (r240302) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Sep 10 10:24:57 2012 (r240303) @@ -19,9 +19,13 @@ * CDDL HEADER END * * $FreeBSD$ - * + */ +/* + * Copyright 2007 John Birrell . All rights reserved. + * Copyright 2012 Martin Matuska . All rights reserved. */ +#include #include void @@ -68,3 +72,19 @@ cmn_err(int type, const char *fmt, ...) vcmn_err(type, fmt, ap); va_end(ap); } + +int +assfail(const char *a, const char *f, int l) { + + panic("solaris assert: %s, file: %s, line: %d", a, f, l); + + return (0); +} + +void +assfail3(const char *a, uintmax_t lv, const char *op, uintmax_t rv, + const char *f, int l) { + + panic("solaris assert: %s (0x%jx %s 0x%jx), file: %s, line: %d", + a, lv, op, rv, f, l); +} Added: head/sys/cddl/compat/opensolaris/sys/assfail.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/compat/opensolaris/sys/assfail.h Mon Sep 10 10:24:57 2012 (r240303) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2012 Martin Matuska + * 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 AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _OPENSOLARIS_SYS_ASSFAIL_H_ +#define _OPENSOLARIS_SYS_ASSFAIL_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int assfail(const char *, const char *, int); +void assfail3(const char *, uintmax_t, const char *, uintmax_t, const char *, + int); + +#ifdef __cplusplus +} +#endif + +#endif /* _OPENSOLARIS_SYS_ASSFAIL_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Mon Sep 10 08:23:56 2012 (r240302) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Mon Sep 10 10:24:57 2012 (r240303) @@ -21,6 +21,7 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2012 Martin Matuska . All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -31,6 +32,9 @@ #include #include +#ifdef _KERNEL +#include +#endif #ifdef __cplusplus extern "C" { From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 11:08:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAD101065677; Mon, 10 Sep 2012 11:08:08 +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 93F9A8FC15; Mon, 10 Sep 2012 11:08:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AB88cT042683; Mon, 10 Sep 2012 11:08:08 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AB88Z8042681; Mon, 10 Sep 2012 11:08:08 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209101108.q8AB88Z8042681@svn.freebsd.org> From: Joel Dahl Date: Mon, 10 Sep 2012 11:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240304 - head/usr.bin/chat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 11:08:08 -0000 Author: joel (doc committer) Date: Mon Sep 10 11:08:08 2012 New Revision: 240304 URL: http://svn.freebsd.org/changeset/base/240304 Log: mdocify the chat(8) manual page. Reviewed by: brueffer Modified: head/usr.bin/chat/chat.8 Modified: head/usr.bin/chat/chat.8 ============================================================================== --- head/usr.bin/chat/chat.8 Mon Sep 10 10:24:57 2012 (r240303) +++ head/usr.bin/chat/chat.8 Mon Sep 10 11:08:08 2012 (r240304) @@ -1,41 +1,81 @@ -.\" -*- nroff -*- -.\" manual page [] for chat 1.8 .\" $FreeBSD$ -.\" SH section heading -.\" SS subsection heading -.\" LP paragraph -.\" IP indented paragraph -.\" TP hanging label -.TH CHAT 8 "27 Sep 1997" "Chat Version 1.17" -.SH NAME -chat \- Automated conversational script with a modem -.SH SYNOPSIS -.B chat -[ -.I options -] -.I script -.SH DESCRIPTION -.LP -The \fIchat\fR program defines a conversational exchange between the +.Dd September 10, 2012 +.Dt CHAT 8 +.Os +.Sh NAME +.Nm chat +.Nd Automated conversational script with a modem +.Sh SYNOPSIS +.Nm +.Op Fl eSsVv +.Op Fl f Ar chat-file +.Op Fl r Ar report-file +.Op Fl T Ar phone-number +.Op Fl t Ar timeout +.Op Fl U Ar phone-number2 +.Op Ar script +.Sh DESCRIPTION +The +.Nm +program defines a conversational exchange between the computer and the modem. Its primary purpose is to establish the -connection between the Point-to-Point Protocol Daemon (\fIpppd\fR) and -the remote's \fIpppd\fR process. -.SH OPTIONS -.TP -.B -f \fI -Read the chat script from the chat \fIfile\fR. +connection between the Point-to-Point Protocol Daemon +.Pq pppd +and the remote's pppd process. +.Sh OPTIONS +.Bl -tag -width indent +.It Fl e +Start with the echo option turned on. +Echoing may also be turned on +or off at specific points in the chat script by using the ECHO +keyword. +When echoing is enabled, all output from the modem is echoed +to +.Em stderr . +.It Fl f Ar chat-file +Read the chat script from the chat file. The use of this option is mutually exclusive with the chat script parameters. The user must have read access to the file. -Multiple lines are permitted in the -file. +Multiple lines are permitted in the file. Space or horizontal tab characters should be used to separate the strings. -.TP -.B -t \fI +.It Fl r Ar report-file +Set the file for output of the report strings. +If you use the keyword +.Dv REPORT , +the resulting strings are written to this file. +If this +option is not used and you still use +.Dv REPORT +keywords, the +.Pa stderr +file is used for the report strings. +.It Fl S +Do not use +.Xr syslog 3 . +By default, error messages are sent to +.Xr syslog 3 . +The use of +.Fl S +will prevent both log messages from +.Fl v +and error messages from being sent to +.Xr syslog 3 . +.It Fl s +Use +.Em stderr . +All log messages from +.Fl v +and all error messages will be +sent to +.Em stderr . +.It Fl T Ar phone-number +Pass in an arbitrary string, usually a phone number, that will be +substituted for the \\T substitution metacharacter in a send string. +.It Fl t Ar timeout Set the timeout for the expected string to be received. If the string is not received within the time limit then the reply string is not @@ -43,96 +83,81 @@ sent. An alternate reply may be sent or the script will fail if there is no alternate reply string. A failed script will cause the -\fIchat\fR program to terminate with a non-zero error code. -.TP -.B -r \fI -Set the file for output of the report strings. -If you use the keyword -\fIREPORT\fR, the resulting strings are written to this file. -If this -option is not used and you still use \fIREPORT\fR keywords, the -\fIstderr\fR file is used for the report strings. -.TP -.B -e -Start with the echo option turned on. -Echoing may also be turned on -or off at specific points in the chat script by using the \fIECHO\fR -keyword. -When echoing is enabled, all output from the modem is echoed -to \fIstderr\fR. -.TP -.B -v -Request that the \fIchat\fR script be executed in a verbose mode. +.Nm +program to terminate with a non-zero error code. +.It Fl U Ar phone-number2 +Pass in a second string, usually a phone number, that will be +substituted for the \\U substitution metacharacter in a send string. +This is useful when dialing an ISDN terminal adapter that requires two +numbers. +.It Fl V +Request that the +.Nm +script be executed in a +.Em stderr +verbose mode. The -\fIchat\fR program will then log the execution state of the chat -script as well as all text received from the modem and the output -strings sent to the modem. The default is to log through -.IR syslog (3); -the logging method may be altered with the -S and -s flags. -Logging is -done to the \fIlocal2\fR facility at level \fIinfo\fR for verbose tracing -and level \fIerr\fR for some errors. -.TP -.B -V -Request that the \fIchat\fR script be executed in a stderr verbose -mode. -The \fIchat\fR program will then log all text received from the +.Nm +program will then log all text received from the modem and the output strings sent to the modem to the stderr device. This device is usually the local console at the station running the chat or pppd program. -.TP -.B -s -Use stderr. All log messages from '-v' and all error messages will be -sent to stderr. -.TP -.B -S -Do not use -.IR syslog (3). -By default, error messages are sent to -.IR syslog (3). -The use of -S will prevent both log messages from '-v' and -error messages from being sent to -.IR syslog (3). -.TP -.B -T \fI -Pass in an arbitrary string, usually a phone number, that will be -substituted for the \\T substitution metacharacter in a send string. -.TP -.B -U \fI -Pass in a second string, usually a phone number, that will be -substituted for the \\U substitution metacharacter in a send string. -This is useful when dialing an ISDN terminal adapter that requires two -numbers. -.TP -.B script -If the script is not specified in a file with the \fI-f\fR option then -the script is included as parameters to the \fIchat\fR program. -.SH CHAT SCRIPT -.LP -The \fIchat\fR script defines the communications. -.LP +.It Fl v +Request that the +.Nm +script be executed in a verbose mode. +The +.Nm +program will then log the execution state of the chat +script as well as all text received from the modem and the output +strings sent to the modem. +The default is to log through +.Xr syslog 3 ; +the logging method may be altered with the +.Fl S +and +.Fl s +flags. +Logging is done to the +.Em local2 +facility at level +.Em info +for verbose tracing and level +.Em err +for some errors. +.El +.Sh CHAT SCRIPT +The +.Nm +script defines the communications. A script consists of one or more "expect-send" pairs of strings, separated by spaces, with an optional "subexpect-subsend" string pair, separated by a dash as in the following example: -.IP -ogin:-BREAK-ogin: ppp ssword: hello2u2 -.LP -This line indicates that the \fIchat\fR program should expect the string -"ogin:". If it fails to receive a login prompt within the time interval +.Pp +.D1 ogin:-BREAK-ogin: ppp ssword: hello2u2 +.Pp +This line indicates that the +.Nm +program should expect the string "ogin:". +If it fails to receive a login prompt within the time interval allotted, it is to send a break sequence to the remote and then expect the -string "ogin:". If the first "ogin:" is received then the break sequence is +string "ogin:". +If the first "ogin:" is received then the break sequence is not generated. -.LP -Once it received the login prompt the \fIchat\fR program will send the -string ppp and then expect the prompt "ssword:". When it receives the +.Pp +Once it received the login prompt the +.Nm +program will send the +string ppp and then expect the prompt "ssword:". +When it receives the prompt for the password, it will send the password hello2u2. -.LP +.Pp A carriage return is normally sent following the reply string. It is not expected in the "expect" string unless it is specifically requested by using the \\r character sequence. -.LP +.Pp The expect sequence should contain only what is needed to identify the string. Since it is normally stored on a disk file, it should not contain @@ -140,29 +165,30 @@ variable information. It is generally not acceptable to look for time strings, network identification strings, or other variable pieces of data as an expect string. -.LP +.Pp To help correct for characters which may be corrupted during the initial -sequence, look for the string "ogin:" rather than "login:". It is possible +sequence, look for the string "ogin:" rather than "login:". +It is possible that the leading "l" character may be received in error and you may never find the string even though it was sent by the system. For this reason, scripts look for "ogin:" rather than "login:" and "ssword:" rather than "password:". -.LP +.Pp A very simple script might look like this: -.IP -ogin: ppp ssword: hello2u2 -.LP +.Pp +.D1 ogin: ppp ssword: hello2u2 +.Pp In other words, expect ....ogin:, send ppp, expect ...ssword:, send hello2u2. -.LP +.Pp In actual practice, simple scripts are rare. At the vary least, you should include sub-expect sequences should the original string not be received. For example, consider the following script: -.IP -ogin:--ogin: ppp ssword: hello2u2 -.LP +.Pp +.D1 ogin:--ogin: ppp ssword: hello2u2 +.Pp This would be a better script than the simple one used earlier. This would look for the same login: prompt, however, if one was not received, a single @@ -170,123 +196,135 @@ return sequence is sent and then it will Should line noise obscure the first login prompt then sending the empty line will usually generate a login prompt again. -.SH COMMENTS +.Sh COMMENTS Comments can be embedded in the chat script. A comment is a line which -starts with the \fB#\fR (hash) character in column 1. Such comment +starts with the # (hash) character in column 1. +Such comment lines are just ignored by the chat program. If a '#' character is to be expected as the first character of the expect sequence, you should quote the expect string. If you want to wait for a prompt that starts with a # (hash) character, you would have to write something like this: -.IP +.Bd -literal -offset indent # Now wait for the prompt and send logout string -.br \&'# ' logout -.LP - -.SH ABORT STRINGS +.Ed +.Sh ABORT STRINGS Many modems will report the status of the call as a string. -These -strings may be \fBCONNECTED\fR or \fBNO CARRIER\fR or \fBBUSY\fR. -It -is often desirable to terminate the script should the modem fail to +These strings may be +.Dv CONNECTED +or +.Dv NO CARRIER +or +.Dv BUSY . +It is often desirable to terminate the script should the modem fail to connect to the remote. The difficulty is that a script would not know exactly which modem string it may receive. -On one attempt, it may -receive \fBBUSY\fR while the next time it may receive \fBNO CARRIER\fR. -.LP -These "abort" strings may be specified in the script using the \fIABORT\fR +On one attempt, it may receive +.Dv BUSY +while the next time it may receive +.Dv NO CARRIER . +.Pp +These "abort" strings may be specified in the script using the ABORT sequence. It is written in the script as in the following example: -.IP -ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATDT5551212 CONNECT -.LP +.Pp +.D1 ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATDT5551212 CONNECT +.Pp This sequence will expect nothing; and then send the string ATZ. -The -expected response to this is the string \fIOK\fR. -When it receives \fIOK\fR, +The expected response to this is the string +.Dv OK . +When it receives +.Dv OK , the string ATDT5551212 to dial the telephone. The expected string is -\fICONNECT\fR. -If the string \fICONNECT\fR is received the remainder of the +.Dv CONNECT . +If the string +.Dv CONNECT +is received the remainder of the script is executed. However, should the modem find a busy telephone, it will -send the string \fIBUSY\fR. +send the string +.Dv BUSY . This will cause the string to match the abort character sequence. The script will then fail because it found a match to the abort string. -If it received the string \fINO CARRIER\fR, it will abort +If it received the string +.Dv NO CARRIER , +it will abort for the same reason. Either string may be received. Either string will -terminate the \fIchat\fR script. -.SH CLR_ABORT STRINGS -This sequence allows for clearing previously set \fBABORT\fR strings. -\fBABORT\fR strings are kept in an array of a pre-determined size (at -compilation time); \fBCLR_ABORT\fR will reclaim the space for cleared +terminate the +.Nm +script. +.Sh CLR_ABORT STRINGS +This sequence allows for clearing previously set +.Dv ABORT +strings. +.Dv ABORT +strings are kept in an array of a pre-determined size (at +compilation time); CLR_ABORT will reclaim the space for cleared entries so that new strings can use that space. -.SH SAY STRINGS -The \fBSAY\fR directive allows the script to send strings to the user -at the terminal via standard error. If \fBchat\fR is being run by +.Sh SAY STRINGS +The +.Dv SAY +directive allows the script to send strings to the user +at the terminal via standard error. +If +.Nm +is being run by pppd, and pppd is running as a daemon (detached from its controlling terminal), standard error will normally be redirected to the file -/etc/ppp/connect-errors. -.LP -\fBSAY\fR strings must be enclosed in single or double quotes. -If -carriage return and line feed are needed in the string to be output, +.Pa /etc/ppp/connect-errors . +.Pp +.Dv SAY +strings must be enclosed in single or double quotes. +If carriage return and line feed are needed in the string to be output, you must explicitly add them to your string. -.LP -The SAY strings could be used to give progress messages in sections of +.Pp +The +.Dv SAY +strings could be used to give progress messages in sections of the script where you want to have 'ECHO OFF' but still let the user know what is happening. An example is: -.IP +.Bd -literal -offset indent ABORT BUSY -.br ECHO OFF -.br SAY "Dialling your ISP...\\n" -.br \&'' ATDT5551212 -.br TIMEOUT 120 -.br SAY "Waiting up to 2 minutes for connection ... " -.br CONNECT '' -.br SAY "Connected, now logging in ...\\n" -.br ogin: account -.br ssword: pass -.br -$ \c -SAY "Logged in OK ...\\n" -\fIetc ...\fR -.LP -This sequence will only present the SAY strings to the user and all +$ SAY "Logged in OK ...\\n" \fIetc ...\fR +.Ed +.Pp +This sequence will only present the +.Dv SAY +strings to the user and all the details of the script will remain hidden. For example, if the above script works, the user will see: -.IP +.Bd -literal -offset indent Dialling your ISP... -.br Waiting up to 2 minutes for connection ... Connected, now logging in ... -.br Logged in OK ... -.LP - -.SH REPORT STRINGS -A \fBreport\fR string is similar to the ABORT string. +.Ed +.Sh REPORT STRINGS +A report string is similar to the +.Dv ABORT +string. The difference is that the strings, and all characters to the next control character such as a carriage return, are written to the report file. -.LP +.Pp The report strings may be used to isolate the transmission rate of the modem's connect string and return the value to the chat user. The @@ -295,281 +333,312 @@ other string processing such as looking The use of the same string for a report and abort sequence is probably not very useful, however, it is possible. -.LP +.Pp The report strings to no change the completion code of the program. -.LP -These "report" strings may be specified in the script using the \fIREPORT\fR +.Pp +These "report" strings may be specified in the script using the +.Dv REPORT sequence. It is written in the script as in the following example: -.IP -REPORT CONNECT ABORT BUSY '' ATDT5551212 CONNECT '' ogin: account -.LP +.Pp +.D1 REPORT CONNECT ABORT BUSY '' ATDT5551212 CONNECT '' ogin: account +.Pp This sequence will expect nothing; and then send the string ATDT5551212 to dial the telephone. The expected string is -\fICONNECT\fR. -If the string \fICONNECT\fR is received the remainder +.Dv CONNECT . +If the string +.Dv CONNECT +is received the remainder of the script is executed. In addition the program will write to the expect-file the string "CONNECT" plus any characters which follow it such as the connection rate. -.SH CLR_REPORT STRINGS -This sequence allows for clearing previously set \fBREPORT\fR strings. -\fBREPORT\fR strings are kept in an array of a pre-determined size (at -compilation time); \fBCLR_REPORT\fR will reclaim the space for cleared +.Sh CLR_REPORT STRINGS +This sequence allows for clearing previously set +.Dv REPORT +strings. +.Dv REPORT +strings are kept in an array of a pre-determined size (at +compilation time); CLR_REPORT will reclaim the space for cleared entries so that new strings can use that space. -.SH ECHO +.Sh ECHO The echo options controls whether the output from the modem is echoed -to \fIstderr\fR. -This option may be set with the \fI-e\fR option, but -it can also be controlled by the \fIECHO\fR keyword. +to +.Em stderr . +This option may be set with the +.Fl e +option, but +it can also be controlled by the +.Dv ECHO +keyword. The "expect-send" -pair \fIECHO\fR \fION\fR enables echoing, and \fIECHO\fR \fIOFF\fR +pair +.Dv ECHO ON +enables echoing, and +.Dv ECHO OFF disables it. With this keyword you can select which parts of the conversation should be visible. For instance, with the following script: -.IP +.Bd -literal -offset indent ABORT 'BUSY' -.br ABORT 'NO CARRIER' -.br \&'' ATZ -.br OK\\r\\n ATD1234567 -.br \\r\\n \\c -.br ECHO ON -.br CONNECT \\c -.br ogin: account -.LP +.Ed +.Pp all output resulting from modem configuration and dialing is not visible, -but starting with the \fICONNECT\fR (or \fIBUSY\fR) message, everything +but starting with the +.Dv CONNECT +or +.Dv BUSY +message, everything will be echoed. -.SH HANGUP -The HANGUP options control whether a modem hangup should be considered -as an error or not. This option is useful in scripts for dialling -systems which will hang up and call your system back. The HANGUP -options can be \fBON\fR or \fBOFF\fR. -.br -When HANGUP is set OFF and the modem hangs up (e.g., after the first -stage of logging in to a callback system), \fBchat\fR will continue +.Sh HANGUP +The +.Dv HANGUP +options control whether a modem hangup should be considered +as an error or not. +This option is useful in scripts for dialling +systems which will hang up and call your system back. +The +.Dv HANGUP +options can be +.Dv ON +or +.Dv OFF . +.Pp +When +.Dv HANGUP +is set +.Dv OFF +and the modem hangs up (e.g., after the first +stage of logging in to a callback system), +.Nm +will continue running the script (e.g., waiting for the incoming call and second -stage login prompt). As soon as the incoming call is connected, you -should use the \fBHANGUP ON\fR directive to reinstall normal hang up -signal behavior. Here is a (simple) example script: -.IP +stage login prompt). +As soon as the incoming call is connected, you +should use the +.Dv HANGUP ON +directive to reinstall normal hang up +signal behavior. +Here is a (simple) example script: +.Bd -literal -offset indent ABORT 'BUSY' -.br \&'' ATZ -.br OK\\r\\n ATD1234567 -.br \\r\\n \\c -.br CONNECT \\c -.br \&'Callback login:' call_back_ID -.br HANGUP OFF -.br ABORT "Bad Login" -.br \&'Callback Password:' Call_back_password -.br TIMEOUT 120 -.br CONNECT \\c -.br HANGUP ON -.br ABORT "NO CARRIER" -.br ogin:--BREAK--ogin: real_account -.br \fIetc ...\fR -.SH TIMEOUT +.Ed +.Sh TIMEOUT The initial timeout value is 45 seconds. -This may be changed using the \fB-t\fR +This may be changed using the +.Fl t parameter. -.LP +.Pp To change the timeout value for the next expect string, the following example may be used: -.IP +.Bd -literal -offset indent ATZ OK ATDT5551212 CONNECT TIMEOUT 10 ogin:--ogin: TIMEOUT 5 assword: hello2u2 -.LP +.Ed +.Pp This will change the timeout to 10 seconds when it expects the login: prompt. The timeout is then changed to 5 seconds when it looks for the password prompt. -.LP +.Pp The timeout, once changed, remains in effect until it is changed again. -.SH SENDING EOT -The special reply string of \fIEOT\fR indicates that the chat program -should send an EOT character to the remote. +.Sh SENDING EOT +The special reply string of +.Dv EOT +indicates that the chat program +should send an +.Dv EOT +character to the remote. This is normally the End-of-file character sequence. A return character is not sent -following the EOT. -.LP -The EOT sequence may be embedded into the send string using the -sequence \fI^D\fR. -.SH GENERATING BREAK -The special reply string of \fIBREAK\fR will cause a break condition +following the +.Dv EOT . +.Pp +The +.Dv EOT +sequence may be embedded into the send string using the +sequence ^D. +.Sh GENERATING BREAK +The special reply string of +.Dv BREAK +will cause a break condition to be sent. The break is a special signal on the transmitter. The normal processing on the receiver is to change the transmission rate. It may be used to cycle through the available transmission rates on the remote until you are able to receive a valid login prompt. -.LP +.Pp The break sequence may be embedded into the send string using the \fI\\K\fR sequence. -.SH ESCAPE SEQUENCES +.Sh ESCAPE SEQUENCES The expect and reply strings may contain escape sequences. All of the sequences are legal in the reply string. Many are legal in the expect. Those which are not valid in the expect sequence are so indicated. -.TP -.B '' +.Bl -tag -width indent +.It '' Expects or sends a null string. If you send a null string then it will still send the return character. This sequence may either be a pair of apostrophe or quote characters. -.TP -.B \\\\b +.It \\\\b represents a backspace character. -.TP -.B \\\\c +.It \\\\c Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. It must be at the end of the send string. For example, -the sequence hello\\c will simply send the characters h, e, l, l, o. -.I (not valid in expect.) -.TP -.B \\\\d +the sequence hello\\c will simply send the characters h, e, l, l, o +.Pq Em not valid in expect . +.It \\\\d Delay for one second. The program uses sleep(1) which will delay to a -maximum of one second. -.I (not valid in expect.) -.TP -.B \\\\K -Insert a BREAK -.I (not valid in expect.) -.TP -.B \\\\n +maximum of one second +.Pq Em not valid in expect . +.It \\\\K +Insert a +.Dv BREAK +.Pq Em not valid in expect . +.It \\\\n Send a newline or linefeed character. -.TP -.B \\\\N +.It \\\\N Send a null character. -The same sequence may be represented by \\0. -.I (not valid in expect.) -.TP -.B \\\\p +The same sequence may be represented by \\0 +.Pq Em not valid in expect . +.It \\\\p Pause for a fraction of a second. -The delay is 1/10th of a second. -.I (not valid in expect.) -.TP -.B \\\\q +The delay is 1/10th of a second +.Pq Em not valid in expect . +.It \\\\q Suppress writing the string to -.IR syslogd (8). +.Xr syslogd 8 . The string ?????? is -written to the log in its place. -.I (not valid in expect.) -.TP -.B \\\\r +written to the log in its place +.Pq Em not valid in expect . +.It \\\\r Send or expect a carriage return. -.TP -.B \\\\s +.It \\\\s Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\\sTIM are the same. -.TP -.B \\\\t +.It \\\\t Send or expect a tab character. -.TP -.B \\\\\\\\ +.It \\\\\\\\ Send or expect a backslash character. -.TP -.B \\\\ddd +.It \\\\ddd Collapse the octal digits (ddd) into a single ASCII character and send that -character. -.I (some characters are not valid in expect.) -.TP -.B \^^C +character +.Pq Em some characters are not valid in expect . +.It \^^C Substitute the sequence with the control character represented by C. -For example, the character DC1 (17) is shown as \^^Q. -.I (some characters are not valid in expect.) -.SH TERMINATION CODES -The \fIchat\fR program will terminate with the following completion +For example, the character DC1 (17) is shown as \^^Q +.Pq Em some characters are not valid in expect . +.El +.Sh TERMINATION CODES +The +.Nm +program will terminate with the following completion codes. -.TP -.B 0 +.Bl -tag -width indent +.It 0 The normal termination of the program. This indicates that the script was executed without error to the normal conclusion. -.TP -.B 1 +.It 1 One or more of the parameters are invalid or an expect string was too large for the internal buffers. This indicates that the program as not properly executed. -.TP -.B 2 +.It 2 An error occurred during the execution of the program. This may be due to a read or write operation failing for some reason or chat receiving -a signal such as SIGINT. -.TP -.B 3 -A timeout event occurred when there was an \fIexpect\fR string without +a signal such as +.Dv SIGINT . +.It 3 +A timeout event occurred when there was an +.Em expect +string without having a "-subsend" string. This may mean that you did not program the script correctly for the condition or that some unexpected event has occurred and the expected string could not be found. -.TP -.B 4 -The first string marked as an \fIABORT\fR condition occurred. -.TP -.B 5 -The second string marked as an \fIABORT\fR condition occurred. -.TP -.B 6 -The third string marked as an \fIABORT\fR condition occurred. -.TP -.B 7 -The fourth string marked as an \fIABORT\fR condition occurred. -.TP -.B ... -The other termination codes are also strings marked as an \fIABORT\fR +.It 4 +The first string marked as an +.Dv ABORT +condition occurred. +.It 5 +The second string marked as an +.Dv ABORT +condition occurred. +.It 6 +The third string marked as an +.Dv ABORT +condition occurred. +.It 7 +The fourth string marked as an +.Dv ABORT +condition occurred. +.It ... +The other termination codes are also strings marked as an +.Dv ABORT condition. -.LP +.El +.Pp Using the termination code, it is possible to determine which event terminated the script. It is possible to decide if the string "BUSY" -was received from the modem as opposed to "NO DIAL TONE". While the +was received from the modem as opposed to "NO DIAL TONE". +While the first event may be retried, the second will probably have little chance of succeeding during a retry. -.SH SEE ALSO -Additional information about \fIchat\fR scripts may be found with UUCP +.Sh SEE ALSO +Additional information about +.Nm +scripts may be found with UUCP documentation. -The \fIchat\fR script was taken from the ideas proposed -by the scripts used by the \fIuucico\fR program. -.LP -uucico(1), uucp(1), syslog(3), syslogd(8). -.SH COPYRIGHT -The \fIchat\fR program is in public domain. +The +.Nm +script was taken from the ideas proposed +by the scripts used by the uucico program. +.Pp +.Xr syslog 3 , +.Xr syslogd 8 +.Sh COPYRIGHT +The +.Nm +program is in public domain. This is not the GNU public license. If it breaks then you get to keep both pieces. From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 12:23:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2663106566B; Mon, 10 Sep 2012 12:23:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDB888FC15; Mon, 10 Sep 2012 12:23:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ACNujZ052215; Mon, 10 Sep 2012 12:23:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ACNub9052213; Mon, 10 Sep 2012 12:23:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209101223.q8ACNub9052213@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 10 Sep 2012 12:23: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: r240312 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 12:23:57 -0000 Author: hselasky Date: Mon Sep 10 12:23:56 2012 New Revision: 240312 URL: http://svn.freebsd.org/changeset/base/240312 Log: Fix for IRQ hang in DWC OTG host mode. Modified: head/sys/dev/usb/controller/dwc_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Mon Sep 10 12:11:11 2012 (r240311) +++ head/sys/dev/usb/controller/dwc_otg.c Mon Sep 10 12:23:56 2012 (r240312) @@ -498,8 +498,16 @@ dwc_otg_host_channel_alloc(struct dwc_ot DPRINTF("HCCHAR=0x%08x(0x%08x) HCSPLT=0x%08x\n", td->hcchar, temp, td->hcsplt); + /* clear leftover interrupts */ temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); + + /* enable interrupts */ + DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), + HCINT_STALL | HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | + HCINT_XFERCOMPL); + DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt); DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0); DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), 0); @@ -569,12 +577,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td /* must enable channel before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); - /* enable interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), - HCINT_STALL | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | - HCINT_XFERCOMPL); - /* transfer data into FIFO */ bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4); @@ -875,12 +877,6 @@ not_complete: (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) : (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT))); - /* enable interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), - HCINT_STALL | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | - HCINT_XFERCOMPL); - temp |= HCCHAR_EPDIR_IN; /* must enable channel before data can be received */ @@ -1123,12 +1119,6 @@ dwc_otg_host_data_tx(struct dwc_otg_td * /* must enable before writing data to FIFO */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); - /* enable interrupts */ - DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel), - HCINT_STALL | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | - HCINT_XFERCOMPL); - if (count != 0) { /* clear topmost word before copy */ @@ -1632,7 +1622,17 @@ dwc_otg_interrupt(struct dwc_otg_softc * status, haint, DWC_OTG_READ_4(sc, DOTG_HFNUM)); if (haint != 0) { + uint8_t x; + /* clear left-over interrupts */ + for (x = 0; x != sc->sc_host_ch_max; x++) { + /* check if channel is disabled */ + if (sc->sc_hcchar[x] == 0) { + uint32_t temp; + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); + } + } } if (status & GINTSTS_USBRST) { @@ -2064,7 +2064,7 @@ dwc_otg_setup_standard_chain(struct usb_ td = xfer->td_transfer_first; td->toggle = (xfer->endpoint->toggle_next ? 1 : 0); - td->hcchar = ((xfer->max_packet_count & 3) << HCCHAR_MC_SHIFT) | + td->hcchar = (xfer->address << HCCHAR_DEVADDR_SHIFT) | (xfer_type << HCCHAR_EPTYPE_SHIFT) | ((xfer->endpointno & UE_ADDR) << HCCHAR_EPNUM_SHIFT) | @@ -2092,6 +2092,14 @@ dwc_otg_setup_standard_chain(struct usb_ td->hcsplt = 0; } break; + case USB_SPEED_HIGH: + td->hcsplt = 0; + if (xfer_type == UE_ISOCHRONOUS || + xfer_type == UE_INTERRUPT) { + td->hcchar |= ((xfer->max_packet_count & 3) + << HCCHAR_MC_SHIFT); + } + break; default: td->hcsplt = 0; break; From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 13:50:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 492EF106564A; Mon, 10 Sep 2012 13:50:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29AF28FC19; Mon, 10 Sep 2012 13:50:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ADoZdY063458; Mon, 10 Sep 2012 13:50:35 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ADoYvl063455; Mon, 10 Sep 2012 13:50:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209101350.q8ADoYvl063455@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 10 Sep 2012 13:50: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: r240314 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 13:50:35 -0000 Author: hselasky Date: Mon Sep 10 13:50:34 2012 New Revision: 240314 URL: http://svn.freebsd.org/changeset/base/240314 Log: Poll VBUS status every second, hence the AT91 GPIO library doesn't support registering interrupt handlers yet for GPIO events. Modified: head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/at91dci_atmelarm.c Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Mon Sep 10 12:25:57 2012 (r240313) +++ head/sys/dev/usb/controller/at91dci.c Mon Sep 10 13:50:34 2012 (r240314) @@ -740,7 +740,6 @@ at91dci_vbus_interrupt(struct at91dci_so { DPRINTFN(5, "vbus = %u\n", is_on); - USB_BUS_LOCK(&sc->sc_bus); if (is_on) { if (!sc->sc_flags.status_vbus) { sc->sc_flags.status_vbus = 1; @@ -760,7 +759,6 @@ at91dci_vbus_interrupt(struct at91dci_so at91dci_root_intr(sc); } } - USB_BUS_UNLOCK(&sc->sc_bus); } void Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/at91dci_atmelarm.c Mon Sep 10 12:25:57 2012 (r240313) +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Mon Sep 10 13:50:34 2012 (r240314) @@ -83,24 +83,18 @@ struct at91_udp_softc { struct at91_pmc_clock *sc_mclk; struct at91_pmc_clock *sc_iclk; struct at91_pmc_clock *sc_fclk; - struct resource *sc_vbus_irq_res; - void *sc_vbus_intr_hdl; + struct callout sc_vbus; }; static void at91_vbus_poll(struct at91_udp_softc *sc) { - uint32_t temp; uint8_t vbus_val; - /* XXX temporary clear interrupts here */ - - temp = at91_pio_gpio_clear_interrupt(VBUS_BASE); - - /* just forward it */ - vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK); at91dci_vbus_interrupt(&sc->sc_dci, vbus_val); + + callout_reset(&sc->sc_vbus, hz, (void *)&at91_vbus_poll, sc); } static void @@ -168,6 +162,8 @@ at91_udp_attach(device_t dev) USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); } + callout_init_mtx(&sc->sc_vbus, &sc->sc_dci.sc_bus.bus_mtx, 0); + /* * configure VBUS input pin, enable deglitch and enable * interrupt : @@ -175,7 +171,7 @@ at91_udp_attach(device_t dev) at91_pio_use_gpio(VBUS_BASE, VBUS_MASK); at91_pio_gpio_input(VBUS_BASE, VBUS_MASK); at91_pio_gpio_set_deglitch(VBUS_BASE, VBUS_MASK, 1); - at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 1); + at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 0); /* * configure PULLUP output pin : @@ -210,13 +206,6 @@ at91_udp_attach(device_t dev) if (!(sc->sc_dci.sc_irq_res)) { goto error; } - rid = 1; - sc->sc_vbus_irq_res = - bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); - if (sc->sc_vbus_irq_res == NULL) { - at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 0); - device_printf(dev, "No VBUS IRQ!\n"); - } sc->sc_dci.sc_bus.bdev = device_add_child(dev, "usbus", -1); if (!(sc->sc_dci.sc_bus.bdev)) { goto error; @@ -234,25 +223,7 @@ at91_udp_attach(device_t dev) sc->sc_dci.sc_intr_hdl = NULL; goto error; } -#if (__FreeBSD_version >= 700031) - if (sc->sc_vbus_irq_res != NULL) { - err = bus_setup_intr(dev, sc->sc_vbus_irq_res, - INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)at91_vbus_poll, sc, - &sc->sc_vbus_intr_hdl); - } -#else - if (sc->sc_vbus_irq_res != NULL) { - err = bus_setup_intr(dev, sc->sc_vbus_irq_res, - INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)at91_vbus_poll, sc, - &sc->sc_vbus_intr_hdl); - } -#endif - if (err) { - sc->sc_vbus_intr_hdl = NULL; - goto error; - } + err = at91dci_init(&sc->sc_dci); if (!err) { err = device_probe_and_attach(sc->sc_dci.sc_bus.bdev); @@ -261,7 +232,9 @@ at91_udp_attach(device_t dev) goto error; } else { /* poll VBUS one time */ + USB_BUS_LOCK(&sc->sc_dci.sc_bus); at91_vbus_poll(sc); + USB_BUS_UNLOCK(&sc->sc_dci.sc_bus); } return (0); @@ -285,6 +258,12 @@ at91_udp_detach(device_t dev) /* during module unload there are lots of children leftover */ device_delete_children(dev); + USB_BUS_LOCK(&sc->sc_dci.sc_bus); + callout_stop(&sc->sc_vbus); + USB_BUS_UNLOCK(&sc->sc_dci.sc_bus); + + callout_drain(&sc->sc_vbus); + /* disable Transceiver */ AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_TXVC, AT91_UDP_TXVC_DIS); @@ -292,19 +271,6 @@ at91_udp_detach(device_t dev) AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_IDR, 0xFFFFFFFF); AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_ICR, 0xFFFFFFFF); - /* disable VBUS interrupt */ - at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 0); - - if (sc->sc_vbus_irq_res && sc->sc_vbus_intr_hdl) { - err = bus_teardown_intr(dev, sc->sc_vbus_irq_res, - sc->sc_vbus_intr_hdl); - sc->sc_vbus_intr_hdl = NULL; - } - if (sc->sc_vbus_irq_res) { - bus_release_resource(dev, SYS_RES_IRQ, 1, - sc->sc_vbus_irq_res); - sc->sc_vbus_irq_res = NULL; - } if (sc->sc_dci.sc_irq_res && sc->sc_dci.sc_intr_hdl) { /* * only call at91_udp_uninit() after at91_udp_init() From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 14:11:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 539E71065672; Mon, 10 Sep 2012 14:11:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1BB8FC25; Mon, 10 Sep 2012 14:11:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AEBBK4065930; Mon, 10 Sep 2012 14:11:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AEBBZ4065928; Mon, 10 Sep 2012 14:11:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209101411.q8AEBBZ4065928@svn.freebsd.org> From: Eitan Adler Date: Mon, 10 Sep 2012 14:11: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: r240316 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 14:11:11 -0000 Author: eadler Date: Mon Sep 10 14:11:10 2012 New Revision: 240316 URL: http://svn.freebsd.org/changeset/base/240316 Log: We moved to subversion ages ago. Approved by: cperciva MFC after: 3 days Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon Sep 10 14:10:10 2012 (r240315) +++ head/MAINTAINERS Mon Sep 10 14:11:10 2012 (r240316) @@ -3,7 +3,7 @@ $FreeBSD$ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements are granted by core. These are documented in head/LOCKS and enforced -by CVSROOT/approvers. +by svnadmin/conf/approvers. The source tree is a community effort. However, some folks go to the trouble of looking after particular areas of the tree. In return for From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 16:11:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EF961065672; Mon, 10 Sep 2012 16:11:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 894FA8FC0A; Mon, 10 Sep 2012 16:11:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AGBUmY080642; Mon, 10 Sep 2012 16:11:30 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AGBUnD080637; Mon, 10 Sep 2012 16:11:30 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209101611.q8AGBUnD080637@svn.freebsd.org> From: Alan Cox Date: Mon, 10 Sep 2012 16:11: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: r240317 - in head/sys: amd64/amd64 i386/i386 i386/xen mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 16:11:30 -0000 Author: alc Date: Mon Sep 10 16:11:29 2012 New Revision: 240317 URL: http://svn.freebsd.org/changeset/base/240317 Log: Simplify pmap_unmapdev(). Since kmem_free() eventually calls pmap_remove(), pmap_unmapdev()'s own direct efforts to destroy the page table entries are redundant, so eliminate them. Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS. Setting PTE_W on MIPS is inconsistent with the implementation of this function on other architectures. Moreover, PTE_W should not be set, unless the pmap's wired mapping count is incremented, which pmap_kenter{,_attr}() doesn't do. MFC after: 10 days Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/mips/mips/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 10 14:11:10 2012 (r240316) +++ head/sys/amd64/amd64/pmap.c Mon Sep 10 16:11:29 2012 (r240317) @@ -4998,7 +4998,7 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - vm_offset_t base, offset, tmpva; + vm_offset_t base, offset; /* If we gave a direct map region in pmap_mapdev, do nothing */ if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) @@ -5006,9 +5006,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) - pmap_kremove(tmpva); - pmap_invalidate_range(kernel_pmap, va, tmpva); kmem_free(kernel_map, base, size); } Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Sep 10 14:11:10 2012 (r240316) +++ head/sys/i386/i386/pmap.c Mon Sep 10 16:11:29 2012 (r240317) @@ -5011,16 +5011,13 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - vm_offset_t base, offset, tmpva; + vm_offset_t base, offset; if (va >= KERNBASE && va + size <= KERNBASE + KERNLOAD) return; base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) - pmap_kremove(tmpva); - pmap_invalidate_range(kernel_pmap, va, tmpva); kmem_free(kernel_map, base, size); } Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Mon Sep 10 14:11:10 2012 (r240316) +++ head/sys/i386/xen/pmap.c Mon Sep 10 16:11:29 2012 (r240317) @@ -3989,18 +3989,13 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - vm_offset_t base, offset, tmpva; + vm_offset_t base, offset; if (va >= KERNBASE && va + size <= KERNBASE + KERNLOAD) return; base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - critical_enter(); - for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE) - pmap_kremove(tmpva); - pmap_invalidate_range(kernel_pmap, va, tmpva); - critical_exit(); kmem_free(kernel_map, base, size); } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Mon Sep 10 14:11:10 2012 (r240316) +++ head/sys/mips/mips/pmap.c Mon Sep 10 16:11:29 2012 (r240317) @@ -814,10 +814,10 @@ pmap_kenter_attr(vm_offset_t va, vm_padd #ifdef PMAP_DEBUG printf("pmap_kenter: va: %p -> pa: %p\n", (void *)va, (void *)pa); #endif - npte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | PTE_W | attr; pte = pmap_pte(kernel_pmap, va); opte = *pte; + npte = TLBLO_PA_TO_PFN(pa) | attr | PTE_D | PTE_V | PTE_G; *pte = npte; if (pte_test(&opte, PTE_V) && opte != npte) pmap_update_page(kernel_pmap, va, npte); @@ -2946,7 +2946,7 @@ void pmap_unmapdev(vm_offset_t va, vm_size_t size) { #ifndef __mips_n64 - vm_offset_t base, offset, tmpva; + vm_offset_t base, offset; /* If the address is within KSEG1 then there is nothing to do */ if (va >= MIPS_KSEG1_START && va <= MIPS_KSEG1_END) @@ -2955,8 +2955,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(size + offset, PAGE_SIZE); - for (tmpva = base; tmpva < base + size; tmpva += PAGE_SIZE) - pmap_kremove(tmpva); kmem_free(kernel_map, base, size); #endif } From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 16:19:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97DA3106564A; Mon, 10 Sep 2012 16:19:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78CEE8FC08; Mon, 10 Sep 2012 16:19:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AGJDPG081528; Mon, 10 Sep 2012 16:19:13 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AGJDES081526; Mon, 10 Sep 2012 16:19:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209101619.q8AGJDES081526@svn.freebsd.org> From: Eitan Adler Date: Mon, 10 Sep 2012 16:19: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: r240318 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 16:19:13 -0000 Author: eadler Date: Mon Sep 10 16:19:12 2012 New Revision: 240318 URL: http://svn.freebsd.org/changeset/base/240318 Log: Update a few more teams and hats with new members. Remove explicit re${arch} teams as they are not listed anywhere else. MFC after: 3 days X-MFC-With: r240294 Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Sep 10 16:11:29 2012 (r240317) +++ head/share/misc/organization.dot Mon Sep 10 16:19:12 2012 (r240318) @@ -26,22 +26,15 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted core [label="Core Team\ncore@FreeBSD.org\ntabthorpe, gavin, jhb, kib,\ntheraven, attilio, hrs,\npeter, miwi"] -coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\ngavin"] +coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\npgj"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nmux, bmah, hrs, kensmith,\nmurray, rwatson, dwhite"] -realpha [label="FreeBSD/alpha Release Engineering Team\nre-alpha@FreeBSD.org\nwilko, murray, rwatson"] -reamd64 [label="FreeBSD/amd64 Release Engineering Team\nre-amd64@FreeBSD.org\nobrien"] -rei386 [label="FreeBSD/i386 Release Engineering Team\nre-i386@FreeBSD.org\nmurray, rwatson"] -reia64 [label="FreeBSD/ia64 Release Engineering Team\nre-ia64@FreeBSD.org\nmarcel"] -repc98 [label="FreeBSD/pc98 Release Engineering Team\nre-pc98@FreeBSD.org\nnyan"] -reppc [label="FreeBSD/ppc Release Engineering Team\nre-ppc@FreeBSD.org\ngrehan"] -resparc64 [label="FreeBSD/sparc64 Release Engineering Team\nre-sparc64@FreeBSD.org\njake, phk, tmm, obrien,\nkensmith, murray, rwatson"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, hrs, kensmith,\nrwatson, bz"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] -portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\n"] +portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\nmiwi, rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] @@ -105,14 +98,6 @@ doceng -> doccommitters portmgr -> portmgrsecretary portmgr -> portscommitters -re -> realpha -re -> reamd64 -re -> rei386 -re -> reia64 -re -> repc98 -re -> reppc -re -> resparc64 - securityofficer -> secteam securityofficer -> portssecteam From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 16:27:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 175EB106564A; Mon, 10 Sep 2012 16:27:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01B188FC15; Mon, 10 Sep 2012 16:27:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AGRJ3j082599; Mon, 10 Sep 2012 16:27:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AGRJTg082597; Mon, 10 Sep 2012 16:27:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209101627.q8AGRJTg082597@svn.freebsd.org> From: Alan Cox Date: Mon, 10 Sep 2012 16:27: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: r240321 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 16:27:20 -0000 Author: alc Date: Mon Sep 10 16:27:19 2012 New Revision: 240321 URL: http://svn.freebsd.org/changeset/base/240321 Log: Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap. Revise some comments. The file vm/vm_param.h includes the file machine/vmparam.h, so there is no need to directly include it. Tested by: andrew Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Sep 10 16:25:52 2012 (r240320) +++ head/sys/arm/arm/pmap-v6.c Mon Sep 10 16:27:19 2012 (r240321) @@ -153,10 +153,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include @@ -164,12 +166,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -400,6 +400,7 @@ static vm_offset_t pmap_kernel_l2ptp_kva static vm_paddr_t pmap_kernel_l2ptp_phys; static struct vm_object pvzone_obj; static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0; +static struct rwlock pvh_global_lock; int l1_mem_types[] = { ARM_L1S_STRONG_ORD, @@ -613,7 +614,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse l1idx = L1_IDX(va); PMAP_ASSERT_LOCKED(pm); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if ((l2 = pm->pm_l2[L2_IDX(l1idx)]) == NULL) { /* * No mapping at this address, as there is @@ -622,19 +623,19 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse */ again_l2table: PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); if ((l2 = pmap_alloc_l2_dtable()) == NULL) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); return (NULL); } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (pm->pm_l2[L2_IDX(l1idx)] != NULL) { PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); uma_zfree(l2table_zone, l2); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); l2 = pm->pm_l2[L2_IDX(l1idx)]; if (l2 == NULL) @@ -666,16 +667,16 @@ again_l2table: */ again_ptep: PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); ptep = (void*)uma_zalloc(l2zone, M_NOWAIT|M_USE_RESERVE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (l2b->l2b_kva != 0) { /* We lost the race. */ PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); uma_zfree(l2zone, ptep); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); if (l2b->l2b_kva == 0) goto again_ptep; @@ -851,7 +852,7 @@ pmap_clearbit(struct vm_page *pg, u_int u_int oflags; int count = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (maskbits & PVF_WRITE) maskbits |= PVF_MOD; @@ -861,7 +862,7 @@ pmap_clearbit(struct vm_page *pg, u_int pg->md.pvh_attrs &= ~(maskbits & (PVF_MOD | PVF_REF)); if (TAILQ_EMPTY(&pg->md.pv_list)) { - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (0); } @@ -917,7 +918,7 @@ pmap_clearbit(struct vm_page *pg, u_int if (maskbits & PVF_WRITE) vm_page_aflag_clear(pg, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -927,15 +928,15 @@ pmap_clearbit(struct vm_page *pg, u_int * pmap_remove_pv: remove a mappiing from a vm_page list * * NOTE: pmap_enter_pv expects to lock the pvh itself - * pmap_remove_pv expects te caller to lock the pvh before calling + * pmap_remove_pv expects the caller to lock the pvh before calling */ /* - * pmap_enter_pv: enter a mapping onto a vm_page lst + * pmap_enter_pv: enter a mapping onto a vm_page's PV list * - * => caller should hold the proper lock on pmap_main_lock + * => caller should hold the proper lock on pvh_global_lock * => caller should have pmap locked - * => we will gain the lock on the vm_page and allocate the new pv_entry + * => we will (someday) gain the lock on the vm_page's PV list * => caller should adjust ptp's wire_count before calling * => caller should not adjust pmap's wire_count */ @@ -944,7 +945,7 @@ pmap_enter_pv(struct vm_page *pg, struct vm_offset_t va, u_int flags) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_ASSERT_LOCKED(pm); pve->pv_pmap = pm; @@ -970,7 +971,7 @@ pmap_find_pv(struct vm_page *pg, pmap_t { struct pv_entry *pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pg->md.pv_list, pv_list) if (pm == pv->pv_pmap && va == pv->pv_va) break; @@ -1031,7 +1032,7 @@ static void pmap_nuke_pv(struct vm_page *pg, pmap_t pm, struct pv_entry *pve) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_ASSERT_LOCKED(pm); TAILQ_REMOVE(&pg->md.pv_list, pve, pv_list); @@ -1064,7 +1065,7 @@ pmap_remove_pv(struct vm_page *pg, pmap_ { struct pv_entry *pve; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pve = TAILQ_FIRST(&pg->md.pv_list); while (pve) { @@ -1096,7 +1097,7 @@ pmap_modify_pv(struct vm_page *pg, pmap_ u_int flags, oflags; PMAP_ASSERT_LOCKED(pm); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if ((npv = pmap_find_pv(pg, pm, va)) == NULL) return (0); @@ -1210,7 +1211,7 @@ pmap_fault_fixup(pmap_t pm, vm_offset_t int rv = 0; l1idx = L1_IDX(va); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); /* @@ -1374,7 +1375,7 @@ pmap_fault_fixup(pmap_t pm, vm_offset_t rv = 1; out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); return (rv); } @@ -1682,6 +1683,11 @@ pmap_bootstrap(vm_offset_t firstaddr, vm TAILQ_INIT(&kernel_pmap->pm_pvlist); /* + * Initialize the global pv list lock. + */ + rw_init_flags(&pvh_global_lock, "pmap pv global", RW_RECURSE); + + /* * Reserve some special page table entries/VA space for temporary * mapping of pages. */ @@ -1946,7 +1952,7 @@ pmap_remove_pages(pmap_t pmap) vm_page_t m; pt_entry_t *pt; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { if (pv->pv_flags & PVF_WIRED) { @@ -1969,7 +1975,7 @@ pmap_remove_pages(pmap_t pmap) pmap_free_pv_entry(pv); pmap_free_l2_bucket(pmap, l2b, 1); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); cpu_tlb_flushID(); cpu_cpwait(); PMAP_UNLOCK(pmap); @@ -2326,7 +2332,7 @@ pmap_remove_all(vm_page_t m) if (TAILQ_EMPTY(&m->md.pv_list)) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); pmap_remove_write(m); curpm = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { @@ -2356,7 +2362,7 @@ pmap_remove_all(vm_page_t m) cpu_tlb_flushD(); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } int @@ -2444,7 +2450,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); /* @@ -2506,7 +2512,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, if (PV_BEEN_REFD(flags)) cpu_tlb_flushD(); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pm); } @@ -2530,11 +2536,11 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t prot, boolean_t wired) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, m, prot, wired, M_WAITOK); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2554,7 +2560,7 @@ pmap_enter_locked(pmap_t pmap, vm_offset u_char user; PMAP_ASSERT_LOCKED(pmap); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if (va == vector_page) { pa = systempage.pv_pa; m = NULL; @@ -2594,9 +2600,9 @@ do_l2b_alloc: if (l2b == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); goto do_l2b_alloc; } @@ -2789,7 +2795,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_locked(pmap, start + ptoa(diff), m, prot & @@ -2797,7 +2803,7 @@ pmap_enter_object(pmap_t pmap, vm_offset m = TAILQ_NEXT(m, listq); } PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2813,12 +2819,12 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE, M_NOWAIT); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2835,7 +2841,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse pt_entry_t *ptep, pte; vm_page_t pg; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); l2b = pmap_get_l2_bucket(pmap, va); KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); @@ -2844,7 +2850,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse pg = PHYS_TO_VM_PAGE(l2pte_pa(pte)); if (pg) pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3091,7 +3097,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, * we lock in the pmap => pv_head direction */ - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pm); total = 0; while (sva < eva) { @@ -3170,7 +3176,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, pmap_free_l2_bucket(pm, l2b, mappings); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); if (flushall) cpu_tlb_flushID(); PMAP_UNLOCK(pm); @@ -3323,7 +3329,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pv->pv_pmap == pmap) { rv = TRUE; @@ -3334,7 +3340,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -3353,11 +3359,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->flags & PG_FICTITIOUS) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) if ((pv->pv_flags & PVF_WIRED) != 0) count++; - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 16:32:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1664E106566B; Mon, 10 Sep 2012 16:32:29 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 013ED8FC1B; Mon, 10 Sep 2012 16:32:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AGWSKD083279; Mon, 10 Sep 2012 16:32:28 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AGWS83083277; Mon, 10 Sep 2012 16:32:28 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201209101632.q8AGWS83083277@svn.freebsd.org> From: Fabien Thomas Date: Mon, 10 Sep 2012 16:32: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: r240323 - head/tools/test/hwpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 16:32:29 -0000 Author: fabient Date: Mon Sep 10 16:32:28 2012 New Revision: 240323 URL: http://svn.freebsd.org/changeset/base/240323 Log: Add SOFT as a possible section to exclude from counter list. Modified: head/tools/test/hwpmc/pmctest.py Modified: head/tools/test/hwpmc/pmctest.py ============================================================================== --- head/tools/test/hwpmc/pmctest.py Mon Sep 10 16:28:45 2012 (r240322) +++ head/tools/test/hwpmc/pmctest.py Mon Sep 10 16:32:28 2012 (r240323) @@ -53,7 +53,7 @@ from subprocess import PIPE # A list of strings that are not really counters, just # name tags that are output by pmccontrol -L -notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP"] +notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ] def main(): From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 16:51:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBE4106566B; Mon, 10 Sep 2012 16:51:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEB438FC17; Mon, 10 Sep 2012 16:51:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AGphKq085485; Mon, 10 Sep 2012 16:51:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AGphHq085483; Mon, 10 Sep 2012 16:51:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209101651.q8AGphHq085483@svn.freebsd.org> From: Eitan Adler Date: Mon, 10 Sep 2012 16:51: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: r240324 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 16:51:44 -0000 Author: eadler Date: Mon Sep 10 16:51:43 2012 New Revision: 240324 URL: http://svn.freebsd.org/changeset/base/240324 Log: hrs has yet to create clones of himself MFC after: 3 days X-MFC-With: r240318, r240294 Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Sep 10 16:32:28 2012 (r240323) +++ head/share/misc/organization.dot Mon Sep 10 16:51:43 2012 (r240324) @@ -32,7 +32,7 @@ doceng [label="Documentation Engineering portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, hrs, kensmith,\nrwatson, bz"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith,\nrwatson, bz"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\nmiwi, rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 18:49:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC0B01065700; Mon, 10 Sep 2012 18:49:50 +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 A4B578FC15; Mon, 10 Sep 2012 18:49:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8AInoil000806; Mon, 10 Sep 2012 18:49:50 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8AIno0S000792; Mon, 10 Sep 2012 18:49:50 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209101849.q8AIno0S000792@svn.freebsd.org> From: John Baldwin Date: Mon, 10 Sep 2012 18:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240325 - in head/sys: cam/scsi compat/netbsd conf dev/ct dev/ncv dev/nsp dev/stg X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 18:49:50 -0000 Author: jhb Date: Mon Sep 10 18:49:49 2012 New Revision: 240325 URL: http://svn.freebsd.org/changeset/base/240325 Log: Remove some more NetBSD compat shims and other unused bits from these drivers: - Remove scsi_low_pisa.*, they were unused. - Remove and calls to the stubs in that header. They were empty nops. - Retire sl_xname and use device_get_nameunit() and device_printf() with the underlying device_t instead. - Remove unused {ct,ncv,nsp,stg}print() functions. - Remove empty SOFT_INTR_REQUIRED() macro and the unused sl_irq member. Deleted: head/sys/cam/scsi/scsi_low_pisa.c head/sys/cam/scsi/scsi_low_pisa.h head/sys/compat/netbsd/physio_proc.h Modified: head/sys/cam/scsi/scsi_low.c head/sys/cam/scsi/scsi_low.h head/sys/conf/files head/sys/dev/ct/bshw_machdep.c head/sys/dev/ct/ct.c head/sys/dev/ct/ct_isa.c head/sys/dev/ct/ct_machdep.h head/sys/dev/ct/ctvar.h head/sys/dev/ncv/ncr53c500.c head/sys/dev/ncv/ncr53c500_pccard.c head/sys/dev/ncv/ncr53c500hw.h head/sys/dev/ncv/ncr53c500var.h head/sys/dev/nsp/nsp.c head/sys/dev/nsp/nsp_pccard.c head/sys/dev/nsp/nspvar.h head/sys/dev/stg/tmc18c30.c head/sys/dev/stg/tmc18c30_isa.c head/sys/dev/stg/tmc18c30_pccard.c head/sys/dev/stg/tmc18c30_pci.c head/sys/dev/stg/tmc18c30_subr.c head/sys/dev/stg/tmc18c30var.h Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/cam/scsi/scsi_low.c Mon Sep 10 18:49:49 2012 (r240325) @@ -157,7 +157,7 @@ static struct scsi_low_softc_tab sl_tab #ifdef SCSI_LOW_INFO_DETAIL #define SCSI_LOW_INFO(slp, ti, s) scsi_low_info((slp), (ti), (s)) #else /* !SCSI_LOW_INFO_DETAIL */ -#define SCSI_LOW_INFO(slp, ti, s) printf("%s: %s\n", (slp)->sl_xname, (s)) +#define SCSI_LOW_INFO(slp, ti, s) device_printf((slp)->sl_dev, "%s\n", (s)) #endif /* !SCSI_LOW_INFO_DETAIL */ #ifdef SCSI_LOW_STATICS @@ -439,8 +439,9 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DEBUG if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_ACTION, target) != 0) { - printf("%s: cam_action: func code 0x%x target: %d, lun: %d\n", - slp->sl_xname, ccb->ccb_h.func_code, target, lun); + device_printf(slp->sl_dev, + "cam_action: func code 0x%x target: %d, lun: %d\n", + ccb->ccb_h.func_code, target, lun); } #endif /* SCSI_LOW_DEBUG */ @@ -449,7 +450,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD) { - printf("%s: invalid target/lun\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target/lun\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -502,7 +503,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD) { - printf("%s: invalid target/lun\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target/lun\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -530,7 +531,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD) { - printf("%s: invalid target\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -603,7 +604,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD) { - printf("%s: invalid target\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -624,8 +625,8 @@ scsi_low_scsi_action_cam(sim, ccb) if (li->li_flags_valid != SCSI_LOW_LUN_FLAGS_ALL_VALID) { ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - printf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "invalid GET_TRANS_CURRENT_SETTINGS call\n"); goto settings_out; } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -687,7 +688,7 @@ settings_out: #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD) { - printf("%s: invalid target\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -767,9 +768,6 @@ scsi_low_attach_cam(slp) struct cam_devq *devq; int tagged_openings; - sprintf(slp->sl_xname, "%s%d", - device_get_name(slp->sl_dev), device_get_unit(slp->sl_dev)); - devq = cam_simq_alloc(SCSI_LOW_NCCB); if (devq == NULL) return (ENOMEM); @@ -890,8 +888,8 @@ scsi_low_done_cam(slp, cb) (scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] & SCSI_LOW_CMD_ABORT_WARNING) != 0) { - printf("%s: WARNING: scsi_low IO abort\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "WARNING: scsi_low IO abort\n"); scsi_low_print(slp, NULL); } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -1203,7 +1201,7 @@ scsi_low_alloc_ti(slp, targ) ti = SCSI_LOW_MALLOC(slp->sl_targsize); if (ti == NULL) - panic("%s short of memory", slp->sl_xname); + panic("%s short of memory", device_get_nameunit(slp->sl_dev)); bzero(ti, slp->sl_targsize); ti->ti_id = targ; @@ -1310,7 +1308,8 @@ scsi_low_timeout_check(slp) cb->ccb_flags |= CCB_NORETRY; cb->ccb_error |= SELTIMEOUTIO; if (scsi_low_revoke_ccb(slp, cb, 1) != NULL) - panic("%s: ccb not finished", slp->sl_xname); + panic("%s: ccb not finished", + device_get_nameunit(slp->sl_dev)); } if (slp->sl_Tnexus == NULL) @@ -1393,7 +1392,7 @@ step1: bus_reset: cb->ccb_error |= TIMEOUTIO; - printf("%s: slccb (0x%lx) timeout!\n", slp->sl_xname, (u_long) cb); + device_printf(slp->sl_dev, "slccb (0x%lx) timeout!\n", (u_long) cb); scsi_low_info(slp, NULL, "scsi bus hangup. try to recover."); scsi_low_init(slp, SCSI_LOW_RESTART_HARD); scsi_low_start(slp); @@ -1434,7 +1433,8 @@ scsi_low_abort_ccb(slp, cb) else if ((cb->ccb_flags & CCB_DISCQ) != 0) { if (scsi_low_revoke_ccb(slp, cb, 0) == NULL) - panic("%s: revoked ccb done", slp->sl_xname); + panic("%s: revoked ccb done", + device_get_nameunit(slp->sl_dev)); cb->ccb_flags |= CCB_STARTQ; TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain); @@ -1445,7 +1445,8 @@ scsi_low_abort_ccb(slp, cb) else { if (scsi_low_revoke_ccb(slp, cb, 1) != NULL) - panic("%s: revoked ccb retried", slp->sl_xname); + panic("%s: revoked ccb retried", + device_get_nameunit(slp->sl_dev)); } return 0; } @@ -1509,8 +1510,8 @@ scsi_low_attach(slp, openings, ntargs, n if (rv != 0) { splx(s); - printf("%s: scsi_low_attach: osdep attach failed\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi_low_attach: osdep attach failed\n"); return EINVAL; } @@ -1519,8 +1520,8 @@ scsi_low_attach(slp, openings, ntargs, n if (scsi_low_init(slp, SCSI_LOW_RESTART_HARD) != 0) { splx(s); - printf("%s: scsi_low_attach: initialization failed\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi_low_attach: initialization failed\n"); return EINVAL; } @@ -1735,7 +1736,7 @@ scsi_low_setup_start(slp, ti, li, cb) return SCSI_LOW_START_QTAG; default: - panic("%s: no setup phase", slp->sl_xname); + panic("%s: no setup phase", device_get_nameunit(slp->sl_dev)); } return SCSI_LOW_START_NO_QTAG; @@ -1791,7 +1792,7 @@ scsi_low_start(slp) if (slp->sl_Tnexus || slp->sl_Lnexus || slp->sl_Qnexus) { scsi_low_info(slp, NULL, "NEXUS INCOSISTENT"); - panic("%s: inconsistent", slp->sl_xname); + panic("%s: inconsistent", device_get_nameunit(slp->sl_dev)); } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -1928,7 +1929,7 @@ scsi_low_arbit_fail(slp, cb) if (slp->sl_disc == 0) { #ifdef SCSI_LOW_DIAGNOSTIC - printf("%s: try selection again\n", slp->sl_xname); + device_printf(slp->sl_dev, "try selection again\n"); #endif /* SCSI_LOW_DIAGNOSTIC */ slp->sl_retry_sel = 1; } @@ -2356,7 +2357,7 @@ scsi_low_bus_reset(slp) (*slp->sl_funcs->scsi_low_bus_reset) (slp); - printf("%s: try to reset scsi bus ", slp->sl_xname); + device_printf(slp->sl_dev, "try to reset scsi bus "); for (i = 0; i <= SCSI2_RESET_DELAY / TWIDDLEWAIT ; i++) scsi_low_twiddle_wait(); cnputc('\b'); @@ -2372,7 +2373,7 @@ scsi_low_restart(slp, flags, s) int error; if (s != NULL) - printf("%s: scsi bus restart. reason: %s\n", slp->sl_xname, s); + device_printf(slp->sl_dev, "scsi bus restart. reason: %s\n", s); if ((error = scsi_low_init(slp, flags)) != 0) return error; @@ -2411,8 +2412,8 @@ found: #ifdef SCSI_LOW_DEBUG if (SCSI_LOW_DEBUG_TEST_GO(SCSI_LOW_NEXUS_CHECK, ti->ti_id) != 0) { - printf("%s: nexus(0x%lx) abort check start\n", - slp->sl_xname, (u_long) cb); + device_printf(slp->sl_dev, "nexus(0x%lx) abort check start\n", + (u_long) cb); cb->ccb_flags |= (CCB_NORETRY | CCB_SILENT); scsi_low_revoke_ccb(slp, cb, 1); return NULL; @@ -2514,7 +2515,7 @@ scsi_low_reselected(slp, targ) return ti; world_restart: - printf("%s: reselect(%x:unknown) %s\n", slp->sl_xname, targ, s); + device_printf(slp->sl_dev, "reselect(%x:unknown) %s\n", targ, s); scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, "reselect: scsi world confused"); return NULL; @@ -2894,7 +2895,7 @@ scsi_low_errfunc_qtag(slp, msgflags) slp->sl_Lnexus->li_cfgflags &= ~SCSI_LOW_QTAG; scsi_low_calcf_lun(slp->sl_Lnexus); } - printf("%s: scsi_low: qtag msg rejected\n", slp->sl_xname); + device_printf(slp->sl_dev, "scsi_low: qtag msg rejected\n"); } return 0; } @@ -2920,7 +2921,7 @@ scsi_low_msgout(slp, ti, fl) slp->sl_ph_count ++; if (slp->sl_ph_count > SCSI_LOW_MAX_PHCHANGES) { - printf("%s: too many phase changes\n", slp->sl_xname); + device_printf(slp->sl_dev, "too many phase changes\n"); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 0); } @@ -2945,7 +2946,7 @@ scsi_low_msgout(slp, ti, fl) ti->ti_msgflags |= ti->ti_omsgflags; ti->ti_omsgflags = 0; #ifdef SCSI_LOW_DIAGNOSTIC - printf("%s: scsi_low_msgout: retry msgout\n", slp->sl_xname); + device_printf(slp->sl_dev, "scsi_low_msgout: retry msgout\n"); #endif /* SCSI_LOW_DIAGNOSTIC */ } @@ -3020,7 +3021,7 @@ scsi_low_msginfunc_rejop(slp) struct targ_info *ti = slp->sl_Tnexus; u_int8_t msg = ti->ti_msgin[0]; - printf("%s: MSGIN: msg 0x%x rejected\n", slp->sl_xname, (u_int) msg); + device_printf(slp->sl_dev, "MSGIN: msg 0x%x rejected\n", (u_int) msg); scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_REJECT, 0); return 0; } @@ -3128,7 +3129,8 @@ cmd_link_start: cb->ccb_tag = SCSI_LOW_UNKTAG; cb->ccb_otag = SCSI_LOW_UNKTAG; if (scsi_low_done(slp, cb) == SCSI_LOW_DONE_RETRY) - panic("%s: linked ccb retried", slp->sl_xname); + panic("%s: linked ccb retried", + device_get_nameunit(slp->sl_dev)); slp->sl_Qnexus = ncb; slp->sl_ph_count = 0; @@ -3220,8 +3222,8 @@ scsi_low_synch(slp) */ ti->ti_maxsynch.period = 0; ti->ti_maxsynch.offset = 0; - printf("%s: target brain damaged. async transfer\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "target brain damaged. async transfer\n"); return EINVAL; } @@ -3236,8 +3238,8 @@ scsi_low_synch(slp) * for our adapter. * The adapter changes max synch and max offset. */ - printf("%s: synch neg failed. retry synch msg neg ...\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "synch neg failed. retry synch msg neg ...\n"); return error; } @@ -3257,8 +3259,9 @@ scsi_low_synch(slp) return 0; #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */ - printf("%s(%d:*): <%s> offset %d period %dns ", - slp->sl_xname, ti->ti_id, s, offset, period * 4); + device_printf(slp->sl_dev, + "(%d:*): <%s> offset %d period %dns ", + ti->ti_id, s, offset, period * 4); if (period != 0) { @@ -3285,8 +3288,8 @@ scsi_low_wide(slp) * Current width is not acceptable for our adapter. * The adapter changes max width. */ - printf("%s: wide neg failed. retry wide msg neg ...\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "wide neg failed. retry wide msg neg ...\n"); return error; } @@ -3307,8 +3310,8 @@ scsi_low_wide(slp) return 0; #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */ - printf("%s(%d:*): transfer width %d bits\n", - slp->sl_xname, ti->ti_id, 1 << (3 + ti->ti_width)); + device_printf(slp->sl_dev, "(%d:*): transfer width %d bits\n", + ti->ti_id, 1 << (3 + ti->ti_width)); } return 0; } @@ -3452,8 +3455,8 @@ scsi_low_msginfunc_msg_reject(slp) if (ti->ti_emsgflags != 0) { - printf("%s: msg flags [0x%x] rejected\n", - slp->sl_xname, ti->ti_emsgflags); + device_printf(slp->sl_dev, "msg flags [0x%x] rejected\n", + ti->ti_emsgflags); msgflags = SCSI_LOW_MSG_REJECT; mdp = &scsi_low_msgout_data[0]; for ( ; mdp->md_flags != SCSI_LOW_MSG_ALL; mdp ++) @@ -3505,7 +3508,7 @@ scsi_low_msgin(slp, ti, c) slp->sl_ph_count ++; if (slp->sl_ph_count > SCSI_LOW_MAX_PHCHANGES) { - printf("%s: too many phase changes\n", slp->sl_xname); + device_printf(slp->sl_dev, "too many phase changes\n"); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 0); } @@ -3798,7 +3801,8 @@ scsi_low_revoke_ccb(slp, cb, fdone) if ((cb->ccb_flags & (CCB_STARTQ | CCB_DISCQ)) == (CCB_STARTQ | CCB_DISCQ)) { - panic("%s: ccb in both queue", slp->sl_xname); + panic("%s: ccb in both queue", + device_get_nameunit(slp->sl_dev)); } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -3825,7 +3829,8 @@ scsi_low_revoke_ccb(slp, cb, fdone) cb->ccb_error |= FATALIO; cb->ccb_flags &= ~CCB_AUTOSENSE; if (scsi_low_done(slp, cb) != SCSI_LOW_DONE_COMPLETE) - panic("%s: done ccb retried", slp->sl_xname); + panic("%s: done ccb retried", + device_get_nameunit(slp->sl_dev)); return NULL; } else @@ -3992,8 +3997,9 @@ scsi_low_calcf_target(ti) #ifdef SCSI_LOW_DEBUG if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_CALCF, ti->ti_id) != 0) { - printf("%s(%d:*): max period(%dns) offset(%d) width(%d)\n", - slp->sl_xname, ti->ti_id, + device_printf(slp->sl_dev, + "(%d:*): max period(%dns) offset(%d) width(%d)\n", + ti->ti_id, ti->ti_maxsynch.period * 4, ti->ti_maxsynch.offset, ti->ti_width); @@ -4008,8 +4014,9 @@ scsi_low_calcf_show(li) struct targ_info *ti = li->li_ti; struct scsi_low_softc *slp = ti->ti_sc; - printf("%s(%d:%d): period(%d ns) offset(%d) width(%d) flags 0x%b\n", - slp->sl_xname, ti->ti_id, li->li_lun, + device_printf(slp->sl_dev, + "(%d:%d): period(%d ns) offset(%d) width(%d) flags 0x%b\n", + ti->ti_id, li->li_lun, ti->ti_maxsynch.period * 4, ti->ti_maxsynch.offset, ti->ti_width, @@ -4031,7 +4038,7 @@ scsi_low_start_up(slp) struct slccb *cb; int target, lun; - printf("%s: scsi_low: probing all devices ....\n", slp->sl_xname); + device_printf(slp->sl_dev, "scsi_low: probing all devices ....\n"); for (target = 0; target < slp->sl_ntargs; target ++) { @@ -4039,16 +4046,17 @@ scsi_low_start_up(slp) { if ((slp->sl_show_result & SHOW_PROBE_RES) != 0) { - printf("%s: scsi_low: target %d (host card)\n", - slp->sl_xname, target); + device_printf(slp->sl_dev, + "scsi_low: target %d (host card)\n", + target); } continue; } if ((slp->sl_show_result & SHOW_PROBE_RES) != 0) { - printf("%s: scsi_low: target %d lun ", - slp->sl_xname, target); + device_printf(slp->sl_dev, "scsi_low: target %d lun ", + target); } ti = slp->sl_ti[target]; @@ -4125,8 +4133,8 @@ scsi_low_test_abort(slp, ti, li) acb = TAILQ_FIRST(&li->li_discq); if (scsi_low_abort_ccb(slp, acb) == 0) { - printf("%s: aborting ccb(0x%lx) start\n", - slp->sl_xname, (u_long) acb); + device_printf(slp->sl_dev, + "aborting ccb(0x%lx) start\n", (u_long) acb); } } } @@ -4141,7 +4149,7 @@ scsi_low_test_atten(slp, ti, msg) if (slp->sl_ph_count < SCSI_LOW_MAX_ATTEN_CHECK) scsi_low_assert_msg(slp, ti, msg, 0); else - printf("%s: atten check OK\n", slp->sl_xname); + device_printf(slp->sl_dev, "atten check OK\n"); } static void @@ -4216,9 +4224,9 @@ scsi_low_print(slp, ti) } sp = &slp->sl_scp; - printf("%s: === NEXUS T(0x%lx) L(0x%lx) Q(0x%lx) NIO(%d) ===\n", - slp->sl_xname, (u_long) ti, (u_long) li, (u_long) cb, - slp->sl_nio); + device_printf(slp->sl_dev, + "=== NEXUS T(0x%lx) L(0x%lx) Q(0x%lx) NIO(%d) ===\n", + (u_long) ti, (u_long) li, (u_long) cb, slp->sl_nio); /* target stat */ if (ti != NULL) @@ -4234,8 +4242,8 @@ scsi_low_print(slp, ti) nqio = li->li_nqio; } - printf("%s(%d:%d) ph<%s> => ph<%s> DISC(%d) QIO(%d:%d)\n", - slp->sl_xname, + device_printf(slp->sl_dev, + "(%d:%d) ph<%s> => ph<%s> DISC(%d) QIO(%d:%d)\n", ti->ti_id, lun, phase[(int) ti->ti_ophase], phase[(int) ti->ti_phase], ti->ti_disc, nqio, maxnqio); Modified: head/sys/cam/scsi/scsi_low.h ============================================================================== --- head/sys/cam/scsi/scsi_low.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/cam/scsi/scsi_low.h Mon Sep 10 18:49:49 2012 (r240325) @@ -83,12 +83,6 @@ struct scsi_low_osdep_interface { #endif }; -struct scsi_low_osdep_targ_interface { -}; - -struct scsi_low_osdep_lun_interface { -}; - /******** os depend interface functions *************/ struct slccb; struct scsi_low_softc; @@ -252,8 +246,6 @@ TAILQ_HEAD(targ_info_tab, targ_info); LIST_HEAD(lun_info_tab, lun_info); struct lun_info { - struct scsi_low_osdep_lun_interface li_sloi; - int li_lun; struct targ_info *li_ti; /* my target */ @@ -340,8 +332,6 @@ struct scsi_low_msg_log { }; struct targ_info { - struct scsi_low_osdep_targ_interface ti_slti; - TAILQ_ENTRY(targ_info) ti_chain; /* targ_info link */ struct scsi_low_softc *ti_sc; /* our softc */ @@ -500,7 +490,6 @@ struct scsi_low_softc { struct scsi_low_osdep_interface sl_si; #define sl_dev sl_si.si_dev struct scsi_low_osdep_funcs *sl_osdep_fp; - u_char sl_xname[16]; /* our chain */ LIST_ENTRY(scsi_low_softc) sl_chain; @@ -605,10 +594,6 @@ struct scsi_low_softc { /* targinfo size */ int sl_targsize; - -#if defined(i386) || defined(__i386__) - u_int sl_irq; /* XXX */ -#endif /* i386 */ }; /************************************************* Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/conf/files Mon Sep 10 18:49:49 2012 (r240325) @@ -130,7 +130,6 @@ cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ct | ncv | nsp | stg -cam/scsi/scsi_low_pisa.c optional ct | ncv | nsp | stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa Modified: head/sys/dev/ct/bshw_machdep.c ============================================================================== --- head/sys/dev/ct/bshw_machdep.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/bshw_machdep.c Mon Sep 10 18:49:49 2012 (r240325) @@ -53,9 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include /* XXX: Hack */ #include #include @@ -115,8 +113,9 @@ bshw_bus_reset(ct) /* open hardware busmaster mode */ if (hw->hw_dma_init != NULL && ((*hw->hw_dma_init)(ct)) != 0) { - printf("%s: change mode using external DMA (%x)\n", - slp->sl_xname, (u_int)ct_cr_read_1(chp, 0x37)); + device_printf(slp->sl_dev, + "change mode using external DMA (%x)\n", + (u_int)ct_cr_read_1(chp, 0x37)); } /* clear hardware synch registers */ @@ -240,7 +239,7 @@ bshw_lc_smit_fstat(ct, wc, read) } } - printf("%s: SMIT fifo status timeout\n", ct->sc_sclow.sl_xname); + device_printf(ct->sc_sclow.sl_dev, "SMIT fifo status timeout\n"); return EIO; } @@ -279,14 +278,15 @@ bshw_smit_xfer_stop(ct) else if (count > bs->sc_sdatalen) { bad: - printf("%s: smit_xfer_end: cnt error\n", slp->sl_xname); + device_printf(slp->sl_dev, + "smit_xfer_end: cnt error\n"); slp->sl_error |= PDMAERR; } scsi_low_data_finish(slp); } else { - printf("%s: smit_xfer_end: phase miss\n", slp->sl_xname); + device_printf(slp->sl_dev, "smit_xfer_end: phase miss\n"); slp->sl_error |= PDMAERR; } } @@ -488,8 +488,9 @@ bshw_dma_xfer_stop(ct) } else if (count > (u_int) bs->sc_seglen) { - printf("%s: port data %x != seglen %x\n", - slp->sl_xname, count, bs->sc_seglen); + device_printf(slp->sl_dev, + "port data %x != seglen %x\n", + count, bs->sc_seglen); slp->sl_error |= PDMAERR; } @@ -497,7 +498,7 @@ bshw_dma_xfer_stop(ct) } else { - printf("%s: extra DMA interrupt\n", slp->sl_xname); + device_printf(slp->sl_dev, "extra DMA interrupt\n"); slp->sl_error |= PDMAERR; } Modified: head/sys/dev/ct/ct.c ============================================================================== --- head/sys/dev/ct/ct.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ct.c Mon Sep 10 18:49:49 2012 (r240325) @@ -50,9 +50,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include - #include #include @@ -348,17 +345,6 @@ ctprobesubr(chp, dvcfg, hsid, chipclk, c return 1; } -int -ctprint(aux, name) - void *aux; - const char *name; -{ - - if (name != NULL) - printf("%s: scsibus ", name); - return 1; -} - void ctattachsubr(ct) struct ct_softc *ct; @@ -480,7 +466,6 @@ ct_world_start(ct, fdone) scsi_low_bus_reset(slp); cthw_chip_reset(chp, NULL, ct->sc_chipclk, slp->sl_hostid); - SOFT_INTR_REQUIRED(slp); return 0; } @@ -760,8 +745,8 @@ ct_phase_error(ct, scsi_status) if (pep->pe_msg != NULL) { - printf("%s: phase error: %s", - slp->sl_xname, pep->pe_msg); + device_printf(slp->sl_dev, "phase error: %s", + pep->pe_msg); scsi_low_print(slp, slp->sl_Tnexus); } @@ -904,7 +889,7 @@ ct_unbusy(ct) DELAY(CT_DELAY_INTERVAL); } - printf("%s: unbusy timeout\n", slp->sl_xname); + device_printf(slp->sl_dev, "unbusy timeout\n"); return EBUSY; } @@ -935,7 +920,6 @@ ctintr(arg) struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; struct targ_info *ti; - struct physio_proc *pp; struct buf *bp; u_int derror, flags; int len, satgo, error; @@ -974,7 +958,7 @@ again: if (ct_debug > 0) { scsi_low_print(slp, NULL); - printf("%s: scsi_status 0x%x\n\n", slp->sl_xname, + device_printf(slp->sl_dev, "scsi_status 0x%x\n\n", (u_int) scsi_status); #ifdef KDB if (ct_debug > 1) @@ -1079,9 +1063,7 @@ common_data_phase: slp->sl_flags |= HW_PDMASTART; if ((ct->sc_xmode & CT_XMODE_PIO) != 0) { - pp = physio_proc_enter(bp); error = (*ct->ct_pio_xfer_start) (ct); - physio_proc_leave(pp); if (error == 0) { ct->sc_dma |= CT_DMA_PIOSTART; @@ -1105,7 +1087,8 @@ common_data_phase: { if (!(slp->sl_flags & HW_READ_PADDING)) { - printf("%s: read padding required\n", slp->sl_xname); + device_printf(slp->sl_dev, + "read padding required\n"); return 1; } } @@ -1113,7 +1096,8 @@ common_data_phase: { if (!(slp->sl_flags & HW_WRITE_PADDING)) { - printf("%s: write padding required\n", slp->sl_xname); + device_printf(slp->sl_dev, + "write padding required\n"); return 1; } } @@ -1134,8 +1118,8 @@ common_data_phase: slp->sl_scp.scp_cmdlen, SCSI_LOW_WRITE, &derror) != 0) { - printf("%s: scsi cmd xfer short\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi cmd xfer short\n"); } return 1; @@ -1167,7 +1151,7 @@ common_data_phase: case BSR_UNSPINFO0: case BSR_UNSPINFO1: - printf("%s: illegal bus phase (0x%x)\n", slp->sl_xname, + device_printf(slp->sl_dev, "illegal bus phase (0x%x)\n", (u_int) scsi_status); scsi_low_print(slp, ti); return 1; @@ -1187,8 +1171,8 @@ common_data_phase: if (ct_xfer(ct, ti->ti_msgoutstr, len, SCSI_LOW_WRITE, &derror) != 0) { - printf("%s: scsi msgout xfer short\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi msgout xfer short\n"); } SCSI_LOW_DEASSERT_ATN(slp); ct->sc_atten = 0; Modified: head/sys/dev/ct/ct_isa.c ============================================================================== --- head/sys/dev/ct/ct_isa.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ct_isa.c Mon Sep 10 18:49:49 2012 (r240325) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include @@ -297,7 +296,6 @@ ct_isa_attach(device_t dev) slp->sl_dev = dev; slp->sl_hostid = bs->sc_hostid; - slp->sl_irq = isa_get_irq(dev); slp->sl_cfgflags = device_get_flags(dev); s = splcam(); Modified: head/sys/dev/ct/ct_machdep.h ============================================================================== --- head/sys/dev/ct/ct_machdep.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ct_machdep.h Mon Sep 10 18:49:49 2012 (r240325) @@ -208,9 +208,4 @@ ct_cmdp_write_1(chp, val) CT_BUS_WEIGHT(chp) } -#if defined(__i386__) && 0 -#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq)) -#else /* !__i386__ */ -#define SOFT_INTR_REQUIRED(slp) -#endif /* !__i386__ */ #endif /* !_CT_MACHDEP_H_ */ Modified: head/sys/dev/ct/ctvar.h ============================================================================== --- head/sys/dev/ct/ctvar.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ctvar.h Mon Sep 10 18:49:49 2012 (r240325) @@ -132,6 +132,5 @@ struct ct_targ_info { *****************************************************************/ int ctprobesubr(struct ct_bus_access_handle *, u_int, int, u_int, int *); void ctattachsubr(struct ct_softc *); -int ctprint(void *, const char *); int ctintr(void *); #endif /* !_CTVAR_H_ */ Modified: head/sys/dev/ncv/ncr53c500.c ============================================================================== --- head/sys/dev/ncv/ncr53c500.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500.c Mon Sep 10 18:49:49 2012 (r240325) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include @@ -326,7 +325,7 @@ ncvhw_power(sc, flags) if (flags == SCSI_LOW_POWDOWN) { - printf("%s power down\n", slp->sl_xname); + device_printf(slp->sl_dev, "power down\n"); ncvhw_select_register_1(iot, ioh, &sc->sc_hw); bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_POWDOWN); } @@ -335,13 +334,13 @@ ncvhw_power(sc, flags) switch (sc->sc_rstep) { case 0: - printf("%s resume step O\n", slp->sl_xname); + device_printf(slp->sl_dev, "resume step O\n"); ncvhw_select_register_1(iot, ioh, &sc->sc_hw); bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_ENGAGE); break; case 1: - printf("%s resume step I\n", slp->sl_xname); + device_printf(slp->sl_dev, "resume step I\n"); ncvhw_reset(iot, ioh, &sc->sc_hw); ncvhw_init(iot, ioh, &sc->sc_hw); break; @@ -473,7 +472,6 @@ ncv_world_start(sc, fdone) (bus_space_read_1(sc->sc_iot, sc->sc_ioh, cr0_istat) & INTR_SBR)) return ENODEV; - SOFT_INTR_REQUIRED(slp); return 0; } @@ -607,17 +605,6 @@ ncvprobesubr(iot, ioh, dvcfg, hsid) return 1; } -int -ncvprint(aux, name) - void *aux; - const char *name; -{ - - if (name != NULL) - printf("%s: scsibus ", name); - return 1; -} - void ncvattachsubr(sc) struct ncv_softc *sc; @@ -696,9 +683,9 @@ ncv_pdma_end(sc, ti) bad: if ((slp->sl_error & PDMAERR) == 0) { - printf("%s: stragne cnt hw 0x%x soft 0x%x\n", - slp->sl_xname, len, - slp->sl_scp.scp_datalen); + device_printf(slp->sl_dev, + "strange cnt hw 0x%x soft 0x%x\n", len, + slp->sl_scp.scp_datalen); } slp->sl_error |= PDMAERR; } @@ -706,7 +693,7 @@ bad: } else { - printf("%s: data phase miss\n", slp->sl_xname); + device_printf(slp->sl_dev, "data phase miss\n"); slp->sl_error |= PDMAERR; } @@ -859,7 +846,7 @@ ncv_reselected(sc) if ((bus_space_read_1(iot, ioh, cr0_sffl) & CR0_SFFLR_BMASK) != 2) { - printf("%s illegal fifo bytes\n", slp->sl_xname); + device_printf(slp->sl_dev, "illegal fifo bytes\n"); scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, "chip confused"); return EJUSTRETURN; } @@ -965,7 +952,6 @@ ncvintr(arg) bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; struct targ_info *ti; - struct physio_proc *pp; struct buf *bp; u_int derror, flags; int len; @@ -1005,7 +991,7 @@ again: if (ncv_debug) { scsi_low_print(slp, NULL); - printf("%s st %x ist %x\n\n", slp->sl_xname, + device_printf(slp->sl_dev, "st %x ist %x\n\n", status, ireason); #ifdef KDB if (ncv_debug > 1) @@ -1087,8 +1073,8 @@ again: ncv_target_nexus_establish(sc); if ((status & PHASE_MASK) != MESSAGE_IN_PHASE) { - printf("%s: unexpected phase after reselect\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "unexpected phase after reselect\n"); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1); return 1; @@ -1115,14 +1101,13 @@ again: scsi_low_attention(slp); } - pp = physio_proc_enter(bp); if (slp->sl_scp.scp_datalen <= 0) { if ((ireason & INTR_BS) == 0) break; if ((slp->sl_error & PDMAERR) == 0) - printf("%s: data underrun\n", slp->sl_xname); + device_printf(slp->sl_dev, "data underrun\n"); slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_WRITE_PADDING) != 0) @@ -1134,8 +1119,8 @@ again: } else { - printf("%s: write padding required\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "write padding required\n"); } } else @@ -1148,7 +1133,6 @@ again: } ncv_pio_write(sc, slp->sl_scp.scp_data, len); } - physio_proc_leave(pp); break; case DATA_IN_PHASE: /* data in */ @@ -1158,14 +1142,13 @@ again: scsi_low_attention(slp); } - pp = physio_proc_enter(bp); if (slp->sl_scp.scp_datalen <= 0) { if ((ireason & INTR_BS) == 0) break; if ((slp->sl_error & PDMAERR) == 0) - printf("%s: data overrun\n", slp->sl_xname); + device_printf(slp->sl_dev, "data overrun\n"); slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_READ_PADDING) != 0) @@ -1176,8 +1159,8 @@ again: } else { - printf("%s: read padding required\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "read padding required\n"); break; } } @@ -1191,7 +1174,6 @@ again: } ncv_pio_read(sc, slp->sl_scp.scp_data, len); } - physio_proc_leave(pp); break; case COMMAND_PHASE: /* cmd out */ Modified: head/sys/dev/ncv/ncr53c500_pccard.c ============================================================================== --- head/sys/dev/ncv/ncr53c500_pccard.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500_pccard.c Mon Sep 10 18:49:49 2012 (r240325) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/dev/ncv/ncr53c500hw.h ============================================================================== --- head/sys/dev/ncv/ncr53c500hw.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500hw.h Mon Sep 10 18:49:49 2012 (r240325) @@ -36,8 +36,6 @@ #ifndef __NCR53C500HW_H_ #define __NCR53C500HW_H_ -#include - #define NCV_HOSTID 7 #define NCV_NTARGETS 8 #define NCV_NLUNS 8 Modified: head/sys/dev/ncv/ncr53c500var.h ============================================================================== --- head/sys/dev/ncv/ncr53c500var.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500var.h Mon Sep 10 18:49:49 2012 (r240325) @@ -82,12 +82,6 @@ struct ncv_targ_info { *****************************************************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Sep 10 21:57:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622291065670; Mon, 10 Sep 2012 21:57:41 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DA698FC08; Mon, 10 Sep 2012 21:57:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ALvfOu026119; Mon, 10 Sep 2012 21:57:41 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ALvf80026117; Mon, 10 Sep 2012 21:57:41 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201209102157.q8ALvf80026117@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 10 Sep 2012 21:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240327 - head/sys/modules/scsi_low X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 21:57:41 -0000 Author: gnn Date: Mon Sep 10 21:57:40 2012 New Revision: 240327 URL: http://svn.freebsd.org/changeset/base/240327 Log: Remove scsi_low_pisa.c from the module Makefile to keep in line with r240325. Modified: head/sys/modules/scsi_low/Makefile Modified: head/sys/modules/scsi_low/Makefile ============================================================================== --- head/sys/modules/scsi_low/Makefile Mon Sep 10 21:24:41 2012 (r240326) +++ head/sys/modules/scsi_low/Makefile Mon Sep 10 21:57:40 2012 (r240327) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../cam/scsi KMOD= scsi_low -SRCS= scsi_low.c scsi_low_pisa.c +SRCS= scsi_low.c SRCS+= opt_ddb.h opt_scsi.h opt_cam.h bus_if.h device_if.h EXPORT_SYMS= scsi_low_attach \ From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 00:07:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A638B1065675 for ; Tue, 11 Sep 2012 00:07:45 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 4BE508FC16 for ; Tue, 11 Sep 2012 00:07:43 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=XGEYOm 45Z5H1rn0aRwolNMFvq1en2uHAgw5bU2Gi+SfK9HwL7odwDGXnxwULBeNF07YZtH ZkgFGVqQbZYr410ishno4VqmvWnHmAzaVA2BLoP/bWE45FX0mz1P4CN68+Zpt8Sd u8W4ejh/3N1dDOLu+4iaI/b7ntqchkG3xj2TM= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=pD9fCHWmIMKd 42P4DeJ/7A3CLjMxvwtA8mL2YIBX/zI=; b=clvX7o5RmvlFlDYiqHWjzz/Ddcv3 /Kj2PQu5SNFJgDbZV+rZt/2ilyZzY5FLK+wdwniLz1+s3+EgmONjzUkM/R2FOW92 Aij6Vfyob663XFxUvELRxqe4Bt9I4VqXZ9RDUf41PF/CZMH3B+6XSXpJHst0ZQEl SrWO+qrtnUlJ6WY= Received: (qmail 93697 invoked from network); 10 Sep 2012 19:07:41 -0500 Received: from unknown (HELO ?10.10.0.115?) (bryan@shatow.net@10.10.0.115) by sweb.xzibition.com with ESMTPA; 10 Sep 2012 19:07:41 -0500 Message-ID: <504E80CC.2090508@shatow.net> Date: Mon, 10 Sep 2012 19:07:40 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Jun Kuriyama References: <201208190815.q7J8FWLi049955@svn.freebsd.org> In-Reply-To: <201208190815.q7J8FWLi049955@svn.freebsd.org> X-Enigmail-Version: 1.4.4 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc 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: r239382 - in head/etc: defaults rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 00:07:45 -0000 On 8/19/2012 3:15 AM, Jun Kuriyama wrote: > Author: kuriyama > Date: Sun Aug 19 08:15:32 2012 > New Revision: 239382 > URL: http://svn.freebsd.org/changeset/base/239382 > > Log: > - Allow to pass extra parameters for each jails. > - To achieve above, convert jail(8) invocation to use new style > command line "-c" flag. > > Reviewed at: freebsd-jail@ Do you plan to MFC this to stable/9? I'm using it on 9.1-RC1 and having good results. Considering switching to 9-STABLE. > > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/jail > > Modified: head/etc/defaults/rc.conf > ============================================================================== > --- head/etc/defaults/rc.conf Sun Aug 19 02:22:16 2012 (r239381) > +++ head/etc/defaults/rc.conf Sun Aug 19 08:15:32 2012 (r239382) > @@ -705,6 +705,7 @@ jail_sysvipc_allow="NO" # Allow SystemV > #jail_example_mount_enable="NO" # mount/umount jail's fs > #jail_example_fstab="" # fstab(5) for mount/umount > #jail_example_flags="-l -U root" # flags for jail(8) > +#jail_example_parameters="allow.raw_sockets=1" # extra parameters for this jail > > ############################################################## > ### Define source_rc_confs, the mechanism used by /etc/rc.* ## > > Modified: head/etc/rc.d/jail > ============================================================================== > --- head/etc/rc.d/jail Sun Aug 19 02:22:16 2012 (r239381) > +++ head/etc/rc.d/jail Sun Aug 19 08:15:32 2012 (r239382) > @@ -115,6 +115,8 @@ init_variables() > [ -z "${_flags}" ] && _flags="-l -U root" > eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" > [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log" > + eval _parameters=\"\${jail_${_j}_parameters:-${jail_parameters}}\" > + [ -z "${_parameters}" ] && _parameters="" > eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\" > > # Debugging aid > @@ -193,6 +195,7 @@ init_variables() > > debug "$_j flags: $_flags" > debug "$_j consolelog: $_consolelog" > + debug "$_j parameters: $_parameters" > > if [ -z "${_hostname}" ]; then > err 3 "$name: No hostname has been defined for ${_j}" > @@ -484,9 +487,19 @@ jail_handle_ips_option() > esac > > # Append address to list of addresses for the jail command. > - case "${_addrl}" in > - "") _addrl="${_addr}" ;; > - *) _addrl="${_addrl},${_addr}" ;; > + case "${_type}" in > + inet) > + case "${_addrl}" in > + "") _addrl="${_addr}" ;; > + *) _addrl="${_addrl},${_addr}" ;; > + esac > + ;; > + inet6) > + case "${_addr6l}" in > + "") _addr6l="${_addr}" ;; > + *) _addr6l="${_addr6l},${_addr}" ;; > + esac > + ;; > esac > > # Configure interface alias if requested by a given interface > @@ -576,6 +589,7 @@ jail_start() > continue; > fi > _addrl="" > + _addr6l="" > jail_ips "add" > if [ -n "${_fib}" ]; then > _setfib="setfib -F '${_fib}'" > @@ -641,8 +655,8 @@ jail_start() > i=$((i + 1)) > done > > - eval ${_setfib} jail -n ${_jail} ${_flags} -i ${_rootdir} ${_hostname} \ > - \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \ > + eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ > + ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ > > if [ "$?" -eq 0 ] ; then > _______________________________________________ > 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" > -- Regards, Bryan Drewery bdrewery@freenode/EFNet From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 02:29:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82F6D106564A; Tue, 11 Sep 2012 02:29:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5648FC16; Tue, 11 Sep 2012 02:29:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B2TbSF061018; Tue, 11 Sep 2012 02:29:37 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B2TbnX061016; Tue, 11 Sep 2012 02:29:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209110229.q8B2TbnX061016@svn.freebsd.org> From: Eitan Adler Date: Tue, 11 Sep 2012 02:29: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: r240328 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 02:29:37 -0000 Author: eadler Date: Tue Sep 11 02:29:36 2012 New Revision: 240328 URL: http://svn.freebsd.org/changeset/base/240328 Log: Follow up to doc r39516: Update the Vendor Relations Team information to reflect that incoming email is now handled by core@ and the Foundation. Reviewed by: gjb MFC after: 3 days Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Sep 10 21:57:40 2012 (r240327) +++ head/share/misc/organization.dot Tue Sep 11 02:29:36 2012 (r240328) @@ -59,7 +59,7 @@ webmaster [label="Webmaster Team\nwebmas donations [label="Donations Team\ndonations@FreeBSD.org\ngjb, wilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] -vendorrelations [label="Vendor Relations Team\nvendor-relations@FreeBSD.org\ngioria, jmg, rik,\nphilip, hmp, marks,\nmurray"] +vendorrelations [label="Vendor Relations\nvendor-relations@FreeBSD.org\ncore, FreeBSD Foundation"] # Here are the team relationships. # Group together all the entries for the superior team. From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 04:11:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D43D106566B; Tue, 11 Sep 2012 04:11:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 689B88FC15; Tue, 11 Sep 2012 04:11:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B4Bhb6074523; Tue, 11 Sep 2012 04:11:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B4BhCA074521; Tue, 11 Sep 2012 04:11:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209110411.q8B4BhCA074521@svn.freebsd.org> From: Adrian Chadd Date: Tue, 11 Sep 2012 04: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: r240333 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 04:11:43 -0000 Author: adrian Date: Tue Sep 11 04:11:42 2012 New Revision: 240333 URL: http://svn.freebsd.org/changeset/base/240333 Log: Clear the correct descriptor when going through the chained together gather DMA descriptor list. Pointy hat to: adrian@, for even USING bf->bf_desc here instead of 'ds'. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Sep 11 03:02:40 2012 (r240332) +++ head/sys/dev/ath/if_ath_tx.c Tue Sep 11 04:11:42 2012 (r240333) @@ -380,7 +380,7 @@ ath_tx_chaindesclist(struct ath_softc *s /* Make sure the 11n aggregate fields are cleared */ if (ath_tx_is_11n(sc)) - ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); + ath_hal_clr11n_aggr(sc->sc_ah, (struct ath_desc *) ds); isFirstDesc = 0; #ifdef ATH_DEBUG From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 04:53:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EDA31065670; Tue, 11 Sep 2012 04:53:33 +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 D57288FC08; Tue, 11 Sep 2012 04:53:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B4rWxj079390; Tue, 11 Sep 2012 04:53:32 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B4rWm8079388; Tue, 11 Sep 2012 04:53:32 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209110453.q8B4rWm8079388@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 11 Sep 2012 04:53: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: r240334 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 04:53:33 -0000 Author: obrien Date: Tue Sep 11 04:53:32 2012 New Revision: 240334 URL: http://svn.freebsd.org/changeset/base/240334 Log: Add postrandom. Modified: head/etc/rc.d/Makefile Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Tue Sep 11 04:11:42 2012 (r240333) +++ head/etc/rc.d/Makefile Tue Sep 11 04:53:32 2012 (r240334) @@ -107,6 +107,7 @@ FILES= DAEMON \ pf \ pflog \ pfsync \ + postrandom \ powerd \ power_profile \ ppp \ From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 04:54:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 206DF106564A; Tue, 11 Sep 2012 04:54:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BF428FC0A; Tue, 11 Sep 2012 04:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B4siR3079570; Tue, 11 Sep 2012 04:54:44 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B4siJL079567; Tue, 11 Sep 2012 04:54:44 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209110454.q8B4siJL079567@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 11 Sep 2012 04:54: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: r240335 - in head/sys/boot: i386/loader sparc64/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 04:54:45 -0000 Author: ae Date: Tue Sep 11 04:54:44 2012 New Revision: 240335 URL: http://svn.freebsd.org/changeset/base/240335 Log: Slightly reduce an overhead for the open() call in the zfsloader. libstand(3) tries to detect file system in the predefined order, but zfsloader usually is used for the booting from ZFS, and there is no need to try detect several file system types for each open() call. Modified: head/sys/boot/i386/loader/conf.c head/sys/boot/sparc64/loader/main.c Modified: head/sys/boot/i386/loader/conf.c ============================================================================== --- head/sys/boot/i386/loader/conf.c Tue Sep 11 04:53:32 2012 (r240334) +++ head/sys/boot/i386/loader/conf.c Tue Sep 11 04:54:44 2012 (r240335) @@ -70,6 +70,9 @@ struct devsw *devsw[] = { }; struct fs_ops *file_system[] = { +#if defined(LOADER_ZFS_SUPPORT) + &zfs_fsops, +#endif &ufs_fsops, &ext2fs_fsops, &dosfs_fsops, @@ -78,9 +81,6 @@ struct fs_ops *file_system[] = { &nandfs_fsops, #endif &splitfs_fsops, -#if defined(LOADER_ZFS_SUPPORT) - &zfs_fsops, -#endif #ifdef LOADER_GZIP_SUPPORT &gzipfs_fsops, #endif Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Tue Sep 11 04:53:32 2012 (r240334) +++ head/sys/boot/sparc64/loader/main.c Tue Sep 11 04:54:44 2012 (r240335) @@ -170,15 +170,15 @@ struct file_format *file_formats[] = { }; struct fs_ops *file_system[] = { +#ifdef LOADER_ZFS_SUPPORT + &zfs_fsops, +#endif #ifdef LOADER_UFS_SUPPORT &ufs_fsops, #endif #ifdef LOADER_CD9660_SUPPORT &cd9660_fsops, #endif -#ifdef LOADER_ZFS_SUPPORT - &zfs_fsops, -#endif #ifdef LOADER_ZIP_SUPPORT &zipfs_fsops, #endif From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 05:05:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 924EA1065670; Tue, 11 Sep 2012 05:05:00 +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 712B78FC16; Tue, 11 Sep 2012 05:05:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B5500F080973; Tue, 11 Sep 2012 05:05:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B54xDZ080940; Tue, 11 Sep 2012 05:04:59 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209110504.q8B54xDZ080940@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 11 Sep 2012 05:04: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: r240336 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 05:05:00 -0000 Author: obrien Date: Tue Sep 11 05:04:59 2012 New Revision: 240336 URL: http://svn.freebsd.org/changeset/base/240336 Log: Simply things so that "#REQUIRE: FILESYSTEMS" means the file systems are fully "ready to go". 'FILESYSTEMS' states: "This is a dummy dependency, for services which require file systems to be mounted before starting." However, we have 'var' which is was run after 'FILESYSTEMS' and can mount /var if it already isn't mounted. Furthermore, several scripts cannot use /var until 'cleanvar' has done its thing. Thus "FILESYSTEMS" hasn't really meant all critical file systems are fully usable. Modified: head/etc/rc.d/FILESYSTEMS head/etc/rc.d/addswap head/etc/rc.d/amd head/etc/rc.d/cleanvar head/etc/rc.d/cron head/etc/rc.d/dmesg head/etc/rc.d/ftpd head/etc/rc.d/inetd head/etc/rc.d/ipmon head/etc/rc.d/jail head/etc/rc.d/ldconfig head/etc/rc.d/mixer head/etc/rc.d/mountcritremote head/etc/rc.d/moused head/etc/rc.d/mrouted head/etc/rc.d/named head/etc/rc.d/netif head/etc/rc.d/newsyslog head/etc/rc.d/ntpd head/etc/rc.d/pflog head/etc/rc.d/postrandom head/etc/rc.d/random head/etc/rc.d/rarpd head/etc/rc.d/resolv head/etc/rc.d/sendmail head/etc/rc.d/sshd head/etc/rc.d/syslogd head/etc/rc.d/utx head/etc/rc.d/var head/etc/rc.d/watchdogd Modified: head/etc/rc.d/FILESYSTEMS ============================================================================== --- head/etc/rc.d/FILESYSTEMS Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/FILESYSTEMS Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: FILESYSTEMS -# REQUIRE: root mountcritlocal zfs +# REQUIRE: root mountcritlocal cleanvar zfs # This is a dummy dependency, for services which require file systems # to be mounted before starting. It also serves as the default early / Modified: head/etc/rc.d/addswap ============================================================================== --- head/etc/rc.d/addswap Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/addswap Tue Sep 11 05:04:59 2012 (r240336) @@ -7,6 +7,7 @@ # PROVIDE: addswap # REQUIRE: FILESYSTEMS kld +# BEFORE: netif # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/amd ============================================================================== --- head/etc/rc.d/amd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/amd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig # BEFORE: DAEMON # KEYWORD: nojail shutdown Modified: head/etc/rc.d/cleanvar ============================================================================== --- head/etc/rc.d/cleanvar Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/cleanvar Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: cleanvar -# REQUIRE: FILESYSTEMS var +# REQUIRE: var . /etc/rc.subr Modified: head/etc/rc.d/cron ============================================================================== --- head/etc/rc.d/cron Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/cron Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: cron -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # BEFORE: securelevel # KEYWORD: shutdown Modified: head/etc/rc.d/dmesg ============================================================================== --- head/etc/rc.d/dmesg Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/dmesg Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: dmesg -# REQUIRE: mountcritremote cleanvar +# REQUIRE: mountcritremote FILESYSTEMS # BEFORE: DAEMON # KEYWORD: nojail Modified: head/etc/rc.d/ftpd ============================================================================== --- head/etc/rc.d/ftpd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/ftpd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: ftpd -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/inetd ============================================================================== --- head/etc/rc.d/inetd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/inetd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: inetd -# REQUIRE: DAEMON LOGIN cleanvar +# REQUIRE: DAEMON LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/ipmon ============================================================================== --- head/etc/rc.d/ipmon Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/ipmon Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: ipmon -# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter +# REQUIRE: FILESYSTEMS hostname sysctl FILESYSTEMS ipfilter # BEFORE: SERVERS # KEYWORD: nojail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/jail Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: jail -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # BEFORE: securelevel # KEYWORD: nojail shutdown Modified: head/etc/rc.d/ldconfig ============================================================================== --- head/etc/rc.d/ldconfig Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/ldconfig Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: ldconfig -# REQUIRE: mountcritremote cleanvar +# REQUIRE: mountcritremote FILESYSTEMS # BEFORE: DAEMON . /etc/rc.subr Modified: head/etc/rc.d/mixer ============================================================================== --- head/etc/rc.d/mixer Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/mixer Tue Sep 11 05:04:59 2012 (r240336) @@ -28,7 +28,7 @@ # # PROVIDE: mixer -# REQUIRE: cleanvar +# REQUIRE: FILESYSTEMS # KEYWORD: nojail shutdown . /etc/rc.subr Modified: head/etc/rc.d/mountcritremote ============================================================================== --- head/etc/rc.d/mountcritremote Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/mountcritremote Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: mountcritremote -# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec netwait +# REQUIRE: NETWORKING FILESYSTEMS ipsec netwait # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/moused ============================================================================== --- head/etc/rc.d/moused Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/moused Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: moused -# REQUIRE: DAEMON cleanvar +# REQUIRE: DAEMON FILESYSTEMS # KEYWORD: nojail shutdown . /etc/rc.subr Modified: head/etc/rc.d/mrouted ============================================================================== --- head/etc/rc.d/mrouted Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/mrouted Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: mrouted -# REQUIRE: netif routing cleanvar +# REQUIRE: netif routing FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/named ============================================================================== --- head/etc/rc.d/named Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/named Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: named -# REQUIRE: SERVERS cleanvar +# REQUIRE: SERVERS FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/netif Tue Sep 11 05:04:59 2012 (r240336) @@ -26,7 +26,7 @@ # # PROVIDE: netif -# REQUIRE: atm1 cleanvar FILESYSTEMS serial sppp sysctl +# REQUIRE: atm1 FILESYSTEMS serial sppp sysctl # REQUIRE: ipfilter ipfs # KEYWORD: nojail Modified: head/etc/rc.d/newsyslog ============================================================================== --- head/etc/rc.d/newsyslog Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/newsyslog Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: newsyslog -# REQUIRE: cleanvar mountcritremote +# REQUIRE: FILESYSTEMS mountcritremote . /etc/rc.subr Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/ntpd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: ntpd -# REQUIRE: DAEMON ntpdate cleanvar devfs +# REQUIRE: DAEMON ntpdate FILESYSTEMS devfs # BEFORE: LOGIN # KEYWORD: nojail shutdown Modified: head/etc/rc.d/pflog ============================================================================== --- head/etc/rc.d/pflog Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/pflog Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: pflog -# REQUIRE: FILESYSTEMS netif cleanvar +# REQUIRE: FILESYSTEMS netif FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/postrandom ============================================================================== --- head/etc/rc.d/postrandom Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/postrandom Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: postrandom -# REQUIRE: initrandom random var +# REQUIRE: initrandom random FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail Modified: head/etc/rc.d/random ============================================================================== --- head/etc/rc.d/random Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/random Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: random -# REQUIRE: initrandom var +# REQUIRE: initrandom FILESYSTEMS # BEFORE: netif # KEYWORD: nojail shutdown Modified: head/etc/rc.d/rarpd ============================================================================== --- head/etc/rc.d/rarpd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/rarpd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: rarpd -# REQUIRE: DAEMON cleanvar +# REQUIRE: DAEMON FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail Modified: head/etc/rc.d/resolv ============================================================================== --- head/etc/rc.d/resolv Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/resolv Tue Sep 11 05:04:59 2012 (r240336) @@ -28,7 +28,7 @@ # # PROVIDE: resolv -# REQUIRE: netif var +# REQUIRE: netif FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/sendmail ============================================================================== --- head/etc/rc.d/sendmail Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/sendmail Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: mail -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # we make mail start late, so that things like .forward's are not # processed until the system is fully operational # KEYWORD: shutdown Modified: head/etc/rc.d/sshd ============================================================================== --- head/etc/rc.d/sshd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/sshd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: sshd -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/syslogd ============================================================================== --- head/etc/rc.d/syslogd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/syslogd Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: syslogd -# REQUIRE: mountcritremote cleanvar newsyslog +# REQUIRE: mountcritremote FILESYSTEMS newsyslog # BEFORE: SERVERS . /etc/rc.subr Modified: head/etc/rc.d/utx ============================================================================== --- head/etc/rc.d/utx Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/utx Tue Sep 11 05:04:59 2012 (r240336) @@ -4,7 +4,7 @@ # # PROVIDE: utx -# REQUIRE: DAEMON cleanvar +# REQUIRE: DAEMON FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/var ============================================================================== --- head/etc/rc.d/var Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/var Tue Sep 11 05:04:59 2012 (r240336) @@ -28,7 +28,9 @@ # # PROVIDE: var -# REQUIRE: FILESYSTEMS kld addswap +# REQUIRE: mountcritlocal zfs + +# NFS /var is not supported, unless NFS /var is part of diskless NFS / . /etc/rc.subr Modified: head/etc/rc.d/watchdogd ============================================================================== --- head/etc/rc.d/watchdogd Tue Sep 11 04:54:44 2012 (r240335) +++ head/etc/rc.d/watchdogd Tue Sep 11 05:04:59 2012 (r240336) @@ -28,7 +28,7 @@ # # PROVIDE: watchdogd -# REQUIRE: FILESYSTEMS cleanvar syslogd +# REQUIRE: FILESYSTEMS syslogd # KEYWORD: nojail shutdown . /etc/rc.subr From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 06:10:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FADD1065673; Tue, 11 Sep 2012 06:10:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B33C8FC14; Tue, 11 Sep 2012 06:10:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B6Ao4D088901; Tue, 11 Sep 2012 06:10:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B6AotW088899; Tue, 11 Sep 2012 06:10:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110610.q8B6AotW088899@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 06:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240339 - head/crypto/openssl/crypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 06:10:50 -0000 Author: avg Date: Tue Sep 11 06:10:49 2012 New Revision: 240339 URL: http://svn.freebsd.org/changeset/base/240339 Log: openssl: change SHLIB_VERSION_NUMBER to reflect the reality Note: I timed out waiting for an exp-run for this change but I survived having it locally for quite a long time. MFC after: 1 month X-MFC note: SHLIB_MAJOR is 6 in stable/8 and stable/9 Modified: head/crypto/openssl/crypto/opensslv.h Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Tue Sep 11 05:59:19 2012 (r240338) +++ head/crypto/openssl/crypto/opensslv.h Tue Sep 11 06:10:49 2012 (r240339) @@ -83,7 +83,7 @@ * should only keep the versions that are binary compatible with the current. */ #define SHLIB_VERSION_HISTORY "" -#define SHLIB_VERSION_NUMBER "1.0.0" +#define SHLIB_VERSION_NUMBER "7" #endif /* HEADER_OPENSSLV_H */ From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 06:14:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3E48106566B; Tue, 11 Sep 2012 06:14:03 +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 DF7688FC0A; Tue, 11 Sep 2012 06:14:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B6E32Q089304; Tue, 11 Sep 2012 06:14:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B6E38P089302; Tue, 11 Sep 2012 06:14:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110614.q8B6E38P089302@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 06:14: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: r240340 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 06:14:04 -0000 Author: avg Date: Tue Sep 11 06:14:03 2012 New Revision: 240340 URL: http://svn.freebsd.org/changeset/base/240340 Log: acpi.4: machdep.cpu_idle_hlt no longer exists MFC after: 1 week Modified: head/share/man/man4/acpi.4 Modified: head/share/man/man4/acpi.4 ============================================================================== --- head/share/man/man4/acpi.4 Tue Sep 11 06:10:49 2012 (r240339) +++ head/share/man/man4/acpi.4 Tue Sep 11 06:14:03 2012 (r240340) @@ -80,8 +80,12 @@ A scheduling algorithm will select state and this setting as system load dictates. To enable ACPI CPU idling control, -.Va machdep.cpu_idle_hlt -must be set to 1. +.Va machdep.idle +should be set to +.Li acpi +if it is listed in +.Va machdep.idle_available +. .It Va hw.acpi.cpu.cx_supported List of supported CPU idle states and their transition latency in microseconds. From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 06:15:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22390106568A; Tue, 11 Sep 2012 06:15:56 +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 0DFEC8FC08; Tue, 11 Sep 2012 06:15:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B6FtT9089617; Tue, 11 Sep 2012 06:15:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B6Ftwx089615; Tue, 11 Sep 2012 06:15:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110615.q8B6Ftwx089615@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 06:15: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: r240341 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 06:15:56 -0000 Author: avg Date: Tue Sep 11 06:15:55 2012 New Revision: 240341 URL: http://svn.freebsd.org/changeset/base/240341 Log: a bit of trailing whitespace cleanup MFC after: 1 week Modified: head/sys/boot/i386/loader/main.c Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Tue Sep 11 06:14:03 2012 (r240340) +++ head/sys/boot/i386/loader/main.c Tue Sep 11 06:15:55 2012 (r240341) @@ -322,13 +322,13 @@ command_heap(int argc, char *argv[]) } /* ISA bus access functions for PnP, derived from */ -static int +static int isa_inb(int port) { u_char data; - - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && + + if (__builtin_constant_p(port) && + (((port) & 0xffff) < 0x100) && ((port) < 0x10000)) { __asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port))); } else { @@ -341,9 +341,9 @@ static void isa_outb(int port, int value) { u_char al = value; - - if (__builtin_constant_p(port) && - (((port) & 0xffff) < 0x100) && + + if (__builtin_constant_p(port) && + (((port) & 0xffff) < 0x100) && ((port) < 0x10000)) { __asm __volatile("outb %0,%1" : : "a" (al), "id" ((u_short)(port))); } else { From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 06:18:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAA991065673; Tue, 11 Sep 2012 06:18:36 +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 D6C618FC0A; Tue, 11 Sep 2012 06:18:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B6IaMO090062; Tue, 11 Sep 2012 06:18:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B6Ia6Z090060; Tue, 11 Sep 2012 06:18:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110618.q8B6Ia6Z090060@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 06:18: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: r240342 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 06:18:37 -0000 Author: avg Date: Tue Sep 11 06:18:36 2012 New Revision: 240342 URL: http://svn.freebsd.org/changeset/base/240342 Log: boot: file_loadraw should strdup name argument ... the same way it's done for type argument. MFC after: 2 weeks Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Tue Sep 11 06:15:55 2012 (r240341) +++ head/sys/boot/common/module.c Tue Sep 11 06:18:36 2012 (r240342) @@ -396,7 +396,7 @@ file_loadraw(char *type, char *name) /* Looks OK so far; create & populate control structure */ fp = file_alloc(); - fp->f_name = name; + fp->f_name = strdup(name); fp->f_type = strdup(type); fp->f_args = NULL; fp->f_metadata = NULL; From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 06:25:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35782106564A; Tue, 11 Sep 2012 06:25:11 +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 212EE8FC17; Tue, 11 Sep 2012 06:25:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B6PA5p091030; Tue, 11 Sep 2012 06:25:10 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B6PARR091027; Tue, 11 Sep 2012 06:25:10 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110625.q8B6PARR091027@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 06:25: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: r240343 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 06:25:11 -0000 Author: avg Date: Tue Sep 11 06:25:10 2012 New Revision: 240343 URL: http://svn.freebsd.org/changeset/base/240343 Log: rc.d/power_profile: use recently added Cmax for cx_lowest Trying to determine current lowest C-state after an AC event is racy with C-states actually being changed by ACPI platform and kernel driver. MFC after: 3 weeks Modified: head/etc/rc.d/power_profile Modified: head/etc/rc.d/power_profile ============================================================================== --- head/etc/rc.d/power_profile Tue Sep 11 06:18:36 2012 (r240342) +++ head/etc/rc.d/power_profile Tue Sep 11 06:25:10 2012 (r240343) @@ -81,8 +81,7 @@ esac # Set the various sysctls based on the profile's values. node="hw.acpi.cpu.cx_lowest" highest_value="C1" -lowest_value="`(sysctl -n dev.cpu.0.cx_supported | \ - awk '{ print "C" split($0, a) }' -) 2> /dev/null`" +lowest_value="Cmax" eval value=\$${profile}_cx_lowest sysctl_set From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 06:26:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D6C9106566C; Tue, 11 Sep 2012 06:26:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 598B48FC1C; Tue, 11 Sep 2012 06:26:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B6QLSn091262; Tue, 11 Sep 2012 06:26:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B6QLlp091260; Tue, 11 Sep 2012 06:26:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110626.q8B6QLlp091260@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 06:26: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: r240344 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 06:26:21 -0000 Author: avg Date: Tue Sep 11 06:26:20 2012 New Revision: 240344 URL: http://svn.freebsd.org/changeset/base/240344 Log: acpi_cpu: free result of device_get_children MFC after: 1 week Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Tue Sep 11 06:25:10 2012 (r240343) +++ head/sys/dev/acpica/acpi_cpu.c Tue Sep 11 06:26:20 2012 (r240344) @@ -862,6 +862,7 @@ acpi_cpu_startup(void *arg) cpu_cx_lowest_lim = 0; cpu_disable_idle = FALSE; cpu_idle_hook = acpi_cpu_idle; + free(cpu_devices, M_TEMP); } static void From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:07:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 011A1106564A; Tue, 11 Sep 2012 07:07:53 +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 D596A8FC0A; Tue, 11 Sep 2012 07:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B77qKR098065; Tue, 11 Sep 2012 07:07:52 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B77qBh098063; Tue, 11 Sep 2012 07:07:52 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110707.q8B77qBh098063@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 07:07: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: r240345 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:07:53 -0000 Author: avg Date: Tue Sep 11 07:07:52 2012 New Revision: 240345 URL: http://svn.freebsd.org/changeset/base/240345 Log: zfs: fix sa_modify_attrs handling of variable-sized attributes - skip length_idx index for a replaced variable-sized attribute - skip length_idx index for a removed variable-sized attribute - also re-arranged code to make sure that length_idx is always incremented for variable-sized attributes - additionally add an assertion that the number of actually produced attributes is the same as the expected number of resulting attributes In cooperation with: Matthew Ahrens Tested by: Trent Nelson Reviewed by: Matthew Ahrens (for upstream) To do: get this upstreamed MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Tue Sep 11 06:26:20 2012 (r240344) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Tue Sep 11 07:07:52 2012 (r240345) @@ -1604,8 +1604,11 @@ sa_replace_all_by_template(sa_handle_t * } /* - * add/remove/replace a single attribute and then rewrite the entire set + * Add/remove a single attribute or replace a variable-sized attribute value + * with a value of a different size, and then rewrite the entire set * of attributes. + * Same-length attribute value replacement (including fixed-length attributes) + * is handled more efficiently by the upper layers. */ static int sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr, @@ -1687,18 +1690,19 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att attr = idx_tab->sa_layout->lot_attrs[i]; if (attr == newattr) { - if (action == SA_REMOVE) { - j++; - continue; + /* duplicate attributes are not allowed */ + ASSERT(action == SA_REPLACE || + action == SA_REMOVE); + /* must be variable-sized to be replaced here */ + if (action == SA_REPLACE) { + ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); + SA_ADD_BULK_ATTR(attr_desc, j, attr, + locator, datastart, buflen); } - ASSERT(SA_REGISTERED_LEN(sa, attr) == 0); - ASSERT(action == SA_REPLACE); - SA_ADD_BULK_ATTR(attr_desc, j, attr, - locator, datastart, buflen); } else { length = SA_REGISTERED_LEN(sa, attr); if (length == 0) { - length = hdr->sa_lengths[length_idx++]; + length = hdr->sa_lengths[length_idx]; } SA_ADD_BULK_ATTR(attr_desc, j, attr, @@ -1706,6 +1710,8 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att (TOC_OFF(idx_tab->sa_idx_tab[attr]) + (uintptr_t)old_data[k]), length); } + if (SA_REGISTERED_LEN(sa, attr) == 0) + length_idx++; } if (k == 0 && hdl->sa_spill) { hdr = SA_GET_HDR(hdl, SA_SPILL); @@ -1723,6 +1729,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_att SA_ADD_BULK_ATTR(attr_desc, j, newattr, locator, datastart, buflen); } + ASSERT3U(j, ==, attr_count); error = sa_build_layouts(hdl, attr_desc, attr_count, tx); From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:11:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 320B8106566B; Tue, 11 Sep 2012 07:11: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 1DB8D8FC12; Tue, 11 Sep 2012 07:11:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B7BWA9098574; Tue, 11 Sep 2012 07:11:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B7BWYf098571; Tue, 11 Sep 2012 07:11:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110711.q8B7BWYf098571@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 07:11: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: r240346 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:11:33 -0000 Author: avg Date: Tue Sep 11 07:11:32 2012 New Revision: 240346 URL: http://svn.freebsd.org/changeset/base/240346 Log: zfs boot: bring zap_leaf_chunk field names in sync with kernel code This change is cosmetic. MFC after: 10 days Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Tue Sep 11 07:07:52 2012 (r240345) +++ head/sys/boot/zfs/zfs.c Tue Sep 11 07:11:32 2012 (r240346) @@ -318,7 +318,7 @@ zfs_readdir(struct open_file *f, struct if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) goto fzap_next; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; if (namelen > sizeof(d->d_name)) namelen = sizeof(d->d_name); Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:07:52 2012 (r240345) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:11:32 2012 (r240346) @@ -1245,7 +1245,7 @@ fzap_name_equal(const zap_leaf_t *zl, co const zap_leaf_chunk_t *nc; const char *p; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); p = name; @@ -1458,7 +1458,7 @@ fzap_list(const spa_t *spa, const dnode_ zc = &ZAP_LEAF_CHUNK(&zl, j); if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) continue; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; if (namelen > sizeof(name)) namelen = sizeof(name); @@ -1557,7 +1557,7 @@ fzap_name_copy(const zap_leaf_t *zl, con const zap_leaf_chunk_t *nc; char *p; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); p = name; From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:12:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C4451065673; Tue, 11 Sep 2012 07:12:49 +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 25A668FC20; Tue, 11 Sep 2012 07:12:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B7Cnn1098749; Tue, 11 Sep 2012 07:12:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B7Cm2c098747; Tue, 11 Sep 2012 07:12:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110712.q8B7Cm2c098747@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 07:12: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: r240347 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:12:49 -0000 Author: avg Date: Tue Sep 11 07:12:48 2012 New Revision: 240347 URL: http://svn.freebsd.org/changeset/base/240347 Log: zfs boot: fix/replace fzap_rlookup implementation The previous one was totally bogus as it used hash value of _output_ variable as an index for searching... The only reliable way to do a reverse lookup here is to iterate over all entries. MFC after: 15 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:11:32 2012 (r240346) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:12:48 2012 (r240347) @@ -1581,9 +1581,7 @@ fzap_rlookup(const spa_t *spa, const dno int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; fat_zap_t z; - uint64_t *ptrtbl; - uint64_t hash; - int rc; + int i, j; if (zh.zap_magic != ZAP_MAGIC) return (EIO); @@ -1592,59 +1590,34 @@ fzap_rlookup(const spa_t *spa, const dno z.zap_phys = (zap_phys_t *) zap_scratch; /* - * Figure out where the pointer table is and read it in if necessary. + * This assumes that the leaf blocks start at block 1. The + * documentation isn't exactly clear on this. */ - if (zh.zap_ptrtbl.zt_blk) { - rc = dnode_read(spa, dnode, zh.zap_ptrtbl.zt_blk * bsize, - zap_scratch, bsize); - if (rc) - return (rc); - ptrtbl = (uint64_t *) zap_scratch; - } else { - ptrtbl = &ZAP_EMBEDDED_PTRTBL_ENT(&z, 0); - } - - hash = zap_hash(zh.zap_salt, name); - zap_leaf_t zl; zl.l_bs = z.zap_block_shift; + for (i = 0; i < zh.zap_num_leafs; i++) { + off_t off = (i + 1) << zl.l_bs; - off_t off = ptrtbl[hash >> (64 - zh.zap_ptrtbl.zt_shift)] << zl.l_bs; - zap_leaf_chunk_t *zc; - - rc = dnode_read(spa, dnode, off, zap_scratch, bsize); - if (rc) - return (rc); + if (dnode_read(spa, dnode, off, zap_scratch, bsize)) + return (EIO); - zl.l_phys = (zap_leaf_phys_t *) zap_scratch; + zl.l_phys = (zap_leaf_phys_t *) zap_scratch; - /* - * Make sure this chunk matches our hash. - */ - if (zl.l_phys->l_hdr.lh_prefix_len > 0 - && zl.l_phys->l_hdr.lh_prefix - != hash >> (64 - zl.l_phys->l_hdr.lh_prefix_len)) - return (ENOENT); + for (j = 0; j < ZAP_LEAF_NUMCHUNKS(&zl); j++) { + zap_leaf_chunk_t *zc; - /* - * Hash within the chunk to find our entry. - */ - int shift = (64 - ZAP_LEAF_HASH_SHIFT(&zl) - zl.l_phys->l_hdr.lh_prefix_len); - int h = (hash >> shift) & ((1 << ZAP_LEAF_HASH_SHIFT(&zl)) - 1); - h = zl.l_phys->l_hash[h]; - if (h == 0xffff) - return (ENOENT); - zc = &ZAP_LEAF_CHUNK(&zl, h); - while (zc->l_entry.le_hash != hash) { - if (zc->l_entry.le_next == 0xffff) { - zc = 0; - break; + zc = &ZAP_LEAF_CHUNK(&zl, j); + if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) + continue; + if (zc->l_entry.le_value_intlen != 8 || + zc->l_entry.le_value_numints != 1) + continue; + + if (fzap_leaf_value(&zl, zc) == value) { + fzap_name_copy(&zl, zc, name); + return (0); + } } - zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); - } - if (fzap_leaf_value(&zl, zc) == value) { - fzap_name_copy(&zl, zc, name); - return (0); } return (ENOENT); From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:13:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 921A11065673; Tue, 11 Sep 2012 07:13:59 +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 7E07C8FC14; Tue, 11 Sep 2012 07:13:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B7DxCd098912; Tue, 11 Sep 2012 07:13:59 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B7Dx3e098910; Tue, 11 Sep 2012 07:13:59 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110713.q8B7Dx3e098910@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 07:13: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: r240348 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:13:59 -0000 Author: avg Date: Tue Sep 11 07:13:58 2012 New Revision: 240348 URL: http://svn.freebsd.org/changeset/base/240348 Log: zfs boot: print only an attribute name in fzap_list ... this matches mzap_list behavior MFC after: 12 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:12:48 2012 (r240347) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:13:58 2012 (r240348) @@ -1484,7 +1484,8 @@ fzap_list(const spa_t *spa, const dnode_ */ value = fzap_leaf_value(&zl, zc); - printf("%s 0x%jx\n", name, (uintmax_t)value); + //printf("%s 0x%jx\n", name, (uintmax_t)value); + printf("%s\n", name); } } From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:15:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63AD41065674; Tue, 11 Sep 2012 07:15:12 +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 4EF7B8FC12; Tue, 11 Sep 2012 07:15:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B7FCFa099091; Tue, 11 Sep 2012 07:15:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B7FCEY099089; Tue, 11 Sep 2012 07:15:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110715.q8B7FCEY099089@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 07:15: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: r240349 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:15:12 -0000 Author: avg Date: Tue Sep 11 07:15:11 2012 New Revision: 240349 URL: http://svn.freebsd.org/changeset/base/240349 Log: zfs boot: add a size check for a value in fzap_lookup MFC after: 25 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:13:58 2012 (r240348) +++ head/sys/boot/zfs/zfsimpl.c Tue Sep 11 07:15:11 2012 (r240349) @@ -1355,6 +1355,8 @@ fzap_lookup(const spa_t *spa, const dnod zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); } if (fzap_name_equal(&zl, zc, name)) { + if (zc->l_entry.le_value_intlen * zc->l_entry.le_value_numints > 8) + return (E2BIG); *value = fzap_leaf_value(&zl, zc); return (0); } From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:35:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D77B1065673; Tue, 11 Sep 2012 07:35:25 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7FC8FC0A; Tue, 11 Sep 2012 07:35:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B7ZOcc001849; Tue, 11 Sep 2012 07:35:24 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B7ZO36001847; Tue, 11 Sep 2012 07:35:24 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209110735.q8B7ZO36001847@svn.freebsd.org> From: Kevin Lo Date: Tue, 11 Sep 2012 07: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: r240350 - head/usr.sbin/rpc.lockd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:35:25 -0000 Author: kevlo Date: Tue Sep 11 07:35:24 2012 New Revision: 240350 URL: http://svn.freebsd.org/changeset/base/240350 Log: Remove dead return code Modified: head/usr.sbin/rpc.lockd/lockd_lock.c Modified: head/usr.sbin/rpc.lockd/lockd_lock.c ============================================================================== --- head/usr.sbin/rpc.lockd/lockd_lock.c Tue Sep 11 07:15:11 2012 (r240349) +++ head/usr.sbin/rpc.lockd/lockd_lock.c Tue Sep 11 07:35:24 2012 (r240350) @@ -494,8 +494,6 @@ regions_overlap(start1, len1, start2, le } else { return 1; } - - return (result); } /* From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 07:54:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD313106564A; Tue, 11 Sep 2012 07:54:41 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8B9A8FC14; Tue, 11 Sep 2012 07:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B7sfS0004305; Tue, 11 Sep 2012 07:54:41 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B7sfFs004302; Tue, 11 Sep 2012 07:54:41 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209110754.q8B7sfFs004302@svn.freebsd.org> From: Kevin Lo Date: Tue, 11 Sep 2012 07:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240351 - in head: sbin/ipfw usr.sbin/lpr/lpd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 07:54:42 -0000 Author: kevlo Date: Tue Sep 11 07:54:41 2012 New Revision: 240351 URL: http://svn.freebsd.org/changeset/base/240351 Log: Remove unused values Modified: head/sbin/ipfw/nat.c head/usr.sbin/lpr/lpd/printjob.c Modified: head/sbin/ipfw/nat.c ============================================================================== --- head/sbin/ipfw/nat.c Tue Sep 11 07:35:24 2012 (r240350) +++ head/sbin/ipfw/nat.c Tue Sep 11 07:54:41 2012 (r240351) @@ -421,7 +421,7 @@ setup_redir_port(char *buf, int *ac, cha /* * Extract local address. */ - if ((sep = strchr(**av, ',')) != NULL) { + if (strchr(**av, ',') != NULL) { r->laddr.s_addr = INADDR_NONE; r->lport = ~0; numLocalPorts = 1; @@ -454,7 +454,7 @@ setup_redir_port(char *buf, int *ac, cha /* * Extract public port and optionally address. */ - if ((sep = strchr(**av, ':')) != NULL) { + if (strchr(**av, ':') != NULL) { if (StrToAddrAndPortRange(**av, &r->paddr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port: " @@ -482,7 +482,7 @@ setup_redir_port(char *buf, int *ac, cha * option for this redirect entry, else stop here processing arg[cv]. */ if (*ac != 0 && isdigit(***av)) { - if ((sep = strchr(**av, ':')) != NULL) { + if (strchr(**av, ':') != NULL) { if (StrToAddrAndPortRange(**av, &r->raddr, protoName, &portRange) != 0) errx(EX_DATAERR, "redirect_port: " Modified: head/usr.sbin/lpr/lpd/printjob.c ============================================================================== --- head/usr.sbin/lpr/lpd/printjob.c Tue Sep 11 07:35:24 2012 (r240350) +++ head/usr.sbin/lpr/lpd/printjob.c Tue Sep 11 07:54:41 2012 (r240351) @@ -1788,7 +1788,7 @@ openpr(const struct printer *pp) of_pid = 0; return; } else if (*pp->lp) { - if ((cp = strchr(pp->lp, '@')) != NULL) + if (strchr(pp->lp, '@') != NULL) opennet(pp); else opentty(pp); From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 08:28:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01A4E1065672; Tue, 11 Sep 2012 08:28:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0C0F8FC1C; Tue, 11 Sep 2012 08:28:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B8Swcq008528; Tue, 11 Sep 2012 08:28:58 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B8SwGZ008526; Tue, 11 Sep 2012 08:28:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209110828.q8B8SwGZ008526@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 11 Sep 2012 08:28: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: r240352 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 08:28:59 -0000 Author: glebius Date: Tue Sep 11 08:28:58 2012 New Revision: 240352 URL: http://svn.freebsd.org/changeset/base/240352 Log: Spelling. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c Tue Sep 11 07:54:41 2012 (r240351) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_swrun_tbl.c Tue Sep 11 08:28:58 2012 (r240352) @@ -319,7 +319,7 @@ kld_file_stat_to_swrun(const struct kld_ } /** - * Get all visible proceses including the kernel visible threads + * Get all visible processes including the kernel visible threads */ static void swrun_OS_get_procs(void) From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 08:33:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0830106566C; Tue, 11 Sep 2012 08:33:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABDFD8FC15; Tue, 11 Sep 2012 08:33:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B8XGkv009281; Tue, 11 Sep 2012 08:33:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B8XGmN009279; Tue, 11 Sep 2012 08:33:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209110833.q8B8XGmN009279@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 11 Sep 2012 08:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240354 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 08:33:16 -0000 Author: glebius Date: Tue Sep 11 08:33:16 2012 New Revision: 240354 URL: http://svn.freebsd.org/changeset/base/240354 Log: Do not count kernel threads as processes for hrSystemProcesses OID. PR: bin/160494 Submitted by: Jeremy Chadwick Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Tue Sep 11 08:30:48 2012 (r240353) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Tue Sep 11 08:33:16 2012 (r240354) @@ -238,7 +238,7 @@ OS_getSystemProcesses(uint32_t *proc_cou if (hr_kd == NULL) return (SNMP_ERR_GENERR); - if (kvm_getprocs(hr_kd, KERN_PROC_ALL, 0, &pc) == NULL) { + if (kvm_getprocs(hr_kd, KERN_PROC_PROC, 0, &pc) == NULL) { syslog(LOG_ERR, "kvm_getprocs failed: %m"); return (SNMP_ERR_GENERR); } From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 08:36:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 395051065670; Tue, 11 Sep 2012 08:36:42 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24D608FC1B; Tue, 11 Sep 2012 08:36:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B8afIm009786; Tue, 11 Sep 2012 08:36:41 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B8af64009784; Tue, 11 Sep 2012 08:36:41 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209110836.q8B8af64009784@svn.freebsd.org> From: Kevin Lo Date: Tue, 11 Sep 2012 08:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240355 - head/sys/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 08:36:42 -0000 Author: kevlo Date: Tue Sep 11 08:36:41 2012 New Revision: 240355 URL: http://svn.freebsd.org/changeset/base/240355 Log: Fix style nit Modified: head/sys/fs/ext2fs/ext2_inode.c Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Tue Sep 11 08:33:16 2012 (r240354) +++ head/sys/fs/ext2fs/ext2_inode.c Tue Sep 11 08:36:41 2012 (r240355) @@ -397,8 +397,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, le */ vp = ITOV(ip); bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, 0, 0); - if (bp->b_flags & (B_DONE | B_DELWRI)) { - } else { + if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0) { bp->b_iocmd = BIO_READ; if (bp->b_bcount > bp->b_bufsize) panic("ext2_indirtrunc: bad buffer size"); From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 08:45:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DAB5106566C; Tue, 11 Sep 2012 08:45:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 899D08FC14; Tue, 11 Sep 2012 08:45:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B8jooq010994; Tue, 11 Sep 2012 08:45:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B8joQi010992; Tue, 11 Sep 2012 08:45:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209110845.q8B8joQi010992@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 08:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240356 - head/sys/cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 08:45:50 -0000 Author: avg Date: Tue Sep 11 08:45:49 2012 New Revision: 240356 URL: http://svn.freebsd.org/changeset/base/240356 Log: forgotten file from r240346 Pointyhat to: avg MFC after: 10 days X-MFC with: r240346 Modified: head/sys/cddl/boot/zfs/zfsimpl.h Modified: head/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- head/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 11 08:36:41 2012 (r240355) +++ head/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 11 08:45:49 2012 (r240356) @@ -1181,12 +1181,12 @@ typedef struct zap_leaf_phys { typedef union zap_leaf_chunk { struct zap_leaf_entry { uint8_t le_type; /* always ZAP_CHUNK_ENTRY */ - uint8_t le_int_size; /* size of ints */ + uint8_t le_value_intlen; /* size of ints */ uint16_t le_next; /* next entry in hash chain */ uint16_t le_name_chunk; /* first chunk of the name */ - uint16_t le_name_length; /* bytes in name, incl null */ + uint16_t le_name_numints; /* bytes in name, incl null */ uint16_t le_value_chunk; /* first chunk of the value */ - uint16_t le_value_length; /* value length in ints */ + uint16_t le_value_numints; /* value length in ints */ uint32_t le_cd; /* collision differentiator */ uint64_t le_hash; /* hash value of the name */ } l_entry; From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 09:38:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35C021065673; Tue, 11 Sep 2012 09:38:33 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2056C8FC16; Tue, 11 Sep 2012 09:38:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8B9cWQN018126; Tue, 11 Sep 2012 09:38:32 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8B9cW4K018123; Tue, 11 Sep 2012 09:38:32 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209110938.q8B9cW4K018123@svn.freebsd.org> From: Kevin Lo Date: Tue, 11 Sep 2012 09:38: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: r240358 - head/sys/fs/nandfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 09:38:33 -0000 Author: kevlo Date: Tue Sep 11 09:38:32 2012 New Revision: 240358 URL: http://svn.freebsd.org/changeset/base/240358 Log: Prevent nump NULL pointer dereference in bmap_getlbns() Modified: head/sys/fs/nandfs/bmap.c Modified: head/sys/fs/nandfs/bmap.c ============================================================================== --- head/sys/fs/nandfs/bmap.c Tue Sep 11 08:49:22 2012 (r240357) +++ head/sys/fs/nandfs/bmap.c Tue Sep 11 09:38:32 2012 (r240358) @@ -548,7 +548,8 @@ bmap_getlbns(struct nandfs_node *node, n DPRINTF(BMAP, ("%s: node %p bn=%jx mnindir=%zd enter\n", __func__, node, bn, MNINDIR(fsdev))); - *nump = 0; + if (nump) + *nump = 0; numlevels = 0; realbn = bn; From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 12:55:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8F08106566B; Tue, 11 Sep 2012 12:55:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A31058FC0A; Tue, 11 Sep 2012 12:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BCtFVj049620; Tue, 11 Sep 2012 12:55:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BCtFVG049617; Tue, 11 Sep 2012 12:55:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209111255.q8BCtFVG049617@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 11 Sep 2012 12:55: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: r240361 - in head/lib/libc: gen stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 12:55:15 -0000 Author: des Date: Tue Sep 11 12:55:15 2012 New Revision: 240361 URL: http://svn.freebsd.org/changeset/base/240361 Log: Add the same warning to rand48(3) as to rand(3) and random(3). MFC after: 3 days Modified: head/lib/libc/gen/rand48.3 head/lib/libc/stdlib/random.3 Modified: head/lib/libc/gen/rand48.3 ============================================================================== --- head/lib/libc/gen/rand48.3 Tue Sep 11 11:05:32 2012 (r240360) +++ head/lib/libc/gen/rand48.3 Tue Sep 11 12:55:15 2012 (r240361) @@ -12,7 +12,7 @@ .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 .\" $FreeBSD$ .\" -.Dd February 2, 2010 +.Dd September 4, 2012 .Dt RAND48 3 .Os .Sh NAME @@ -49,6 +49,14 @@ .Ft void .Fn lcong48 "unsigned short p[7]" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn rand48 family of functions generates pseudo-random numbers using a linear @@ -174,10 +182,8 @@ It is thus not possible to use values gr Note that all three methods of seeding the random number generator always also set the multiplicand and addend for any of the six generator calls. -.Pp -For a more powerful random number generator, see -.Xr random 3 . .Sh SEE ALSO +.Xr arc4random 3 , .Xr rand 3 , .Xr random 3 .Sh AUTHORS Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Tue Sep 11 11:05:32 2012 (r240360) +++ head/lib/libc/stdlib/random.3 Tue Sep 11 12:55:15 2012 (r240361) @@ -181,7 +181,6 @@ messages are printed on the standard err .Xr arc4random 3 , .Xr lrand48 3 , .Xr rand 3 , -.Xr srand 3 , .Xr random 4 .Sh HISTORY These From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 13:29:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76075106564A; Tue, 11 Sep 2012 13:29:51 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46C8D8FC08; Tue, 11 Sep 2012 13:29:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BDTphu055821; Tue, 11 Sep 2012 13:29:51 GMT (envelope-from jhale@svn.freebsd.org) Received: (from jhale@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BDTpWT055818; Tue, 11 Sep 2012 13:29:51 GMT (envelope-from jhale@svn.freebsd.org) Message-Id: <201209111329.q8BDTpWT055818@svn.freebsd.org> From: "Jason E. Hale" Date: Tue, 11 Sep 2012 13:29: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: r240362 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 13:29:51 -0000 Author: jhale (ports committer) Date: Tue Sep 11 13:29:50 2012 New Revision: 240362 URL: http://svn.freebsd.org/changeset/base/240362 Log: - Add myself to calendar.freebsd - Add my mentor relationships to committers-ports.dot Approved by: makc (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Sep 11 12:55:15 2012 (r240361) +++ head/share/misc/committers-ports.dot Tue Sep 11 13:29:50 2012 (r240362) @@ -105,6 +105,7 @@ jacula [label="Giuseppe Pilichi\njacula@ jadawin [label="Philippe Audeoud\njadawin@FreeBSD.org\n2008/03/02"] jase [label="Jase Thew\njase@FreeBSD.org\n2012/05/30"] jgh [label="Jason Helfman\njgh@FreeBSD.org\n2011/12/16"] +jhale [label="Jason E. Hale\njhale@FreeBSD.org\n2012/09/10"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] @@ -226,6 +227,7 @@ arved -> stefan asami -> obrien +avilla -> jhale avilla -> rakuco bapt -> bdrewery @@ -369,6 +371,7 @@ marcus -> eik marcus -> jmallett makc -> bf +makc -> jhale makc -> rakuco mat -> thierry Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Sep 11 12:55:15 2012 (r240361) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Sep 11 13:29:50 2012 (r240362) @@ -54,6 +54,7 @@ 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 02/10 Simon Barner born in Rosenheim, Bayern, Germany, 1980 +02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, Unites States, 1982 02/13 Jesper Skriver born in Aarhus, Denmark, 1975 02/13 Steve Wills born in Lynchburg, Virginia, United States, 1975 02/13 Andrey Slusar born in Odessa, USSR, 1979 From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 16:30:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B26D1065670; Tue, 11 Sep 2012 16:30:27 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26F3E8FC0A; Tue, 11 Sep 2012 16:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BGURkR085125; Tue, 11 Sep 2012 16:30:27 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BGUQDu085122; Tue, 11 Sep 2012 16:30:26 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209111630.q8BGUQDu085122@svn.freebsd.org> From: Andrey Zonov Date: Tue, 11 Sep 2012 16: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: r240364 - head/usr.bin/truss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 16:30:27 -0000 Author: zont Date: Tue Sep 11 16:30:26 2012 New Revision: 240364 URL: http://svn.freebsd.org/changeset/base/240364 Log: - Remove unused variables. - Remove redundant return after err(3) call. Approved by: kib (mentor) Modified: head/usr.bin/truss/setup.c Modified: head/usr.bin/truss/setup.c ============================================================================== --- head/usr.bin/truss/setup.c Tue Sep 11 13:58:03 2012 (r240363) +++ head/usr.bin/truss/setup.c Tue Sep 11 16:30:26 2012 (r240364) @@ -70,7 +70,6 @@ int setup_and_wait(char *command[]) { pid_t pid; - int waitval; pid = vfork(); if (pid == -1) @@ -82,10 +81,8 @@ setup_and_wait(char *command[]) } /* Only in the parent here */ - if (waitpid(pid, &waitval, 0) < 0) { + if (waitpid(pid, NULL, 0) < 0) err(1, "unexpect stop in waitpid"); - return 0; - } child_pid = pid; @@ -101,7 +98,7 @@ setup_and_wait(char *command[]) int start_tracing(pid_t pid) { - int ret, retry, waitval; + int ret, retry; retry = 10; do { @@ -112,7 +109,7 @@ start_tracing(pid_t pid) err(1, "can not attach to target process"); child_pid = pid; - if (waitpid(pid, &waitval, 0) < 0) + if (waitpid(pid, NULL, 0) < 0) err(1, "Unexpect stop in waitpid"); return (0); From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 16:32:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78EC71065694; Tue, 11 Sep 2012 16:32:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 650528FC0C; Tue, 11 Sep 2012 16:32:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BGWWkx085484; Tue, 11 Sep 2012 16:32:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BGWWRE085481; Tue, 11 Sep 2012 16:32:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209111632.q8BGWWRE085481@svn.freebsd.org> From: Dimitry Andric Date: Tue, 11 Sep 2012 16:32: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: r240365 - in head/usr.bin: mkcsmapper mkesdb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 16:32:32 -0000 Author: dim Date: Tue Sep 11 16:32:31 2012 New Revision: 240365 URL: http://svn.freebsd.org/changeset/base/240365 Log: Ensure mkcsmapper and mkesdb compile with clang, if WITH_ICONV is defined. Submitted by: zeising PR: bin/167481 MFC after: 3 days X-MFC-With: r238197 Modified: head/usr.bin/mkcsmapper/lex.l head/usr.bin/mkesdb/lex.l Modified: head/usr.bin/mkcsmapper/lex.l ============================================================================== --- head/usr.bin/mkcsmapper/lex.l Tue Sep 11 16:30:26 2012 (r240364) +++ head/usr.bin/mkcsmapper/lex.l Tue Sep 11 16:32:31 2012 (r240365) @@ -43,6 +43,7 @@ int line_number = 1; %} +%option noinput %option nounput %x COMMENT Modified: head/usr.bin/mkesdb/lex.l ============================================================================== --- head/usr.bin/mkesdb/lex.l Tue Sep 11 16:30:26 2012 (r240364) +++ head/usr.bin/mkesdb/lex.l Tue Sep 11 16:32:31 2012 (r240365) @@ -45,6 +45,7 @@ int line_number = 1; %} +%option noinput %option nounput %x COMMENT From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 16:59:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D02FE1065673; Tue, 11 Sep 2012 16:59:04 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC36C8FC17; Tue, 11 Sep 2012 16:59:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BGx4Fh089755; Tue, 11 Sep 2012 16:59:04 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BGx4g6089753; Tue, 11 Sep 2012 16:59:04 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201209111659.q8BGx4g6089753@svn.freebsd.org> From: Scott Long Date: Tue, 11 Sep 2012 16:59: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: r240366 - head/sys/dev/ixgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 16:59:04 -0000 Author: scottl Date: Tue Sep 11 16:59:04 2012 New Revision: 240366 URL: http://svn.freebsd.org/changeset/base/240366 Log: Remove a prefetch() directive that, after careful testing, does more harm than good. Submitted by: Fabien Thomas Reviewed by: jfv Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Sep 11 16:32:31 2012 (r240365) +++ head/sys/dev/ixgbe/ixgbe.c Tue Sep 11 16:59:04 2012 (r240366) @@ -4641,7 +4641,6 @@ ixgbe_rxeof(struct ix_queue *que, int co * leave the old mbuf+cluster for re-use. */ if (eop && plen <= IXGBE_RX_COPY_LEN) { - prefetch(mp->m_data); sendmp = m_gethdr(M_DONTWAIT, MT_DATA); if (sendmp != NULL) { sendmp->m_data += From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 17:21:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5CCB106566C; Tue, 11 Sep 2012 17:21:25 +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 D24FC8FC1E; Tue, 11 Sep 2012 17:21:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BHLPPL093495; Tue, 11 Sep 2012 17:21:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BHLPJp093492; Tue, 11 Sep 2012 17:21:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209111721.q8BHLPJp093492@svn.freebsd.org> From: Andriy Gapon Date: Tue, 11 Sep 2012 17:21: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: r240367 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 17:21:26 -0000 Author: avg Date: Tue Sep 11 17:21:25 2012 New Revision: 240367 URL: http://svn.freebsd.org/changeset/base/240367 Log: revert r240344: cpu_devices[] is used in other functions and must be kept Reported by: gjb, glebius Pointyhat to: avg MFC after: 1 day X-MFC note: fake MFC, reminder to never MFC r240344 Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Tue Sep 11 16:59:04 2012 (r240366) +++ head/sys/dev/acpica/acpi_cpu.c Tue Sep 11 17:21:25 2012 (r240367) @@ -862,7 +862,6 @@ acpi_cpu_startup(void *arg) cpu_cx_lowest_lim = 0; cpu_disable_idle = FALSE; cpu_idle_hook = acpi_cpu_idle; - free(cpu_devices, M_TEMP); } static void From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 17:40:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A01C41065670; Tue, 11 Sep 2012 17:40:07 +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 8B75D8FC1A; Tue, 11 Sep 2012 17:40:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BHe7g5098958; Tue, 11 Sep 2012 17:40:07 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BHe7U1098956; Tue, 11 Sep 2012 17:40:07 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209111740.q8BHe7U1098956@svn.freebsd.org> From: Joel Dahl Date: Tue, 11 Sep 2012 17:40: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: r240368 - head/lib/msun/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 17:40:07 -0000 Author: joel (doc committer) Date: Tue Sep 11 17:40:06 2012 New Revision: 240368 URL: http://svn.freebsd.org/changeset/base/240368 Log: Minor mdoc fix. Modified: head/lib/msun/man/cexp.3 Modified: head/lib/msun/man/cexp.3 ============================================================================== --- head/lib/msun/man/cexp.3 Tue Sep 11 17:21:25 2012 (r240367) +++ head/lib/msun/man/cexp.3 Tue Sep 11 17:40:06 2012 (r240368) @@ -59,17 +59,17 @@ behaves according to Euler's formula: .Bd -ragged -offset indent .Fn cexp "x + I*y" = -.Ns ( Sy e Ns ** Ns +.Po Sy e Ns ** Ns .Fa x * -.Em cos Ns ( Ns -.Fa y Ns )) + ( Ns +.Em cos Ns Po Ns +.Fa y Ns Pc Pc + Po Ns .Sy I * .Sy e Ns ** Ns .Fa x * -.Em sin Ns ( Ns -.Fa y Ns )) +.Em sin Ns Po Ns +.Fa y Ns Pc Pc .Ed .Pp Generally speaking, infinities, zeroes and \*(Nas are handled as would From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 17:57:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B3561065670; Tue, 11 Sep 2012 17:57:04 +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 06F9C8FC0C; Tue, 11 Sep 2012 17:57:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BHv3xh001824; Tue, 11 Sep 2012 17:57:03 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BHv393001822; Tue, 11 Sep 2012 17:57:03 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209111757.q8BHv393001822@svn.freebsd.org> From: Joel Dahl Date: Tue, 11 Sep 2012 17:57: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: r240369 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 17:57:04 -0000 Author: joel (doc committer) Date: Tue Sep 11 17:57:03 2012 New Revision: 240369 URL: http://svn.freebsd.org/changeset/base/240369 Log: Minor mdoc fix. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Tue Sep 11 17:40:06 2012 (r240368) +++ head/bin/sh/sh.1 Tue Sep 11 17:57:03 2012 (r240369) @@ -487,8 +487,9 @@ and backslash The backslash inside double quotes is historically weird. It remains literal unless it precedes the following characters, which it serves to quote: +.Pp .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact -.It Li $ Ta Li ` Ta Li \&" Ta Li \e\ Ta Li \en +.It Li $ Ta Li ` Ta Li \&" Ta Li \e Ta Li \en .El .It Backslash A backslash preserves the literal meaning of the following From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 19:25:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD031065675; Tue, 11 Sep 2012 19:25:59 +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 BC45D8FC18; Tue, 11 Sep 2012 19:25:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BJPxvO015884; Tue, 11 Sep 2012 19:25:59 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BJPxvc015882; Tue, 11 Sep 2012 19:25:59 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209111925.q8BJPxvc015882@svn.freebsd.org> From: Joel Dahl Date: Tue, 11 Sep 2012 19:25: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: r240370 - head/usr.bin/chat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 19:26:00 -0000 Author: joel (doc committer) Date: Tue Sep 11 19:25:59 2012 New Revision: 240370 URL: http://svn.freebsd.org/changeset/base/240370 Log: Minor mdoc fix. Modified: head/usr.bin/chat/chat.8 Modified: head/usr.bin/chat/chat.8 ============================================================================== --- head/usr.bin/chat/chat.8 Tue Sep 11 17:57:03 2012 (r240369) +++ head/usr.bin/chat/chat.8 Tue Sep 11 19:25:59 2012 (r240370) @@ -508,9 +508,9 @@ If you send a null string then it will s send the return character. This sequence may either be a pair of apostrophe or quote characters. -.It \\\\b +.It \eb represents a backspace character. -.It \\\\c +.It \ec Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. @@ -519,44 +519,44 @@ be at the end of the send string. For example, the sequence hello\\c will simply send the characters h, e, l, l, o .Pq Em not valid in expect . -.It \\\\d +.It \ed Delay for one second. The program uses sleep(1) which will delay to a maximum of one second .Pq Em not valid in expect . -.It \\\\K +.It \eK Insert a .Dv BREAK .Pq Em not valid in expect . -.It \\\\n +.It \en Send a newline or linefeed character. -.It \\\\N +.It \eN Send a null character. The same sequence may be represented by \\0 .Pq Em not valid in expect . -.It \\\\p +.It \ep Pause for a fraction of a second. The delay is 1/10th of a second .Pq Em not valid in expect . -.It \\\\q +.It \eq Suppress writing the string to .Xr syslogd 8 . The string ?????? is written to the log in its place .Pq Em not valid in expect . -.It \\\\r +.It \er Send or expect a carriage return. -.It \\\\s +.It \es Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\\sTIM are the same. -.It \\\\t +.It \et Send or expect a tab character. -.It \\\\\\\\ +.It \e Send or expect a backslash character. -.It \\\\ddd +.It \eddd Collapse the octal digits (ddd) into a single ASCII character and send that character .Pq Em some characters are not valid in expect . From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 20:20:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F384E1065670; Tue, 11 Sep 2012 20:20:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C50BC8FC0C; Tue, 11 Sep 2012 20:20:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BKKDCw024942; Tue, 11 Sep 2012 20:20:13 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BKKDZB024939; Tue, 11 Sep 2012 20:20:13 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209112020.q8BKKDZB024939@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 11 Sep 2012 20:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240371 - in head/sys/geom: mirror raid3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 20:20:14 -0000 Author: glebius Date: Tue Sep 11 20:20:13 2012 New Revision: 240371 URL: http://svn.freebsd.org/changeset/base/240371 Log: When synchronizing, include in the config dump amount of bytes syncronized. The rationale behind this is the following: for large disks the percent synchronisation counter ticks too seldom, and monitoring software (as well as human operator) can't tell whether synchronisation goes on or one of disks got stuck. On an idle server one can look into gstat and see whether synchronisation goes on or not, but on a busy server that won't work. Also, new value monitored can be differentiated obtaining the synchronisation speed quite precisely. Submitted by: Konstantin Kukushkin Reviewed by: pjd Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/raid3/g_raid3.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Sep 11 19:25:59 2012 (r240370) +++ head/sys/geom/mirror/g_mirror.c Tue Sep 11 20:20:13 2012 (r240371) @@ -3144,6 +3144,11 @@ g_mirror_dumpconf(struct sbuf *sb, const sc->sc_provider->mediasize)); } sbuf_printf(sb, "\n"); + if (disk->d_sync.ds_offset > 0) { + sbuf_printf(sb, "%s%jd" + "\n", indent, + (intmax_t)disk->d_sync.ds_offset); + } } sbuf_printf(sb, "%s%u\n", indent, disk->d_sync.ds_syncid); Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Tue Sep 11 19:25:59 2012 (r240370) +++ head/sys/geom/raid3/g_raid3.c Tue Sep 11 20:20:13 2012 (r240371) @@ -3448,6 +3448,11 @@ g_raid3_dumpconf(struct sbuf *sb, const (sc->sc_mediasize / (sc->sc_ndisks - 1)))); } sbuf_printf(sb, "\n"); + if (disk->d_sync.ds_offset > 0) { + sbuf_printf(sb, "%s%jd" + "\n", indent, + (intmax_t)disk->d_sync.ds_offset); + } } sbuf_printf(sb, "%s%u\n", indent, disk->d_sync.ds_syncid); From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 20:53:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71C01106566B; Tue, 11 Sep 2012 20:53:51 +0000 (UTC) (envelope-from arthurmesh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 38EA38FC08; Tue, 11 Sep 2012 20:53:51 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so1463545pbb.13 for ; Tue, 11 Sep 2012 13:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=2Xc5nm/iuuA7DoGG1OAA5dNTeRmEzihzBzcMBbEJq6c=; b=SPstn085J1fOdqKCg5cxVe2Rqw7T8gkiNcfU0M58sRmEaeWHZQuybe+pcCqxRLr8Im TcU9X56oVfc8USLjrXa7NNCcPJup5qhbtzCmHNtx2QydpEE2MHRJxA7hxrV7LvagQvBa z6XyromRvTi7Be+eONrNJ1QeXJhiHUg7EtepE+jwrBm+xS0fS+lqwFBJ4jbSrW3qI2YK VLk7UuX3PLjBbq3bHasmzqfH3Tn2jIl2Th7wqlVwPGRiLKkKVXU+mUKPw3pzJqva7XDR eBQp2bjYCF3CGo/zvKDULq6ZooOpTk6WQEyx+yKi1AyQkcURVraOnrkH4oP6D3Q1LuP0 WdSg== Received: by 10.68.224.162 with SMTP id rd2mr12955424pbc.118.1347396830366; Tue, 11 Sep 2012 13:53:50 -0700 (PDT) Received: from x96.org (x96.org. [64.85.165.177]) by mx.google.com with ESMTPS id mu8sm10297054pbc.49.2012.09.11.13.53.47 (version=SSLv3 cipher=OTHER); Tue, 11 Sep 2012 13:53:49 -0700 (PDT) Date: Tue, 11 Sep 2012 13:53:45 -0700 From: Arthur Mesh To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120911205345.GD14077@x96.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: RE: svn commit: r240135 - in head/sys: amd64/conf conf dev/random i386/conf modules/random X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 20:53:51 -0000 Funny, I've also implemented RdRand backing for /dev/random over the weekend, w/o being aware of kib@'s work. Oh well. One comment I have: IVY_RNG is potentially not the best name. RdRand will be available on future architectures, such as Haswell. Perhaps RDRAND_RNG would make a better name? Thanks. From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 21:13:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75D871065673; Tue, 11 Sep 2012 21:13:19 +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 48F638FC25; Tue, 11 Sep 2012 21:13:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BLDJlN033796; Tue, 11 Sep 2012 21:13:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BLDJKu033794; Tue, 11 Sep 2012 21:13:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209112113.q8BLDJKu033794@svn.freebsd.org> From: Xin LI Date: Tue, 11 Sep 2012 21:13: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: r240372 - head/usr.bin/stdbuf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 21:13:19 -0000 Author: delphij Date: Tue Sep 11 21:13:18 2012 New Revision: 240372 URL: http://svn.freebsd.org/changeset/base/240372 Log: WARNS is now default to 6. Modified: head/usr.bin/stdbuf/Makefile Modified: head/usr.bin/stdbuf/Makefile ============================================================================== --- head/usr.bin/stdbuf/Makefile Tue Sep 11 20:20:13 2012 (r240371) +++ head/usr.bin/stdbuf/Makefile Tue Sep 11 21:13:18 2012 (r240372) @@ -3,6 +3,4 @@ PROG= stdbuf SRCS= stdbuf.c -WARNS?= 6 - .include From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 21:16:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 321F61065678; Tue, 11 Sep 2012 21:16:23 +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 1D9C18FC1E; Tue, 11 Sep 2012 21:16:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BLGMh2034339; Tue, 11 Sep 2012 21:16:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BLGMGb034337; Tue, 11 Sep 2012 21:16:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209112116.q8BLGMGb034337@svn.freebsd.org> From: Xin LI Date: Tue, 11 Sep 2012 21:16: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: r240373 - head/contrib/bzip2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 21:16:23 -0000 Author: delphij Date: Tue Sep 11 21:16:22 2012 New Revision: 240373 URL: http://svn.freebsd.org/changeset/base/240373 Log: Remove a few files that are not needed for FreeBSD. PR: bin/171555 Approved by: obrien Deleted: head/contrib/bzip2/Makefile head/contrib/bzip2/Makefile-libbz2_so head/contrib/bzip2/dlltest.c head/contrib/bzip2/makefile.msc Modified: head/contrib/bzip2/FREEBSD-Xlist Modified: head/contrib/bzip2/FREEBSD-Xlist ============================================================================== --- head/contrib/bzip2/FREEBSD-Xlist Tue Sep 11 21:13:18 2012 (r240372) +++ head/contrib/bzip2/FREEBSD-Xlist Tue Sep 11 21:16:22 2012 (r240373) @@ -1,4 +1,5 @@ # $FreeBSD$ +*Makefile* *README.XML.STUFF *bz-common.xsl *bz-fo.xsl @@ -12,10 +13,11 @@ *bzip2.txt *bzmore *bzmore.1 -*dlltest.dsp +*dlltest.* *entities.xml *format.pl *libbz2.dsp +*makefile.msc *manual.html *manual.pdf *manual.ps From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 22:08:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E79F1065673; Tue, 11 Sep 2012 22:08:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27F9E8FC16; Tue, 11 Sep 2012 22:08:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BM8KTU042424; Tue, 11 Sep 2012 22:08:20 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BM8Kwb042420; Tue, 11 Sep 2012 22:08:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209112208.q8BM8Kwb042420@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 11 Sep 2012 22:08: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: r240374 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 22:08:20 -0000 Author: hselasky Date: Tue Sep 11 22:08:19 2012 New Revision: 240374 URL: http://svn.freebsd.org/changeset/base/240374 Log: Fix missing parts of DWC OTG host mode support. The host mode support of the DWC OTG is very simple in PIO mode, and we need to re-transmit data when NAK is received among other things. We probably will need to implement some kind of rate limitation on the NAK-ing. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Tue Sep 11 21:16:22 2012 (r240373) +++ head/sys/dev/usb/controller/dwc_otg.c Tue Sep 11 22:08:19 2012 (r240374) @@ -127,7 +127,6 @@ static dwc_otg_cmd_t dwc_otg_data_tx_syn static dwc_otg_cmd_t dwc_otg_host_setup_tx; static dwc_otg_cmd_t dwc_otg_host_data_tx; static dwc_otg_cmd_t dwc_otg_host_data_rx; -static dwc_otg_cmd_t dwc_otg_host_data_tx_sync; static void dwc_otg_device_done(struct usb_xfer *, usb_error_t); static void dwc_otg_do_poll(struct usb_bus *); @@ -505,8 +504,9 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* enable interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), HCINT_STALL | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR | - HCINT_XFERCOMPL); + HCINT_AHBERR | HCINT_CHHLTD | + HCINT_XACTERR | HCINT_XFERCOMPL | + HCINT_NAK | HCINT_NYET); DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt); DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0); @@ -544,6 +544,42 @@ dwc_otg_host_setup_tx(struct dwc_otg_td /* get pointer to softc */ sc = DWC_OTG_PC2SC(td->pc); + temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel)); + DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp); + + DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", + td->channel, + temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), + DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + + if (temp & HCINT_NAK) + td->did_nak = 1; + + if (temp & HCINT_STALL) { + td->error_stall = 1; + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & (HCINT_BBLERR | + HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { + td->error_any = 1; + return (0); /* complete */ + } + + if (temp & HCINT_XFERCOMPL) + td->did_complete = 1; + + if (td->did_complete) { + if (td->did_nak == 0) { + td->offset += td->tx_bytes; + td->remainder -= td->tx_bytes; + td->toggle = 1; + return (0); /* complete */ + } + } else { + return (1); /* busy */ + } temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS); DPRINTF("HPTXSTS=0x%08x\n", temp); @@ -563,9 +599,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td usbd_copy_out(td->pc, 0, &req, sizeof(req)); - td->offset = sizeof(req); - td->remainder = 0; - DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), (sizeof(req) << HCTSIZ_XFERSIZE_SHIFT) | (1 << HCTSIZ_PKTCNT_SHIFT) | @@ -581,13 +614,12 @@ dwc_otg_host_setup_tx(struct dwc_otg_td bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4); - td->toggle = 1; - - /* need to sync before complete */ - td->func = &dwc_otg_host_data_tx_sync; + /* reset statemachine */ + td->did_complete = 0; + td->did_nak = 0; + td->tx_bytes = sizeof(req); - /* check status */ - return (dwc_otg_host_data_tx_sync(td)); + return (1); /* busy */ } static uint8_t @@ -728,13 +760,11 @@ dwc_otg_host_data_rx(struct dwc_otg_td * uint32_t temp; uint16_t count; uint8_t got_short; - uint8_t is_isoc; + uint8_t ep_type; if (dwc_otg_host_channel_alloc(td)) return (1); /* busy */ - got_short = 0; - /* get pointer to softc */ sc = DWC_OTG_PC2SC(td->pc); @@ -746,6 +776,9 @@ dwc_otg_host_data_rx(struct dwc_otg_td * temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + if (temp & HCINT_NAK) + td->did_nak = 1; + if (temp & HCINT_STALL) { td->error_stall = 1; td->error_any = 1; @@ -758,6 +791,9 @@ dwc_otg_host_data_rx(struct dwc_otg_td * return (0); /* complete */ } + if (temp & HCINT_XFERCOMPL) + td->did_complete = 1; + /* check endpoint status */ if (sc->sc_last_rx_status == 0) goto not_complete; @@ -770,92 +806,74 @@ dwc_otg_host_data_rx(struct dwc_otg_td * DPRINTF("DATA\n"); - td->npkt = 0; + td->toggle ^= 1; - if ((sc->sc_last_rx_status & - GRXSTSRD_DPID_MASK) == GRXSTSRD_DPID_DATA0) { - if (td->toggle == 1) { - /* release FIFO - wrong toggle */ - DPRINTF("Wrong DT\n"); - dwc_otg_common_rx_ack(sc); - goto not_complete; - } - td->toggle = 1; - } else { - if (td->toggle == 0) { - /* release FIFO - wrong toggle */ - DPRINTF("Wrong DT\n"); + got_short = 0; + + /* get the packet byte count */ + count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); + + /* verify the packet byte count */ + if (count != td->max_packet_size) { + if (count < td->max_packet_size) { + /* we have a short packet */ + td->short_pkt = 1; + got_short = 1; + } else { + /* invalid USB packet */ + td->error_any = 1; + + /* release FIFO */ dwc_otg_common_rx_ack(sc); - goto not_complete; + return (0); /* we are complete */ } - td->toggle = 0; } - break; - - default: - DPRINTF("OTHER\n"); - - /* release FIFO */ - dwc_otg_common_rx_ack(sc); - goto not_complete; - } - - /* get the packet byte count */ - count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); - /* verify the packet byte count */ - if (count != td->max_packet_size) { - if (count < td->max_packet_size) { - /* we have a short packet */ - td->short_pkt = 1; - got_short = 1; - } else { + /* verify the packet byte count */ + if (count > td->remainder) { /* invalid USB packet */ td->error_any = 1; /* release FIFO */ dwc_otg_common_rx_ack(sc); - return (0); /* we are complete */ + return (0); /* we are complete */ } - } - /* verify the packet byte count */ - if (count > td->remainder) { - /* invalid USB packet */ - td->error_any = 1; + usbd_copy_in(td->pc, td->offset, sc->sc_rx_bounce_buffer, count); + td->remainder -= count; + td->offset += count; /* release FIFO */ dwc_otg_common_rx_ack(sc); - return (0); /* we are complete */ - } - usbd_copy_in(td->pc, td->offset, sc->sc_rx_bounce_buffer, count); - td->remainder -= count; - td->offset += count; + /* check if we are complete */ + if ((td->remainder == 0) || got_short) { + if (td->short_pkt) { + /* we are complete */ + return (0); + } + /* else need to receive a zero length packet */ + } + break; - /* release FIFO */ - dwc_otg_common_rx_ack(sc); + default: + DPRINTF("OTHER\n"); - /* check if we are complete */ - if ((td->remainder == 0) || got_short) { - if (td->short_pkt) { - /* we are complete */ - return (0); - } - /* else need to receive a zero length packet */ + /* release FIFO */ + dwc_otg_common_rx_ack(sc); + break; } not_complete: - - if (td->npkt != 0) + if (td->did_complete == 0 && td->did_nak == 0) return (1); /* busy */ temp = sc->sc_hcchar[td->channel]; - is_isoc = (((temp & HCCHAR_EPTYPE_MASK) >> - HCCHAR_EPTYPE_SHIFT) == UE_ISOCHRONOUS); + ep_type = ((temp & HCCHAR_EPTYPE_MASK) >> + HCCHAR_EPTYPE_SHIFT); - if (is_isoc != 0) { + if (ep_type == UE_ISOCHRONOUS) { if ((sc->sc_sof_val & 0xFF) != td->sof_val) return (1); /* busy */ if (td->sof_val & 1) @@ -863,17 +881,19 @@ not_complete: td->sof_val += td->sof_res; /* DATA 0 */ td->toggle = 0; + } else if (ep_type == UE_INTERRUPT) { + if ((sc->sc_interrupt_val & 0xFF) != td->sof_val) + return (1); /* busy */ + td->sof_val += td->sof_res; } else if (td->set_toggle) { td->set_toggle = 0; td->toggle = 1; } - /* receive one packet at a time */ - td->npkt = 1; - + /* receive one packet */ DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), (td->max_packet_size << HCTSIZ_XFERSIZE_SHIFT) | - (td->npkt << HCTSIZ_PKTCNT_SHIFT) | + (1 << HCTSIZ_PKTCNT_SHIFT) | (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) : (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT))); @@ -882,6 +902,10 @@ not_complete: /* must enable channel before data can be received */ DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp); + /* reset statemachine */ + td->did_complete = 0; + td->did_nak = 0; + return (1); /* not complete */ } @@ -1004,9 +1028,8 @@ dwc_otg_host_data_tx(struct dwc_otg_td * struct dwc_otg_softc *sc; uint32_t max_buffer; uint32_t count; - uint32_t mpkt; uint32_t temp; - uint8_t is_isoc; + uint8_t ep_type; uint8_t max_frames; if (dwc_otg_host_channel_alloc(td)) @@ -1023,6 +1046,9 @@ dwc_otg_host_data_tx(struct dwc_otg_td * temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); + if (temp & HCINT_NAK) + td->did_nak = 1; + if (temp & HCINT_STALL) { td->error_stall = 1; td->error_any = 1; @@ -1035,12 +1061,33 @@ dwc_otg_host_data_tx(struct dwc_otg_td * return (0); /* complete */ } + if (temp & HCINT_XFERCOMPL) + td->did_complete = 1; + + if (td->did_complete) { + if (td->did_nak == 0) { + td->offset += td->tx_bytes; + td->remainder -= td->tx_bytes; + td->toggle ^= 1; + td->did_nak = 1; + + /* check remainder */ + if (td->remainder == 0) { + if (td->short_pkt) + return (0); /* complete */ + + /* else we need to transmit a short packet */ + } + } + } else { + return (1); /* busy */ + } temp = sc->sc_hcchar[td->channel]; - is_isoc = (((temp & HCCHAR_EPTYPE_MASK) >> - HCCHAR_EPTYPE_SHIFT) == UE_ISOCHRONOUS); + ep_type = ((temp & HCCHAR_EPTYPE_MASK) >> + HCCHAR_EPTYPE_SHIFT); - if (is_isoc != 0) { + if (ep_type == UE_ISOCHRONOUS) { if ((sc->sc_sof_val & 0xFF) != td->sof_val) return (1); /* busy */ if (td->sof_val & 1) @@ -1050,20 +1097,15 @@ dwc_otg_host_data_tx(struct dwc_otg_td * td->sof_val += td->sof_res; td->toggle = 0; + } else if (ep_type == UE_INTERRUPT) { + if ((sc->sc_interrupt_val & 0xFF) != td->sof_val) + return (1); /* busy */ + td->sof_val += td->sof_res; } else if (td->set_toggle) { td->set_toggle = 0; td->toggle = 1; } - /* check if all packets have been transferred */ - temp = DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)); - if (temp & HCTSIZ_PKTCNT_MASK) { - DPRINTFN(5, "busy ch=%d npkt=%d HCTSIZ=0x%08x\n", - td->channel, (temp & HCTSIZ_PKTCNT_MASK) >> - HCTSIZ_PKTCNT_SHIFT, temp); - return (1); /* busy */ - } - temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS); max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK); @@ -1071,48 +1113,25 @@ dwc_otg_host_data_tx(struct dwc_otg_td * >> HPTXSTS_PTXQSPCAVAIL_SHIFT; max_buffer = max_buffer - (max_buffer % td->max_packet_size); - if (max_buffer == 0 || max_frames < 2) + if (max_buffer == 0 || max_frames == 0) return (1); /* busy */ - /* try to optimise by sending more data */ - if (td->channel != 0 && - (td->max_packet_size & 3) == 0 && is_isoc == 0) { - + /* send one packet at a time */ + count = td->max_packet_size; + if (td->remainder < count) { + /* we have a short packet */ + td->short_pkt = 1; count = td->remainder; - if (count > max_buffer) - count = max_buffer; - - mpkt = count / td->max_packet_size; - - if (mpkt > max_frames) { - mpkt = max_frames; - count = td->max_packet_size * mpkt; - } else if ((count == 0) || (count % td->max_packet_size)) { - /* we are transmitting a short packet */ - mpkt++; - td->short_pkt = 1; - } - } else { - /* send one packet at a time */ - mpkt = 1; - count = td->max_packet_size; - if (td->remainder < count) { - /* we have a short packet */ - td->short_pkt = 1; - count = td->remainder; - } } + /* TODO: HCTSIZ_DOPNG */ + DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel), (count << HCTSIZ_XFERSIZE_SHIFT) | - (mpkt << HCTSIZ_PKTCNT_SHIFT) | + (1 << HCTSIZ_PKTCNT_SHIFT) | (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) : (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT))); - td->toggle ^= (mpkt & 1); - - /* TODO: HCTSIZ_DOPNG */ - temp = sc->sc_hcchar[td->channel]; temp &= ~HCCHAR_EPDIR_IN; @@ -1132,19 +1151,14 @@ dwc_otg_host_data_tx(struct dwc_otg_td * bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl, DOTG_DFIFO(td->channel), sc->sc_tx_bounce_buffer, (count + 3) / 4); - - td->remainder -= count; - td->offset += count; } - /* check remainder */ - if (td->remainder == 0) { - if (td->short_pkt) - return (0); /* complete */ + /* reset statemachine */ + td->did_complete = 0; + td->did_nak = 0; + td->tx_bytes = count; - /* else we need to transmit a short packet */ - } - return (1); /* not complete */ + return (1); /* busy */ } static uint8_t @@ -1340,44 +1354,6 @@ not_complete: } static uint8_t -dwc_otg_host_data_tx_sync(struct dwc_otg_td *td) -{ - struct dwc_otg_softc *sc; - uint32_t temp; - - if (dwc_otg_host_channel_alloc(td)) - return (1); /* busy */ - - /* get pointer to softc */ - sc = DWC_OTG_PC2SC(td->pc); - - temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel)); - DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp); - - DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n", - td->channel, - temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), - DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); - - if (temp & HCINT_STALL) { - td->error_stall = 1; - td->error_any = 1; - return (0); /* complete */ - } - - if (temp & (HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { - td->error_any = 1; - return (0); /* complete */ - } - - if (temp & HCINT_XFERCOMPL) - return (0); /* complete */ - - return (1); /* busy */ -} - -static uint8_t dwc_otg_data_tx_sync(struct dwc_otg_td *td) { struct dwc_otg_softc *sc; @@ -1842,6 +1818,8 @@ dwc_otg_setup_standard_chain_sub(struct td->error_any = 0; td->npkt = 0; td->did_stall = temp->did_stall; + td->did_nak = 1; + td->did_complete = 1; td->short_pkt = temp->short_pkt; td->alt_next = temp->setup_alt_next; td->set_toggle = 0; @@ -1918,7 +1896,7 @@ dwc_otg_setup_standard_chain(struct usb_ } else { if (is_host) { temp.func = &dwc_otg_host_data_tx; - need_sync = 1; + need_sync = 0; } else { temp.func = &dwc_otg_data_rx; need_sync = 0; @@ -1980,13 +1958,8 @@ dwc_otg_setup_standard_chain(struct usb_ /* check if we need to sync */ if (need_sync) { - if (is_host) { - /* we need a SYNC point after TX */ - temp.func = &dwc_otg_host_data_tx_sync; - } else { - /* we need a SYNC point after TX */ - temp.func = &dwc_otg_data_tx_sync; - } + /* we need a SYNC point after TX */ + temp.func = &dwc_otg_data_tx_sync; dwc_otg_setup_standard_chain_sub(&temp); } @@ -2000,7 +1973,7 @@ dwc_otg_setup_standard_chain(struct usb_ if (xfer->endpointno & UE_DIR_IN) { if (is_host) { temp.func = &dwc_otg_host_data_tx; - need_sync = 1; + need_sync = 0; } else { temp.func = &dwc_otg_data_rx; need_sync = 0; @@ -2023,10 +1996,7 @@ dwc_otg_setup_standard_chain(struct usb_ if (need_sync) { /* we need a SYNC point after TX */ - if (is_host) - temp.func = &dwc_otg_host_data_tx_sync; - else - temp.func = &dwc_otg_data_tx_sync; + temp.func = &dwc_otg_data_tx_sync; dwc_otg_setup_standard_chain_sub(&temp); } } @@ -2040,10 +2010,7 @@ dwc_otg_setup_standard_chain(struct usb_ temp.setup_alt_next = 0; /* we need a SYNC point after TX */ - if (is_host) - temp.func = &dwc_otg_host_data_tx_sync; - else - temp.func = &dwc_otg_data_tx_sync; + temp.func = &dwc_otg_data_tx_sync; dwc_otg_setup_standard_chain_sub(&temp); } } @@ -2105,8 +2072,13 @@ dwc_otg_setup_standard_chain(struct usb_ break; } - td->sof_val = xfer->endpoint->isoc_next & 0xFF; - td->sof_res = 1 << usbd_xfer_get_fps_shift(xfer); + if (xfer_type == UE_ISOCHRONOUS) { + td->sof_val = xfer->endpoint->isoc_next & 0xFF; + td->sof_res = 1 << usbd_xfer_get_fps_shift(xfer); + } else if (xfer_type == UE_INTERRUPT) { + td->sof_val = sc->sc_interrupt_val; + td->sof_res = 0; /* TODO */ + } } } Modified: head/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.h Tue Sep 11 21:16:22 2012 (r240373) +++ head/sys/dev/usb/controller/dwc_otg.h Tue Sep 11 22:08:19 2012 (r240374) @@ -66,9 +66,10 @@ struct dwc_otg_td { uint8_t alt_next:1; uint8_t short_pkt:1; uint8_t did_stall:1; - uint8_t did_ping:1; uint8_t toggle:1; uint8_t set_toggle:1; + uint8_t did_nak:1; + uint8_t did_complete:1; }; struct dwc_otg_std_temp { @@ -150,6 +151,8 @@ struct dwc_otg_softc { uint32_t sc_hcchar[DWC_OTG_MAX_CHANNELS]; uint32_t sc_sof_refs; uint32_t sc_sof_val; + uint32_t sc_interrupt_refs; + uint32_t sc_interrupt_val; uint32_t sc_hprt_val; uint16_t sc_active_rx_ep; From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 22:10:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E8B0106567E; Tue, 11 Sep 2012 22:10:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49BED8FC17; Tue, 11 Sep 2012 22:10:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BMAb28042823; Tue, 11 Sep 2012 22:10:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BMAbtW042820; Tue, 11 Sep 2012 22:10:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209112210.q8BMAbtW042820@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 11 Sep 2012 22:10: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: r240375 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 22:10:37 -0000 Author: hselasky Date: Tue Sep 11 22:10:36 2012 New Revision: 240375 URL: http://svn.freebsd.org/changeset/base/240375 Log: Add device entry for DWC OTG. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 11 22:08:19 2012 (r240374) +++ head/sys/conf/files Tue Sep 11 22:10:36 2012 (r240375) @@ -2081,6 +2081,7 @@ dev/usb/controller/at91dci.c optional a dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 dev/usb/controller/musb_otg.c optional musb dev/usb/controller/musb_otg_atmelarm.c optional musb at91rm9200 +dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_pci.c optional ehci pci dev/usb/controller/ohci.c optional ohci From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 22:13:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2472D1065696; Tue, 11 Sep 2012 22:13:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1AB28FC34; Tue, 11 Sep 2012 22:13:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BMDb5V043319; Tue, 11 Sep 2012 22:13:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BMDbD2043317; Tue, 11 Sep 2012 22:13:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209112213.q8BMDbD2043317@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 11 Sep 2012 22:13: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: r240376 - head/sys/arm/broadcom/bcm2835 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 22:13:38 -0000 Author: hselasky Date: Tue Sep 11 22:13:37 2012 New Revision: 240376 URL: http://svn.freebsd.org/changeset/base/240376 Log: Add device entry for DWC OTG. Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Tue Sep 11 22:10:36 2012 (r240375) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Tue Sep 11 22:13:37 2012 (r240376) @@ -8,6 +8,7 @@ arm/broadcom/bcm2835/bcm2835_systimer.c arm/broadcom/bcm2835/bcm2835_wdog.c standard arm/broadcom/bcm2835/bus_space.c optional fdt arm/broadcom/bcm2835/common.c optional fdt +arm/broadcom/bcm2835/dwc_otg_brcm.c optional dwcotg arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 22:38:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53CD7106566B; Tue, 11 Sep 2012 22:38:34 +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 24EC48FC18; Tue, 11 Sep 2012 22:38:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BMcYgL047307; Tue, 11 Sep 2012 22:38:34 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BMcXCV047303; Tue, 11 Sep 2012 22:38:33 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209112238.q8BMcXCV047303@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 11 Sep 2012 22:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240377 - in head: lib/libmagic tools/build X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 22:38:34 -0000 Author: obrien Date: Tue Sep 11 22:38:33 2012 New Revision: 240377 URL: http://svn.freebsd.org/changeset/base/240377 Log: r235638 is not the clean way to add support for building on ancient FreeBSD versions. Instead use Imp's good work on "legacy" and follow the outcome of the previous TRB discussions on this topic. Now use the libc getline() if it exists, and only where it doesn't create a bootstraping version. Modified: head/lib/libmagic/Makefile head/lib/libmagic/config.h head/tools/build/Makefile Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Tue Sep 11 22:13:37 2012 (r240376) +++ head/lib/libmagic/Makefile Tue Sep 11 22:38:33 2012 (r240377) @@ -39,9 +39,9 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic -mkmagic: apprentice.c encoding.c funcs.c getline.c magic.c print.c - ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \ - -o ${.TARGET} ${.ALLSRC} +mkmagic: apprentice.c encoding.c funcs.c magic.c print.c + ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} \ + ${LDADD} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: head/lib/libmagic/config.h ============================================================================== --- head/lib/libmagic/config.h Tue Sep 11 22:13:37 2012 (r240376) +++ head/lib/libmagic/config.h Tue Sep 11 22:38:33 2012 (r240377) @@ -39,9 +39,7 @@ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `getline' function. */ -#ifndef HOSTPROG #define HAVE_GETLINE 1 -#endif /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Tue Sep 11 22:13:37 2012 (r240376) +++ head/tools/build/Makefile Tue Sep 11 22:38:33 2012 (r240377) @@ -3,12 +3,24 @@ .PATH: ${.CURDIR}/../../include LIB= egacy -SRCS= +SRC= INCSGROUPS= INCS -INCS= +INCS= BOOTSTRAPPING?= 0 +_WITH_GETLINE!= grep -c _WITH_GETLINE /usr/include/stdio.h || true +.if ${_WITH_GETLINE} == 0 +.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic +SRCS= getline.c config.h +CFLAGS+= -DHAVE_CONFIG_H -I. +CLEANFILES+= config.h + +${SRCS:N*.h:R:S/$/.o/}: config.h +config.h: ${.CURDIR}/../../lib/libmagic/config.h + grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET} +.endif + .if empty(SRCS) SRCS= dummy.c .endif From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 03:39:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BA3A106564A; Wed, 12 Sep 2012 03:39:33 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 886CD8FC15; Wed, 12 Sep 2012 03:39:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C3dXAL086766; Wed, 12 Sep 2012 03:39:33 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C3dXAo086764; Wed, 12 Sep 2012 03:39:33 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209120339.q8C3dXAo086764@svn.freebsd.org> From: Kevin Lo Date: Wed, 12 Sep 2012 03:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240378 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 03:39:33 -0000 Author: kevlo Date: Wed Sep 12 03:39:32 2012 New Revision: 240378 URL: http://svn.freebsd.org/changeset/base/240378 Log: Add references to VFS_SET(9) and VOP_VPTOFH(9) Modified: head/share/man/man9/VFS.9 Modified: head/share/man/man9/VFS.9 ============================================================================== --- head/share/man/man9/VFS.9 Tue Sep 11 22:38:33 2012 (r240377) +++ head/share/man/man9/VFS.9 Wed Sep 12 03:39:32 2012 (r240378) @@ -49,10 +49,12 @@ rather than implementing empty functions .Xr VFS_INIT 9 , .Xr VFS_MOUNT 9 , .Xr VFS_QUOTACTL 9 , +.Xr VFS_SET 9 , .Xr VFS_STATFS 9 , .Xr VFS_SYNC 9 , .Xr VFS_UNMOUNT 9 , .Xr VFS_VGET 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 03:42:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EE42106566B; Wed, 12 Sep 2012 03:42:52 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B44208FC17; Wed, 12 Sep 2012 03:42:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C3gqZe087238; Wed, 12 Sep 2012 03:42:52 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C3gqBQ087235; Wed, 12 Sep 2012 03:42:52 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209120342.q8C3gqBQ087235@svn.freebsd.org> From: Kevin Lo Date: Wed, 12 Sep 2012 03:42: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: r240379 - in head/sys: fs/ntfs gnu/fs/xfs/FreeBSD X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 03:42:53 -0000 Author: kevlo Date: Wed Sep 12 03:42:52 2012 New Revision: 240379 URL: http://svn.freebsd.org/changeset/base/240379 Log: Add VFCF_READONLY flag that indicates ntfs and xfs file systems are only supported as read-only. Modified: head/sys/fs/ntfs/ntfs_vfsops.c head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Wed Sep 12 03:39:32 2012 (r240378) +++ head/sys/fs/ntfs/ntfs_vfsops.c Wed Sep 12 03:42:52 2012 (r240379) @@ -776,5 +776,5 @@ static struct vfsops ntfs_vfsops = { .vfs_unmount = ntfs_unmount, .vfs_vget = ntfs_vget, }; -VFS_SET(ntfs_vfsops, ntfs, 0); +VFS_SET(ntfs_vfsops, ntfs, VFCF_READONLY); MODULE_VERSION(ntfs, 1); Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Wed Sep 12 03:39:32 2012 (r240378) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Wed Sep 12 03:42:52 2012 (r240379) @@ -422,7 +422,7 @@ static struct vfsops xfs_fsops = { .vfs_extattrctl = _xfs_extattrctl, }; -VFS_SET(xfs_fsops, xfs, 0); +VFS_SET(xfs_fsops, xfs, VFCF_READONLY); /* * Copy GEOM VFS functions here to provide a conveniet place to From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 04:33:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B693106566B; Wed, 12 Sep 2012 04:33:38 +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 133058FC12; Wed, 12 Sep 2012 04:33:36 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8C4XFcO025866; Wed, 12 Sep 2012 07:33:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8C4X2hl009401; Wed, 12 Sep 2012 07:33:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8C4X2aK009400; Wed, 12 Sep 2012 07:33:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 12 Sep 2012 07:33:02 +0300 From: Konstantin Belousov To: Arthur Mesh Message-ID: <20120912043302.GN37286@deviant.kiev.zoral.com.ua> References: <20120911205345.GD14077@x96.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ie5iOtK4e9kgqh2F" Content-Disposition: inline In-Reply-To: <20120911205345.GD14077@x96.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240135 - in head/sys: amd64/conf conf dev/random i386/conf modules/random X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 04:33:38 -0000 --Ie5iOtK4e9kgqh2F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 11, 2012 at 01:53:45PM -0700, Arthur Mesh wrote: > Funny, I've also implemented RdRand backing for /dev/random over the > weekend, w/o being aware of kib@'s work. Oh well. >=20 > One comment I have: IVY_RNG is potentially not the best name. RdRand > will be available on future architectures, such as Haswell.=20 >=20 > Perhaps RDRAND_RNG would make a better name? Can you submit the desired patch ? --Ie5iOtK4e9kgqh2F Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBQEH4ACgkQC3+MBN1Mb4hZtgCg2WYNelTzJX7ZzxN0L8RQcf2k 3owAoJQcPVAq4PR1fBJo+IFt3dcTfJnP =rSAG -----END PGP SIGNATURE----- --Ie5iOtK4e9kgqh2F-- From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 07:34:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE56D1065673; Wed, 12 Sep 2012 07:34:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D96B28FC14; Wed, 12 Sep 2012 07:34:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C7Y9df020441; Wed, 12 Sep 2012 07:34:09 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C7Y9bY020438; Wed, 12 Sep 2012 07:34:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209120734.q8C7Y9bY020438@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 12 Sep 2012 07:34: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: r240381 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 07:34:10 -0000 Author: hselasky Date: Wed Sep 12 07:34:09 2012 New Revision: 240381 URL: http://svn.freebsd.org/changeset/base/240381 Log: Reduce DWC OTG polling rate by using the SOF interrupt. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Wed Sep 12 04:29:11 2012 (r240380) +++ head/sys/dev/usb/controller/dwc_otg.c Wed Sep 12 07:34:09 2012 (r240381) @@ -160,6 +160,23 @@ dwc_otg_get_hw_ep_profile(struct usb_dev *ppf = NULL; } +static void +dwc_otg_request_sof(struct dwc_otg_softc *sc) +{ + sc->sc_sof_refs++; + sc->sc_irq_mask |= GINTMSK_SOFMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); +} + +static void +dwc_otg_release_sof(struct dwc_otg_softc *sc) +{ + if (--(sc->sc_sof_refs) == 0) { + sc->sc_irq_mask &= ~GINTMSK_SOFMSK; + DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + } +} + static int dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mode) { @@ -523,6 +540,9 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* set active EP */ sc->sc_active_rx_ep |= (1 << x); + /* request SOF's */ + dwc_otg_request_sof(sc); + return (0); /* allocated */ } } @@ -576,6 +596,10 @@ dwc_otg_host_setup_tx(struct dwc_otg_td td->remainder -= td->tx_bytes; td->toggle = 1; return (0); /* complete */ + } else { + if ((sc->sc_sof_val & 1) != (td->sof_val & 1)) + return (1); /* busy */ + td->sof_val += 1; } } else { return (1); /* busy */ @@ -882,12 +906,19 @@ not_complete: /* DATA 0 */ td->toggle = 0; } else if (ep_type == UE_INTERRUPT) { - if ((sc->sc_interrupt_val & 0xFF) != td->sof_val) + if ((sc->sc_sof_val & 0xFF) != td->sof_val) return (1); /* busy */ td->sof_val += td->sof_res; - } else if (td->set_toggle) { - td->set_toggle = 0; - td->toggle = 1; + } else { + if (td->did_nak) { + if ((sc->sc_sof_val & 1) != (td->sof_val & 1)) + return (1); /* busy */ + td->sof_val += 1; + } + if (td->set_toggle) { + td->set_toggle = 0; + td->toggle = 1; + } } /* receive one packet */ @@ -1078,7 +1109,11 @@ dwc_otg_host_data_tx(struct dwc_otg_td * /* else we need to transmit a short packet */ } - } + } else { + if ((sc->sc_sof_val & 1) != (td->sof_val & 1)) + return (1); /* busy */ + td->sof_val += 1; + } } else { return (1); /* busy */ } @@ -1098,7 +1133,7 @@ dwc_otg_host_data_tx(struct dwc_otg_td * td->toggle = 0; } else if (ep_type == UE_INTERRUPT) { - if ((sc->sc_interrupt_val & 0xFF) != td->sof_val) + if ((sc->sc_sof_val & 0xFF) != td->sof_val) return (1); /* busy */ td->sof_val += td->sof_res; } else if (td->set_toggle) { @@ -1775,21 +1810,8 @@ dwc_otg_interrupt(struct dwc_otg_softc * } /* check for Start Of Frame IRQ */ - if (status & GINTMSK_SOFMSK) { - - uint32_t temp; - - temp = DWC_OTG_READ_4(sc, DOTG_HFNUM); - temp &= HFNUM_FRNUM_MASK; - - if (sc->sc_flags.status_high_speed) { - if ((temp & 7) == (sc->sc_sof_val & 7)) - sc->sc_sof_val++; - } else { - if ((temp & 1) == (sc->sc_sof_val & 1)) - sc->sc_sof_val++; - } - } + if (status & GINTMSK_SOFMSK) + sc->sc_sof_val++; /* poll FIFO(s) */ dwc_otg_interrupt_poll(sc); @@ -2058,6 +2080,16 @@ dwc_otg_setup_standard_chain(struct usb_ } else { td->hcsplt = 0; } + if (xfer_type == UE_INTERRUPT) { + uint32_t ival; + ival = xfer->interval; + if (ival == 0) + ival = 1; + else if (ival > 255) + ival = 255; + td->sof_val = sc->sc_sof_val + ival; + td->sof_res = ival; + } break; case USB_SPEED_HIGH: td->hcsplt = 0; @@ -2066,6 +2098,16 @@ dwc_otg_setup_standard_chain(struct usb_ td->hcchar |= ((xfer->max_packet_count & 3) << HCCHAR_MC_SHIFT); } + if (xfer_type == UE_INTERRUPT) { + uint32_t ival; + ival = xfer->interval * 8; + if (ival == 0) + ival = 1; + else if (ival > 255) + ival = 255; + td->sof_val = sc->sc_sof_val + ival; + td->sof_res = ival; + } break; default: td->hcsplt = 0; @@ -2075,9 +2117,9 @@ dwc_otg_setup_standard_chain(struct usb_ if (xfer_type == UE_ISOCHRONOUS) { td->sof_val = xfer->endpoint->isoc_next & 0xFF; td->sof_res = 1 << usbd_xfer_get_fps_shift(xfer); - } else if (xfer_type == UE_INTERRUPT) { - td->sof_val = sc->sc_interrupt_val; - td->sof_res = 0; /* TODO */ + } else if (xfer_type != UE_INTERRUPT) { + td->sof_val = sc->sc_sof_val + 1; + td->sof_res = 1; } } } @@ -2269,6 +2311,9 @@ dwc_otg_device_done(struct usb_xfer *xfe sc->sc_active_rx_ep &= ~(1 << td->channel); td->channel = DWC_OTG_MAX_CHANNELS; + + /* release SOF's */ + dwc_otg_release_sof(sc); } } /* dequeue transfer and start next transfer */ @@ -2742,32 +2787,22 @@ struct usb_pipe_methods dwc_otg_device_n static void dwc_otg_device_isoc_open(struct usb_xfer *xfer) { - struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus); - if (xfer->xroot->udev->flags.usb_mode == USB_MODE_HOST) { - xfer->qh_pos = 1; - sc->sc_sof_refs++; - sc->sc_irq_mask |= GINTMSK_SOFMSK; - DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); + struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus); - usb_hs_bandwidth_alloc(xfer); + xfer->qh_pos = 1; + dwc_otg_request_sof(sc); } } static void dwc_otg_device_isoc_close(struct usb_xfer *xfer) { - struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus); - if (xfer->qh_pos != 0) { + struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(xfer->xroot->bus); + xfer->qh_pos = 0; - if (--(sc->sc_sof_refs) == 0) { - sc->sc_irq_mask &= ~GINTMSK_SOFMSK; - DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); - } - } - if (xfer->xroot->udev->flags.usb_mode == USB_MODE_HOST) { - usb_hs_bandwidth_free(xfer); + dwc_otg_release_sof(sc); } dwc_otg_device_done(xfer, USB_ERR_CANCELLED); } Modified: head/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.h Wed Sep 12 04:29:11 2012 (r240380) +++ head/sys/dev/usb/controller/dwc_otg.h Wed Sep 12 07:34:09 2012 (r240381) @@ -151,8 +151,6 @@ struct dwc_otg_softc { uint32_t sc_hcchar[DWC_OTG_MAX_CHANNELS]; uint32_t sc_sof_refs; uint32_t sc_sof_val; - uint32_t sc_interrupt_refs; - uint32_t sc_interrupt_val; uint32_t sc_hprt_val; uint16_t sc_active_rx_ep; From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 07:59:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF18C106566C; Wed, 12 Sep 2012 07:59:28 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA3A28FC18; Wed, 12 Sep 2012 07:59:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C7xSCs023829; Wed, 12 Sep 2012 07:59:28 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C7xS5B023827; Wed, 12 Sep 2012 07:59:28 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209120759.q8C7xS5B023827@svn.freebsd.org> From: Kevin Lo Date: Wed, 12 Sep 2012 07:59: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: r240382 - head/sys/dev/usb/serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 07:59:28 -0000 Author: kevlo Date: Wed Sep 12 07:59:28 2012 New Revision: 240382 URL: http://svn.freebsd.org/changeset/base/240382 Log: Restart the USB transfer if the error is not USB_ERR_CANCELLED. Modified: head/sys/dev/usb/serial/ufoma.c Modified: head/sys/dev/usb/serial/ufoma.c ============================================================================== --- head/sys/dev/usb/serial/ufoma.c Wed Sep 12 07:34:09 2012 (r240381) +++ head/sys/dev/usb/serial/ufoma.c Wed Sep 12 07:59:28 2012 (r240382) @@ -631,10 +631,7 @@ tr_setup: if (error == USB_ERR_CANCELLED) { return; - } else { - goto tr_setup; } - goto tr_transferred; } } @@ -651,7 +648,6 @@ ufoma_ctrl_write_callback(struct usb_xfe case USB_ST_TRANSFERRED: tr_transferred: case USB_ST_SETUP: -tr_setup: pc = usbd_xfer_get_frame(xfer, 1); if (ucom_get_data(&sc->sc_ucom, pc, 0, 1, &actlen)) { @@ -677,10 +673,7 @@ tr_setup: if (error == USB_ERR_CANCELLED) { return; - } else { - goto tr_setup; } - goto tr_transferred; } } From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 09:20:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 608B1106564A; Wed, 12 Sep 2012 09:20:38 +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 4C5708FC0A; Wed, 12 Sep 2012 09:20:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C9KcZ1035606; Wed, 12 Sep 2012 09:20:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C9KcmM035604; Wed, 12 Sep 2012 09:20:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209120920.q8C9KcmM035604@svn.freebsd.org> From: Alexander Motin Date: Wed, 12 Sep 2012 09:20: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: r240383 - head/sys/dev/ahci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 09:20:38 -0000 Author: mav Date: Wed Sep 12 09:20:37 2012 New Revision: 240383 URL: http://svn.freebsd.org/changeset/base/240383 Log: Fix AHCI 1.2 version checks. This should be mostly cosmetic. Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Sep 12 07:59:28 2012 (r240382) +++ head/sys/dev/ahci/ahci.c Wed Sep 12 09:20:37 2012 (r240383) @@ -403,7 +403,7 @@ ahci_attach(device_t dev) /* Get the HW capabilities */ version = ATA_INL(ctlr->r_mem, AHCI_VS); ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); - if (version >= 0x00010020) + if (version >= 0x00010200) ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); if (ctlr->caps & AHCI_CAP_EMS) ctlr->capsem = ATA_INL(ctlr->r_mem, AHCI_EM_CTL); @@ -483,7 +483,7 @@ ahci_attach(device_t dev) (ctlr->caps & AHCI_CAP_SXS) ? " eSATA":"", (ctlr->caps & AHCI_CAP_NPMASK) + 1); } - if (bootverbose && version >= 0x00010020) { + if (bootverbose && version >= 0x00010200) { device_printf(dev, "Caps2:%s%s%s\n", (ctlr->caps2 & AHCI_CAP2_APST) ? " APST":"", (ctlr->caps2 & AHCI_CAP2_NVMP) ? " NVMP":"", @@ -982,7 +982,7 @@ ahci_ch_attach(device_t dev) } ch->chcaps = ATA_INL(ch->r_mem, AHCI_P_CMD); version = ATA_INL(ctlr->r_mem, AHCI_VS); - if (version < 0x00010020 && (ctlr->caps & AHCI_CAP_FBSS)) + if (version < 0x00010200 && (ctlr->caps & AHCI_CAP_FBSS)) ch->chcaps |= AHCI_P_CMD_FBSCP; if (bootverbose) { device_printf(dev, "Caps:%s%s%s%s%s\n", From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 09:50:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E837106564A; Wed, 12 Sep 2012 09:50:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59CBB8FC15; Wed, 12 Sep 2012 09:50:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8C9oIoA039957; Wed, 12 Sep 2012 09:50:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8C9oIcP039955; Wed, 12 Sep 2012 09:50:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209120950.q8C9oIcP039955@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 12 Sep 2012 09:50: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: r240385 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 09:50:18 -0000 Author: glebius Date: Wed Sep 12 09:50:17 2012 New Revision: 240385 URL: http://svn.freebsd.org/changeset/base/240385 Log: Describe in detail required conditions for receiving the SCM_CREDS control message and suggest to use LOCAL_CREDS setsockopt() for reliability. Modified: head/lib/libc/sys/recv.2 Modified: head/lib/libc/sys/recv.2 ============================================================================== --- head/lib/libc/sys/recv.2 Wed Sep 12 09:29:22 2012 (r240384) +++ head/lib/libc/sys/recv.2 Wed Sep 12 09:50:17 2012 (r240385) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd December 28, 2006 +.Dd September 12, 2012 .Dt RECV 2 .Os .Sh NAME @@ -252,8 +252,21 @@ struct cmsgcred { }; .Ed .Pp -The kernel will fill in the credential information of the sending process -and deliver it to the receiver. +If a sender supplies ancillary data with enough space for the above struct +tagged as +.Dv SCM_CREDS +control message type to the +.Fn sendmsg +system call, then kernel will fill in the credential information of the +sending process and deliver it to the receiver. +Since receiver usually has no control over a sender, this method of retrieving +credential information isn't reliable. +For reliable retrieval of remote side credentials it is advised to use the +.Dv LOCAL_CREDS +socket option on the receiving socket. +See +.Xr unix 4 +for details. .Pp The .Fa msg_flags @@ -322,7 +335,8 @@ address space. .Xr getsockopt 2 , .Xr read 2 , .Xr select 2 , -.Xr socket 2 +.Xr socket 2 , +.Xr unix 4 .Sh HISTORY The .Fn recv From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 10:09:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 425831065675; Wed, 12 Sep 2012 10:09:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C5168FC16; Wed, 12 Sep 2012 10:09:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CA9ZhW043061; Wed, 12 Sep 2012 10:09:35 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CA9Y2Y043059; Wed, 12 Sep 2012 10:09:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209121009.q8CA9Y2Y043059@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 12 Sep 2012 10:09: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: r240386 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 10:09:35 -0000 Author: glebius Date: Wed Sep 12 10:09:34 2012 New Revision: 240386 URL: http://svn.freebsd.org/changeset/base/240386 Log: Document conditions for IP_SENDSRCADDR socket option. Obtained from: r167342 commit message Modified: head/share/man/man4/ip.4 Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Wed Sep 12 09:50:17 2012 (r240385) +++ head/share/man/man4/ip.4 Wed Sep 12 10:09:34 2012 (r240386) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd June 15, 2012 +.Dd September 12, 2012 .Dt IP 4 .Os .Sh NAME @@ -172,9 +172,7 @@ cmsg_type = IP_RECVDSTADDR .Pp The source address to be used for outgoing .Tn UDP -datagrams on a socket that is not bound to a specific -.Tn IP -address can be specified as ancillary data with a type code of +datagrams on a socket can be specified as ancillary data with a type code of .Dv IP_SENDSRCADDR . The msg_control field in the msghdr structure should point to a buffer that contains a @@ -189,6 +187,22 @@ cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed .Pp +The socket should be bound to a local port. +The socket may be bound or not bound to a local address. +In the former case address supplied with +.Dv IP_SENDSRCADDR +overrides bound address. +If the socket is bound to a local address and the address supplied with +.Dv IP_SENDSRCADDR +is +.Dv INADDR_ANY , +then bound address is overriden via generic source address selection logic, +which would choose IP address of interface closest to destination. +If the socket is not bound to a local address, then address supplied with +.Dv IP_SENDSRCADDR +can't be +.Dv INADDR_ANY . +.Pp For convenience, .Dv IP_SENDSRCADDR is defined to have the same value as From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 10:12:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9137106566C; Wed, 12 Sep 2012 10:12:03 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C56F78FC08; Wed, 12 Sep 2012 10:12:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CAC3vh043531; Wed, 12 Sep 2012 10:12:03 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CAC3lM043529; Wed, 12 Sep 2012 10:12:03 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209121012.q8CAC3lM043529@svn.freebsd.org> From: Kevin Lo Date: Wed, 12 Sep 2012 10:12: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: r240387 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 10:12:04 -0000 Author: kevlo Date: Wed Sep 12 10:12:03 2012 New Revision: 240387 URL: http://svn.freebsd.org/changeset/base/240387 Log: Remove redundant check Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Wed Sep 12 10:09:34 2012 (r240386) +++ head/sys/compat/linux/linux_file.c Wed Sep 12 10:12:03 2012 (r240387) @@ -384,11 +384,6 @@ getdents_common(struct thread *td, struc auio.uio_resid = buflen; auio.uio_offset = off; - if (cookies) { - free(cookies, M_TEMP); - cookies = NULL; - } - #ifdef MAC /* * Do directory search MAC check using non-cached credentials. From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 10:16:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EA3D106566B; Wed, 12 Sep 2012 10:16:40 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A9B78FC1A; Wed, 12 Sep 2012 10:16:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CAGecB044344; Wed, 12 Sep 2012 10:16:40 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CAGdob044341; Wed, 12 Sep 2012 10:16:39 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209121016.q8CAGdob044341@svn.freebsd.org> From: Kevin Lo Date: Wed, 12 Sep 2012 10:16: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: r240388 - head/usr.sbin/timed/timed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 10:16:40 -0000 Author: kevlo Date: Wed Sep 12 10:16:39 2012 New Revision: 240388 URL: http://svn.freebsd.org/changeset/base/240388 Log: Add missing braces Obtained from: DragonFly Modified: head/usr.sbin/timed/timed/timed.c Modified: head/usr.sbin/timed/timed/timed.c ============================================================================== --- head/usr.sbin/timed/timed/timed.c Wed Sep 12 10:12:03 2012 (r240387) +++ head/usr.sbin/timed/timed/timed.c Wed Sep 12 10:16:39 2012 (r240388) @@ -418,9 +418,10 @@ main(argc, argv) justquit = 1; } for (ntp = nettab; ntp != NULL; ntp = ntp->next) { - if (ntp->status == MASTER) + if (ntp->status == MASTER) { rmnetmachs(ntp); ntp->status = NOMASTER; + } } checkignorednets(); pickslavenet(0); From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 10:39:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F698106566C; Wed, 12 Sep 2012 10:39:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AFA08FC08; Wed, 12 Sep 2012 10:39:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CAdmPu050730; Wed, 12 Sep 2012 10:39:48 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CAdm0e050728; Wed, 12 Sep 2012 10:39:48 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201209121039.q8CAdm0e050728@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 12 Sep 2012 10:39: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: r240389 - head/usr.sbin/syslogd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 10:39:48 -0000 Author: bapt Date: Wed Sep 12 10:39:47 2012 New Revision: 240389 URL: http://svn.freebsd.org/changeset/base/240389 Log: Add support for ipv6 addresses as destination PR: bin/150530 Submitted by: andy white Tested by: Olivier Cochard-Labbe MFC after: 1 month Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Wed Sep 12 10:16:39 2012 (r240388) +++ head/usr.sbin/syslogd/syslogd.c Wed Sep 12 10:39:47 2012 (r240389) @@ -1931,6 +1931,7 @@ cfline(const char *line, struct filed *f case '@': { char *tp; + char endkey = ':'; /* * scan forward to see if there is a port defined. * so we can't use strlcpy.. @@ -1939,9 +1940,19 @@ cfline(const char *line, struct filed *f tp = f->f_un.f_forw.f_hname; p++; - while (*p && (*p != ':') && (i-- > 0)) { + /* + * an ipv6 address should start with a '[' in that case + * we should scan for a ']' + */ + if (*p == '[') { + p++; + endkey = ']'; + } + while (*p && (*p != endkey) && (i-- > 0)) { *tp++ = *p++; } + if (endkey == ']' && *p == endkey) + p++; *tp = '\0'; } /* See if we copied a domain and have a port */ From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 11:41:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BE8D106564A; Wed, 12 Sep 2012 11:41:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 279A58FC17; Wed, 12 Sep 2012 11:41:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CBf4xg059742; Wed, 12 Sep 2012 11:41:04 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CBf3pt059740; Wed, 12 Sep 2012 11:41:03 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201209121141.q8CBf3pt059740@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 12 Sep 2012 11:41: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: r240391 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 11:41:04 -0000 Author: bapt Date: Wed Sep 12 11:41:03 2012 New Revision: 240391 URL: http://svn.freebsd.org/changeset/base/240391 Log: Fix IEC / SI binary prefixes (Ki, Mi, Gi, etc) production by humanize_number(3) PR: bin/171487 Submitted by: matthew MFC after: 1 week Modified: head/lib/libutil/humanize_number.c Modified: head/lib/libutil/humanize_number.c ============================================================================== --- head/lib/libutil/humanize_number.c Wed Sep 12 10:53:08 2012 (r240390) +++ head/lib/libutil/humanize_number.c Wed Sep 12 11:41:03 2012 (r240391) @@ -76,7 +76,7 @@ humanize_number(char *buf, size_t len, i if (flags & HN_B) prefixes = "B\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; else - prefixes = "\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; + prefixes = "\0\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; } else { baselen = 1; if (flags & HN_DIVISOR_1000) From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 12:14:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC442106566B; Wed, 12 Sep 2012 12:14:50 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 973278FC0A; Wed, 12 Sep 2012 12:14:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CCEo6U064666; Wed, 12 Sep 2012 12:14:50 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CCEovr064664; Wed, 12 Sep 2012 12:14:50 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <201209121214.q8CCEovr064664@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Wed, 12 Sep 2012 12:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240392 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 12:14:50 -0000 Author: vanhu Date: Wed Sep 12 12:14:50 2012 New Revision: 240392 URL: http://svn.freebsd.org/changeset/base/240392 Log: In NAT-T transport mode, allow a client to open a new connection just after closing another. It worked only in tunnel mode before. Submitted by: Andreas Longwitz MFC after: 1M Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Wed Sep 12 11:41:03 2012 (r240391) +++ head/sys/netipsec/key.c Wed Sep 12 12:14:50 2012 (r240392) @@ -4055,10 +4055,12 @@ key_cmpsaidx( /* * If NAT-T is enabled, check ports for tunnel mode. * Do not check ports if they are set to zero in the SPD. - * Also do not do it for transport mode, as there is no - * port information available in the SP. + * Also do not do it for native transport mode, as there + * is no port information available in the SP. */ - if (saidx1->mode == IPSEC_MODE_TUNNEL && + if ((saidx1->mode == IPSEC_MODE_TUNNEL || + (saidx1->mode == IPSEC_MODE_TRANSPORT && + saidx1->proto == IPPROTO_ESP)) && saidx1->src.sa.sa_family == AF_INET && saidx1->dst.sa.sa_family == AF_INET && ((const struct sockaddr_in *)(&saidx1->src))->sin_port && From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 13:06:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA4B106564A; Wed, 12 Sep 2012 13:06:57 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C91AB8FC18; Wed, 12 Sep 2012 13:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CD6v00072691; Wed, 12 Sep 2012 13:06:57 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CD6v67072686; Wed, 12 Sep 2012 13:06:57 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209121306.q8CD6v67072686@svn.freebsd.org> From: Andrey Zonov Date: Wed, 12 Sep 2012 13:06: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: r240393 - head/usr.bin/truss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:06:58 -0000 Author: zont Date: Wed Sep 12 13:06:57 2012 New Revision: 240393 URL: http://svn.freebsd.org/changeset/base/240393 Log: - Fix detaching under some circumstances. When truss is detaching from very active process it is possible to hang on waitpid(2) in restore_proc() forever, because ptrace(PT_SYSCALL) must be called before detaching, to allow the debugging process to continue execution. Also when truss called with '-c' argument, it does not print anything after detach, because it immediately exits from restore_proc(). To fix these two problems make detaching deferred, but then it is impossible to detach from a process which does not do any system call. To fix this issue use sigaction(2) instead of signal(3) to disable SA_RESTART flag for waitpid(2) that makes it non-restartable. Remove global variable child_pid, because now detaching is handled in context where child's pid is known. Reported by: mjg Tested by: mjg, swills Approved by: kib (mentor) MFC after: 2 weeks Modified: head/usr.bin/truss/main.c head/usr.bin/truss/setup.c head/usr.bin/truss/truss.h Modified: head/usr.bin/truss/main.c ============================================================================== --- head/usr.bin/truss/main.c Wed Sep 12 12:14:50 2012 (r240392) +++ head/usr.bin/truss/main.c Wed Sep 12 13:06:57 2012 (r240393) @@ -163,6 +163,7 @@ strsig(int sig) int main(int ac, char **av) { + struct sigaction sa; struct ex_types *funcs; struct trussinfo *trussinfo; char *fname; @@ -257,10 +258,13 @@ main(int ac, char **av) signal(SIGTERM, SIG_IGN); signal(SIGQUIT, SIG_IGN); } else { + sa.sa_handler = restore_proc; + sa.sa_flags = 0; + sigemptyset(&sa.sa_mask); + sigaction(SIGINT, &sa, NULL); + sigaction(SIGQUIT, &sa, NULL); + sigaction(SIGTERM, &sa, NULL); start_tracing(trussinfo->pid); - signal(SIGINT, restore_proc); - signal(SIGTERM, restore_proc); - signal(SIGQUIT, restore_proc); } @@ -366,7 +370,8 @@ START_TRACE: default: break; } - } while (trussinfo->pr_why != S_EXIT); + } while (trussinfo->pr_why != S_EXIT && + trussinfo->pr_why != S_DETACHED); if (trussinfo->flags & FOLLOWFORKS) { do { Modified: head/usr.bin/truss/setup.c ============================================================================== --- head/usr.bin/truss/setup.c Wed Sep 12 12:14:50 2012 (r240392) +++ head/usr.bin/truss/setup.c Wed Sep 12 13:06:57 2012 (r240393) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include "truss.h" #include "extern.h" -static pid_t child_pid; +static sig_atomic_t detaching; /* * setup_and_wait() is called to start a process. All it really does @@ -84,8 +84,6 @@ setup_and_wait(char *command[]) if (waitpid(pid, NULL, 0) < 0) err(1, "unexpect stop in waitpid"); - child_pid = pid; - return (pid); } @@ -108,7 +106,6 @@ start_tracing(pid_t pid) if (ret) err(1, "can not attach to target process"); - child_pid = pid; if (waitpid(pid, NULL, 0) < 0) err(1, "Unexpect stop in waitpid"); @@ -121,21 +118,30 @@ start_tracing(pid_t pid) * applies if truss was told to monitor an already-existing * process. */ + void restore_proc(int signo __unused) { + + detaching = 1; +} + +static int +detach_proc(pid_t pid) +{ int waitval; /* stop the child so that we can detach */ - kill(child_pid, SIGSTOP); - if (waitpid(child_pid, &waitval, 0) < 0) + kill(pid, SIGSTOP); + if (waitpid(pid, &waitval, 0) < 0) err(1, "Unexpected stop in waitpid"); - if (ptrace(PT_DETACH, child_pid, (caddr_t)1, 0) < 0) + if (ptrace(PT_DETACH, pid, (caddr_t)1, 0) < 0) err(1, "Can not detach the process"); - kill(child_pid, SIGCONT); - exit(0); + kill(pid, SIGCONT); + + return (waitval); } /* @@ -180,8 +186,19 @@ waitevent(struct trussinfo *info) ptrace(PT_SYSCALL, info->pid, (caddr_t)1, pending_signal); pending_signal = 0; - if (waitpid(info->pid, &waitval, 0) < 0) +detach: + if (detaching) { + waitval = detach_proc(info->pid); + info->pr_why = S_DETACHED; + info->pr_data = WEXITSTATUS(waitval); + return; + } + + if (waitpid(info->pid, &waitval, 0) == -1) { + if (errno == EINTR) + goto detach; err(1, "Unexpected stop in waitpid"); + } if (WIFCONTINUED(waitval)) { info->pr_why = S_NONE; Modified: head/usr.bin/truss/truss.h ============================================================================== --- head/usr.bin/truss/truss.h Wed Sep 12 12:14:50 2012 (r240392) +++ head/usr.bin/truss/truss.h Wed Sep 12 13:06:57 2012 (r240393) @@ -87,3 +87,4 @@ struct trussinfo #define S_EXIT 3 #define S_SIG 4 #define S_EXEC 5 +#define S_DETACHED 6 From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 13:58:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C992106566B; Wed, 12 Sep 2012 13:58:19 +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 366C98FC12; Wed, 12 Sep 2012 13:58:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDwJ52081373; Wed, 12 Sep 2012 13:58:19 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDwImU081370; Wed, 12 Sep 2012 13:58:18 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121358.q8CDwImU081370@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 13:58: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: r240400 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:58:19 -0000 Author: obrien Date: Wed Sep 12 13:58:18 2012 New Revision: 240400 URL: http://svn.freebsd.org/changeset/base/240400 Log: Replace a bare use of 'objcopy' with ${OBJCOPY} for easier cross compilation in environments where 'objcopy' is spelled differently. Submitted by: John Van Horne Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 12 13:43:42 2012 (r240399) +++ head/sys/conf/files.amd64 Wed Sep 12 13:58:18 2012 (r240400) @@ -79,7 +79,7 @@ acpi_wakecode.o optional acpi \ clean "acpi_wakecode.o" acpi_wakecode.bin optional acpi \ dependency "acpi_wakecode.o" \ - compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + compile-with "${OBJCOPY} -S -O binary acpi_wakecode.o ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "acpi_wakecode.bin" acpi_wakecode.h optional acpi \ Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 12 13:43:42 2012 (r240399) +++ head/sys/conf/files.i386 Wed Sep 12 13:58:18 2012 (r240400) @@ -369,7 +369,7 @@ acpi_wakecode.o optional acpi \ clean "acpi_wakecode.o" acpi_wakecode.bin optional acpi \ dependency "acpi_wakecode.o" \ - compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + compile-with "${OBJCOPY} -S -O binary acpi_wakecode.o ${.TARGET}" \ no-obj no-implicit-rule before-depend \ clean "acpi_wakecode.bin" acpi_wakecode.h optional acpi \ From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 14:17:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4B60106564A; Wed, 12 Sep 2012 14:17:11 +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 A4CD88FC08; Wed, 12 Sep 2012 14:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CEHBrD084234; Wed, 12 Sep 2012 14:17:11 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CEHBYN084230; Wed, 12 Sep 2012 14:17:11 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121417.q8CEHBYN084230@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 14:17: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: r240401 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:17:12 -0000 Author: obrien Date: Wed Sep 12 14:17:11 2012 New Revision: 240401 URL: http://svn.freebsd.org/changeset/base/240401 Log: Not all Pmake derived makes quietly tolerate assignment from shell commands with no output. Add "echo" at the end these shell commands whose output is assigned to a variable's value to ensure there is some output. Submitted by: John Van Horne Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.powerpc Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Wed Sep 12 13:58:18 2012 (r240400) +++ head/sys/conf/Makefile.amd64 Wed Sep 12 14:17:11 2012 (r240401) @@ -31,9 +31,9 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -DDB_ENABLED!= grep DDB opt_ddb.h || true -DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true -HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo +DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo +HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo .if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Wed Sep 12 13:58:18 2012 (r240400) +++ head/sys/conf/Makefile.arm Wed Sep 12 14:17:11 2012 (r240401) @@ -39,7 +39,7 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri STRIP_FLAGS = -S .endif -DDB_ENABLED!= grep DDB opt_ddb.h || true +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Wed Sep 12 13:58:18 2012 (r240400) +++ head/sys/conf/Makefile.powerpc Wed Sep 12 14:17:11 2012 (r240401) @@ -37,7 +37,7 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -msoft-float -Wa,-many -DDB_ENABLED!= grep DDB opt_ddb.h || true +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo .if !empty(DDB_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 14:19:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B54D1065670; Wed, 12 Sep 2012 14:19:41 +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 3C5218FC12; Wed, 12 Sep 2012 14:19:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CEJfDO084666; Wed, 12 Sep 2012 14:19:41 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CEJefe084661; Wed, 12 Sep 2012 14:19:40 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121419.q8CEJefe084661@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 14:19: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: r240402 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:19:41 -0000 Author: obrien Date: Wed Sep 12 14:19:40 2012 New Revision: 240402 URL: http://svn.freebsd.org/changeset/base/240402 Log: Remove duplication and centralize testing of various config(8)ed features. Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.arm head/sys/conf/Makefile.powerpc head/sys/conf/kern.pre.mk Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Wed Sep 12 14:17:11 2012 (r240401) +++ head/sys/conf/Makefile.amd64 Wed Sep 12 14:19:40 2012 (r240402) @@ -31,9 +31,6 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo -DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo -HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo .if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Wed Sep 12 14:17:11 2012 (r240401) +++ head/sys/conf/Makefile.arm Wed Sep 12 14:19:40 2012 (r240402) @@ -39,8 +39,6 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri STRIP_FLAGS = -S .endif -DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo - .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame .endif Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Wed Sep 12 14:17:11 2012 (r240401) +++ head/sys/conf/Makefile.powerpc Wed Sep 12 14:19:40 2012 (r240402) @@ -37,7 +37,6 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -msoft-float -Wa,-many -DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo .if !empty(DDB_ENABLED) CFLAGS+= -fno-omit-frame-pointer .endif Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Wed Sep 12 14:17:11 2012 (r240401) +++ head/sys/conf/kern.pre.mk Wed Sep 12 14:19:40 2012 (r240402) @@ -189,3 +189,8 @@ MKMODULESENV+= WITHOUT_MODULES="${WITHOU .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif + +# Are various things configured? +DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo +DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo +HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 14:44:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 731BD106566C; Wed, 12 Sep 2012 14:44:26 +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 5E0028FC16; Wed, 12 Sep 2012 14:44:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CEiQcO088450; Wed, 12 Sep 2012 14:44:26 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CEiQuT088446; Wed, 12 Sep 2012 14:44:26 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121444.q8CEiQuT088446@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 14:44: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: r240403 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:44:26 -0000 Author: obrien Date: Wed Sep 12 14:44:25 2012 New Revision: 240403 URL: http://svn.freebsd.org/changeset/base/240403 Log: Not all Pmake derivatives silently handle empty shell output, so ensure there is something for make(1) to consume. Bmake gives output such as: "warning: Couldn't read shell's output for "/bin/sh -c true" Note we parted from traditional Pmake behavior in r18864 / r18255. Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Wed Sep 12 14:19:40 2012 (r240402) +++ head/Makefile Wed Sep 12 14:44:25 2012 (r240403) @@ -216,7 +216,7 @@ ${TGTS}: .MAIN: all STARTTIME!= LC_ALL=C date -CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s +CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo .if !empty(CHECK_TIME) .error check your date/time: ${STARTTIME} .endif Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Sep 12 14:19:40 2012 (r240402) +++ head/Makefile.inc1 Wed Sep 12 14:44:25 2012 (r240403) @@ -1558,7 +1558,7 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} + ${KERNCONFDIR}/${KERNCONF} ; echo .endif .endif From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 14:58:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 250D41065677; Wed, 12 Sep 2012 14:58:08 +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 106A28FC1B; Wed, 12 Sep 2012 14:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CEw7YI090746; Wed, 12 Sep 2012 14:58:07 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CEw79A090743; Wed, 12 Sep 2012 14:58:07 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121458.q8CEw79A090743@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 14:58: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: r240404 - in head: share/mk usr.bin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:58:08 -0000 Author: obrien Date: Wed Sep 12 14:58:07 2012 New Revision: 240404 URL: http://svn.freebsd.org/changeset/base/240404 Log: Add MK_KDUMP. Modified: head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Sep 12 14:44:25 2012 (r240403) +++ head/share/mk/bsd.own.mk Wed Sep 12 14:58:07 2012 (r240404) @@ -254,6 +254,7 @@ WITHOUT_${var}= INFO \ IPFILTER \ IPX \ + KDUMP \ KERBEROS \ LIB32 \ LIBPTHREAD \ @@ -357,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \ IPFW \ IPX \ JAIL \ + KDUMP \ KERBEROS \ KERNEL_SYMBOLS \ KVM \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed Sep 12 14:44:25 2012 (r240403) +++ head/usr.bin/Makefile Wed Sep 12 14:58:07 2012 (r240404) @@ -68,7 +68,7 @@ SUBDIR= alias \ ipcs \ join \ jot \ - kdump \ + ${_kdump} \ keylogin \ keylogout \ killall \ @@ -163,7 +163,7 @@ SUBDIR= alias \ tr \ true \ truncate \ - truss \ + ${_truss} \ tset \ tsort \ tty \ @@ -245,6 +245,11 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif +.if ${MK_KDUMP} != "no" +SUBDIR+= kdump +SUBDIR+= truss +.endif + .if ${MK_KERBEROS_SUPPORT} != "no" SUBDIR+= compile_et .endif From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 14:59:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B92CB1065676; Wed, 12 Sep 2012 14:59:57 +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 9AA8C8FC18; Wed, 12 Sep 2012 14:59:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CExvpQ091075; Wed, 12 Sep 2012 14:59:57 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CExvvL091073; Wed, 12 Sep 2012 14:59:57 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121459.q8CExvvL091073@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 14:59: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: r240405 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 14:59:57 -0000 Author: obrien Date: Wed Sep 12 14:59:57 2012 New Revision: 240405 URL: http://svn.freebsd.org/changeset/base/240405 Log: Simply printf-like strings and outdent strings so that it is easy to see if they fit on a standard terminal. Modified: head/sbin/fsck_ffs/main.c Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Wed Sep 12 14:58:07 2012 (r240404) +++ head/sbin/fsck_ffs/main.c Wed Sep 12 14:59:57 2012 (r240405) @@ -279,8 +279,8 @@ checkfilesys(char *filesys) exit(0); exit(4); } else { - pfatal("UNEXPECTED INCONSISTENCY, %s\n", - "CANNOT RUN FAST FSCK\n"); + pfatal( + "UNEXPECTED INCONSISTENCY, CANNOT RUN FAST FSCK\n"); } } } @@ -297,8 +297,8 @@ checkfilesys(char *filesys) pfatal("NOT MOUNTED, CANNOT RUN IN BACKGROUND\n"); } else if ((mntp->f_flags & MNT_SOFTDEP) == 0) { bkgrdflag = 0; - pfatal("NOT USING SOFT UPDATES, %s\n", - "CANNOT RUN IN BACKGROUND"); + pfatal( + "NOT USING SOFT UPDATES, CANNOT RUN IN BACKGROUND\n"); } else if ((mntp->f_flags & MNT_RDONLY) != 0) { bkgrdflag = 0; pfatal("MOUNTED READ-ONLY, CANNOT RUN IN BACKGROUND\n"); @@ -306,8 +306,8 @@ checkfilesys(char *filesys) if (readsb(0) != 0) { if (sblock.fs_flags & (FS_NEEDSFSCK | FS_SUJ)) { bkgrdflag = 0; - pfatal("UNEXPECTED INCONSISTENCY, %s\n", - "CANNOT RUN IN BACKGROUND\n"); + pfatal( + "UNEXPECTED INCONSISTENCY, CANNOT RUN IN BACKGROUND\n"); } if ((sblock.fs_flags & FS_UNCLEAN) == 0 && skipclean && ckclean) { @@ -315,8 +315,8 @@ checkfilesys(char *filesys) * file system is clean; * skip snapshot and report it clean */ - pwarn("FILE SYSTEM CLEAN; %s\n", - "SKIPPING CHECKS"); + pwarn( + "FILE SYSTEM CLEAN; SKIPPING CHECKS\n"); goto clean; } } @@ -328,24 +328,23 @@ checkfilesys(char *filesys) if (stat(snapname, &snapdir) < 0) { if (errno != ENOENT) { bkgrdflag = 0; - pfatal("CANNOT FIND %s %s: %s, %s\n", - "SNAPSHOT DIRECTORY", - snapname, strerror(errno), - "CANNOT RUN IN BACKGROUND"); + pfatal( + "CANNOT FIND SNAPSHOT DIRECTORY %s: %s, CANNOT RUN IN BACKGROUND\n", + snapname, strerror(errno)); } else if ((grp = getgrnam("operator")) == 0 || mkdir(snapname, 0770) < 0 || chown(snapname, -1, grp->gr_gid) < 0 || chmod(snapname, 0770) < 0) { bkgrdflag = 0; - pfatal("CANNOT CREATE %s %s: %s, %s\n", - "SNAPSHOT DIRECTORY", - snapname, strerror(errno), - "CANNOT RUN IN BACKGROUND"); + pfatal( + "CANNOT CREATE SNAPSHOT DIRECTORY %s: %s, CANNOT RUN IN BACKGROUND\n", + snapname, strerror(errno)); } } else if (!S_ISDIR(snapdir.st_mode)) { bkgrdflag = 0; - pfatal("%s IS NOT A DIRECTORY, %s\n", snapname, - "CANNOT RUN IN BACKGROUND"); + pfatal( + "%s IS NOT A DIRECTORY, CANNOT RUN IN BACKGROUND\n", + snapname); } } if (bkgrdflag) { @@ -636,8 +635,7 @@ static void usage(void) { (void) fprintf(stderr, - "usage: %s [-BEFfnpry] [-b block] [-c level] [-m mode] " - "filesystem ...\n", +"usage: %s [-BEFfnpry] [-b block] [-c level] [-m mode] filesystem ...\n", getprogname()); exit(1); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 15:36:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 173BE106566C; Wed, 12 Sep 2012 15:36:45 +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 DCB218FC0C; Wed, 12 Sep 2012 15:36:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CFaiYw096944; Wed, 12 Sep 2012 15:36:44 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CFaiAU096941; Wed, 12 Sep 2012 15:36:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209121536.q8CFaiAU096941@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Sep 2012 15:36: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: r240406 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 15:36:45 -0000 Author: obrien Date: Wed Sep 12 15:36:44 2012 New Revision: 240406 URL: http://svn.freebsd.org/changeset/base/240406 Log: Remove needless (int) casts of write(2)'s 3rd argument. Also change blwrite() 'size' parameter to a ssize_t to better match write(2). Modified: head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/fsutil.c Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Wed Sep 12 14:59:57 2012 (r240405) +++ head/sbin/fsck_ffs/fsck.h Wed Sep 12 15:36:44 2012 (r240406) @@ -337,7 +337,7 @@ void blkerror(ino_t ino, const char *ty char *blockcheck(char *name); int blread(int fd, char *buf, ufs2_daddr_t blk, long size); void bufinit(void); -void blwrite(int fd, char *buf, ufs2_daddr_t blk, long size); +void blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t size); void blerase(int fd, ufs2_daddr_t blk, long size); void cacheino(union dinode *dp, ino_t inumber); void catch(int); Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Wed Sep 12 14:59:57 2012 (r240405) +++ head/sbin/fsck_ffs/fsutil.c Wed Sep 12 15:36:44 2012 (r240406) @@ -245,7 +245,7 @@ flush(int fd, struct bufarea *bp) (bp->b_errs == bp->b_size / dev_bsize) ? "" : "PARTIALLY ", (long long)bp->b_bno); bp->b_errs = 0; - blwrite(fd, bp->b_un.b_buf, bp->b_bno, (long)bp->b_size); + blwrite(fd, bp->b_un.b_buf, bp->b_bno, bp->b_size); if (bp != &sblk) return; for (i = 0, j = 0; i < sblock.fs_cssize; i += sblock.fs_bsize, j++) { @@ -392,7 +392,7 @@ blread(int fd, char *buf, ufs2_daddr_t b } void -blwrite(int fd, char *buf, ufs2_daddr_t blk, long size) +blwrite(int fd, char *buf, ufs2_daddr_t blk, ssize_t size) { int i; char *cp; @@ -404,7 +404,7 @@ blwrite(int fd, char *buf, ufs2_daddr_t offset *= dev_bsize; if (lseek(fd, offset, 0) < 0) rwerror("SEEK BLK", blk); - else if (write(fd, buf, (int)size) == size) { + else if (write(fd, buf, size) == size) { fsmodified = 1; return; } @@ -414,7 +414,7 @@ blwrite(int fd, char *buf, ufs2_daddr_t rwerror("SEEK BLK", blk); printf("THE FOLLOWING SECTORS COULD NOT BE WRITTEN:"); for (cp = buf, i = 0; i < size; i += dev_bsize, cp += dev_bsize) - if (write(fd, cp, (int)dev_bsize) != dev_bsize) { + if (write(fd, cp, dev_bsize) != dev_bsize) { (void)lseek(fd, offset + i + dev_bsize, 0); printf(" %jd,", (intmax_t)blk + i / dev_bsize); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 15:49:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3C38106567F; Wed, 12 Sep 2012 15:49:51 +0000 (UTC) (envelope-from arthurmesh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 59C868FC4D; Wed, 12 Sep 2012 15:49:50 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so2710447pbb.13 for ; Wed, 12 Sep 2012 08:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=fcimNR3VYM8pOH5doT3CJYfM+o4Wcl/7StLK7IY40vw=; b=LMTKll2yOGpjy+Cf748UPOyhS7v7a2qIsfhR8FfUesPW0Fsj6nrNiGTBPiFgWy6tak Xi8pEvdIh4AxX9/2Z1LLW8UrJLVqISonSk/qhPFSpbyw52Au7Yr8Lvrq2mG/Dj57C5CD DaAWVlWPgW2bCoo7umZQn6jV7SdgvPJ2JVkR/ND5hf0HGCY0e0Fp0OtIIAP8dIlhXH4v Q29ZrKcihrMGOTXUq/TFc6xKT7VQ3Zl55tTZvngs9Qk0RxUPWIVZoU3psarasDQBiK2W zqyLcmzaJsqYB/1TMrzldiS21PYsdX+mXMYJXYyjOTy8BCq4u9/YhPL0TyOnHGr3FSJK O0VQ== Received: by 10.68.223.163 with SMTP id qv3mr17196331pbc.101.1347464987618; Wed, 12 Sep 2012 08:49:47 -0700 (PDT) Received: from x96.org (x96.org. [64.85.165.177]) by mx.google.com with ESMTPS id vd4sm11576577pbc.41.2012.09.12.08.49.43 (version=SSLv3 cipher=OTHER); Wed, 12 Sep 2012 08:49:45 -0700 (PDT) Date: Wed, 12 Sep 2012 08:49:41 -0700 From: Arthur Mesh To: Konstantin Belousov Message-ID: <20120912154941.GG14077@x96.org> References: <20120911205345.GD14077@x96.org> <20120912043302.GN37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120912043302.GN37286@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240135 - in head/sys: amd64/conf conf dev/random i386/conf modules/random X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 15:49:52 -0000 On Wed, Sep 12, 2012 at 07:33:02AM +0300, Konstantin Belousov wrote: > Can you submit the desired patch ? Sure, Index: sys/i386/conf/GENERIC =================================================================== --- sys/i386/conf/GENERIC (revision 240406) +++ sys/i386/conf/GENERIC (working copy) @@ -306,7 +306,7 @@ device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG -options IVY_RNG # Intel Bull Mountain RNG +options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Index: sys/dev/random/probe.c =================================================================== --- sys/dev/random/probe.c (revision 240406) +++ sys/dev/random/probe.c (working copy) @@ -55,7 +55,7 @@ #ifdef PADLOCK_RNG extern struct random_systat random_nehemiah; #endif -#ifdef IVY_RNG +#ifdef RDRAND_RNG extern struct random_systat random_ivy; #endif #endif @@ -79,7 +79,7 @@ *systat = random_nehemiah; } #endif -#ifdef IVY_RNG +#ifdef RDRAND_RNG if (cpu_feature2 & CPUID2_RDRAND) { int enable; Index: sys/dev/random/ivy.c =================================================================== --- sys/dev/random/ivy.c (revision 240406) +++ sys/dev/random/ivy.c (working copy) @@ -30,7 +30,7 @@ #include "opt_cpu.h" -#ifdef IVY_RNG +#ifdef RDRAND_RNG #include #include Index: sys/conf/options.amd64 =================================================================== --- sys/conf/options.amd64 (revision 240406) +++ sys/conf/options.amd64 (working copy) @@ -71,4 +71,4 @@ # hw random number generators for random(4) PADLOCK_RNG opt_cpu.h -IVY_RNG opt_cpu.h +RDRAND_RNG opt_cpu.h Index: sys/conf/options.i386 =================================================================== --- sys/conf/options.i386 (revision 240406) +++ sys/conf/options.i386 (working copy) @@ -126,4 +126,4 @@ # hw random number generators for random(4) PADLOCK_RNG opt_cpu.h -IVY_RNG opt_cpu.h +RDRAND_RNG opt_cpu.h Index: sys/amd64/conf/GENERIC =================================================================== --- sys/amd64/conf/GENERIC (revision 240406) +++ sys/amd64/conf/GENERIC (working copy) @@ -293,7 +293,7 @@ device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG -options IVY_RNG # Intel Bull Mountain RNG +options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 16:58:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8ABEA106566C; Wed, 12 Sep 2012 16:58:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75D6E8FC18; Wed, 12 Sep 2012 16:58:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CGwh62010149; Wed, 12 Sep 2012 16:58:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CGwhw5010146; Wed, 12 Sep 2012 16:58:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209121658.q8CGwhw5010146@svn.freebsd.org> From: Eitan Adler Date: Wed, 12 Sep 2012 16:58: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: r240409 - head/usr.sbin/syslogd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 16:58:43 -0000 Author: eadler Date: Wed Sep 12 16:58:42 2012 New Revision: 240409 URL: http://svn.freebsd.org/changeset/base/240409 Log: Add documentation for IPv6 support PR: docs/171580 Submitted by: bdrewery Reviewed by: wblock Approved by: gjb MFC after: 1 month X-MFC-With: r240389 Modified: head/usr.sbin/syslogd/syslog.conf.5 Modified: head/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- head/usr.sbin/syslogd/syslog.conf.5 Wed Sep 12 16:01:48 2012 (r240408) +++ head/usr.sbin/syslogd/syslog.conf.5 Wed Sep 12 16:58:42 2012 (r240409) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd September 12, 2012 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -347,6 +347,14 @@ If a port number is added after a colon .Pq Ql :\& then that port will be used as the destination port rather than the usual syslog port. +IPv6 addresses can be used +by surrounding the address portion with +square brackets +.Po +.Ql [\& +and +.Ql ]\& +.Pc . .It A comma separated list of users. Selected messages are written to those users From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 17:05:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FA64106566C; Wed, 12 Sep 2012 17:05:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AD338FC12; Wed, 12 Sep 2012 17:05:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CH5eVN011281; Wed, 12 Sep 2012 17:05:40 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CH5eqS011277; Wed, 12 Sep 2012 17:05:40 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209121705.q8CH5eqS011277@svn.freebsd.org> From: Ed Maste Date: Wed, 12 Sep 2012 17:05: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: r240410 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 17:05:40 -0000 Author: emaste Date: Wed Sep 12 17:05:39 2012 New Revision: 240410 URL: http://svn.freebsd.org/changeset/base/240410 Log: Avoid mapping ENOENT to ENOTDIR for non-existent path components. The ENOTDIR mapping was introduced in r235266 for kern/128933 based on an interpretation of the somewhat ambiguous language in the POSIX realpath specification. The interpretation is inconsistent with Solaris and Linux, a regression from 9.0, and does not appear to be permitted by the description of ENOTDIR: 20 ENOTDIR Not a directory. A component of the specified pathname existed, but it was not a directory, when a directory was expected. PR: standards/171577 MFC after: 3 days Modified: head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.c ============================================================================== --- head/lib/libc/stdlib/realpath.c Wed Sep 12 16:58:42 2012 (r240409) +++ head/lib/libc/stdlib/realpath.c Wed Sep 12 17:05:39 2012 (r240410) @@ -181,8 +181,6 @@ realpath(const char * __restrict path, c return (NULL); } if (lstat(resolved, &sb) != 0) { - if (errno != ENOENT || p != NULL) - errno = ENOTDIR; if (m) free(resolved); return (NULL); From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 17:54:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED6E3106566C; Wed, 12 Sep 2012 17:54:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D95C58FC12; Wed, 12 Sep 2012 17:54:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CHs9Vc019125; Wed, 12 Sep 2012 17:54:09 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CHs9Fv019122; Wed, 12 Sep 2012 17:54:09 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209121754.q8CHs9Fv019122@svn.freebsd.org> From: Ed Maste Date: Wed, 12 Sep 2012 17:54: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: r240412 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 17:54:10 -0000 Author: emaste Date: Wed Sep 12 17:54:09 2012 New Revision: 240412 URL: http://svn.freebsd.org/changeset/base/240412 Log: According to a clarification at http://austingroupbugs.net/view.php?id=503 ptsname may set errno, so avoid saving and restoring errno across the function. PR: standards/171572 Modified: head/lib/libc/stdlib/ptsname.3 head/lib/libc/stdlib/ptsname.c Modified: head/lib/libc/stdlib/ptsname.3 ============================================================================== --- head/lib/libc/stdlib/ptsname.3 Wed Sep 12 17:50:56 2012 (r240411) +++ head/lib/libc/stdlib/ptsname.3 Wed Sep 12 17:54:09 2012 (r240412) @@ -102,7 +102,8 @@ of the slave device on success; otherwis pointer is returned. .Sh ERRORS The -.Fn grantpt +.Fn grantpt , +.Fn ptsname and .Fn unlockpt functions may fail and set Modified: head/lib/libc/stdlib/ptsname.c ============================================================================== --- head/lib/libc/stdlib/ptsname.c Wed Sep 12 17:50:56 2012 (r240411) +++ head/lib/libc/stdlib/ptsname.c Wed Sep 12 17:54:09 2012 (r240412) @@ -77,7 +77,6 @@ ptsname(int fildes) { static char pt_slave[sizeof _PATH_DEV + SPECNAMELEN] = _PATH_DEV; char *ret = NULL; - int sverrno = errno; /* Make sure fildes points to a master device. */ if (__isptmaster(fildes) != 0) @@ -87,7 +86,6 @@ ptsname(int fildes) sizeof pt_slave - (sizeof _PATH_DEV - 1)) != NULL) ret = pt_slave; -done: /* Make sure ptsname() does not overwrite errno. */ - errno = sverrno; +done: return (ret); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 18:05:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C36C5106566B; Wed, 12 Sep 2012 18:05:44 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7DA88FC19; Wed, 12 Sep 2012 18:05:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CI5it8021106; Wed, 12 Sep 2012 18:05:44 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CI5iCO021102; Wed, 12 Sep 2012 18:05:44 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209121805.q8CI5iCO021102@svn.freebsd.org> From: Martin Matuska Date: Wed, 12 Sep 2012 18:05: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: r240415 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libuutil/common cddl/contrib/opens... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 18:05:44 -0000 Author: mm Date: Wed Sep 12 18:05:43 2012 New Revision: 240415 URL: http://svn.freebsd.org/changeset/base/240415 Log: Merge recent zfs vendor changes, sync code and adjust userland DEBUG. Illumos issued covered: 1884 Empty "used" field for zfs *space commands 3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero 3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID 3048 zfs {user,group}space [-s|-S] is broken 3049 zfs {user,group}space -t doesn't really filter the results 3060 zfs {user,group}space -H output isn't tab-delimited 3061 zfs {user,group}space -o doesn't use specified fields order 3064 usr/src/cmd/zpool/zpool_main.c misspells "successful" 3093 zfs {user,group}space's -i is noop 3098 zfs userspace/groupspace fail without saying why when run as non-root References: https://www.illumos.org/issues/ + [issue_id] Obtained from: illumos (vendor/illumos, vendor/illumos-sys) MFC after: 2 weeks Added: head/sys/cddl/compat/opensolaris/sys/debug.h - copied, changed from r240302, head/sys/cddl/compat/opensolaris/sys/debug.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libuutil/common/uu_misc.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/cddl/lib/libzpool/Makefile head/cddl/usr.bin/ztest/Makefile head/cddl/usr.sbin/zdb/Makefile head/cddl/usr.sbin/zhack/Makefile head/sys/cddl/compat/opensolaris/sys/assfail.h head/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 12 18:02:35 2012 (r240414) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 12 18:05:43 2012 (r240415) @@ -137,17 +137,21 @@ .Fl a | Ar filesystem .Nm .Cm userspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot @@ -1987,9 +1991,11 @@ Upgrade the specified file system. .It Xo .Nm .Cm userspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot @@ -2007,9 +2013,9 @@ Print numeric ID instead of user/group n .It Fl H Do not print headers, use tab-delimited output. .It Fl p -Use exact (parseable) numeric output. +Use exact (parsable) numeric output. .It Fl o Ar field Ns Op , Ns Ar ... -Display only the specified fields from the following set, +Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. .It Fl s Ar field @@ -2024,7 +2030,7 @@ another. The default is Sort by this field in reverse order. See .Fl s . .It Fl t Ar type Ns Op , Ns Ar ... -Print only the specified types from the following set, +Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp The default is @@ -2038,9 +2044,11 @@ Translate SID to POSIX ID. This flag cur .It Xo .Nm .Cm groupspace -.Op Fl niHp +.Op Fl Hinp .Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl sS Ar field +.Op Fl s Ar field +.Ar ... +.Op Fl S Ar field .Ar ... .Op Fl t Ar type Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar snapshot Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Sep 12 18:02:35 2012 (r240414) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Sep 12 18:05:43 2012 (r240415) @@ -304,13 +304,13 @@ get_usage(zfs_help_t idx) "\tunallow [-r] -s @setname [[,...]] " "\n")); case HELP_USERSPACE: - return (gettext("\tuserspace [-niHp] [-o field[,...]] " - "[-sS field] ... [-t type[,...]]\n" - "\t \n")); + return (gettext("\tuserspace [-Hinp] [-o field[,...]] " + "[-s field] ...\n\t[-S field] ... " + "[-t type[,...]] \n")); case HELP_GROUPSPACE: - return (gettext("\tgroupspace [-niHp] [-o field[,...]] " - "[-sS field] ... [-t type[,...]]\n" - "\t \n")); + return (gettext("\tgroupspace [-Hinp] [-o field[,...]] " + "[-s field] ...\n\t[-S field] ... " + "[-t type[,...]] \n")); case HELP_HOLD: return (gettext("\thold [-r] ...\n")); case HELP_HOLDS: @@ -2068,30 +2068,52 @@ zfs_do_upgrade(int argc, char **argv) return (ret); } -#define USTYPE_USR_BIT (0) -#define USTYPE_GRP_BIT (1) -#define USTYPE_PSX_BIT (2) -#define USTYPE_SMB_BIT (3) - -#define USTYPE_USR (1 << USTYPE_USR_BIT) -#define USTYPE_GRP (1 << USTYPE_GRP_BIT) - -#define USTYPE_PSX (1 << USTYPE_PSX_BIT) -#define USTYPE_SMB (1 << USTYPE_SMB_BIT) - -#define USTYPE_PSX_USR (USTYPE_PSX | USTYPE_USR) -#define USTYPE_SMB_USR (USTYPE_SMB | USTYPE_USR) -#define USTYPE_PSX_GRP (USTYPE_PSX | USTYPE_GRP) -#define USTYPE_SMB_GRP (USTYPE_SMB | USTYPE_GRP) -#define USTYPE_ALL (USTYPE_PSX_USR | USTYPE_SMB_USR \ - | USTYPE_PSX_GRP | USTYPE_SMB_GRP) +/* + * zfs userspace [-Hinp] [-o field[,...]] [-s field [-s field]...] + * [-S field [-S field]...] [-t type[,...]] filesystem | snapshot + * zfs groupspace [-Hinp] [-o field[,...]] [-s field [-s field]...] + * [-S field [-S field]...] [-t type[,...]] filesystem | snapshot + * + * -H Scripted mode; elide headers and separate columns by tabs. + * -i Translate SID to POSIX ID. + * -n Print numeric ID instead of user/group name. + * -o Control which fields to display. + * -p Use exact (parseable) numeric output. + * -s Specify sort columns, descending order. + * -S Specify sort columns, ascending order. + * -t Control which object types to display. + * + * Displays space consumed by, and quotas on, each user in the specified + * filesystem or snapshot. + */ +/* us_field_types, us_field_hdr and us_field_names should be kept in sync */ +enum us_field_types { + USFIELD_TYPE, + USFIELD_NAME, + USFIELD_USED, + USFIELD_QUOTA +}; +static char *us_field_hdr[] = { "TYPE", "NAME", "USED", "QUOTA" }; +static char *us_field_names[] = { "type", "name", "used", "quota" }; +#define USFIELD_LAST (sizeof (us_field_names) / sizeof (char *)) -#define USPROP_USED_BIT (0) -#define USPROP_QUOTA_BIT (1) +#define USTYPE_PSX_GRP (1 << 0) +#define USTYPE_PSX_USR (1 << 1) +#define USTYPE_SMB_GRP (1 << 2) +#define USTYPE_SMB_USR (1 << 3) +#define USTYPE_ALL \ + (USTYPE_PSX_GRP | USTYPE_PSX_USR | USTYPE_SMB_GRP | USTYPE_SMB_USR) -#define USPROP_USED (1 << USPROP_USED_BIT) -#define USPROP_QUOTA (1 << USPROP_QUOTA_BIT) +static int us_type_bits[] = { + USTYPE_PSX_GRP, + USTYPE_PSX_USR, + USTYPE_SMB_GRP, + USTYPE_SMB_USR, + USTYPE_ALL +}; +static char *us_type_names[] = { "posixgroup", "posxiuser", "smbgroup", + "smbuser", "all" }; typedef struct us_node { nvlist_t *usn_nvl; @@ -2100,37 +2122,49 @@ typedef struct us_node { } us_node_t; typedef struct us_cbdata { - nvlist_t **cb_nvlp; - uu_avl_pool_t *cb_avl_pool; - uu_avl_t *cb_avl; - boolean_t cb_numname; - boolean_t cb_nicenum; - boolean_t cb_sid2posix; - zfs_userquota_prop_t cb_prop; - zfs_sort_column_t *cb_sortcol; - size_t cb_max_typelen; - size_t cb_max_namelen; - size_t cb_max_usedlen; - size_t cb_max_quotalen; + nvlist_t **cb_nvlp; + uu_avl_pool_t *cb_avl_pool; + uu_avl_t *cb_avl; + boolean_t cb_numname; + boolean_t cb_nicenum; + boolean_t cb_sid2posix; + zfs_userquota_prop_t cb_prop; + zfs_sort_column_t *cb_sortcol; + size_t cb_width[USFIELD_LAST]; } us_cbdata_t; +static boolean_t us_populated = B_FALSE; + typedef struct { zfs_sort_column_t *si_sortcol; - boolean_t si_num_name; - boolean_t si_parsable; + boolean_t si_numname; } us_sort_info_t; static int +us_field_index(char *field) +{ + int i; + + for (i = 0; i < USFIELD_LAST; i++) { + if (strcmp(field, us_field_names[i]) == 0) + return (i); + } + + return (-1); +} + +static int us_compare(const void *larg, const void *rarg, void *unused) { const us_node_t *l = larg; const us_node_t *r = rarg; - int rc = 0; us_sort_info_t *si = (us_sort_info_t *)unused; zfs_sort_column_t *sortcol = si->si_sortcol; - boolean_t num_name = si->si_num_name; + boolean_t numname = si->si_numname; nvlist_t *lnvl = l->usn_nvl; nvlist_t *rnvl = r->usn_nvl; + int rc = 0; + boolean_t lvb, rvb; for (; sortcol != NULL; sortcol = sortcol->sc_next) { char *lvstr = ""; @@ -2149,17 +2183,17 @@ us_compare(const void *larg, const void (void) nvlist_lookup_uint32(lnvl, propname, &lv32); (void) nvlist_lookup_uint32(rnvl, propname, &rv32); if (rv32 != lv32) - rc = (rv32 > lv32) ? 1 : -1; + rc = (rv32 < lv32) ? 1 : -1; break; case ZFS_PROP_NAME: propname = "name"; - if (num_name) { - (void) nvlist_lookup_uint32(lnvl, propname, - &lv32); - (void) nvlist_lookup_uint32(rnvl, propname, - &rv32); - if (rv32 != lv32) - rc = (rv32 > lv32) ? 1 : -1; + if (numname) { + (void) nvlist_lookup_uint64(lnvl, propname, + &lv64); + (void) nvlist_lookup_uint64(rnvl, propname, + &rv64); + if (rv64 != lv64) + rc = (rv64 < lv64) ? 1 : -1; } else { (void) nvlist_lookup_string(lnvl, propname, &lvstr); @@ -2168,27 +2202,40 @@ us_compare(const void *larg, const void rc = strcmp(lvstr, rvstr); } break; - case ZFS_PROP_USED: case ZFS_PROP_QUOTA: - if (ZFS_PROP_USED == prop) + if (!us_populated) + break; + if (prop == ZFS_PROP_USED) propname = "used"; else propname = "quota"; (void) nvlist_lookup_uint64(lnvl, propname, &lv64); (void) nvlist_lookup_uint64(rnvl, propname, &rv64); if (rv64 != lv64) - rc = (rv64 > lv64) ? 1 : -1; + rc = (rv64 < lv64) ? 1 : -1; + break; } - if (rc) + if (rc != 0) { if (rc < 0) return (reverse ? 1 : -1); else return (reverse ? -1 : 1); + } } - return (rc); + /* + * If entries still seem to be the same, check if they are of the same + * type (smbentity is added only if we are doing SID to POSIX ID + * translation where we can have duplicate type/name combinations). + */ + if (nvlist_lookup_boolean_value(lnvl, "smbentity", &lvb) == 0 && + nvlist_lookup_boolean_value(rnvl, "smbentity", &rvb) == 0 && + lvb != rvb) + return (lvb < rvb ? -1 : 1); + + return (0); } static inline const char * @@ -2208,9 +2255,6 @@ us_type2str(unsigned field_type) } } -/* - * zfs userspace - */ static int userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space) { @@ -2218,7 +2262,6 @@ userspace_cb(void *arg, const char *doma zfs_userquota_prop_t prop = cb->cb_prop; char *name = NULL; char *propname; - char namebuf[32]; char sizebuf[32]; us_node_t *node; uu_avl_pool_t *avl_pool = cb->cb_avl_pool; @@ -2232,32 +2275,30 @@ userspace_cb(void *arg, const char *doma size_t namelen; size_t typelen; size_t sizelen; + int typeidx, nameidx, sizeidx; us_sort_info_t sortinfo = { sortcol, cb->cb_numname }; + boolean_t smbentity = B_FALSE; - if (domain == NULL || domain[0] == '\0') { - /* POSIX */ - if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { - type = USTYPE_PSX_GRP; - struct group *g = getgrgid(rid); - if (g) - name = g->gr_name; - } else { - type = USTYPE_PSX_USR; - struct passwd *p = getpwuid(rid); - if (p) - name = p->pw_name; - } - } else { - char sid[ZFS_MAXNAMELEN+32]; + if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) + nomem(); + node = safe_malloc(sizeof (us_node_t)); + uu_avl_node_init(node, &node->usn_avlnode, avl_pool); + node->usn_nvl = props; + + if (domain != NULL && domain[0] != '\0') { + /* SMB */ + char sid[ZFS_MAXNAMELEN + 32]; uid_t id; uint64_t classes; #ifdef sun - int err = 0; + int err; directory_error_t e; #endif + smbentity = B_TRUE; + (void) snprintf(sid, sizeof (sid), "%s-%u", domain, rid); - /* SMB */ + if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { type = USTYPE_SMB_GRP; #ifdef sun @@ -2273,217 +2314,139 @@ userspace_cb(void *arg, const char *doma #ifdef sun if (err == 0) { rid = id; - - e = directory_name_from_sid(NULL, sid, &name, &classes); - if (e != NULL) { - directory_error_free(e); - return (NULL); + if (!cb->cb_sid2posix) { + e = directory_name_from_sid(NULL, sid, &name, + &classes); + if (e != NULL) + directory_error_free(e); + if (name == NULL) + name = sid; } - - if (name == NULL) - name = sid; } #endif } -/* - * if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) - * ug = "group"; - * else - * ug = "user"; - */ - - if (prop == ZFS_PROP_USERUSED || prop == ZFS_PROP_GROUPUSED) - propname = "used"; - else - propname = "quota"; - - (void) snprintf(namebuf, sizeof (namebuf), "%u", rid); - if (name == NULL) - name = namebuf; - - if (cb->cb_nicenum) - zfs_nicenum(space, sizebuf, sizeof (sizebuf)); - else - (void) sprintf(sizebuf, "%llu", space); + if (cb->cb_sid2posix || domain == NULL || domain[0] == '\0') { + /* POSIX or -i */ + if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { + type = USTYPE_PSX_GRP; + if (!cb->cb_numname) { + struct group *g; - node = safe_malloc(sizeof (us_node_t)); - uu_avl_node_init(node, &node->usn_avlnode, avl_pool); + if ((g = getgrgid(rid)) != NULL) + name = g->gr_name; + } + } else { + type = USTYPE_PSX_USR; + if (!cb->cb_numname) { + struct passwd *p; - if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) { - free(node); - return (-1); + if ((p = getpwuid(rid)) != NULL) + name = p->pw_name; + } + } } + /* + * Make sure that the type/name combination is unique when doing + * SID to POSIX ID translation (hence changing the type from SMB to + * POSIX). + */ + if (cb->cb_sid2posix && + nvlist_add_boolean_value(props, "smbentity", smbentity) != 0) + nomem(); + + /* Calculate/update width of TYPE field */ + typestr = us_type2str(type); + typelen = strlen(gettext(typestr)); + typeidx = us_field_index("type"); + if (typelen > cb->cb_width[typeidx]) + cb->cb_width[typeidx] = typelen; if (nvlist_add_uint32(props, "type", type) != 0) nomem(); - if (cb->cb_numname) { - if (nvlist_add_uint32(props, "name", rid) != 0) + /* Calculate/update width of NAME field */ + if ((cb->cb_numname && cb->cb_sid2posix) || name == NULL) { + if (nvlist_add_uint64(props, "name", rid) != 0) nomem(); - namelen = strlen(namebuf); + namelen = snprintf(NULL, 0, "%u", rid); } else { if (nvlist_add_string(props, "name", name) != 0) nomem(); namelen = strlen(name); } + nameidx = us_field_index("name"); + if (namelen > cb->cb_width[nameidx]) + cb->cb_width[nameidx] = namelen; - typestr = us_type2str(type); - typelen = strlen(gettext(typestr)); - if (typelen > cb->cb_max_typelen) - cb->cb_max_typelen = typelen; - - if (namelen > cb->cb_max_namelen) - cb->cb_max_namelen = namelen; - - sizelen = strlen(sizebuf); - if (0 == strcmp(propname, "used")) { - if (sizelen > cb->cb_max_usedlen) - cb->cb_max_usedlen = sizelen; - } else { - if (sizelen > cb->cb_max_quotalen) - cb->cb_max_quotalen = sizelen; - } - - node->usn_nvl = props; - - n = uu_avl_find(avl, node, &sortinfo, &idx); - if (n == NULL) + /* + * Check if this type/name combination is in the list and update it; + * otherwise add new node to the list. + */ + if ((n = uu_avl_find(avl, node, &sortinfo, &idx)) == NULL) { uu_avl_insert(avl, node, idx); - else { + } else { nvlist_free(props); free(node); node = n; props = node->usn_nvl; } + /* Calculate/update width of USED/QUOTA fields */ + if (cb->cb_nicenum) + zfs_nicenum(space, sizebuf, sizeof (sizebuf)); + else + (void) snprintf(sizebuf, sizeof (sizebuf), "%llu", space); + sizelen = strlen(sizebuf); + if (prop == ZFS_PROP_USERUSED || prop == ZFS_PROP_GROUPUSED) { + propname = "used"; + if (!nvlist_exists(props, "quota")) + (void) nvlist_add_uint64(props, "quota", 0); + } else { + propname = "quota"; + if (!nvlist_exists(props, "used")) + (void) nvlist_add_uint64(props, "used", 0); + } + sizeidx = us_field_index(propname); + if (sizelen > cb->cb_width[sizeidx]) + cb->cb_width[sizeidx] = sizelen; + if (nvlist_add_uint64(props, propname, space) != 0) nomem(); return (0); } -static inline boolean_t -usprop_check(zfs_userquota_prop_t p, unsigned types, unsigned props) -{ - unsigned type; - unsigned prop; - - switch (p) { - case ZFS_PROP_USERUSED: - type = USTYPE_USR; - prop = USPROP_USED; - break; - case ZFS_PROP_USERQUOTA: - type = USTYPE_USR; - prop = USPROP_QUOTA; - break; - case ZFS_PROP_GROUPUSED: - type = USTYPE_GRP; - prop = USPROP_USED; - break; - case ZFS_PROP_GROUPQUOTA: - type = USTYPE_GRP; - prop = USPROP_QUOTA; - break; - default: /* ALL */ - return (B_TRUE); - }; - - return (type & types && prop & props); -} - -#define USFIELD_TYPE (1 << 0) -#define USFIELD_NAME (1 << 1) -#define USFIELD_USED (1 << 2) -#define USFIELD_QUOTA (1 << 3) -#define USFIELD_ALL (USFIELD_TYPE | USFIELD_NAME | USFIELD_USED | USFIELD_QUOTA) - -static int -parsefields(unsigned *fieldsp, char **names, unsigned *bits, size_t len) -{ - char *field = optarg; - char *delim; - - do { - int i; - boolean_t found = B_FALSE; - delim = strchr(field, ','); - if (delim != NULL) - *delim = '\0'; - - for (i = 0; i < len; i++) - if (0 == strcmp(field, names[i])) { - found = B_TRUE; - *fieldsp |= bits[i]; - break; - } - - if (!found) { - (void) fprintf(stderr, gettext("invalid type '%s'" - "for -t option\n"), field); - return (-1); - } - - field = delim + 1; - } while (delim); - - return (0); -} - - -static char *type_names[] = { "posixuser", "smbuser", "posixgroup", "smbgroup", - "all" }; -static unsigned type_bits[] = { - USTYPE_PSX_USR, - USTYPE_SMB_USR, - USTYPE_PSX_GRP, - USTYPE_SMB_GRP, - USTYPE_ALL -}; - -static char *us_field_names[] = { "type", "name", "used", "quota" }; -static unsigned us_field_bits[] = { - USFIELD_TYPE, - USFIELD_NAME, - USFIELD_USED, - USFIELD_QUOTA -}; - static void -print_us_node(boolean_t scripted, boolean_t parseable, unsigned fields, - size_t type_width, size_t name_width, size_t used_width, - size_t quota_width, us_node_t *node) +print_us_node(boolean_t scripted, boolean_t parsable, int *fields, int types, + size_t *width, us_node_t *node) { nvlist_t *nvl = node->usn_nvl; - nvpair_t *nvp = NULL; char valstr[ZFS_MAXNAMELEN]; boolean_t first = B_TRUE; - boolean_t quota_found = B_FALSE; - - if (fields & USFIELD_QUOTA && !nvlist_exists(nvl, "quota")) - if (nvlist_add_string(nvl, "quota", "none") != 0) - nomem(); + int cfield = 0; + int field; + uint32_t ustype; + + /* Check type */ + (void) nvlist_lookup_uint32(nvl, "type", &ustype); + if (!(ustype & types)) + return; - while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) { - char *pname = nvpair_name(nvp); - data_type_t type = nvpair_type(nvp); - uint32_t val32 = 0; - uint64_t val64 = 0; + while ((field = fields[cfield]) != USFIELD_LAST) { + nvpair_t *nvp = NULL; + data_type_t type; + uint32_t val32; + uint64_t val64; char *strval = NULL; - unsigned field = 0; - unsigned width = 0; - int i; - for (i = 0; i < 4; i++) { - if (0 == strcmp(pname, us_field_names[i])) { - field = us_field_bits[i]; + + while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) { + if (strcmp(nvpair_name(nvp), + us_field_names[field]) == 0) break; - } } - if (!(field & fields)) - continue; - + type = nvpair_type(nvp); switch (type) { case DATA_TYPE_UINT32: (void) nvpair_value_uint32(nvp, &val32); @@ -2495,99 +2458,86 @@ print_us_node(boolean_t scripted, boolea (void) nvpair_value_string(nvp, &strval); break; default: - (void) fprintf(stderr, "Invalid data type\n"); + (void) fprintf(stderr, "invalid data type\n"); } - if (!first) - if (scripted) - (void) printf("\t"); - else - (void) printf(" "); - switch (field) { case USFIELD_TYPE: strval = (char *)us_type2str(val32); - width = type_width; break; case USFIELD_NAME: if (type == DATA_TYPE_UINT64) { (void) sprintf(valstr, "%llu", val64); strval = valstr; } - width = name_width; break; case USFIELD_USED: case USFIELD_QUOTA: if (type == DATA_TYPE_UINT64) { - (void) nvpair_value_uint64(nvp, &val64); - if (parseable) + if (parsable) { (void) sprintf(valstr, "%llu", val64); - else + } else { zfs_nicenum(val64, valstr, sizeof (valstr)); - strval = valstr; - } - - if (field == USFIELD_USED) - width = used_width; - else { - quota_found = B_FALSE; - width = quota_width; + } + if (field == USFIELD_QUOTA && + strcmp(valstr, "0") == 0) + strval = "none"; + else + strval = valstr; } - break; } - if (field == USFIELD_QUOTA && !quota_found) - (void) printf("%*s", width, strval); - else { - if (type == DATA_TYPE_STRING) - (void) printf("%-*s", width, strval); + if (!first) { + if (scripted) + (void) printf("\t"); else - (void) printf("%*s", width, strval); + (void) printf(" "); } + if (scripted) + (void) printf("%s", strval); + else if (field == USFIELD_TYPE || field == USFIELD_NAME) + (void) printf("%-*s", width[field], strval); + else + (void) printf("%*s", width[field], strval); first = B_FALSE; - + cfield++; } (void) printf("\n"); } static void -print_us(boolean_t scripted, boolean_t parsable, unsigned fields, - unsigned type_width, unsigned name_width, unsigned used_width, - unsigned quota_width, boolean_t rmnode, uu_avl_t *avl) +print_us(boolean_t scripted, boolean_t parsable, int *fields, int types, + size_t *width, boolean_t rmnode, uu_avl_t *avl) { - static char *us_field_hdr[] = { "TYPE", "NAME", "USED", "QUOTA" }; us_node_t *node; const char *col; - int i; - size_t width[4] = { type_width, name_width, used_width, quota_width }; + int cfield = 0; + int field; if (!scripted) { boolean_t first = B_TRUE; - for (i = 0; i < 4; i++) { - unsigned field = us_field_bits[i]; - if (!(field & fields)) - continue; - col = gettext(us_field_hdr[i]); - if (field == USFIELD_TYPE || field == USFIELD_NAME) - (void) printf(first?"%-*s":" %-*s", width[i], - col); - else - (void) printf(first?"%*s":" %*s", width[i], - col); + while ((field = fields[cfield]) != USFIELD_LAST) { + col = gettext(us_field_hdr[field]); + if (field == USFIELD_TYPE || field == USFIELD_NAME) { + (void) printf(first ? "%-*s" : " %-*s", + width[field], col); + } else { + (void) printf(first ? "%*s" : " %*s", + width[field], col); + } first = B_FALSE; + cfield++; } (void) printf("\n"); } - for (node = uu_avl_first(avl); node != NULL; - node = uu_avl_next(avl, node)) { - print_us_node(scripted, parsable, fields, type_width, - name_width, used_width, used_width, node); + for (node = uu_avl_first(avl); node; node = uu_avl_next(avl, node)) { + print_us_node(scripted, parsable, fields, types, width, node); if (rmnode) nvlist_free(node->usn_nvl); } @@ -2602,32 +2552,36 @@ zfs_do_userspace(int argc, char **argv) uu_avl_pool_t *avl_pool; uu_avl_t *avl_tree; uu_avl_walk_t *walk; - - char *cmd; + char *delim; + char deffields[] = "type,name,used,quota"; + char *ofield = NULL; + char *tfield = NULL; + int cfield = 0; + int fields[256]; + int i; boolean_t scripted = B_FALSE; boolean_t prtnum = B_FALSE; - boolean_t parseable = B_FALSE; + boolean_t parsable = B_FALSE; boolean_t sid2posix = B_FALSE; - int error = 0; + int ret = 0; int c; - zfs_sort_column_t *default_sortcol = NULL; zfs_sort_column_t *sortcol = NULL; - unsigned types = USTYPE_PSX_USR | USTYPE_SMB_USR; - unsigned fields = 0; - unsigned props = USPROP_USED | USPROP_QUOTA; + int types = USTYPE_PSX_USR | USTYPE_SMB_USR; us_cbdata_t cb; us_node_t *node; - boolean_t resort_avl = B_FALSE; + us_node_t *rmnode; + uu_list_pool_t *listpool; + uu_list_t *list; + uu_avl_index_t idx = 0; + uu_list_index_t idx2 = 0; if (argc < 2) usage(B_FALSE); - cmd = argv[0]; - if (0 == strcmp(cmd, "groupspace")) - /* toggle default group types */ + if (strcmp(argv[0], "groupspace") == 0) + /* Toggle default group types */ types = USTYPE_PSX_GRP | USTYPE_SMB_GRP; - /* check options */ while ((c = getopt(argc, argv, "nHpo:s:S:t:i")) != -1) { switch (c) { case 'n': @@ -2637,32 +2591,22 @@ zfs_do_userspace(int argc, char **argv) scripted = B_TRUE; break; case 'p': - parseable = B_TRUE; + parsable = B_TRUE; break; case 'o': - if (parsefields(&fields, us_field_names, us_field_bits, - 4) != 0) - return (1); + ofield = optarg; break; case 's': - if (zfs_add_sort_column(&sortcol, optarg, - B_FALSE) != 0) { - (void) fprintf(stderr, - gettext("invalid property '%s'\n"), optarg); - usage(B_FALSE); - } - break; case 'S': if (zfs_add_sort_column(&sortcol, optarg, - B_TRUE) != 0) { + c == 's' ? B_FALSE : B_TRUE) != 0) { (void) fprintf(stderr, - gettext("invalid property '%s'\n"), optarg); + gettext("invalid field '%s'\n"), optarg); usage(B_FALSE); } break; case 't': - if (parsefields(&types, type_names, type_bits, 5)) - return (1); + tfield = optarg; break; case 'i': sid2posix = B_TRUE; @@ -2682,104 +2626,129 @@ zfs_do_userspace(int argc, char **argv) argc -= optind; argv += optind; - /* ok, now we have sorted by default colums (type,name) avl tree */ - if (sortcol) { - zfs_sort_column_t *sc; - for (sc = sortcol; sc; sc = sc->sc_next) { - if (sc->sc_prop == ZFS_PROP_QUOTA) { - resort_avl = B_TRUE; - break; - } - } + if (argc < 1) { + (void) fprintf(stderr, gettext("missing dataset name\n")); + usage(B_FALSE); + } + if (argc > 1) { + (void) fprintf(stderr, gettext("too many arguments\n")); + usage(B_FALSE); } - if (!fields) - fields = USFIELD_ALL; + /* Use default output fields if not specified using -o */ + if (ofield == NULL) + ofield = deffields; + do { + if ((delim = strchr(ofield, ',')) != NULL) + *delim = '\0'; + if ((fields[cfield++] = us_field_index(ofield)) == -1) { + (void) fprintf(stderr, gettext("invalid type '%s' " + "for -o option\n"), ofield); + return (-1); + } + if (delim != NULL) + ofield = delim + 1; + } while (delim != NULL); + fields[cfield] = USFIELD_LAST; + + /* Override output types (-t option) */ + if (tfield != NULL) { + types = 0; + + do { + boolean_t found = B_FALSE; + + if ((delim = strchr(tfield, ',')) != NULL) + *delim = '\0'; + for (i = 0; i < sizeof (us_type_bits) / sizeof (int); + i++) { + if (strcmp(tfield, us_type_names[i]) == 0) { + found = B_TRUE; + types |= us_type_bits[i]; + break; + } + } + if (!found) { + (void) fprintf(stderr, gettext("invalid type " + "'%s' for -t option\n"), tfield); + return (-1); + } + if (delim != NULL) + tfield = delim + 1; + } while (delim != NULL); + } - if ((zhp = zfs_open(g_zfs, argv[argc-1], ZFS_TYPE_DATASET)) == NULL) + if ((zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_DATASET)) == NULL) return (1); if ((avl_pool = uu_avl_pool_create("us_avl_pool", sizeof (us_node_t), - offsetof(us_node_t, usn_avlnode), - us_compare, UU_DEFAULT)) == NULL) + offsetof(us_node_t, usn_avlnode), us_compare, UU_DEFAULT)) == NULL) nomem(); if ((avl_tree = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL) nomem(); - if (sortcol && !resort_avl) - cb.cb_sortcol = sortcol; - else { - (void) zfs_add_sort_column(&default_sortcol, "type", B_FALSE); - (void) zfs_add_sort_column(&default_sortcol, "name", B_FALSE); - cb.cb_sortcol = default_sortcol; - } + /* Always add default sorting columns */ + (void) zfs_add_sort_column(&sortcol, "type", B_FALSE); + (void) zfs_add_sort_column(&sortcol, "name", B_FALSE); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 19:15:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08036106566C; Wed, 12 Sep 2012 19:15:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E79488FC0A; Wed, 12 Sep 2012 19:15:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CJFTBN031654; Wed, 12 Sep 2012 19:15:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CJFTwk031651; Wed, 12 Sep 2012 19:15:29 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209121915.q8CJFTwk031651@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 12 Sep 2012 19:15: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: r240419 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 19:15:30 -0000 Author: hselasky Date: Wed Sep 12 19:15:29 2012 New Revision: 240419 URL: http://svn.freebsd.org/changeset/base/240419 Log: Fix TX FIFO sizes. Correct FIFO handling in Host mode. Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Wed Sep 12 18:18:14 2012 (r240418) +++ head/sys/dev/usb/controller/dwc_otg.c Wed Sep 12 19:15:29 2012 (r240419) @@ -211,24 +211,34 @@ dwc_otg_init_fifo(struct dwc_otg_softc * return (EINVAL); } - DWC_OTG_WRITE_4(sc, DOTG_GNPTXFSIZ, (0x10 << 16) | (tx_start / 4)); - fifo_size -= 0x40; - tx_start += 0x40; - - /* setup control endpoint profile */ - sc->sc_hw_ep_profile[0].usb = dwc_otg_ep_profile[0]; - if (mode == DWC_MODE_HOST) { /* reset active endpoints */ sc->sc_active_rx_ep = 0; + fifo_size /= 2; + + DWC_OTG_WRITE_4(sc, DOTG_GNPTXFSIZ, + ((fifo_size / 4) << 16) | + (tx_start / 4)); + + tx_start += fifo_size; + DWC_OTG_WRITE_4(sc, DOTG_HPTXFSIZ, ((fifo_size / 4) << 16) | (tx_start / 4)); } + if (mode == DWC_MODE_DEVICE) { + DWC_OTG_WRITE_4(sc, DOTG_GNPTXFSIZ, + (0x10 << 16) | (tx_start / 4)); + fifo_size -= 0x40; + tx_start += 0x40; + + /* setup control endpoint profile */ + sc->sc_hw_ep_profile[0].usb = dwc_otg_ep_profile[0]; + /* reset active endpoints */ sc->sc_active_rx_ep = 1; @@ -521,18 +531,11 @@ dwc_otg_host_channel_alloc(struct dwc_ot /* enable interrupts */ DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), HCINT_STALL | HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | - HCINT_XACTERR | HCINT_XFERCOMPL | - HCINT_NAK | HCINT_NYET); + HCINT_AHBERR | HCINT_XACTERR | + HCINT_XFERCOMPL | HCINT_NAK); DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt); DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0); - DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), 0); - - /* reset TX FIFO */ - DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL, - GRSTCTL_TXFIFO(x) | - GRSTCTL_TXFFLSH); /* set channel */ td->channel = x; @@ -581,8 +584,7 @@ dwc_otg_host_setup_tx(struct dwc_otg_td return (0); /* complete */ } - if (temp & (HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { + if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) { td->error_any = 1; return (0); /* complete */ } @@ -783,7 +785,6 @@ dwc_otg_host_data_rx(struct dwc_otg_td * struct dwc_otg_softc *sc; uint32_t temp; uint16_t count; - uint8_t got_short; uint8_t ep_type; if (dwc_otg_host_channel_alloc(td)) @@ -800,24 +801,25 @@ dwc_otg_host_data_rx(struct dwc_otg_td * temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); - if (temp & HCINT_NAK) + if (temp & HCINT_NAK) { td->did_nak = 1; + /* disable channel - will generate a halted event */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), + HCCHAR_CHENA | HCCHAR_CHDIS); + } + if (temp & HCINT_STALL) { td->error_stall = 1; td->error_any = 1; return (0); /* complete */ } - if (temp & (HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { + if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) { td->error_any = 1; return (0); /* complete */ } - if (temp & HCINT_XFERCOMPL) - td->did_complete = 1; - /* check endpoint status */ if (sc->sc_last_rx_status == 0) goto not_complete; @@ -826,14 +828,22 @@ dwc_otg_host_data_rx(struct dwc_otg_td * goto not_complete; switch (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) { + case GRXSTSRH_HALTED: + DPRINTF("HALTED\n"); + td->did_complete = 1; + break; + case GRXSTSRH_IN_COMPLETE: + DPRINTF("COMPLETE\n"); + /* disable channel - will generate a halted event */ + DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), + HCCHAR_CHENA | HCCHAR_CHDIS); + break; case GRXSTSRH_IN_DATA: DPRINTF("DATA\n"); td->toggle ^= 1; - got_short = 0; - /* get the packet byte count */ count = GRXSTSRD_BCNT_GET(sc->sc_last_rx_status); @@ -842,7 +852,7 @@ dwc_otg_host_data_rx(struct dwc_otg_td * if (count < td->max_packet_size) { /* we have a short packet */ td->short_pkt = 1; - got_short = 1; + td->got_short = 1; } else { /* invalid USB packet */ td->error_any = 1; @@ -863,35 +873,33 @@ dwc_otg_host_data_rx(struct dwc_otg_td * return (0); /* we are complete */ } - usbd_copy_in(td->pc, td->offset, sc->sc_rx_bounce_buffer, count); + usbd_copy_in(td->pc, td->offset, + sc->sc_rx_bounce_buffer, count); + td->remainder -= count; td->offset += count; - - /* release FIFO */ - dwc_otg_common_rx_ack(sc); - - /* check if we are complete */ - if ((td->remainder == 0) || got_short) { - if (td->short_pkt) { - /* we are complete */ - return (0); - } - /* else need to receive a zero length packet */ - } break; default: DPRINTF("OTHER\n"); - - /* release FIFO */ - dwc_otg_common_rx_ack(sc); break; } + /* release FIFO */ + dwc_otg_common_rx_ack(sc); not_complete: - if (td->did_complete == 0 && td->did_nak == 0) + if (td->did_complete == 0) return (1); /* busy */ + /* check if we are complete */ + if ((td->remainder == 0) || (td->got_short != 0)) { + if (td->short_pkt) { + /* we are complete */ + return (0); + } + /* else need to receive a zero length packet */ + } + temp = sc->sc_hcchar[td->channel]; ep_type = ((temp & HCCHAR_EPTYPE_MASK) >> @@ -1077,8 +1085,10 @@ dwc_otg_host_data_tx(struct dwc_otg_td * temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)), DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel))); - if (temp & HCINT_NAK) + if (temp & HCINT_NAK) { td->did_nak = 1; + td->did_complete = 1; + } if (temp & HCINT_STALL) { td->error_stall = 1; @@ -1086,8 +1096,7 @@ dwc_otg_host_data_tx(struct dwc_otg_td * return (0); /* complete */ } - if (temp & (HCINT_BBLERR | - HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) { + if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) { td->error_any = 1; return (0); /* complete */ } @@ -1509,8 +1518,29 @@ repeat: uint8_t ep_no; - temp = GRXSTSRD_BCNT_GET( - sc->sc_last_rx_status); + temp = sc->sc_last_rx_status & + GRXSTSRD_PKTSTS_MASK; + + /* non-data messages we simply skip */ + if (temp != GRXSTSRD_STP_DATA && + temp != GRXSTSRD_OUT_DATA) { + if (sc->sc_flags.status_device_mode) { + dwc_otg_common_rx_ack(sc); + goto repeat; + } else if (temp != GRXSTSRD_OUT_COMPLETE && + temp != GRXSTSRH_HALTED) { + dwc_otg_common_rx_ack(sc); + goto repeat; + } + } + + if (temp == GRXSTSRH_HALTED || + temp == GRXSTSRD_OUT_COMPLETE) { + temp = 0; + } else { + temp = GRXSTSRD_BCNT_GET( + sc->sc_last_rx_status); + } ep_no = GRXSTSRD_CHNUM_GET( sc->sc_last_rx_status); @@ -1522,16 +1552,6 @@ repeat: sc->sc_rx_bounce_buffer, (temp + 3) / 4); } - temp = sc->sc_last_rx_status & - GRXSTSRD_PKTSTS_MASK; - - /* non-data messages we simply skip */ - if (temp != GRXSTSRD_STP_DATA && - temp != GRXSTSRD_OUT_DATA) { - dwc_otg_common_rx_ack(sc); - goto repeat; - } - /* check if we should dump the data */ if (!(sc->sc_active_rx_ep & (1U << ep_no))) { dwc_otg_common_rx_ack(sc); @@ -1575,12 +1595,6 @@ repeat: if (sc->sc_last_rx_status == 0) goto repeat; - /* if no host listener - dump data */ - if (sc->sc_flags.status_device_mode == 0) { - dwc_otg_common_rx_ack(sc); - goto repeat; - } - /* disable RX FIFO level interrupt */ sc->sc_irq_mask &= ~GINTSTS_RXFLVL; DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); @@ -1637,6 +1651,8 @@ dwc_otg_interrupt(struct dwc_otg_softc * /* clear left-over interrupts */ for (x = 0; x != sc->sc_host_ch_max; x++) { + if (!(haint & (1 << x))) + continue; /* check if channel is disabled */ if (sc->sc_hcchar[x] == 0) { uint32_t temp; @@ -1845,6 +1861,7 @@ dwc_otg_setup_standard_chain_sub(struct td->short_pkt = temp->short_pkt; td->alt_next = temp->setup_alt_next; td->set_toggle = 0; + td->got_short = 0; td->channel = DWC_OTG_MAX_CHANNELS; } Modified: head/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.h Wed Sep 12 18:18:14 2012 (r240418) +++ head/sys/dev/usb/controller/dwc_otg.h Wed Sep 12 19:15:29 2012 (r240419) @@ -70,6 +70,7 @@ struct dwc_otg_td { uint8_t set_toggle:1; uint8_t did_nak:1; uint8_t did_complete:1; + uint8_t got_short:1; }; struct dwc_otg_std_temp { From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 19:36:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D271B106567C; Wed, 12 Sep 2012 19:36:55 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A488E8FC08; Wed, 12 Sep 2012 19:36:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CJatgH034652; Wed, 12 Sep 2012 19:36:55 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CJatND034647; Wed, 12 Sep 2012 19:36:55 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209121936.q8CJatND034647@svn.freebsd.org> From: Jim Harris Date: Wed, 12 Sep 2012 19:36: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: r240420 - in head/sys: conf modules X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 19:36:55 -0000 Author: jimharris Date: Wed Sep 12 19:36:54 2012 New Revision: 240420 URL: http://svn.freebsd.org/changeset/base/240420 Log: Remove some trailing whitespace. Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 12 19:15:29 2012 (r240419) +++ head/sys/conf/files.amd64 Wed Sep 12 19:36:54 2012 (r240420) @@ -135,7 +135,7 @@ crypto/aesni/aesencdec_amd64.S optional crypto/aesni/aeskeys_amd64.S optional aesni crypto/aesni/aesni.c optional aesni crypto/aesni/aesni_wrap.c optional aesni -crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 12 19:15:29 2012 (r240419) +++ head/sys/conf/files.i386 Wed Sep 12 19:36:54 2012 (r240420) @@ -472,7 +472,7 @@ i386/linux/linux_support.s optional comp i386/linux/linux_sysent.c optional compat_linux i386/linux/linux_sysvec.c optional compat_linux i386/pci/pci_cfgreg.c optional pci -i386/pci/pci_pir.c optional pci +i386/pci/pci_pir.c optional pci i386/svr4/svr4_locore.s optional compat_svr4 \ dependency "svr4_assym.h" \ warning "COMPAT_SVR4 is broken and should be avoided" @@ -516,7 +516,7 @@ x86/cpufreq/hwpstate.c optional cpufreq x86/cpufreq/p4tcc.c optional cpufreq x86/cpufreq/powernow.c optional cpufreq x86/cpufreq/smist.c optional cpufreq -x86/isa/atpic.c optional atpic +x86/isa/atpic.c optional atpic x86/isa/atrtc.c optional native x86/isa/clock.c optional native x86/isa/elcr.c optional atpic | apic native Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Sep 12 19:15:29 2012 (r240419) +++ head/sys/modules/Makefile Wed Sep 12 19:36:54 2012 (r240420) @@ -708,7 +708,7 @@ _padlock= padlock .endif _pccard= pccard _qlxgb= qlxgb -_rdma= rdma +_rdma= rdma _s3= s3 _safe= safe _scsi_low= scsi_low From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 21:00:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7406106567C; Wed, 12 Sep 2012 21:00:38 +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 937A28FC08; Wed, 12 Sep 2012 21:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CL0cQ2047222; Wed, 12 Sep 2012 21:00:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CL0ca2047219; Wed, 12 Sep 2012 21:00:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209122100.q8CL0ca2047219@svn.freebsd.org> From: Alexander Motin Date: Wed, 12 Sep 2012 21:00: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: r240421 - head/sys/boot/i386/libi386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 21:00:38 -0000 Author: mav Date: Wed Sep 12 21:00:37 2012 New Revision: 240421 URL: http://svn.freebsd.org/changeset/base/240421 Log: Make pxe device in lsdev really include device name, looking like this: pxe0: 192.168.3.1:/storage/nfsroot/amd64 , instead of confusing and less useful: 192.168.3.1:pxeboot Modified: head/sys/boot/i386/libi386/pxe.c head/sys/boot/i386/libi386/pxe.h Modified: head/sys/boot/i386/libi386/pxe.c ============================================================================== --- head/sys/boot/i386/libi386/pxe.c Wed Sep 12 19:36:54 2012 (r240420) +++ head/sys/boot/i386/libi386/pxe.c Wed Sep 12 21:00:37 2012 (r240421) @@ -355,18 +355,11 @@ pxe_close(struct open_file *f) static void pxe_print(int verbose) { - if (pxe_call != NULL) { - if (*bootplayer.Sname == '\0') { - printf(" "IP_STR":%s\n", - IP_ARGS(htonl(bootplayer.sip)), - bootplayer.bootfile); - } else { - printf(" %s:%s\n", bootplayer.Sname, - bootplayer.bootfile); - } - } - return; + if (pxe_call == NULL) + return; + + printf(" pxe0: %s:%s\n", inet_ntoa(rootip), rootpath); } static void Modified: head/sys/boot/i386/libi386/pxe.h ============================================================================== --- head/sys/boot/i386/libi386/pxe.h Wed Sep 12 19:36:54 2012 (r240420) +++ head/sys/boot/i386/libi386/pxe.h Wed Sep 12 21:00:37 2012 (r240421) @@ -52,15 +52,6 @@ #define S_SIZE(s) s, sizeof(s) - 1 -#define IP_STR "%d.%d.%d.%d" -#define IP_ARGS(ip) \ - (int)(ip >> 24) & 0xff, (int)(ip >> 16) & 0xff, \ - (int)(ip >> 8) & 0xff, (int)ip & 0xff - -#define MAC_STR "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARGS(mac) \ - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] - #define PXENFSROOTPATH "/pxeroot" typedef struct { From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 21:03:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950F51065670; Wed, 12 Sep 2012 21:03:49 +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 7E0B48FC19; Wed, 12 Sep 2012 21:03:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CL3n5S047724; Wed, 12 Sep 2012 21:03:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CL3nJT047718; Wed, 12 Sep 2012 21:03:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201209122103.q8CL3nJT047718@svn.freebsd.org> From: Ed Schouten Date: Wed, 12 Sep 2012 21:03: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: r240422 - in head: share/man/man3 sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 21:03:49 -0000 Author: ed Date: Wed Sep 12 21:03:48 2012 New Revision: 240422 URL: http://svn.freebsd.org/changeset/base/240422 Log: Implement LIST_PREV(). Regular LISTs have been implemented in such a way that the prev-pointer does not point to the previous element, but to the next-pointer stored in the previous element. This is done to simplify LIST_REMOVE(). This macro can be implemented without knowing the address of the list head. Unfortunately this makes it harder to implement LIST_PREV(), which is why this macro was never here. Still, it is possible to implement this macro. If the prev-pointer points to the list head, we return NULL. Otherwise we simply subtract the offset of the prev-pointer within the structure. It's not as efficient as traversing forward of course, but in practice it shouldn't be that bad. In almost all use cases, people will want to compare the value returned by LIST_PREV() against NULL, so an optimizing compiler will not emit code that does more branching than TAILQs. While there, make the code a bit more readable by introducing __member2struct(). This makes STAILQ_LAST() far more readable. MFC after: 1 month Modified: head/share/man/man3/Makefile head/share/man/man3/queue.3 head/sys/sys/cdefs.h head/sys/sys/param.h head/sys/sys/queue.h Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Wed Sep 12 21:00:37 2012 (r240421) +++ head/share/man/man3/Makefile Wed Sep 12 21:03:48 2012 (r240422) @@ -76,6 +76,7 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 LIST_INSERT_BEFORE.3 \ queue.3 LIST_INSERT_HEAD.3 \ queue.3 LIST_NEXT.3 \ + queue.3 LIST_PREV.3 \ queue.3 LIST_REMOVE.3 \ queue.3 LIST_SWAP.3 \ queue.3 SLIST_EMPTY.3 \ Modified: head/share/man/man3/queue.3 ============================================================================== --- head/share/man/man3/queue.3 Wed Sep 12 21:00:37 2012 (r240421) +++ head/share/man/man3/queue.3 Wed Sep 12 21:03:48 2012 (r240422) @@ -32,7 +32,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd May 13, 2011 +.Dd Sep 12, 2012 .Dt QUEUE 3 .Os .Sh NAME @@ -81,6 +81,7 @@ .Nm LIST_INSERT_BEFORE , .Nm LIST_INSERT_HEAD , .Nm LIST_NEXT , +.Nm LIST_PREV , .Nm LIST_REMOVE , .Nm LIST_SWAP , .Nm TAILQ_CONCAT , @@ -155,6 +156,7 @@ lists and tail queues .Fn LIST_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME" .Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" @@ -248,8 +250,18 @@ Code size and execution time of operatio twice that of the singly-linked data-structures. .El .Pp -Linked lists are the simplest of the doubly linked data structures and support -only the above functionality over singly-linked lists. +Linked lists are the simplest of the doubly linked data structures. +They add the following functionality over the above: +.Bl -enum -compact -offset indent +.It +They may be traversed backwards. +.El +However: +.Bl -enum -compact -offset indent +.It +To traverse backwards, an entry to begin the traversal and the list in +which it is contained must be specified. +.El .Pp Tail queues add the following functionality: .Bl -enum -compact -offset indent @@ -763,6 +775,14 @@ The macro returns the next element in the list, or NULL if this is the last. .Pp The macro +.Nm LIST_PREV +returns the previous element in the list, or NULL if this is the first. +List +.Fa head +must contain element +.Fa elm . +.Pp +The macro .Nm LIST_REMOVE removes the element .Fa elm Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Sep 12 21:00:37 2012 (r240421) +++ head/sys/sys/cdefs.h Wed Sep 12 21:03:48 2012 (r240422) @@ -402,6 +402,8 @@ #endif #define __rangeof(type, start, end) \ (__offsetof(type, end) - __offsetof(type, start)) +#define __member2struct(s, m, x) \ + ((struct s *)(void *)((char *)(x) - __offsetof(struct s, m))) /* * Compiler-dependent macros to declare that functions take printf-like Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Sep 12 21:00:37 2012 (r240421) +++ head/sys/sys/param.h Wed Sep 12 21:03:48 2012 (r240422) @@ -334,8 +334,7 @@ __END_DECLS * Given the pointer x to the member m of the struct s, return * a pointer to the containing structure. */ -#define member2struct(s, m, x) \ - ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) +#define member2struct(s, m, x) __member2struct(s, m, x) /* * Access a variable length array that has been declared as a fixed Modified: head/sys/sys/queue.h ============================================================================== --- head/sys/sys/queue.h Wed Sep 12 21:00:37 2012 (r240421) +++ head/sys/sys/queue.h Wed Sep 12 21:03:48 2012 (r240422) @@ -65,7 +65,7 @@ * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. + * may be traversed in either direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly @@ -85,7 +85,7 @@ * _EMPTY + + + + * _FIRST + + + + * _NEXT + + + + - * _PREV - - - + + * _PREV - + - + * _LAST - - + + * _FOREACH + + + + * _FOREACH_SAFE + + + + @@ -289,8 +289,7 @@ struct { \ #define STAILQ_LAST(head, type, field) \ (STAILQ_EMPTY((head)) ? \ NULL : \ - ((struct type *)(void *) \ - ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) + __member2struct(type, field, (head)->stqh_last)) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) @@ -425,6 +424,11 @@ struct { \ #define LIST_NEXT(elm, field) ((elm)->field.le_next) +#define LIST_PREV(elm, head, type, field) \ + ((elm)->field.le_prev == &LIST_FIRST((head)) ? \ + NULL : \ + __member2struct(type, field, (elm)->field.le_prev)) + #define LIST_REMOVE(elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.le_next); \ QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 22:05:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D5A5106564A; Wed, 12 Sep 2012 22:05:55 +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 089D88FC12; Wed, 12 Sep 2012 22:05:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CM5stf057147; Wed, 12 Sep 2012 22:05:54 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CM5sYF057145; Wed, 12 Sep 2012 22:05:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209122205.q8CM5sYF057145@svn.freebsd.org> From: Attilio Rao Date: Wed, 12 Sep 2012 22:05: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: r240423 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 22:05:55 -0000 Author: attilio Date: Wed Sep 12 22:05:54 2012 New Revision: 240423 URL: http://svn.freebsd.org/changeset/base/240423 Log: Tweak the commit message in case of panic for sleeping from threads with TDP_NOSLEEPING on. The current message has no informations on the thread and wchan involed, which may be useful in case where dumps have mangled dwarf informations. Reported by: kib Reviewed by: bde, jhb, kib MFC after: 1 week Modified: head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Wed Sep 12 21:03:48 2012 (r240422) +++ head/sys/kern/subr_sleepqueue.c Wed Sep 12 22:05:54 2012 (r240423) @@ -297,7 +297,8 @@ sleepq_add(void *wchan, struct lock_obje /* If this thread is not allowed to sleep, die a horrible death. */ KASSERT(!(td->td_pflags & TDP_NOSLEEPING), - ("Trying sleep, but thread marked as sleeping prohibited")); + ("%s: td %p to sleep on wchan %p with TDP_NOSLEEPING on", + __func__, td, wchan)); /* Look up the sleep queue associated with the wait channel 'wchan'. */ sq = sleepq_lookup(wchan); From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 22:10:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B814106566C; Wed, 12 Sep 2012 22:10:54 +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 665468FC14; Wed, 12 Sep 2012 22:10:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CMAsAs058097; Wed, 12 Sep 2012 22:10:54 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CMAsUB058089; Wed, 12 Sep 2012 22:10:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209122210.q8CMAsUB058089@svn.freebsd.org> From: Attilio Rao Date: Wed, 12 Sep 2012 22:10: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: r240424 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 22:10:54 -0000 Author: attilio Date: Wed Sep 12 22:10:53 2012 New Revision: 240424 URL: http://svn.freebsd.org/changeset/base/240424 Log: Improve check coverage about idle threads. Idle threads are not allowed to acquire any lock but spinlocks. Deny any attempt to do so by panicing at the locking operation when INVARIANTS is on. Then, remove the check on blocking on a turnstile. The check in sleepqueues is left because they are not allowed to use tsleep() either which could happen still. Reviewed by: bde, jhb, kib MFC after: 1 week Modified: head/sys/kern/kern_lock.c head/sys/kern/kern_mutex.c head/sys/kern/kern_rmlock.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c head/sys/kern/subr_turnstile.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Wed Sep 12 22:05:54 2012 (r240423) +++ head/sys/kern/kern_lock.c Wed Sep 12 22:10:53 2012 (r240424) @@ -477,6 +477,9 @@ __lockmgr_args(struct lock *lk, u_int fl KASSERT((flags & LK_INTERLOCK) == 0 || ilk != NULL, ("%s: LK_INTERLOCK passed without valid interlock @ %s:%d", __func__, file, line)); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("%s: idle thread %p on lockmgr %s @ %s:%d", __func__, curthread, + lk->lock_object.lo_name, file, line)); class = (flags & LK_INTERLOCK) ? LOCK_CLASS(ilk) : NULL; if (panicstr != NULL) { Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Wed Sep 12 22:05:54 2012 (r240423) +++ head/sys/kern/kern_mutex.c Wed Sep 12 22:10:53 2012 (r240424) @@ -201,6 +201,9 @@ _mtx_lock_flags(struct mtx *m, int opts, if (SCHEDULER_STOPPED()) return; MPASS(curthread != NULL); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", + curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, @@ -301,6 +304,9 @@ mtx_trylock_flags_(struct mtx *m, int op return (1); MPASS(curthread != NULL); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", + curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Wed Sep 12 22:05:54 2012 (r240423) +++ head/sys/kern/kern_rmlock.c Wed Sep 12 22:10:53 2012 (r240424) @@ -498,6 +498,9 @@ void _rm_wlock_debug(struct rmlock *rm, if (SCHEDULER_STOPPED()) return; + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("rm_wlock() by idle thread %p on rmlock %s @ %s:%d", + curthread, rm->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); @@ -540,6 +543,9 @@ _rm_rlock_debug(struct rmlock *rm, struc if (SCHEDULER_STOPPED()) return (1); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("rm_rlock() by idle thread %p on rmlock %s @ %s:%d", + curthread, rm->lock_object.lo_name, file, line)); if (!trylock && (rm->lock_object.lo_flags & RM_SLEEPABLE)) WITNESS_CHECKORDER(&rm->rm_lock_sx.lock_object, LOP_NEWORDER, file, line, NULL); Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Wed Sep 12 22:05:54 2012 (r240423) +++ head/sys/kern/kern_rwlock.c Wed Sep 12 22:10:53 2012 (r240424) @@ -242,6 +242,9 @@ _rw_wlock(struct rwlock *rw, const char if (SCHEDULER_STOPPED()) return; MPASS(curthread != NULL); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("rw_wlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_wlock() of destroyed rwlock @ %s:%d", file, line)); WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, @@ -260,6 +263,9 @@ _rw_try_wlock(struct rwlock *rw, const c if (SCHEDULER_STOPPED()) return (1); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_try_wlock() of destroyed rwlock @ %s:%d", file, line)); @@ -333,6 +339,9 @@ _rw_rlock(struct rwlock *rw, const char if (SCHEDULER_STOPPED()) return; + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_rlock() of destroyed rwlock @ %s:%d", file, line)); KASSERT(rw_wowner(rw) != curthread, @@ -521,6 +530,10 @@ _rw_try_rlock(struct rwlock *rw, const c if (SCHEDULER_STOPPED()) return (1); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("rw_try_rlock() by idle thread %p on rwlock %s @ %s:%d", + curthread, rw->lock_object.lo_name, file, line)); + for (;;) { x = rw->rw_lock; KASSERT(rw->rw_lock != RW_DESTROYED, Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Wed Sep 12 22:05:54 2012 (r240423) +++ head/sys/kern/kern_sx.c Wed Sep 12 22:10:53 2012 (r240424) @@ -250,6 +250,9 @@ _sx_slock(struct sx *sx, int opts, const if (SCHEDULER_STOPPED()) return (0); MPASS(curthread != NULL); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("sx_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_slock() of destroyed sx @ %s:%d", file, line)); WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER, file, line, NULL); @@ -271,6 +274,10 @@ sx_try_slock_(struct sx *sx, const char if (SCHEDULER_STOPPED()) return (1); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("sx_try_slock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); + for (;;) { x = sx->sx_lock; KASSERT(x != SX_LOCK_DESTROYED, @@ -297,6 +304,9 @@ _sx_xlock(struct sx *sx, int opts, const if (SCHEDULER_STOPPED()) return (0); MPASS(curthread != NULL); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("sx_xlock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_xlock() of destroyed sx @ %s:%d", file, line)); WITNESS_CHECKORDER(&sx->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, file, @@ -321,6 +331,9 @@ sx_try_xlock_(struct sx *sx, const char return (1); MPASS(curthread != NULL); + KASSERT(!TD_IS_IDLETHREAD(curthread), + ("sx_try_xlock() by idle thread %p on sx %s @ %s:%d", + curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, ("sx_try_xlock() of destroyed sx @ %s:%d", file, line)); Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Wed Sep 12 22:05:54 2012 (r240423) +++ head/sys/kern/subr_turnstile.c Wed Sep 12 22:10:53 2012 (r240424) @@ -684,7 +684,6 @@ turnstile_wait(struct turnstile *ts, str if (owner) MPASS(owner->td_proc->p_magic == P_MAGIC); MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE); - KASSERT(!TD_IS_IDLETHREAD(td), ("idle threads cannot block on locks")); /* * If the lock does not already have a turnstile, use this thread's From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 22:16:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F3C1106566C; Wed, 12 Sep 2012 22:16:32 +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 1156E8FC17; Wed, 12 Sep 2012 22:16:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CMGVPw059034; Wed, 12 Sep 2012 22:16:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CMGVLX059032; Wed, 12 Sep 2012 22:16:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201209122216.q8CMGVLX059032@svn.freebsd.org> From: Ed Schouten Date: Wed, 12 Sep 2012 22:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240425 - head/usr.bin/last X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 22:16:32 -0000 Author: ed Date: Wed Sep 12 22:16:31 2012 New Revision: 240425 URL: http://svn.freebsd.org/changeset/base/240425 Log: Switch batch to an SLIST. This code requires none of the features of LIST. Modified: head/usr.bin/last/last.c Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Wed Sep 12 22:10:53 2012 (r240424) +++ head/usr.bin/last/last.c Wed Sep 12 22:16:31 2012 (r240425) @@ -72,12 +72,12 @@ typedef struct arg { } ARG; static ARG *arglist; /* head of linked list */ -static LIST_HEAD(idlisthead, idtab) idlist; +static SLIST_HEAD(, idtab) idlist; struct idtab { time_t logout; /* log out time */ char id[sizeof ((struct utmpx *)0)->ut_id]; /* identifier */ - LIST_ENTRY(idtab) list; + SLIST_ENTRY(idtab) list; }; static const char *crmsg; /* cause of last reboot */ @@ -206,7 +206,7 @@ wtmp(void) char ct[80]; struct tm *tm; - LIST_INIT(&idlist); + SLIST_INIT(&idlist); (void)time(&t); /* Load the last entries from the file. */ @@ -240,16 +240,14 @@ wtmp(void) static void doentry(struct utmpx *bp) { - struct idtab *tt, *ttx; /* idlist entry */ + struct idtab *tt; /* the machine stopped */ if (bp->ut_type == BOOT_TIME || bp->ut_type == SHUTDOWN_TIME) { /* everybody just logged out */ - for (tt = LIST_FIRST(&idlist); tt;) { - LIST_REMOVE(tt, list); - ttx = tt; - tt = LIST_NEXT(tt, list); - free(ttx); + while ((tt = SLIST_FIRST(&idlist)) != NULL) { + SLIST_REMOVE_HEAD(&idlist, list); + free(tt); } currentout = -bp->ut_tv.tv_sec; crmsg = bp->ut_type != SHUTDOWN_TIME ? @@ -279,7 +277,7 @@ doentry(struct utmpx *bp) return; /* find associated identifier */ - LIST_FOREACH(tt, &idlist, list) + SLIST_FOREACH(tt, &idlist, list) if (!memcmp(tt->id, bp->ut_id, sizeof bp->ut_id)) break; @@ -290,7 +288,7 @@ doentry(struct utmpx *bp) errx(1, "malloc failure"); tt->logout = currentout; memcpy(tt->id, bp->ut_id, sizeof bp->ut_id); - LIST_INSERT_HEAD(&idlist, tt, list); + SLIST_INSERT_HEAD(&idlist, tt, list); } /* From owner-svn-src-head@FreeBSD.ORG Wed Sep 12 22:54:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDFAE1065670; Wed, 12 Sep 2012 22:54:11 +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 D9ACC8FC08; Wed, 12 Sep 2012 22:54:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CMsB2n064954; Wed, 12 Sep 2012 22:54:11 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CMsBjx064951; Wed, 12 Sep 2012 22:54:11 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201209122254.q8CMsBjx064951@svn.freebsd.org> From: Ed Schouten Date: Wed, 12 Sep 2012 22:54: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: r240426 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 22:54:12 -0000 Author: ed Date: Wed Sep 12 22:54:11 2012 New Revision: 240426 URL: http://svn.freebsd.org/changeset/base/240426 Log: Correctness: use __member2struct() on the correct fields. The prev-pointers point to the next-pointers of the previous element -- not the ENTRY structure. The next-pointers are stored in the ENTRY structures first, so the code would already work correctly. Still, it is more accurate to use the next-fields. To prevent misuse of __member2struct() in the future, I've got a patch that requires the pointer to be passed to this macro to be compatible with the member of the structure. I'll commit this patch after I've tested it properly. MFC after: 1 month. Modified: head/sys/sys/queue.h Modified: head/sys/sys/queue.h ============================================================================== --- head/sys/sys/queue.h Wed Sep 12 22:16:31 2012 (r240425) +++ head/sys/sys/queue.h Wed Sep 12 22:54:11 2012 (r240426) @@ -289,7 +289,7 @@ struct { \ #define STAILQ_LAST(head, type, field) \ (STAILQ_EMPTY((head)) ? \ NULL : \ - __member2struct(type, field, (head)->stqh_last)) + __member2struct(type, field.stqe_next, (head)->stqh_last)) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) @@ -427,7 +427,7 @@ struct { \ #define LIST_PREV(elm, head, type, field) \ ((elm)->field.le_prev == &LIST_FIRST((head)) ? \ NULL : \ - __member2struct(type, field, (elm)->field.le_prev)) + __member2struct(type, field.le_next, (elm)->field.le_prev)) #define LIST_REMOVE(elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.le_next); \ From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 00:36:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D8DA106566C; Thu, 13 Sep 2012 00:36:47 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88AEE8FC12; Thu, 13 Sep 2012 00:36:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D0al1E080373; Thu, 13 Sep 2012 00:36:47 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D0aleB080371; Thu, 13 Sep 2012 00:36:47 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201209130036.q8D0aleB080371@svn.freebsd.org> From: Peter Grehan Date: Thu, 13 Sep 2012 00:36: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: r240427 - head/sys/dev/virtio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 00:36:47 -0000 Author: grehan Date: Thu Sep 13 00:36:46 2012 New Revision: 240427 URL: http://svn.freebsd.org/changeset/base/240427 Log: Relax requirement of certain mb()s Submitted by: Bryan Venteicher bryanv at daemoninthecloset org Modified: head/sys/dev/virtio/virtqueue.c Modified: head/sys/dev/virtio/virtqueue.c ============================================================================== --- head/sys/dev/virtio/virtqueue.c Wed Sep 12 22:54:11 2012 (r240426) +++ head/sys/dev/virtio/virtqueue.c Thu Sep 13 00:36:46 2012 (r240427) @@ -525,7 +525,7 @@ virtqueue_dequeue(struct virtqueue *vq, used_idx = vq->vq_used_cons_idx++ & (vq->vq_nentries - 1); uep = &vq->vq_ring.used->ring[used_idx]; - mb(); + rmb(); desc_idx = (uint16_t) uep->id; if (len != NULL) *len = uep->len; @@ -623,7 +623,7 @@ vq_ring_update_avail(struct virtqueue *v avail_idx = vq->vq_ring.avail->idx & (vq->vq_nentries - 1); vq->vq_ring.avail->ring[avail_idx] = desc_idx; - mb(); + wmb(); vq->vq_ring.avail->idx++; /* Keep pending count until virtqueue_notify(). */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 00:42:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4A9110656B9; Thu, 13 Sep 2012 00:42:56 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FBF38FC12; Thu, 13 Sep 2012 00:42:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D0guIi081298; Thu, 13 Sep 2012 00:42:56 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D0gu4J081296; Thu, 13 Sep 2012 00:42:56 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201209130042.q8D0gu4J081296@svn.freebsd.org> From: Peter Grehan Date: Thu, 13 Sep 2012 00:42: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: r240430 - head/sys/dev/virtio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 00:42:56 -0000 Author: grehan Date: Thu Sep 13 00:42:56 2012 New Revision: 240430 URL: http://svn.freebsd.org/changeset/base/240430 Log: No need to leak these into the includer's namespace. Submitted by: Bryan Venteicher bryanv at daemoninthecloset org Modified: head/sys/dev/virtio/virtio.h Modified: head/sys/dev/virtio/virtio.h ============================================================================== --- head/sys/dev/virtio/virtio.h Thu Sep 13 00:39:44 2012 (r240429) +++ head/sys/dev/virtio/virtio.h Thu Sep 13 00:42:56 2012 (r240430) @@ -151,6 +151,8 @@ VIRTIO_RDWR_DEVICE_CONFIG(1, uint8_t); VIRTIO_RDWR_DEVICE_CONFIG(2, uint16_t); VIRTIO_RDWR_DEVICE_CONFIG(4, uint32_t); +#undef VIRTIO_RDWR_DEVICE_CONFIG + #define VIRTIO_READ_IVAR(name, ivar) \ static inline int \ __CONCAT(virtio_get_,name)(device_t dev) \ @@ -166,6 +168,8 @@ VIRTIO_READ_IVAR(device, VIRTIO_IVAR_DEV VIRTIO_READ_IVAR(subvendor, VIRTIO_IVAR_SUBVENDOR); VIRTIO_READ_IVAR(subdevice, VIRTIO_IVAR_SUBDEVICE); +#undef VIRTIO_READ_IVAR + #define VIRTIO_WRITE_IVAR(name, ivar) \ static inline void \ __CONCAT(virtio_set_,name)(device_t dev, void *val) \ @@ -175,4 +179,6 @@ __CONCAT(virtio_set_,name)(device_t dev, VIRTIO_WRITE_IVAR(feature_desc, VIRTIO_IVAR_FEATURE_DESC); +#undef VIRTIO_WRITE_IVAR + #endif /* _VIRTIO_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 06:16:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 561B7106566B; Thu, 13 Sep 2012 06:16:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27FF08FC08; Thu, 13 Sep 2012 06:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D6Go09033069; Thu, 13 Sep 2012 06:16:50 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D6Gnei033067; Thu, 13 Sep 2012 06:16:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209130616.q8D6Gnei033067@svn.freebsd.org> From: Alan Cox Date: Thu, 13 Sep 2012 06:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240442 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 06:16:50 -0000 Author: alc Date: Thu Sep 13 06:16:49 2012 New Revision: 240442 URL: http://svn.freebsd.org/changeset/base/240442 Log: Simplify the kernel pmap locking in pmap_enter_pv(). While I'm here, tidy up the comments and whitespace. Tested by: cognet Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Sep 13 01:05:30 2012 (r240441) +++ head/sys/arm/arm/pmap.c Thu Sep 13 06:16:49 2012 (r240442) @@ -1588,11 +1588,11 @@ pmap_clearbit(struct vm_page *pg, u_int */ /* - * pmap_enter_pv: enter a mapping onto a vm_page lst + * pmap_enter_pv: enter a mapping onto a vm_page's PV list * * => caller should hold the proper lock on pvh_global_lock * => caller should have pmap locked - * => we will gain the lock on the vm_page and allocate the new pv_entry + * => we will (someday) gain the lock on the vm_page's PV list * => caller should adjust ptp's wire_count before calling * => caller should not adjust pmap's wire_count */ @@ -1600,33 +1600,26 @@ static void pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, vm_offset_t va, u_int flags) { - int km; rw_assert(&pvh_global_lock, RA_WLOCKED); - + PMAP_ASSERT_LOCKED(pm); if (pg->md.pv_kva != 0) { - /* PMAP_ASSERT_LOCKED(pmap_kernel()); */ - pve->pv_pmap = pmap_kernel(); + pve->pv_pmap = kernel_pmap; pve->pv_va = pg->md.pv_kva; pve->pv_flags = PVF_WRITE | PVF_UNMAN; - pg->md.pv_kva = 0; - - if (!(km = PMAP_OWNED(pmap_kernel()))) - PMAP_LOCK(pmap_kernel()); + if (pm != kernel_pmap) + PMAP_LOCK(kernel_pmap); TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); - TAILQ_INSERT_HEAD(&pve->pv_pmap->pm_pvlist, pve, pv_plist); - PMAP_UNLOCK(pmap_kernel()); + TAILQ_INSERT_HEAD(&kernel_pmap->pm_pvlist, pve, pv_plist); + if (pm != kernel_pmap) + PMAP_UNLOCK(kernel_pmap); + pg->md.pv_kva = 0; if ((pve = pmap_get_pv_entry()) == NULL) panic("pmap_kenter_pv: no pv entries"); - if (km) - PMAP_LOCK(pmap_kernel()); } - - PMAP_ASSERT_LOCKED(pm); pve->pv_pmap = pm; pve->pv_va = va; pve->pv_flags = flags; - TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); TAILQ_INSERT_HEAD(&pm->pm_pvlist, pve, pv_plist); pg->md.pvh_attrs |= flags & (PVF_REF | PVF_MOD); From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 06:32:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D38C8106566C; Thu, 13 Sep 2012 06:32:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBD648FC12; Thu, 13 Sep 2012 06:32:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D6WqHh035728; Thu, 13 Sep 2012 06:32:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D6WqJZ035724; Thu, 13 Sep 2012 06:32:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201209130632.q8D6WqJZ035724@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 13 Sep 2012 06:32: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: r240443 - in head/sys: dev/cxgbe/common dev/cxgbe/firmware modules/cxgbe/firmware X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 06:32:53 -0000 Author: np Date: Thu Sep 13 06:32:52 2012 New Revision: 240443 URL: http://svn.freebsd.org/changeset/base/240443 Log: Update interface to firmware 1.6.2 and include the firmware in the driver. Obtained from: Chelsio MFC after: 1 week Added: head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu (contents, props changed) Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/firmware/t4fw_interface.h head/sys/modules/cxgbe/firmware/Makefile Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Thu Sep 13 06:16:49 2012 (r240442) +++ head/sys/dev/cxgbe/common/common.h Thu Sep 13 06:32:52 2012 (r240443) @@ -64,7 +64,7 @@ enum { }; #define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 5 +#define FW_VERSION_MINOR 6 #define FW_VERSION_MICRO 2 struct port_stats { Added: head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu Thu Sep 13 06:32:52 2012 (r240443) @@ -0,0 +1,7600 @@ +/*- + * Copyright (c) 2012 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 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. + */ +begin-base64 644 t4fw +AAADSwEGAgAAAQkBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAzADPwNGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IE1vbiBBdWcgMTMgMTM6 +MjU6MDYgUERUIDIwMTIgb24gY2xlb3BhdHJhLmFzaWNkZXNpZ25lcnMuY29tOi9ob21lL2ZlbGl4 +L3cvdDRmdy1yZWxlYXNlKSwgVmVyc2lvbiBUNHh4IDAxLjA2LjAyLjAwAAAAAAAAAAAAAGp9qktg +ALwAH/zhQIAAAAHhAHtwAAAQAB//9fjhAGAQ4QGUcCAAAADhAZwE4QB5AAACAEDhAHmAAAYAQAAC +AAoABgAK4QB5BAAKAACAAAEA4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAAAAAAgADhAHsAAABA +AeEAe5wAAEAAREREQuAAAADjAARjREREQOMACAAgAAJcAAAAAB//ixAAAAAAH/+LFAAAAAAf/4sY +AAAAAB//ixwf/8AAAAAAAAAAAADAABH/0BL/0JIQEf/QEv/QkhAR/9AB9DER/9CQEBH/zyIK/5IQ +AOQxAAUxAQIAEv/MAucxAhYAEf/LgRABAV/AIQIRAckREf/IEv/IkhAR/8gS/8iSEGAADxH/wxL/ +x5IQEf/DEv/GkhCBEBH/xcAgkhES/8SSEsAgkhMS/8OSEIIQAvJQZS/3Ef/Bxy+SEBH/wJIQEv/A +E//AkyDAMpMhE/+/kyKCIhL/vhP/vpMgIyIhFP+9BDMByTgT/7yDMAODFAgzERT/uqQzkyET/66T +ImAACMIwkyET/6uTIhL/tZAgkCGQIpAjkCSQJZAmkCeQKJApkCqQK5AskC2QLpAvICYQICYRgiIS +/6jAMC03MC03NC03OC03PCM9AXIz7QACABL/pSMKAC83AC83EC83IC83MCM9AXIz7QACABL/msAw +KDcwKDc0KDc4KDc8Iz0BcjPtAwIAEv+YwDAnNwAnNxAnNyAnNzAjPQFyM+0DAgAS/5IV/5MW/5PA +MNcgBWYBYAAeAAAAAAAAAAAAAAAABDYFAAIA0w/TDwUzDG47FAdHFAcEQ3Yx5gQ2BQUzDG877QAC +ABL/hBX/giMKAAInAgcEQwQ+BQUzDAdHFG878AMCABL/fskugyCEIYUivCJ0Ow6GULRVljC0M3Qz +9GP/5gBlP+JlX98S/3LAMgMuBQMCABL/acAwKDdAKDdEKDdIKDdMIz0BcjPtAwIAAAIAEv9sLScA +wBEBSTEASDEBAgDAABT/aATSMRX/Z5RQFP9nBNMxFf9nlFAU/2YE1DEV/2aUUBT/ZgTVMRX/ZZRQ +EP9lAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+F4OMACfgf/4XgH/+F4OMAD9gf +/4XgH/+F4OMAD9gf/4XgH/+HFOMAD9gf/4cUH/+LEOMAEQwf/4sQH/+gNOMAFQgf/6A0H/+gNOMA +Kiwf/8AAH//29eMAKiwgAAAAIAABauMAYSQgAAF4IAABfOMAYpAgAAF8IAABheMAYpQgAAGYIAAB +nOMAYqAgAAGcIAABpeMAYqQgAAG4IAABvOMAYrAgAAG8IAABxeMAYrQgAAHYIAAB2OMAYsAgAAHc +IAAB4uMAYsAgAAH4IAAB+OMAYsggAAH8IAAB/OMAYsggAAIYIAACGOMAYsggAAIcIAACHOMAYsgg +AAI4IAACOOMAYsggAAI8IAACPOMAYsggAAJYIAACWOMAYsggAAJcIAACYuMAYsggAAJ4IAACeOMA +YtAgAAJ8IAACguMAYtAgAAKYIAEewOMAYtggAoAAIAKTUOMBfwAgApNQIAKTUOMBklAgApNQIAYW +sOMBklAgBhawIAYbIOMFFbAgBoAAIAaNQOMFGiAgBo1AIAdScOMFJ2AgB1JwIAdTPOMF7JAgCMAA +IAjAAOMF7VwgCMAAIAjAAOMF7VwgCMAAIAkyJeMF7VwAAAAAAAAAAAAAAAAgAA8nIAAPGCAAEz0g +AA8YIAASqCAADxggAA/RIAASQiAAEcIgAA8YIAARbSAAERwgABCxIAAPBSAAEFwgAA8YIAAPGCAA +DxggAA/yAAAAACAAHk4gACCkIAAglSAAIIUgACB1IAAfpyAAH5ggAB47IAAeOyAAHjsgAB47IAAe +OyAAHjsgAB47IAAeOyAAHjsgAB47IAAe+CAAHukgAB47IAAeOyAAHjsgAB47IAAeOyAAHjsgAB47 +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 +H//ziB//84gf//OIH//ziB//7zAf//G0H//wYB//8GAf//BgIAXwAAAAAAAAAAAAAAAAAAAAAAAg +BfJoIAXyaAAAAAAAAAAAAAAAAAAAAAAgAQdgIAXwAB//8rQf//K0H//ytB//8rQf//K0H//ytAAA +AAAf/+84AAAAAAAAAAAAAAAAAAAAAAIBAAAAAAAAAAAAAAAAAAAEAAAAAAAAAIGAAAAAAAAQBQAA +AAAAAAQAAAAAAAAAAAAAAAAAAAAAgQAAAAAAABgFAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAQAAAAAAAACgQAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgCgAR8XcT8XfTDwPmMQECABbxdRfxdndrBpBgtGZ3Y/hU +DRVVlXsPFABj//kAAABsEAYpIAUqIAf4YKQVoBtFAPsgCt1hqgEAiyIuIBQc8WjxcjwN4AeVAAym +EaxmLWKe96AKW+IAnQAtYp3r1AAGilGAACnCrmSRFS3CrWTRD6TuDg5HLiQU9cALpdIAnQAf8Vku +IhYsISkZ8VeZsPhDyBXgCmUA/4AARjANJQDttgIuZ8KAAOy2AyzOAoAACpkC6bYBIfBBAADvABUF +0EEAAAoAivnilAXgTwUAn7f5YMYV4A1FAO2MNgXIgQAAbckFDgCGCQJh7MgRBiCDgAAa8UAIuAjs +2QwEQIEAAOoABQYkKQAAbZkCCAJhKCEp6SEoJEAFAAAICE8oJSn5IAUEIgCdACu8YP/iZgXgDBUA ++kPIFaAJBQDpFgAsbUKAAPwgJhXgHuUA+CBGFeANBQBYU8sFDkfnZp0vFdwAAMAg0Q8AAAAAAAAA +6iQACdgEgADsRAAK6ASAAFhVp9Kg0Q8A2iD8QGgdoBvFAFhV+WP/1+okAArYBIAAWFbz0qDRDwD/ ++uANoA0FAAAAK6wY7CQACVAEgABYVe5j/6wAAAAAAPgAAh2gDwUA/kUkHe/9YgCKJ+tEAApoBIAA ++0QAFaAMBQBYULPSoNEPAAAAAAAAAPhCsBXv+gUACuoBCu8MLyQULyEJBJkQ6tQDL/4CgAD55gAP +8AkFAPmgBh3gChUACv8Cn9H7laYVr/liAGwQBiggBfpCCBXgGYUA7yAHKlAEgAD0oGgdoB7FAPve +AAzwGUUA+QAM1WH/AQCMIhjw4eoWAC4LBgAADPcRqHctcp73oAs7UgCdACVynQwGPmRRWYopKSIK +CpkM9yAJI6IAnQAqIE4rIEyxrPtgCyQiAJ0ALCROKjAB+EMIFeAMFQDzQAr2ktoBAC8gByohJPpg +JBXg/xEA4N0RD/qCgAAP3QIf8MoNuwItIQcoIQkPqgL/ZgAN+t0BAO/wxR7rAoAADYgCLSEim1CL +IJhTmlT/pgAO8AplAO1WAi3eAoAACrsCm1EoIhCYVS8gOO3wuR5YBIAA/gMAB/BIFQAPizkY8Lac +WZ5YD9g5+wYADHANBQCdVxvwqZhW6PCpFPgFAAAvJhidW5la6wAVAsjBAAAJAIroVg4hyEEAAO5W +DyLxAQAACSCGDgJjCQCGDgJh6nadIwDZgACKKSkgOKaq6iYJKAQKgADzIAVHkgCdAAQLR/lgBEFS +AJ0AwCDRDwAAAAAAAADqJAALWASAAFgk2f9NEA3gHsUA6iQACdgEgADsEgAqaASAAFhVEdKg0Q8r +/BjqJAAJYASAAFhVYmP/1wAAAAAA6iQACtgEgABYVlvSoNEPAIwiwNQNzAL8QEYVr/7iAAD+Q6gV +5LkBAACxBADIGgj/Av5DphXv+kYAiieNEMDA6qwgLtgEgABYUB7SoNEP2iBYVLxj/1MAAGwQDCwi +EC8hNSogB+UWBCnABIAAjYL/AIgVpzUBAPJ/wBXgBRUA8q0ACfAWRQD0QLAV4BuFAP/BAA9xqgEA +7OsfDGAEgAD2oBn1I90BAIkimBDzMKwN4A+FACaAASgWAPLAF48SAJ0AmhOdFxbwS+MWBiJYDQAA +7hYFLS8CgADmVQgCeAUAACdSnp8a+uAFQ+IAnQAoUp3phAAEF/GAABrwPiqirujwPBUWeYAAKIKt +DAM+ZILBjSmKKpgSmxsNqgxzo3suGgDzwnIN4Pb1ACggFpsbnBH3AARFIgCdAIcVisMmIDj7IOYV +oAoFAPshJhWgTgUA9yEGFeBmGQAG6jke8DGaGCgiFxrwLpiaLSIbnZuIxAbqOZoZ+OAJ6qIAnQCO +Fpsbnx3sFgEnBwmAAGAAUgAAAAAAAP/9bA2gCAUAmRyfHZwR6iQACdgEgABYJGKMEY8diRzrEgsl +e0mAAGAB/Zkcnx0qIAf7AGgd4AwFAFg9w4wRjx2JHOsSCy17BgAAYALOixGMFYYXjxj+ISgVr4oF +ACokOwb/Ag/uAgyGDJa0rN/vJhspUASAAO0iECz4BIAAWFXcixuPHYwR+rOmFaEHBQBzewgoIBYp +Cv95iVmNKSogOKPd7SYJJXmmgAAoIhAmITX/gIgVoAoVAPogxhWgCTUAmRQG7jb+IKYVoBaFAPne +AAs/+f4AiieZHIsQ6qwgKmAEgABYUsWJHJoRLSIb+UCIFa/9dgAqIAfsNAAMWASAAFg9fYwRjx36 +IWgV7/5CANogWFQojBGPHfohaBXv/joAAAAAixeKGB7v2ogZC6oCKyA7LSIQCogC7o4CDYnuAACH +wPnfqAWjuAEAKiEkCHcBKCAH5iEHLdoCgAD7RgANcIgRAOshCSxCgoAA+OYAC7pmAQDo78EbMwKA +AAa7AiYhIgh3ApeQF++9iCCdlZ6WmpSbkwdmAuaWAixGAoAA6PgCBNjBAADolgEiU/kAAOjMICIU +NQAAbakFCACGCwJhKCAUBIgICAhHKCQU9QAGxdIAnQAqEgr6s6YVoQkFAPMh8g3g+/UAKCAW+wAI +/WIAnQAsIhexzOwmFyGAqYAAjiktIDij7p4p86AHz5IAnQCPFmXw1MAg0Q8AAAAAAAAmIE5kbQwP +mwKbIusSAClQBIAA7RIEKmAEgABYVBfSoNEPANog/EBoHaAbxQBYVGlj/9frEgQpUASAAFhVY9Kg +0Q8AAIsT2iDrvBgpYASAAFhUYGP/tAAAAAAA6iQADlgEgAD8IKgVr48FAO8kOyz4BIAAWFVX+iFG +FaAGBQAmJhv2R2Ydr/xyAIwSKyEJ/EKwFe/+BQAOjgEOjwwvJBTk3RAN3gKAAA27Av+AZh2gDwUA +/4AGHeAJFQAJuwKbwRrvYflVphXv+74AAIon60QACmgEgAD7RAAVoAwFAFhPDdKg0Q8AANogWFOr +Y/8CKiAH7DQADFgEgABYPPdj/tOLE9og67wSKWAEgABYVDFj/vkAAGwQBiggBfvelAWgHUUA/QAI +tWAHFQArIE4poq6wu+skTiSHsYAAJqKtZGDtKSAUs5kJCUcpJBT1IA5V0gCdACggcywiHfsABADf +/vUA4HsaBHgFAAD/dwAPNP8BAC8kc/1gBAWwDxUAC/s5DswB7CYdLYY2AACKInynBCsgTsq0facI +LSBMLCBOfcMZzGwuIBTvIgIvWBwAAGTxocAg0Q8AAAAAAACIJ8eTCakB6SYCJFDBAABYSULj7ywV +ARGAACigAAOICoiM7KAHLVgEgAD6QGgdoA1FAAuAAGWv4YknZJ+oiprKpyqSCWSvniigAAOICoiM +7KAHLVgEgAD6QGgdoA01AAuAAGWv4WP/fQAA//9YDaAKBQDAYCkgFLOZ+EKGHe/8cgAA6iQACtgE +gABYVOHSoNEPACwgBSsgB/2AC/VhuwEABQlH+SAMGVIAnQDsMgYp6ASAAAy1EapVLlKe98AIpNIA +nQAqUp2cEukWACUIOYAAgxL6QAgV4AwVAFgcAhju7C0hCRzu7CsgBy4hIi8hJPnd6gXguxEA7O4C +DdqCgAAL/wIJ/wKfoIsgnqL9QGYV4AwlAOOmBS3eAoAADLsC+0AmFeAJBQDoABUFUGEAALGZ6oMe +DI/oAACMEMDaLVad9Z/0aRIAnQCKJ+tEAApoBIAA+0QAFaAMBQBYToBj/nArIQn8QrAVoA8FAP7A +Bh3v/gUADp4BLmQD7p4MDmECgADuJBQt3gKAAAy7Age7Apth91WmFe/4FgCKJ8Cw+0QAFaAMFQBY +UKod7sidoIwgG+7I66YCLmYCgAAHzAL9QCYVoBvFAOwkAAlQBIAAWFOTwCDRD44inRHpFgAnArmA +APk/72lSAJ0AiifAsPtEABWgDBUAWFGLHu61nqCNIBvutewSAS7uAoAAB90CnaGMxpyj+0BGFe/2 +7gAA61QACVAEgABYVHtj/acAAPxgaBWv+hYAK7wY6iQACWAEgABYU3eJEGP/mQAAAAAAbBAEKSAU +b5sYiif6gGgd4AwFAOqsICpoBIAAWE490qDRD4sic75WGu6GLKKuZMBLLKKtZMBF6SQULNs8AAAu +IQn+QrAV4AsFAPuABh3v+AUACJgBKMQD6JgMD/kCgADoJBQvdgKAAP/GAA9wDRUADe4CnsH9VaYV +7/5GAMizwCDRDwDaIPxAaB2gG8UAWFNQwCDRD2wQCIkv7yE0KbAEgAD2YOgV54UBAO4gBypYBIAA ++x/AFaAEFQD6jQANMB1FAP7hAAvx7gEA6X0fDBR0AAAoIE/vIE0kQAUAAAgIRygkT/ngEROiAJ0A +LyAFmxGaEP3gD01iAJ0AiSLHo/lADQjiAJ0ALCIZizL9YBFVIgCdAI04jxHo7koWj7GAAB3uSe0W +Ai8nAoAA6EQIB/gNAAApQp7/IAyr4gCdAC1CnQwFPmTRh4spiioLqgz1QAmr4gCdACwaAPWB8g3g ++PUAKyAW+WAVXSIAnQAa7kgpISQrIQcKmQIqIQkLC0oMuxALqgIrIAcc7jQLK0Do7kEd2oKAAAy7 +AiwhIpvQiyCZ1JrTCMwCnNL9YAAVsAxVAAy7ApvRG+44ii+a1SkgOPvcbAWgDAUA/aDmFaBIJQD3 +oQYV4JkZAPlNAA3wCiUACYo5iWSZ2YhlmNr8wMgVoAkFAOzWCyOGMYAA6e4pHMKCgAAJiAKY3Ixo +l9+c3owSiWkp1hCIaijWEewAFQbJIQAACQCKjGf84AjDogCdABnuEQq4AgmIApjWwPX+k6YV4Q4F +APXB8g3g+vUAKyAW+2APhSIAnQAuIhmMKS0gTysgOOXMCAdwBQAA7iYZJuv9AAAtJE+cKfNgDAeS +AJ0AjRBl0X7AINEPnxOeFJ0V6iQACtgEgABYIjuNFY4U7xIDJXWxgACOEGXv2Yon2zDsEgElUMEA +AFhQpMAg0Q8sIDnxn/m+EgCdAP/8vA2gCRUAK+wY6iQACWAEgABYUr1j/8PBo3r5FC0gOv4ghhWg +D/UA0w//oAzFYgCdAOokAArYBIAAWFOx0qDRDwDwABgNoBrVAMChjDcrIQmNOI4y668RDd0CgAAP +uwLkuwIJUASAAFhTlcAg0Q8AAAD//1gNoBqFAAq5ApnWwIX4k6YVoQwFAHXLDSsgFioK//tgCq0i +AJ0AixBksOiLaoxnimmrewfMDJxn92DSDeANBQCxqoxlm2qLZppprNqre3e7AbGqm2aaZYgpLSA4 +pYiYKfOgBr+SAJ0AiSeKmsqji5nJvxntsyiwAJ8TnhQJiAqIjCywB/pAaB2gDTUAC4AAjhSPE4si +x6P7X/Vg4gCdACghNIdn/EHoFeAJFQCZEPjhAAuwHEUA/P4ADn/09gDaIFhR5mP+e4on6qwwK1gE +gABYRe3SoNEPnxOeFJ0V+kDwFaAMBQBYO0KNFY4U7xIDLWoGAADaIOvsEilgBIAAWFJlY/5jAADq +IAcq4ASAAFg7ImP+BYonnxPuFgQp2ASAAOwSASVQwQAAWFA47hIELTAEgAD+IGgV7/vSAJ8T7hYE +KVAEgABYUcWOFP4gaBXv/GoAwVP6QGgdoAsFAPwAAh2gDTUAWEvmKyAFjhT1f+J9YgCdAGP98J8T +nhTqIAcq4ASAAFg7BY4U/iBoFe/6agAAAGwQDJUUJiAFLyAHhy/qMgQpwASAAPxGhBXnNQEA8n/A +FeAOFQAD4zn9QQANcBtFAOerHwxgBIAA+sAZRWH/AQCJIpgQ8y9MDeAOhQAmgAGYEPLAFucSAJ0A +nxMW7UbjFgYicAUAAOoWBS+vAoAA5lUIAkgNAAAnUp6eGXlzfShSne+EAAQXgYAAGu06KqKu6O05 +FRYJgAAogq0MAz5kgrOLKYoqmBILqgxzo1ctGgDzoZIN4Pb1ACsgFpwRdrloF+1DLSA499qABaAK +BQD74OYVoEsFAPmAiBWg3RkADbo5DXY5hxWWF5oY+OALCqIAnQCGFmRhAGAAUAAAAP/+BA2gCAUA +mRqeG58cnBHqJAAJ2ASAAFghZ4wRjxyOG+kSCiV8WYAAYAITmRqeG58c+kDwFaAMBQBYOsmMEY8c +jhvpEgote+YAAGAC55wR/iFmFa+IBQDoJDsmOEEAAOcDHgewgQAABgJhhxWX+I3HisSIxq19B6oM +msR32wyZGi4WC+wWASRABQAAmRqMFYsRhhiOF5i2nbcG7gLtIg8pUASAAFhS2IkajhuMEfqzphWh +BwUAc3sIKyAWKAr/eLlliykqIDiju+smCSV5zoAAhi8vITT9gIgV4AoVAPogxhWgCDUAmBQP3Tb8 +IKYV4B9FAPe+AA+/+g4AmRqeG4onnxyLEOqsICpgBIAAWE/AjxzuEgstYASAAPghSBXv/MIAAAAA +AAAA6iAHKeAEgABYOnaMEY4b+CFIFe/+HgAA2iBYUSKMEY4b+CFIFe/+EgAALSA7ixcX7NTmISQn +yIEAAOq7AgZAQQAA57cCDojuAACTHo3AE+zNA90BIyAHAyNACjMQA90CE+zCA90CIyEHCwpD6yEJ +LVICgAD6xgALOjMBAOohIimbAoAAA7sCgy+d8I0glvSX9pP1m/ODHuvstR7uAoAADe0CnfELqgLq +9gIiDD0AALBKbakFCACGCQJhKCAUpIgICEcoJBT1AAaF0gCdAIoZ+rOmFaEJBQDzIfIN4Pz1ACsg +Fv1gCNUiAJ0AyD+OKS0gOKPuninzoAffkgCdAI8WZfDYwCDRDwAAAAAAAAAmIE5kbSEOmwKbIusS +AClQBIAA7RIEKmAEgABYURfSoNEPANog/EBoHaAbxQBYUWlj/9fqJAAK2ASAAFhSY9Kg0Q8AAIsT +2iDrvBgpYASAAFhRYGP/tNvA/CCoFa+OBQAuJDsIIIYJAmPs9ggpUASAAO0iDyvwBIAAWFJW+iEm +FaAPBQD+R2Yd7/yWAIsSKiEJ/EKwFa/9BQANjQENjgwuJBTkzBANVgKAAAyqAv1gZh3gDgUA/2AG +HaAGFQAGqgKasRnsYPc1phWv+94AAIon60QACmgEgAD7RAAVoAwFAFhMDNKg0Q/aIFhQq2P/AAAA +AADqIAcp4ASAAFg59mP+24sT2iDrvBIpYASAAFhRMWP+92wQBiggBSogB8BD/Q5gRFGqAQArICKN +K+wiCSWDMYAAfcFeLCAhGOxCLQoB7KMRBn1KgAAIMwguMp5u40QrMp3LvvpACBWg/uUADs4B/cYA +DvAPBQD8RCYd4AkFAPggBhXgDAUA+CAmFeAOlQD4IEYV4A0FAFhO1fRzphWgAgUA0Q/AINEPAABs +EAosIAX4QPAV4AsVAPhgaB2npQEA6BYDJVP5AADqujkKGASAAOoWBywgBIAA/YHABFGZAQDBs/uA +E+ViAJ0AjCIb7BnlwglsxwKAAKuI6RYCIeARAAAtgp79oA/rogCdACmCnfE/IA3hDgUAmRElIRuH +KYYqikKYEAdmDAWlNgWvDH/jAdWgdWM6KRoA9SHSDeD69QArIBacGZgQerk/iymlu5spiUL4oAZK +4gCdAI0XGuwVh0OcGZgQ6ncBBoPxgABgADGcGeokAArYBIAAWCBFiBDsEgklfZGAAGABcfpA8BWg +DAUAWDmpiBDsEgktfX4AAGACQO50AAlQBIAA7xIBKeAEgADlmwwK6ASAAOtGAipYBIAAWE74jBmI +EPsTphWhDQUAddsIKyAWLgr/frkswPH+IOYV7/x6AIonixPqrCAp4ASAAFhOvdSg+UBIFeALJQD7 +QEYd7/56AAAA6iAHKuAEgABYOXSIEPwhKBWv/woAiUCMF4dD+CAGFafZAQDtFgUuCB4AACogB/rg +aB3hqgEAWCALiRHXoOo8/yJAQQAA6ZwgIYw1AABtqQUIAIYJAmHAoJoWFuvVKSEHGuvTjxX/13YF +qpkBAOyZEQHgBQAA6pkCB8A9AAD6ICgVpIgdAOwWBCRABQAACDgMmaCLIOhuOQf4QQAAn6PupgIt +7gKAAA3MApyh7HQABVBBAABYTraJFJkY6iQACdgEgABYRmGKQOMSCCUpCoAAjBCIFvOTphXhCwUA +9WHyDeD99QArIBb9YAR1YgCdANKA0Q+OF2TgkcAg0Q+LEtog67wYKWAEgABYUHRj/+SLEew9EQlQ +BIAA/WAARfAMFQBYSVLyYGAV7/6mAIon+CAGFafpQQAPAgDqrCAnGa+AACwSASsKAezMICnoBIAA +WEsy+iDGFa/8GgBlrYT5n+wI0gCdAC4gIPHf67eSAJ0AY/+FAAAAAAAAAOogByrgBIAAWDkWiBbS +gNEPiifcMOsSAyVQgQAAWE5SwLL7QEYd4AIFANEPAADbMPxgaB3gDAUAWEsZ20Dt638Z4ASAAOoW +BivwBIAA7xIBKVAEgABYTnP5QGgd7/uSAACLEtog67wSKWAEgABYUDxj/wYAbBAEFOtyJECACEQR ++oBoHaALFQBZiF0Y611koEL4RgAMMAklAJmh6KYAIQHJgABoIRxvJBnuIhZlSCEAAANAiAkIigMg +iAkEigMAiAkAitpA+gBCHeAMFQBZjMjAINEPxyTRDw/oMJ+iDu4wnqMNwDCdpAyxMP1AphWgCwUA +m6b7QOYV7/8uAGwQBBjrVB3rUCsgBxzrUCohCPoCAAdxuwEA7tw5DdwCgAALqgKcMOPrShmwBIAA +CKoCHOsrIzCA+kAIFeANBQCdZexmAiG43QAA+sCGFaR3HQDpfP8t3gKAAOt7AgzPAoAA62YBJMvh +AACZYwIEiZNnKGYGBiCLGOsbJSEJ9MFmFaQzHQDlZgorkASAAOgABQMowQAAbTkCBQJh0Q8AAABs +EAQX6w8b6ywe6ycsIAcd6yf4QQQV4BYFAPwCAAewBQUA/80ADvHMAQAqIQntNgAuZAKAAAyZAguZ +AogglDeXMpYzlTULqgL4YIYV4AIlAOo2BixGAoAAAogCmDHRDwBsEBCSH4ofIxYS+GAIFeAMFQD3 +QPAV54UBAOqiByRb+QAAC8s5+iDGFeeZAQDpFgslUIEAACoWFPUAIuERdwEAjR+N0mXTPBbq4y5i +rmTkbC9irZ8ciBzphAAEI2GAAIofiBuZEv4iSBWv8wUA6qIHJEA9AAADjAGcF/1BaBXvwgUA7swI +BVCBAAACqgHq2ggGYIEAAOqsQC4oBIAA+4Ah2qIAnQCXEJQRix8pEhQqEhL91ZIFpPgdAO8WDSJo +QQAAnRrsFgMi6BEAAO0WBCLgIQAAnBXv6tgb5wKAAKbMLqELApkBLhYQLrEHKRYT7BYRJVCBAAD6 +IQYVqu4BAOuwFi93AoAAD+4C/iEmFaD99QD9YAyMYgCdAJQR9iAGFeAJYgAA6ZwBJaAFAADtZgwK +WASAAO0SFCSQgYAAKhITKCAAjdMFiAv7oABFMPkBAOqsQCwYBIAA+wAPyqAOFQDA0A/tOAPeC+Pd +CgcYIQAAL3AA9AAABzAKFQD0IqgVoAgFAA6oOB7qtQT/C66OLuCQ74oLDqAEgADviAoFUGEAAOzs +CARAQQAAjUADAIkG3TadgAoAi4hA4iwBI7gFAAD3H/sLogCdAAaPDA2HDJdA9mAIFaAOFQD2YCgV +4AoFAA/qOKmpp9eXMX17AiZsAZYw6OqcHM4CgADzgA0H0gCdAIYeF+qYjR8IaAHnZgEFuAUAAAh3 +AigSFYodCWYCl4SWUCYSEo4cIhIQj2aIGBfqgwL/DJ9mghnzwAYVoSwdAKKijdDn5gInSEEAAOcS +CyEwBQAA5+YDLu4CgADtbQILOASAAO3mASUAyYAAih3vEhIrOASAAG2pBQgAhgkCYY/2KRISKJEh +sYjolSEnicmAACoSEYkfJqadKZAWKgr/+yAF1SIAnQArEhGMGiuyni8SEf1gBpuiAJ0AL/KdKhIS +5hIQJ4YpgACfHIqmiVCZHvrBAAswDCUA9iIGFaeZQQDqEgwkjCmAAC0SFBfqSCsSE43Tp5cncAAf +6kWr2/TgAgPwiQEA43QABdkBAAD64Ati4A4VAMDQCO04A94L490KBxghAACIF9TQ75IID7gEgAD7 +AABEMAsFAOgWFSRQYQAA+QKAFa/5kgCDFfwgiBXv+IYAAAD9DwAJ//geACsSEoofK7ETWCB3jB8s +wBYtCv/9n/mcYgCdAIofixZYIIllryRgAQDAINEPixCMH+u8GC5QBIAAWE7zwCDRDwAmEhWNE/eA +AgMwDwUA7QAVAzBBAACx/+aDHg+P6AAA/YAgFa/5BgAAACwSEoocK8EJI8EILMEKLRIQqzOjw6PT +46ULJVCBAABZB5aNHy3QBPWgB6kSAJ0A5hISK08CgACHHIhhqXeGYuaBFGvYBIAA8wAJoFAFBQCK +H4kRKKAUqYj0QABD94gBAOikFCO4BQAA9QAJNlIAnQArEhGKHye2nSqgFisK/3uhCuoSDynYBIAA +WCA9ih+NEYqnwMDqrCAu2ASAAFhJkNKg0Q8f6emDFfwgiBXv+s4AAAAAAAAAAPzvAAn/+lIAAIsQ +jB/rvBIuUASAAFhOtMAg0Q/bMOoSDyToPQAA/IBoHaTdHQBZB2n6IkYVoA4VAP4gxhWv7h4AwPD+ +IYYV7+5KAIwf+4BoHaAbxQBYTqTAINEPAAAAAP2PAAr/7xYAAIofixFYRHooEhIPAgAPAgCIgPEf ++dKSAJ0AixzqEg8rbwKAAP1gAEXwDAUAWEd49sBgFe/8dgCKH+t0AAtgBIAAW/6eKBISDwIAiIEM +qxHrewgNKASAAPEf9qBSAJ0A6hIPK2AEgABb/mz1QABC//sGAIwS+CHoFe//BQAPjwEPhQwllBQt +kQn/IrAVoAsFACvEAC/EA+TuEA7uAoAA/6YADrAJFQAJ3QKdwRrpkflVphXv+noAAGwQCIgiKyAH +lRL8QtAVoP/1APERrA3huwEAmxV/wSIrEgILC0f7f8AV4A0VAOvbOQlQBIAAWB/zixXzRsAN4P/1 +AB7pnBfpfCwwD+7ggC3vAoAAp93tFgQiM/0AAOXA92dw3QAA/bPIFeTuHQCubuoSBCdwCQAA/6AH +a6IAnQAqop2aE+WkAAUHUYAAK3KuZLC1KnKtZKCvLCAWmhF/wQrrMQYpUASAAFgfvy0gBPWgBrES +AJ0AKiAUpKoKCkcqJBT1QAomUgCdACswD4oS8WyMDeeqAQD5QAuJUgCdAOkSAyHAQQAAbWkFCACG +CQJhwECFEwxoEahVKSAE9SAHoRIAnQCJMeUWACrYBIAA5zICLIrCAADzIAugUAUFAKVqixTqtp0q +EASAANEPAAAAAADqJAAJ2ASAAO0SAipgBIAAWE3L0qDRDwDaIPxAaB2gG8UAWE4dY//XJjAO9sAA +gz/8GgAAAAAAAP/8WA2gCgUAAAArvBjqJAAJYASAAFhOEmP/rAAAAAAA6iQAClgEgABYQ+lj/zIA +AAAALiEHH+k//dKQBeruAQDrMA4vdwKAAA/uAi7WKIwgGOlF/YAAFjAONQAOzAIs1inoBAUByEEA +APlAB0FSAJ0AbbkOBQJjCUCGBQJlCQCGBQJh//wkDaAEBQCPMPPgCJKSAJ0AghTmJp0qEASAANEP +ixEpIQn8QrAVr/0FAA2tAQ2vDC8kFOTMEAzOAoAADJkC/WBmHeAOBQD/YAYdoAgVAAiZApmx+PWm +Fa/6GgAAAAAAiif8gGgd4AsVAOwSAyVQgQAAWEiq9UBoHa/6NgAA2iDrVAAL4ASAAFv95IsQiTEM +rBHsuwgNKASAAPE/9KBSAJ0A6iQAC+AEgABb/bOlpaVqixTqtp0qEASAANEPAAArvBLqJAAJYASA +AFhNxGP+dAAAiieNq/tEABWvzAUADKwBrNwszEBtuRMFAmMJgIYFAmkJYIYFAmd8mxnTD9tA/IBo +HeAMBQBYSIX1QGgdr/f+AAAAAP0vAAz//4oAAAAA2iD6oGgd4AwFAFhGkOJEAANYDQAAjBQrxp3R +DwBsEAQjIAAkCu10MQYiIQO8ItEPhiCFI4Qh9nAABDs2IQD4YABBs2YBAKYzDjMR8q8ACX1EAQDj +PBohE8kAAAQkLAQzKKMi0Q9sEAiLIikgB4owJRYD/ELQFaGZAQDxdnwN6KoBAPogRhWg+/UAe8En +KxID+CCmFee7AQD7f8AV4A0VAOvbOQlQBIAAWB8UiRXzR2AN4Pv1ABfonixyrmTBViZyrehkAAMK +wYAAHui4LuCADJUR51UIB3DdAAD8s8gV5O4dAK5Osu7/oAirogCdACZSnWRhCi8gFpgR++NGDeDp +1QAoMBArMQv5AA8cYgCdALy7AioCWB7iLCAE9YAIeRIAnQAoIBSkiAgIRygkFPUACeZSAJ0AHuiY +HOiAjRIoIQeKExnok/+h4BXqiAEA/wAAFDT/HQDpiAIH+AUAAA9PDJhgiyD/zQAOd6oBAO1mAyNI +QQAA7GYCLd4CgADrSwIBwEEAAOtmASgECoAA+UAFWVIAnQD8geAA0AcFALBKbakFCACGCQJh6CAE +Ilv9AAAMuxGra+u8ECgECoAA9QAEwRIAnQCIMYYy6xYALAcKAADzAAgIUAMFAKNM7FadK5AEgADR +DwDqJAAJ2ASAAO0SAypgBIAAWEzb0qDRDwAAACucGOokAAlgBIAAWE0sY//UAAAAAAD/+qANoAYF +ANog/EBoHaAbxQBYTSVj/7fqJAAKWASAAFhC/WP++Yon/SBoHaALFQDqrCAqaASAAFhH6/dAaB3v +/U4AizDzYAbSkgCdAORWnSuQBIAA0Q8AjhEtIQn+QrAV7/kFAAmJAQmLDCskFOT/EA7uAoAAD90C ++cBmHeAKBQD7wAYdoAwVAAzdAp3h/PWmFa/6OgAAAOokAAtgBIAAW/0QixAoMgHqFgQtZwKAAOy7 +CA0YBIAA8R/4OFIAnQDqJAALYASAAFv83qOjo0zsVp0rkASAANEPjjSLN401/nAAB7vOIQD/gABG +c+4BAK7MDswR/W8ADb3dAQDszBol28kAAA29LA3MKP1gAEW/97oAK5wS6iQACWAEgABYTOJj/qyw +Swy7EetrCAlQBIAA+2IAFeAMBQBYRb/idAACYA0AACxWndEPbBAG2iBYHuaENyUwFvnQJAWiZgUA +BqYoF+gUqGgFVQsIVQqnVYhQuET1BAYN4AcVAIgy6lIBKQEKgAAAeRoJiAKUoJpBlUCUUZgy0Q/a +IFge1B3oBpoRHOgGLdITKzAWLMKBqt3rFgIu7kKAAK3MnBBZBooe5+MY5/kZ5/6LEgioAalmLWJ/ +LGJ96hIBLYEKgADo3QIL+AqAAA/MAixmfQ3tOA3MAllqAipif2SvgYoQWAOgiDLqUgEpAQqAAAB5 +GgmIApSgmkGVQJRRmDLRD2wQCNogWB6y1aAb5+j1z8wFomYFAAZVKBfn3ORZCAlXAoAAq6qKoOmS +fyIi8QAApFSnVQqZAfggBhXgYwUA4QAFATO5AADwAOQNoAcVAAAAAAADPAv1gAEGeVjFAOjICAlQ +BIAA6IJ/KlgEgAD+dAAVq10FAO3MCAtoBIAAC4AAAQGHAzdg4QEHCfcgAADRD2wQCCsgB4owlBb2 +YhAVobsBAPogZhXnqgEAmhX0wA3EkAy1APzADgQgDQUAnRKOIocT+c8eBaAPBQDvFgEvCK4AAAx3 +Eah3KXKetEqaEPsgDbOiAJ0AKXKd6RYEJI2ZgAD9z14FoBulAPrABSRiAJ0ALSAEZNDALoKuZODI +KYKtZJDCKiAUpKoKCkcqJBT1QA+2UgCdAPTADIwSAJ0AjRQe53cY54yY0IwgLxIF/6BmFee1AQDu +1gIuZgKAAOxMAgbIQQAA7NYBIcBBAAD5YAxpUgCdAOhBDWJT/QAAbakFCACGCQJhwFCJMPMgClKS +AJ0AixYrdp0qIATxQPwN4Ay1AHxhFC0gBczRZFIi0lDRDy7BhmTvWWAB1B/ngS/xhmT/4Rnnf4gg +KZF5eYvW2iBZX6zAINEPAOokAApYBIAAWEILY/9P2iD8QGgdoBvFAFhMK4oSDwIAZKF86iQACdgE +gADsRAAK6ASAAFhKE4siZb+/jBFkz7qKJyqsMFhBYOPnShUBEYAAKKAAA4gKiIzsoActWASAAPpA +aB2gDUUAC4AAZa/hiCdkj4eJimSRd4qJZK99KKAAA4gKiIzsoActWASAAPpAaB2gDTUAC4AAZa/h +Y/9cAAD6QGgdoAsVAFhBfGAADAAA+kBoHaALFQBYQUgFCUf1IAn5EgCdAMCh+iBGFa/4qgD/+TQN +oAkFACwgBIsT5cCvZdhhAADqJAAJYASAAFhL9mP/J9ogWEEtjCJkzmhj/xqLFC0gBKS75NEVZdg9 +AADcMO1EAAlQBIAAWEGfjBD8IMYVr/piAI0S0w8PAgDoIgcmhPmAAP0gaB2gCxUA6owwKmgEgABY +QP71QGgd7/mSAC8hCfpCsBXv/AUADKwBDK4M/kKGHaANBQDslAMt2QKAAO2UAC/+AoAA++YAD/AO +FQAO/wKfkf8VphWv91IAAADqJAAJYASAAFhHxmP+fAAA6iQACdgEgADsRAAK6ASAAFhLb9Kg0Q/q +JAAJ2ASAAOxEAAroBIAAWV9A0qDRDwAA/SBoHaALFQDqjCAqaASAAFhGifVAaB3v9yYAAAAAAAD/ ++hgNoAoFANogWV8C0lDRD4onKqwwWEDwZK65wMH8ICYVoAsVAPogRhXv+AYAAAD6QGgdoAwVAFhE +i7NN/CDGFe/2JgAAAABsEAQoIAUlIAf6YKgVr/TVAPpASBXgAyUA/QEgEdFVAQDAINEPAIgpGebY +miv7AAd8IgCdAAlZCSmdAiqRTCmRSPsgBFuiAJ0Awa/7QAQI4gCdANogWESRiyIDugFkr8CKJwS7 +AesmAiVQwQAAWEDI4+ayFQERgAAooAADiAqIjOygBy1YBIAA+kBoHaANRQALgABlr+GJJ2SfhYqa +yqcqkglkr3sooAADiAqIjOygBy1YBIAA+kBoHaANNQALgABlr+Fj/1oAAP//WA2gCgUA2iBYRIEr +ICLquwwJUASAAFhFsNpQ+gAiHeAMBQBYRnyLIgO6AfN/+yZiAJ0ALCAH5L0BCVAEgAD8QEYV4bwB +AOu8HylgBIAAWEtdwCDRDwDrICIpUASAAFhFniogBcHjfqEMaKgpiyLzYAQFf/yGAC8gOsCPePnq ++kBoHaALBQD8AAIdoA0lAFhE52P/1wAA+kBoHaALBQD8AAIdoA0lAFhEaWP/vwAAbBAKiCsd5o0u +ICGLN/xgyBWg/+UAD+4BLiQhDcwBDLsM64kIeMgEgADAINEPAwCGCQJhmxUoIAUlIAf4IQYV7/TV +APxASBXgAyUA/RtAQdFVAQCKKZsr+0AH7GIAnQAb5mwLWwkrvQIssUwrsUj9YASzogCdAMHP/YAE +YOIAnQACKgJYRCiLIgO6AWSvmoonBLsB6yYCJVDBAABYQF/boOPmSBUBIYAAKLAA0w8DiAqIjCyw +B/pAaB2gDUUAC4AA66QADX8mAACJJw8CAGSfWIqaK5IJyqdkv04osAADiAqIjCywB/pAaB2gDTUA +C4AA66QADX82AABj/y0AAAAAAP//TA2gCwUA2iBYRBUrICLquwwJUASAAFhFRNpQ+gAiHeAMBQBY +RhCLIgO6AfN/+tZiAJ0ALCAH5L0BCVAEgAD8QEYV4bwBAOu8HylgBIAAWErxwCDRDwDrICIpUASA +AFhFMiogBcHjfqEMaKgpiyLzYAQFf/xeAC8gOsCPePnq+kBoHaALBQD8AAIdoA0lAFhEe2P/1wAA ++kBoHaALBQD8AAIdoA0lAFhD/WP/vwAAbBAEKTAWCVkU9SAGWJIAnQDxLbAN7/rlAOPl/RSl+QAA +aJUEwCDRDwArIAawuwsLR+skBi3/fgAAjSKMJwrdAe0mAiZQwQAAWEAHyawooAADiAqIjOygBy1Y +BIAA+kBoHaANRQALgABlr+GJJ2Sfs4qaZKCaiplkr6kooAADiAqIjOygBy1YBIAA+kBoHaANNQAL +gABlr+Fj/4gpIAawmQkJR+kkBiz77gAAjCKJJwrMAZwii5pksE6LmSiwAAOICoiM2iD9YPAVoA01 +AAuAAMAg0Q8AAAAA6iQACdgEgADsRAAK6ASAAFhE+8Ag0Q8A6iQACdgEgADsRAAK6ASAAFv/U8Ag +0Q8A//68DaALBQD//YwNoAoFAGwQBNEPAAAAbBAIFeXbFOW6F+XbkhL4IEgVoAoFAPogZhWgCUUA +mRQa5dUIggnggQQJF4KAAPZAAEPwCBUA6iIIDEAKgAD4ICYVr/n1APkXAAxwBgUA+CAGFaAAigCb +E4wUsWbiLAwjuDEAAOVcAiZj/QAA7BYEJgTxgAAtUcL6wAQA0AsVAOC7Gg6jTAAALnF+ZO/KAioC +WEYfjxH6wAQA0AgVAOCIGg0YBIAA6BYDJ4BpgACJoooQCpkBmTKKNyqsMFg/o8msKKAABIgKiIzs +oActWASAAPpgaB2gDUUAC4AAZa/hiTdkn3SKmsunKpIJZK9qKKAABIgKiIzsoActWASAAPpgaB2g +DTUAC4AAZa/hY/9JixP6IEgVoAkVAAubOVhGt9EP//8YDaAKBQBsEAYd5ZQLKxGtsyoyfxnlgoig +LnoQ/yAARLAEBQDpuQgEAZGAACwyeC8ye/mABYRiAJ0AZfDjLDZ8LzJ5LzZ72UAJ5BaUoAnkFsCJ ++EAGFCIAnQAvMnvBwO3lfxeDmYAAIjJ8KiEEjiDz4f4NproBACQ2fPRvZhWgAB4ALjZ87a8BBcP9 +AAAI/wLvJQQljFkAACIyfLDM7zJ7IQDxgADJxmP/v9ogWEWMZaCUKiEE/0EADBaaAQDImNEP2iBY +Rn3RDwDaIFhGsNEPAAAAAAAA+kBoHaALBQBYRn3RDwAAAOrSYCFj4QAA+4AEANALFQD9YAEF3/z1 +AAy7AwuqASrWYFmJUSQ2fCQ2e/pv6BWv/MoAWX+lWEU+Y/84HOVQ/m+IFaAKVQD8b0gV4AtFAO0W +ACFr5QAAWYSW+m/oFa/79gAuMnviNnwve44AACI2e9EPAAAAbBAEFOVC6OUvGV7CgACktCNCfyl6 +EKmI6LgIAYJBgACKMHipAipCexzlNysxBCpGfwy6Aeo1BCnQBIAAWEVRzq4pMQT/IQAMFtkBAMjX +0Q/aMFhGQ9EP2jBYRnbRDwAAAAAAAPpAaB2gCwUAWEZD0Q8jRn/RDwAAbBAE8GDwDe/59QCIIgk5 +AwmIASgmAoonDwIADwIAKqwwWD8M4+T2FQERgAAooAADiAqIjOygBy1YBIAA+kBoHaANRQALgABl +r+GJJ8uUiprKqIqZyawooAADiAqIjOygBy1YBIAA+kBoHaANNQALgABlr+HRDwAAAAAAAP//UA2g +CgUA0Q8AAGwQBOrkzhFLoQAACQlHDJkRCpkIKJKeDwIA9wAFdtIAnQAqkp1koKUb5OcCKgn7QAEF +dbuFAAuqCFhFVvpABADQCRUA/SABBN/79QDipAAEgHGAAIqiC5sDC6oBmiKKJw8CAA8CACqsMFg+ +2OPkwhUBEYAAKKAAA4gKiIzsoActWASAAPpAaB2gDUUAC4AAZa/hiSfLmIqayqiKmcmsKKAAA4gK +iIzsoActWASAAPpAaB2gDTUAC4AAZa/h0Q8AAAAAAAD//1ANoAoFANEP0Q/RDwAAbBAEGOSZAgNH +DDMRqDMrMoQZ5KMosACKsQmICgohjAIKPoiMAwI+/EBoHaANJQALgAAiNoQMAgDRDwAAbBAEGOSK +AgNHDDMRqDMrMoSKsSiwCPqYaB2gqSUAAgo+AwI+eYEdGeSPKLAACYgKiIz8QGgdoA0lAAuAACI2 +hAwCANEPLbELLdz4DQ1D7dz8IWP9AAD9ggAJf/82AAAAAAAAAGwQBBnkk9MPKZJGKnrQCpkoFOSi +/yAAFLAKFQD7JgAMsAgFAClGtwjkMRXknShWhCVShCNCt2YwC20IBSpCt2agAmP/8xvklyK2imP/ +/AAAbBAEEuSS98koBaAFBQAjIq4Y5JIIOAEoJq4lZqglZqklZqolZqtZ1y0U5HUpOugpRkVZ1x1Z +1vtZ1rpZg7tZ1jRZg7n+YUAIkAsVACxigH/HRi9CRhjkgil60An/KAg4Aegmri//AoAAC/8CLya3 +BeQxHuR3JeaELuKELSK3ZtALbQgFKiK3ZqACY//zHORxwLMrxopj//wAWdVgZqAlWdTzWdSWWYNo +WdR9WdRuWYNVEuQxKSKCCRqOBKgKiIALgABj/+5Zg5hj/9MAbBAEKiIHKqwQWEWm0Q8AAGwQBIgn +IowQ2iBYRYVooQHRD9ogWEV/EuRcC6gR6CIIBQHZgAAM6jArIoUrsgAirP/suwgJUASAAFmIERzk +VCrCf/pABADQCxUAALsaC6oCKsZ/WYhA0Q8AAAAA+gDiHaALFQBYRV0sIn8sJoPRDwBsEAQmIgcP +AgDmbBAp0ASAAFhFwOw0AApoBIAA7lQADVgEgADvIgArUASAAFhFA9EPAAAAEuQ7IyIAAxMUDzMR +IyYAEuQ4A+gwBO4wBbEwIyYAlCGVIlWH/mP//BDkM5EAkgGTApQDEeQxghAB6jCiEQHwMcBABOQW +AAIAEeQtghAjGgADIgKSEBHkKsAhkhAE5DGEA4MCggGBAADSMAEjAAAAABDkJZEAkgGTApQDEeQj +ghAB6jCiEQHxMcBABOQWAAIAEeQbghAjKgADIgKSEBHkG8AhkhAE5DGEA4MCggGBAADTMAEzAAAA +ABDkFpEAkgGTApQDEeQUghAB6jCiEQHyMcBABOQWAAIAEeQJghAjSgADIgKSEBHkDMAhkhAE5DGE +A4MCggGBAADUMAFDAAAAAABclAFdlAJelANflABDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXJABXZACXpADX5AAUwAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyUAB2QAZ2UAp6UA5+UBAiUBQmUBgqUBwuU +AEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACckAGdkAKekAcdkAOfkAR4kAV5 +kAZ6kAd7kABTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3JQAHZAB3ZQC3pQD +35QEBJQFBZQGBpQHB5QICJQJCZQKCpQLC5QAQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANyQAd2Q +At6QCx2QA9+QBLSQBbWQBraQB7eQCLiQCbmQCrqQC7uQAFMAAAAf//YgANIxEP/+CgAAAAAAH//2 +aADTMRD//goAAAAAAB//9rAA1DEQ//4KAAAAAAAA9DAKAAAAAAD0MAoAAAAAAPQwCgAAAABsEBAd +4R4b4R4oIhUjIhKTF5gcK7KDjd75AUgVr2mFAKkzKjInLjImKIA5nqAsMiaTHikyJfuAJhWgDwUA +LzYmLzYn45IOLu5CgACtux7hDSoy4f4hphWijAUADLsI6xYJLQEOAAAuEg3uAAUJyASAAAkCYQkC +YQkCYSkSDioy4SmSJYuaZLV/6ZIJJSwhgADoFgYh+MEAAP4hZhXgDQUAnR8f4Pnt4PkR8QEAAO4W +CCx3goAA7+4IDGcCgACtzCwWFO4WCiGgCwAA/g5CHaAEDgAAAIgdKxIQ+8HaBaAJBQDoAAUKwASA +AG1pAggCYR3g64gZC5o4ix8ogQcf4Ofp4OUd3oKAAPtGAA16iAEA6+DkHEcCgAAJiAKJGphQjCD+ +oEYV4E4FAJ5TDc0C7VYELmYCgAAMbAKcUSmSqAuZAQqZAhrg2CwSEpxV6pkCCcAEgADpVgci0IEA +AAhAhgoCZQgghgoCYwgAhgoCYYsb7DLrItFBAABZfHAY4MsqMskIqgIqVhSJKS8SEqeZmSkuMsKv +7i7s0C42wi0iGKfdLSYYLBIUix73k6YVr5mFACm0fSoy4S4KcvFAcA3gCwUAKzbhLTLCLDLB/YAg +BGIAnQCPHC/wBf/AIqLgeGUA+eAiZCB5dQD/ICIj4gCdACgiAmWEOygywisywSoy4Qi7DOsWECUG +YYAAKDLHJjLrLBIUJRIULMKe54wwIzF9AAD2IkYV5GYdAPeAIUuiAJ0AJVKd9KHgDeCKtQApIAV6 +kVCMKYsqDLsM93/0SuIAnQDqJAAL2ASAAFgUkGSudo4eKDLNjBf+QkgV4AkVAOk24SRABQAAKDbN +7PYBIWkhAAAt5icv5ib8QkYVoAIFANEPAAApIhuOH8Dx+HwABXHZ8QDv7gIGgGGAAO4WDyQ40QAA ++iHoFeAINQD7EIAdoAwlAOy7AgO4EQAA+iHmFe/90gAvMsgtMsAsMsP6IcgVoAtVACs0AKjMKqIt +LTQX+mJmHajdHQD8YsYd6N0dAPxiph3oqh0A+mJGHajdHQD8YoYd6KodAPpiJh2oqh0AKjQQLiIZ +LDQr/mTmHejcHQD+Y+YdqI0dACg0KfxlRh3omB0AKTQo/CIIFeifHQDpNCYnwAUAAPh5BhWoqR0A ++mSmHai6HQD6ZIYd6O4dAP5jxh2o7h0A/mOmHajuHQAuNBwoIhovCoD9DgAM8AoFAP0FUg3oyB0A +KDQHKDbH/GDGHaANBQD8YCYd6MwdAPxgph2ozB0A/GCGHaAArgAtNActNscpNAb+YDAVqJkdAPhg +ph3omR0AKTQED+4C7jQBLsAEgACMGCUwBCkwBSo2yeswBiquAoAACVUC6TAHKq4CgAALVQLqNswq +rgKAAPimAArwDwUA5TbLIpBpgAD2AAIdoAkFAChCsgyIEag4KI0CKoK15JCJZNv9AADxYAgv0gCd +AGShbC8yybH/LzbJmsEugreexS2Ctp3ELzLL76MOf7gEgACfwecyyy/QBIAALzLMqv8vNsyOwQ5+ +DC42y43BK4K1J4K3KoK2DbsM64a1JYDRgACNwQfXCCeGt317AiqsAeqGti2IZgAAKEKysYjoRrIm +YGEAAP55iBXgA94AZKDvJzLJKzLL6jYNI7gFAAAnNskugrctgrYtFgQuFhMuNg/tNg4jMEEAAOuj +DH04BIAA6zYNLbgEgAAHuwyn/y82zCs2ywerDOuGtSWBOYAALRITihSaFa19LRYRd9sDsa2dFYoV +LRIRLYa36oa2LYQeAAAuQrKx7i5Gsv55iBXgAc4AZKBrKzLJsbsrNsmawCeCt5fDL4K2n8IvMssm +bBjvow5/uASAAJ/A5zLLL9AEgAAvMswK/wgvNswuwgAOfgwuNsstwgArgrUngrcqgrYNuwzrhrUl +/OGAAC3CAAfXCCeGt317AiqsAeqGtiX8KYAAsZn1//Nj4gCdACgyxyoyyiY266qa+nlGFa/xFgCL +Is24LCISLSxIfckWLiIQLyxAf+kNiC4pLDh5iQXAINEPAACLFtog67wYKWAEgABYRDrAINEPAAAA +APtITA3gCQUALZw47QYAAeAhAAD8gmgdr+nGAMBg//5QDaAJBQAAiCIc35+NHI4gIyAFLdIA8iAG +FeAKVQD4ICYVoDsFAFl+wsAg0Q8sMs2KHisiEugSByZgBQAALDbN6LYBIUkhAAAppicrpib4QkYV +oA8VAC824Y4iZe9lixbaIOu8GClgBIAAWEQVwCDRD2wQBogqKIIViIoogDkU33mHLurfdRwfAoAA +pDPpMp4rvoKAACR8J/tRKBWkRB0A9SAHs6IAnQAlMp3p32wSh1mAAOkABQrABIAAbUkCCAJhJhqk +BqYI6iILK1gEgABZKfeaEOsiCytQBIAAWSnrjBAa32r4QUgV5bcdAJtS+qAGFaXMHQCcU4mQGN9k +l1XoVgQszgKAAAlJAplRJDad6iILK1gEgABYvqQe30/6QAgV75N1ACMkBfvRKBWvn2UALyQFLuJ2 ++0EIFaADBQDyQUYV4A0VAO67DAngBIAAWD5VIyYXIyYWIyYVIyYUIyYTIyYSIyYRIyYQky+TLpMt +kyyTK4gnkyqTKfkEABXvygUACpkB4yYIJMkBAACZiZmI8wFGFeACBQDRD4kni5rLt4OZjCLJx40g +/mAIFaAKVQD9vnAFoDsFAFl+XsAg0Q/aIOuMGClgBIAAWEO9Hd8y/GAGFeACBQDRD///FA2gAwUA +bBAEiyca3xwkIAeIuom+91EoFaFEAQDjsgkkECmAAP8gQCWnhQEA/QGgAVAFBQArIEQIuxArNgAu +4DMtIhMsCokOXDjzoA1vkAclABvfDgxJEauZL5Ke9+AOalIAnQArkp3t3wYVjhGAABTfE+0ABQ3o +BIAADQJhDQJhDQJhDQJhLyEHKCAH/EEEFer/AQD4IAAHMIgRAOqIEA//AoAA6P8CD3QCgAAO3QIE +/wLs3v8eJgKAAB7fAQdEAp+wiCCetpW3lbWcsv+mAA6wDEUA/WCGFeA9BQDttgMsRgKAAAyIAvlg +JhWvxwUA5DYBJdiBAAADIIYLAmMDAIb6AKgd75NlACT6lyyWnS8iE3/3efpBaBWhq0UAq2tYvise +3teLICQkBSriiSMkBS7idpUq+0EIFaAMBQD/bwANsA0VAFg94SUmFyUmFiUmFSUmFCUmEyUmEiUm +ESUmEJUvlS6VLZUslSuPJ5UqlSnlJggnwIEAAAeIAeX2CiQRAQAAkvnz4QYVoAIFANEPiyAkJAUv +ookjJAUuonaVKvvhCBWgDAUA/28ADbANFQBYPcYlJhclJhYlJhUlJhQlJhMlJhIlJhElJhCVL5Uu +lS2VLIgnlSuVKuUmCSRIgQAAB5kB5SYIJMkBAACZiZmI9QFGFeACBQDRDwAAHN6yjSouIhL+QAgV +4ApVAP2gCBXgOwUAWX3QGt6a/BGiHa/41gAAAAAAAP/37A2gAwUA2iDu3qYZYASAAO42ACJYYQAA +WEMpwCDRDwAAAGwQBIMoH96KHN6LHt6ej/4swoOK4OsgWC/+QoAA/4AARnKNBQDtzAgFCLGAACgy +Gx/ehPYAQh3gCRUA/2AAFTANBQD/QABFcfjxAOainif7/QAA/yIADvGI4QDn1wIEQ/0AAAh9OPbA +BeHSAJ0AL6KdGN5x6fQAB4VxgAD4AAgdoAs1AAkCYQkCYQkCYSzBBxfebve8+gWqzAEA6d58HmcC +gAAHzAKc8Iwg+bzeBaAXhQCX8+j2Ai5mAoAAC8wCnPH8YAgVoDgFAJj36fYFLr8CgAD34SYV4AkF +AJn2KfYIBswCLPYEK6ad5jIUKVAEgAD5wAYV4AtFAFlU4+pkAAnYBIAAWLl4BQ1HaNIsiif6gGgd +4AwFAOqsICpoBIAAWD2v0qDRDyu8GOokAAlgBIAAWELaBQtHaLIcwCDRDwCxrOokAAXYYQAA7OYA +KWAEgABYQtJj/9yMJ4/KjciLy/+EABWvyAUA6O4BBtBBAADuuwgH+EEAAO/GCiXZAQAAerM9e6FL +msgZ3kOZ0IkgHN5A+byCBaAPFQDo1gIs9gKAAP/GAA9wClUA/6AmFaA7BQDuMgAs6ASAAFl9VMAg +0Q8NugwK6gwqrFD7gQYVr/7qACvsQPuBBhXv/r4AbBAI5CIUKmAEgADnQgcr0ASAAOveKxlwBIAA +8oKoFaAYNQDncg4i++kAAHj7KRjeJQj4CoiAmhScEu4WASwAIoAAAAAAkhAqso3sVAAJ2ASAAFl8 +wmSmH/KCphWgAgUA0Q8AAAAAACviGwubUu4WASX/OYAAGt4S4hYAKdgEgADqoq8q4ASAAFl8tGSk +YSIqgKJykhUiIN4a3grbMOqisSrgBIAAWXyt+0BAwBIAnQAa3gTbMOqisyrgBIAAWXyn+0BBKBIA +nQAa3f7bMOqitSrgBIAAWXyhZKaMGt352zDqorcq4ASAAFl8nPtAQqASAJ0AwTjyQB74YgCdAGkn +I4sVI7TdixD6gqYV4AIFANEPkhAqsoXsVAAJ2ASAAFl8j2Sm04sQ+oKmFeACBQDRDwAAkhAqspPs +VAAJ2ASAAFl8h2WvEvogaB2gC7UAWLZA+gAiHeADBQDqszgFAYmAAOoSAitYBIAAWXnYw7Ds3dYd +KASAAPygaB3gClUAWXzsjBEswhp8WwSNESXWGmU00I4Q/oKmFaACBQDRDy9AbmT+tZIQKrKp7FQA +CdgEgABZfGtlrqL6IGgdoBtlAFi2JPoAIh3gAgUA6rI4BQCpgADqEgIrWASAAFl5vCx9AyrFKGUk +fI0Q/IKmFeACBQDRDwCSECqym+xUAAnYBIAAWXxXZKMDGt2v2zDqoocq4ASAAFl8UmWuQPogaB2g +C1UAWLYM+gAiHeACBQDqsjgFKVmAAOoSAitYBIAAWXmkLEBv8YAortIAnQBkpQ2KFPoAoh3gDNUA +WLXo0qDRD5IQKrKh7FQACdgEgABZfDxlrrT6IGgdoBslAFi19mSj4ytAbvtgRggSAJ0A6hICK1gE +gABZeY4sQhb7gETTogCdACpGFosQ+oKmFeACBQDRD5IQKrKf7FQACdgEgABZfChkonca3YADOwIP +AgDqopkq4ASAAFl8ImWuTPogaB2gC+UAWLXcZKN76hICK1gEgABZeXcrfQIqtRSLEPqCphXgAgUA +0Q+SECqykexUAAnYBIAAWXwTZKJiGt1q2zDqop0q4ASAAFl8DmSjnxrdZtsw0w/qoosq4ASAAFl8 +CWWt5vogaB2gC3UAWLXCZKMVK0Bu0w/7YECgEgCdABrdWosS6qLXK2AEgABZe/1lpvIrQG/AyAy7 +AitEb4sQ+oKmFeACBQDRD5IQKrKn7FQACdgEgABZe/NkoiIa3UrbMOqiiSrgBIAAWXvuZa17+iBo +HaALZQBYtadkoqorQG5kt5ka3UGLEuqi1ytgBIAAWXvkZKepK0BvLAr9DLsBK0RvixD6gqYV4AIF +ANEPAJIQKrKP7FQACdgEgABZe9lkoewa3THbMNMP6qKDKuAEgABZe9Rkovca3SzbMOqioyrgBIAA +WXvPZKw0Gt0n2zDqoqsq4ASAAFl7ymWsIcCl/bpKBaA7BQBZfDsa3R+LEuqixStgBIAAWXvCZaQF +ixErshsLmVLImWiSB/kgBOHSAJ0AjRGMECvWG/yCphWgAgUA0Q8AkhAqsn/sVAAJ2ASAAFl7tGSh +nxrdDNsw0w/qooEq4ASAAFl7r2WsfvogaB2gCyUAWLVoZKGtGt0DixLqotcrYASAAFl7pmWsXYoU ++gBCHeAM1QBYtUnSoNEPAOoSASpYBIAAWLVlzayCFSIg3mP8DwAAAOoSAitYBIAAWXj09UAripIA +nQDHL9EPAPogaB2gC/UAWLVPZKFK6hICK1gEgABZeOvoEgAjyAsAACqVFfiCphWgAgUA0Q8AAPog +aB2gGxUAWLVDZKEaKkBu0w9kpT7qEgIrWASAAFl43StCF/tgJuOiAJ0AKkYXjBD8gqYVoAIFANEP +AAAAAAD6IGgdoAulAFi1M2Sg2i1AbtMPZNUP6hICK1gEgABZeM0uQTT7wA9CogCdAIoU+gFCHeAM +1QBYtRLSoNEPAAAA+iBoHaAbVQBYtSNkoJrqEgEqWASAAOwSAitoBIAAWLSpixD6gqYV4AIFANEP +AAAA+iBoHaALlQBYtRdkoGovQG5k9LMa3LGLEuqi1ytgBIAAWXtUZaHVK0BvjRD8gqYV4AwVAAy7 +AvqN5h3gAgUA0Q8AAAAAAAAA+iBoHaALFQBYtQXKohrcoIsS6qLXK2AEgABZe0RlqtOKFPoAIh3g +DNUAWLTn0qDRD8Cl/bk2BaA7BQBZe7HAINEPAAAAAAAA+iBoHaALhQBYtPP6ACId4AIFAOqyOAUB +SYAALEBuDwIAZMQ2GtyO6xICK2AEgABZey1logUtQG/A6A7dAi1Eb2UvpY8Q/oKmFeACBQDRDwD6 +IGgdoBsFAFi032SviihAbtMPZIPi6hICK1gEgABZeHkpQhj7IBrrogCdACpGGIsQ+oKmFeACBQDR +DwAAAAAA+iBoHaALNQBYtM9kr0oa3GqLEtMP6qK9K2AEgABZew3j3GwdA7YAAIsRK7IbC8lRyJlo +kgf5P+4R0gCdAI4RjBADvQEt5hv8gqYVoAIFANEPZS8EjxD+gqYV4AIFANEPiBXAmAkiAiKE3vgg +SBWnIgEA+PrGFa/ldgAAAAAAAADqEgIrWASAAFl4TipFNIoQ+oKmFaACBQDRDxrcR4sS6qK/K2AE +gABZeutlrU2LESuyGwvJUWiRCmiSB/k/6eHSAJ0AHtxEA70BDt0CjhGMEC3mG/yCphWgAgUA0Q+K +FPoBIh3gDNUAWLSC0qDRDwAA+iBoHaALRQBYtJNkrlqNEf24bAWgClUA/aNoFeA7BQBZe0Ua3CmL +EuqivStgBIAAWXrM49wuHQ3WAACLESuyGwvpUciZaJIH+T/l+dIAnQCOEYwQA70BLeYb/IKmFaAC +BQDRDxrcGYsS6qLHK2AEgABZerxlrJOLESuyGwuZUmiRCmiSB/k/5BHSAJ0AEtwY+CAoFaKOBQCu +fgKyAiKGGy3g3fwgCBWgDxUAD90CLeTd/IKmFaACBQDRD4oU+gECHeAM1QBYtE7SoNEPiBX6IEgV +oA8lAA8vAu+E3itYBIAAWXf8iBUigN77G4Ydr98uAIoSjRX7t/4F4AlFAAkpAvm7xh3gDCUAWXqW +ZKHdihL7t/QF4AwlAFl6kmShzRvb9/ogSBWgDCUAWXqOZKHUihL7t+YF4AwlAFl6imShxIIV8lvQ +Fa/eLgAAAMCw+CCoFeAYBQD4RgAMM2NFAPLgAEHwjAUA6JTeKdAEgABZd3X4fIIdoAsFAPjgAEOw +jAUA4xYDK9AEgABZd26FEtpw5VwCIxv5AADsNAAK2ASAAFl3Xhvb1PogSBWgDCUAWXptZKFoG9vR ++iBIFaAMJQBZemlkoVcb2876IEgVoAwlAFl6ZWShVooS+7eUBeAMJQBZemFkoUaCFfJb0BWv3EIA +AAAa27WLEuqivytgBIAAWXpZZasGixErshsL6VFokQpokgf5P9ep0gCdAB7buowRA70BDt0C/YNm +FeAKVQD9t2wFoDsFAFl6wIsQ+oKmFeACBQDRD4oU+gIiHeAM1QBYs+zSoNEPihT6AgId4AzVAFiz +6NKg0Q+KFPoA4h3gDNUAWLPj0qDRDwAvKoCvfyLw3sCBCCIC/iCmFeciAQDz+8Ydr9g+AIoU+gIi +HeAMxQBYs9jSoNEPihT6AUId4AzFAFiz09Kg0Q8AihT6ASId4AzFAFizz9Kg0Q+KFPoCAh3gDMUA +WLPL0qDRDwCKFPoBAh3gDMUAWLPG0qDRD4oS/N/AFaNrRQDrewgFUAkAAFi1dGP+GYoS/N/AFaNr +RQDrewgFUAkAAFi0tGP+ItpQ6xIDKeAEgABYtWpj/pfaUOsSAyngBIAAWLSsY/6oihT6AkId4AzV +AFizrtKg0Q+KFPoCQh3gDMUAWLOq0qDRD4oU+gDCHeAMxQBYs6XSoNEPAIoU+gDiHeAMxQBYs6HS +oNEPihT6AMId4AzVAFizndKg0Q8AAAAAAABsEAQe2zGLIPvRKBWvn2UALyQFLuJ2+0EIFaADBQDy +QUYV4A0VAO67DAngBIAAWDo5IyYXIyYWIyYVIyYUIyYTIyYSIyYRIyYQky+TLpMtkyyTK4gnkyqT +KfkEABXvygUACpkB4yYIJMkBAACZiZmIk4rRD2wQCI0nGNsTLCAHj94ugon7oUgV4AMFAO4WASbI +gQAA+CAGFeGcAQDqlAAFlkmAAIPZBQtHaLIHLSBECN0QnTAnGoCn9yZwtShwti5wsyVwt+iIEQs0 +AoAACGYCBlUC97YABaCNlQDlFgIioZ0AAP8gABK0RB0A5BYEIiARAAD2oABCsAZFAP7CAAowBgUA +6FKeK1gEgAAO2zkrFgP1ABLbogCdAChSnSgWBe2EAAQSsYAAGdrpCQCH6drzEgC5gABtSQIIAmEs +IAfTD/72cBWhrAEA59rwFwUBgAAuIQeJFPwCAAa6zgEA6t0QDmcCgAANzAKNFS4hCAfMApzQ6yIA +LUQCgAAI7gKMEuja3x3eAoAAC5kC6dYBJkkhAACZ0xna+JbVmNIJ7gKe1AMEiQ0gi/mgxhXguAUA +KNYHKCAMKyow6/sIBmDBAADs1gcsRAKAAAjuAu7WBCbQoQAAWXZrjRWOFCwgB+nayB93AoAA/6AA +RrGsAQAvIQgrIQcMLkDgqBEPcoKAAPnmAA+6uwEA6NrBHd8CgAAOuwIHuwII/wKb0I4gltWW15nS +n9T5oMYVoAtFAP4gaBXgOAUA6NYDL04CgAD7JgAM8AglAOnWAS/+AoAA+eYAD7+XdQDvNgEmyIEA +AAMghgkCYwMAhvgAqB3vk2UAJFadLyIT8eAEL9IAnQArEgH6QWgVoaxFAAy7CFi55B7aj4sgJyQF +KuKJIyQFLuJ2lir7QQgVoAwFAP9vAA2wDRUAWDmZJiYXJiYWJiYVJiYUJiYTJiYSJiYRJiYQli+W +LpYtliyWK5YqjyeWKZYo+eQAFa/JBQAJiAHm9gokEQEAAJL58+EGFaACBQDRDwAe2nOLICckBSri +iSMkBS7idpYq+0EIFaAMBQD/bwANsA0VAFg5fSYmFyYmFiYmFSYmFCYmEyYmEiYmESYmEJYvli6W +LZYsliuWKo8nlimWKPnkABWvyQUACYgB5vYKJBEBAACS+fPhBhWgAgUA0Q9j/TkAAAAA//agDaAI +BQAAihCKosmvgxCDMdog6Np8GWAEgADoNgAk2GEAAFg+5sAg0Q8AAAAA//98DaADBQBsEAQrIhWD +ty4iGxXacvJhyBXkDwUAD+4CLiYbLTAAHNpuGdpu/KAABvI0BQDv2jsWw4EAAOmJCgRgK4AAiZAK +kAAAwKL9tMwFoDsFAFl5asAg0Q8AACQiFGRP8xzaYo0g/2AIFeAKVQD+gAgVoDsFAFl5YSowGCsw +GSgiGewwGi1WAoAAC6oC6zAbLVYCgAAMqgIIqhELqgJ4qQSxiysmGSgiG3aHCCza/wyMASwmGyww +EC0wEe4wEi5mAoAADcwC7TATLmYCgAAOzAIIzBENzAL1gB2YEgCdAC1ABS4Klf+/+2UiAJ0A2kBY +wsbAINEP6iQACdgEgABYud3AINEPKDAQKjARKTAB6zASLEYCgAAKiALqMBMsRgKAAAuIAgiIEQqI +AvE/+T4SAJ0AKTAEKjAF6zAGLM4CgAAKmQLqMAcszgKAAAuZAgiZEQqZAmWe/SowLCswLe0wLi1W +AoAAC6oC6zAvLVYCgAANqgIIqhELqgJkrtgrIhQrshj7f/Z7ogCdAPmAEJ4iAJ0ACFla/TAAFLWI +AQD5BgAMcAgKAOokAAnYBIAAWLq3wCDRDyowAfFf9NfSAJ0AKTAfKDAcKzAdKiIU7TAeLEYCgAAL +iALrohMsRgKAAA2IAgiIEQmIAnixAiimEyswIC0wISmiFO4wIi3eAoAADbsC7TAjLd4CgAAOuwII +uxENuwJ7kQIrphQtMBguMBkoIhnpMBou7gKAAA7dAu4wGy7uAoAACd0CCN0RDt0CeNkEsY4uJhko +MBApMBHqMBIsRgKAAAmIAukwEyxGAoAACogCCIgRCYgC+YAHriIAnQAIWVr9MAAUtYgBAPkGAAxw +A5IA6iQACdgEgABYusTAINEPAOokAAnYBIAAWLvPwCDRDwDqJAAJ2ASAAFi9VMAg0Q8oMBApMBEr +MBnqMBIsRgKAAAmIAukwEyxGAoAACogCKjAY7fIJLEYCgAAJiALowBd9VgKAAAhZWv0wABS1iAEA ++QYADHAAGgDGiiwwGguqAitShujdCA1WAoAA7KoCDu5CgACtu+wwGyXaAQAAibfoIhktVgKAAAyq +AomeeKkEsY4uJhn1IABEsBp1ANMPbaoFAwCICQCK+2BoHaAMBQD8AEId4AsFAFv+XsAg0Q8AxoqL ++SpShqi7CbsRq6oorf8ogieIjgNAhuSICAVSAQAACAJlAyCGCAJjAwCGCAJhwLD8AAIdoA0lAFv6 +RMAg0Q/Gio75LVKGqO4J7hGu3SvcgIi3/bK6Ba+ZlQAptAWIjuwABQRQDwAACgJhCgJhCgJhCgJh +JDAsKTAt6jAuKiYCgAAJRALpMC8qJgKAAApEAghEEQlEAiSGwSwwKC4wKe8wKi5mAoAADswC7jAr +LmYCgAAPzALvguIuZgKAAA7MAiyGwykwFCowFaxE7jAWLM4CgAAKmQLqMBcszgKAAP8mAAywDAUA +7IbILM4CgAAKmQIphsD1/9/jogCdAC4iEiyGwukiAibSgQAAmuHutggheSEAAJ+56iYSLN7WAAD6 +QGgdoA0lAFglHcAg0Q8rMBQtMBXuMBYt3gKAAA27Au0wFy3eAoAADrsCCLsRDbsC9X/hWBIAnQAu +MAQvMAXoMAYvdgKAAA/uAu8wBy92AoAACO4C6O4RCVAEgAD/xgAPcA0FAFi4bmP79AAAAGwQBCsi +CBnZPiyyFyqyFi0iCimSjQyqDOzZOxVBAwAA6YsMepgEgAD7gAUqogCdAC3QORzZBAzZEayZLpKe +98AEmVIAnQAskp0e2PxkwIXuAAUOaASAAA0CYQ0CYRTZAxjY+5jAGNko/kAIFeAFhQCVw/WARhWg +DSUA5NkQH/4CgAAN/wKfwYWwBKQClMUIVQKVxO4CFQZgYQAADACKLZadLrIX+8AARzfDAQDuthcm +FHUAAIon+gAiHeAMBQD7RAAVoA0VAFg4RtKg0Q/AINEPwCDRD4siZb/2K9wY6iQACWAEgABYPW4D +DEdpwuKNJ4/ai9iM2/+kABWvyAUA6O4BBdBBAADuzAgH+EEAAO/WCiZhAQAAesMrfKFcmtgc2N6c +sIogGdj5+WBGFeAMFQDitgMtVgKAAAyqAvtgJhWgAgUA0Q8LzwwP7wzs2NMX+UEAAJ/YnLCKIBnY +7PlgRhXgDBUA4rYDLVYCgAAMqgL7YCYVoAIFANEPKOxA+aEGFa/+egBsEAQY2KsT2NiIiSMyhqKC +CSIRojIiLIDRDwAAbBAEE9jTcjAPAlNa/HAAEbUiAQADIgLRD8Yq0Q8AAABsEAQkIhXKS/qAaB2g +C1UAWU8miTkY2M55iD8rMQssIhaKQqvMLCYW60YOJQChgADaIFv+ScAg0Q8AAAAAAAAA+oBoHaAL +BQD8AAIdoA0lAFv/e/phZBXv/2YAjkeO7izgECjgER3Ysu/gEi5mAoAACMwC7uATLmYCgAAPzAII +zBEOzAJ80BIMWlr9UAAVNZwBAPsmAAywABoAxpod2HYc2KON2SzChqndCd0Rrcwszf4rwnPA0g27 +AvuOZhXv/XoAAAAAbBAEJCIVhUcvQAUmMQv0ocgV4HhFAP8ABVPiAJ0A+oBoHaALVQBZTv9loGGL +LCgyBioxCvsOng3v/MUAKSAFKqzb/UAEBTCMtQB8mRktIhse2JD8fAAG8Aw1AH3ACC8yCX/gAiqs +BKq47GQACtAEgADoJgwh2IEAAFlz/PqAaB2gC1UAWU7gwCDRDwAAACpcMOxkAAHYgQAAWXP0+oBo +HaALVQBZTtDAINEPAPqAaB2gCwUA/AACHaANJQBYvDPAINEPAI4g/bDmBaAKVQD8gAgV4DsFAFl3 +bSlABSoKeHqZyWP/wQAAAAAAAABsEBQrIAclFhXjFhgqSASAAPghJhXgChUAmh4T2GQmEhj8IqgV +4bsBACsWFIdl+MCIFaP+9QD6d4QVp90BAPbB5BWgd/kA+AoAAjDIWQD8IyYVrFgdAPqvAA0wtnkA ++iJGFe+qAQDqFhYkVEKAAAYLSfohphXgAB4AAJ4dLhIYLRYTL+E9KOAdKBQALxYRLuIfnh/1oDah +EgCdAIkiZZfP8OTgDeAMBQDsFhAjgEmAANpQWN3B8gACHeAGBQAuEhnacPwAYh3gDCUA7tw5ClgE +gABY3a+VGPdAAEMwD/UAdvBO9CDmFaRWHQD0oCAV4AEuACgSEWSG/ykSGImVfZanKxIRjB/8IGgd +4AoVAOoWECrQBIAAWN3ZZqc8+gBiHeADBQAKszpkNwb0IQYV4DYFAPQg5hWkVh0AJBIUH9fmDEQR +r0QsQp71gDpr4gCdAClCneaUAAS6UYAAKPKuZIcjKfKt6BIJJLjpgAAuIBSo7g4ORy4kFPXAOc5S +AJ0AKRIZLBIW8SDADeALNQD9YDvAogCdAGQwgC0SB2TQAmQwY+tkAAlQBIAA/ABiHaAdhQBY3dzu +Eg0teASAAOYSCCGs8YAAHNf7+6+qBaALBQCb8pvzm/TuEhIvTAKAAJv1CmoC6vYAL3CCgADp7gIJ +xsKAAPnGAA8wClUA/+AmFaAbxQBZducsEhP5gDcZUgCdAMAgJUad0Q8AAC0SEGTQdutkAAlQBIAA +/ABiHaAdhQBY3b0oEAAW194f19+OGCZi9RnX3v/GAA9x+B0A5oYLD/sCgADp/wIEfJiAAIwf7RIR +I1v/AAAosj8rsX2eoJ+hnaKco5uk+UCmFaAAagCMHy0SESthBYhjnqCfoZuimKOdpJylJqwYLRIS +jB0C3RDtFgouZAKAAOwWCyum/gAAGteb+CEIFaAPBQD+IKYV4A8lAJ8WCogCKBYM62QACVAEgAD8 +AGIdoB2FAFjdkiYSGIkVjxaGZewSDCSK4YAA/CMIFeCGmQD2FAAFsOaJAOLuEA3ZQoAA7dIELEEC +gAD7BgAMcLaRAOymAC3YwoAAC+4CG9enCO4C+0AmFeP49QD5QEYVqd0BAC2mBC6mBR7XoS6mA+/8 +/yUwYQAA7xYGJMgFAADpFgUv+54AAOtkAAlQBIAA/ABiHaAdhQBY3W4d15aPGowbiRz5QAYV7/j1 +AJii+UBmFaAGBQCWEZYSlhOWFJakJqYF78wCCfbCgAAOzALtzAIA2CEAAO4SGCDoQQAA7KYBJTBh +AADqHAQg4DEAAFjcR1jcPsirGtd50w/TDyqgJGSkYyoSFljcNCQWHCUWHeMWHiUhYYAAE9d4jBuE +GBXXch7Xdu8SGSongoAA9IYACnYLBQD0IUgV4AkVAO+fOQ/owoAAD+s59aYADvAINQD9pgAOMAUl +AA+FOSUWGw29Ai0WF/1mAA2wBQUA+iNGFeADFgAGjVD2FQAFsMaxAPYZAAcwhnkA7IgRD3LCgADg +zBEN28KAAOy7Ag7qgoAA/6YADrDGgQDuEgwuZkKAAP0GAAwxxmkA7qYALmUCgAAMiAIsEAALiAL9 +BgAMcLa5APVoABW71gEA+wYADHALJQDriAIO7QKAAOimBC5iAoAADcwCG9dEm6OcpR3XO52hHNdA +/UBGFa/5rgAAAAAAmaGUoJiimKOYpJiln6afp5+on6kpEhvlXAElMKEAAPigEZxiAJ0A62QACVAE +gAD8AIIdoC2FAFjdA+RQUWrOwoAA9KAKYJIAnQArEhrHj/smAAzwDwUA45kCC/0uAACNEywSGI4S +jxGLzCzCEJmhm6n1QAYVoAgFAJiimKafo56knaecpYwU/UEGFa/+JgAtEhksEhcb1xkMmQLrmQIG +hBmAAPDiQA3v/vUAmaGUoJ6inqOepP9AphWgDQUAnaadp52o/UEmFe/9NgAvEhgiFh8r8hYm8Tgi +8Tos8hXo8TkrNAKAAAYiAibxOy3yG+7yGixEAoAACGYCKPIXL/IZn6Keo52knKabp5iolqWZoZSg +kqnyI+gVr/v2AAAAAAAAAADw4kAN7/v1AJmhlKCbopujm6T7QKYV4AgFAJimmKeYqPlBJhWv+zoA +LBIYjRIvwTsmwTkowTguwTrrwhgrNAKAAOb/AgxEAoAACO4CJsIUiMwswhCbpJinlqiZoZ2ilKCc +o5+lnqmMFP1AxhWv+hoAKxIZ7BIXJYNRgAAb1tfH7/0mAAywDQUA65kCA4DxgACZoZSgnqKeo56k +nqWdpp2nnaj9QSYV7/kyAC4SGCIWHy3iEiziEyviGIjthu4v4hSC7y7iEZ6inaOcpJulmKaWp5+p +maGUoJKo8iPoFa/4VgArEhrH3/smAAzwDAUA45kCA4DxgACZoZSgnaKdo52knaWcppynnKj9QSYV +r/eaAJmhlKCOE/4gKBXgCAUAmKKYo5ikmKaYp5ion6X/QSYVr/cKACoSGBnWqYqlIxIeJRId5BIc +JUwcgABkcLIc1qSLGAy7Avs/RhXv6PoAgx7A0vetAAn/6XoAAADApf2tOgWgG8UA7l4RCugEgABZ +dYhj+RcAAAAAAPoiyBWgDgUAnhGeEp4TnhRY20PIqfoiyBWgCwUAWNs4WNtEJBYcJRYd4xYeJWGZ +gAAY1nwogCQkFhwlFh3jFh4sYP4AAPutDAWhSxUAWWoWLOr/DKwB+60EBaFLFQBZbTYkFhwlFh3y +I8YV7+/WAACNH2XY+mP4px/We44YD+4C/z9GFa/mLgD6IsgVoAsVAFjbGyQWHCUWHfIjxhXv7w4A +AAAAAAAAAP/iJA2gNgUA+6zYBaFLFQBZafssGgAMrAL7rM4FoUsVAFltG2P7fADrEhEq0ASAAOwS +DyjoBIAAWNvjY/isAAArEhiMGe0SFSlQBIAAWDpW0qDRD9og/EBoHaAbxQBYNqNj/9sAAAAA/+LY +DaAJBQArEhTaIOu8GClgBIAAWDabY/+8jB4tIQn4QrAVr/oFAArqAQrrDOskFCxBAoAA+yBmHaAL +BQDrlAAu7gKAAAjdAgzdAp2R/fWmFa/iUgCKJ40ZLAoA6qwgLtgEgABYNVzSoCVGndEPAP/iLA2g +A0UAbBAEKCAFLSAHwZT5AAtNYd0BAIkiZZE3LjABG9Xq7NoRB2wogAAvIE5l8cirqiiinvcACpzS +AJ0ALKKd6cQABgqRgAAssq5kwR0ssq3xkXAN4A4FAC0gFKTdDQ1HLSQU9aAJ/dIAnQAY1ekW1dWP +IP7FxhWgDEUA6P8CD94CgAAMuwIc1hcvZjTrZi0s6ASAAOwPHg5YBIAADQJnDECGDQJlDCCGDQJj +DACG7QwABOEBAAAL4IYMAm8LwIYMAm0LoIYMAmsLgIYMAmknIQkmMQEf1gUuISIsMAEtIAcb1gH4 +RIQVocwBAP/GAA9w3REA6t0QDmQCgAANzAIMiAL7BgAMcJuFAKubKJYgjSAmliQuliL3JGYV4A4l +AOfV9B7uAoAADt0CLZYhjDMsliUHAIkLAIr+AUId5+UBAO+mnSgECoAA+cAEoVIAnQDAINEP6iQA +CdgEgADsRAAK6ASAAFg52dKg0Q8A2iD8QGgdoBvFAFg6K2P/1+okAArYBIAAWDsl0qDRDwD/+sAN +oAwFAAAAK9wY6iQACWAEgABYOiBj/6wnIQn4QrAVr/8FAA/fAQ/WDCYkFO/EAyxBAoAA7sQAK74C +gAD45gALsAYVAAZ3ApfB93WmFa/6QgCKJ+tEAApoBIAA+0QAFaAMBQBYNNzSoNEPwLgLmwL6QEYV +7/1KAAAAbBAGKCAFJiAH5zQACdgEgAD4AoId4AM1APkADH1hZgEABQhH5dVnFBQ9AACKImSgasAg +0Q8AACsiHWWxfoknDE0RnRKImv8haBXvzgUA65IIJOCBAAAOzgGeEavarv+tiOiWCif5AQAA++AL +u6IAnQDJd+m0AAIAqYAAjRJtSQUHAIYJAmEqwgANqgj/QA0kYgCdAPuABhWv/lIADGoRpaouop5u +4xUsop0Z1Wb/qx4FoA8VAO3VjB4AtgAA2iDsJAADWGEAAFg51cAg0Q8AmcCIIO/GAixGAoAAA4gC +mMGIsy7ifwiIFKjunsPtABUGSEEAAP+q/gWgCAUAsYjpgx4MD+gAAJ7IGdU4+YDGFeAYBQCYx40g +CN0RA90Cnckjpp2LIi0gBoknD7sC6yYCJugFAADtJAYkyIEAAIiR/SBIFe/LBQALmwHqkgMkQ0EA +AOiWASbowQAA7ZYCJdkBAAB7iyId1SyoqJiRnYCMIBvVYeuGAi5mAoAAA8wC/QAmFaACBQDRDx3V +I52AjCAb1VnrhgIuZgKAAAPMAv0AJhWgAgUA0Q8AAAAAAADqJAAK2ASAAFg6l9Kg0Q8ALlKFL1KE +nhD/3/OsYgCdABjU/IiAwKALgACKEClShHqZ7WP+WwAAAOv6DAOBuYAACk4U7ewIK8AEgADtTTYN +yASAANMPbdkFCACGCQJhiRGqeO5PDATJAQAAbfkFCCCGCQJjjhKNEQruDK7dLdxA/YAGFe/39gAA +jxEv/ED/gAYV7/e+AAAAAGwQCogniSL+QPAVr80FAOqCCypfAoAA6zsIBECBAAANiAGoqOiMQC2o +BIAA+WAgwqHuAQAvUAfl1NEa2ASAAAztEeb8Ayfj+QAA5d0IBIBhgADAINEPAAAAACjSnrb39wAf +a+IAnQAp0p3qlAAEn1GAAC5SrmTjvSlSrWSTty4gFK/uDg5HLiQU9cAe5dIAnQAZ1MeOIIg0FdUH +79TCH3YCgADxAAVSUgCdAPlgMBWgBjUABucCLiAHJLEBIyEk/0BGFeD+EQAK/xAJ/wL/QAYV4AwF +APmpTgWg+AEA90AmFeAehQD/QGYVoAclAOgABQVwQQAAbXoCDgJhKSAHKCEJlKnspgUv9YKAAPsA +ABYxmQEA7swCDMwCgAD4ZgAM8D+lAA/MApymBZkCmaQoIQnaIP9gJBWgDAUA5tadLF0CgAD/ZgAN +8A0FAFg6EMAg0Q+JJ4ib6BYBJMiBAAD4IKYV78UFAAWZAemICAWogQAA6RYIJEEBAAB4UwSIEQhV +DOlSACZABQAACOgCmBb4+AAE8IgVAHiZHBjUgokW6aYBJkv9AAD5QAYVoZkdAPlARhXgAFIAiBYZ +1MCZoJihiFEIWBSYohXUvYg2GdS99LAIFeKIHQAJiAGJFahV5aYDIkAJAADlkgEsRwKAAJgXiZOo +VYgYmRKomOxJCARBAQAA6BYJJMgJAADoUwl8zwKAAIgSCFUMiBfomQwFQEEAAOkWBCSCaYAAmBOI +GalZ+QAPeuIAnQCJEwWODP4gBhWk7h0AbekFBQCGCQJhiRAOyAyqnikSCO7sECTJAQAAbYkFCSCG +DgJjjiDTDw8CAAjuEeXUTB5HAoAA+UAARTAJRQAJ6QIY1I71QIYV4AwVAJymmaWMsyiCfvWpBgXo +zB0ArIj5QOYVoAkFAOUAFQVgQQAA5dSEFVCBAACxmeqDHgyP6AAA/4DGFeApBQCZx440iLMF7gH1 +qPoF54gBAOrUfBxCQoAACO4CBe4ChTWeyC6wCSiwCwpVASmwCiqwCOSIEA9zAoAA5e4CDMmCgAD5 +JgAMsFoxAOjUbhqpwoAABZkCDpkChTYe1GuZyfigBAK1ih0A6TIKLBhCgAADUwLzgUYV5KoBAO6Z +AQ1SAoAACpkCg7WTy462nsyKt5nOms2ItJjPJbAB8KAEx9A1AQAoIAcZ1BD1YCQV4IgRAOohJCxC +goAACYgCKMYQ9kAIFaAehQD5p/AF4Ag1AO7GEyZxQQAA78YSKzYCgAD4xgALMAglAObGESuwBIAA ++AAIHeAJBQBtigIOAmEoIQkuIAfpxhUp/YKAAOXGGSxFAoAA/wYADHAfpQD/BgAMce4BAO/UMR90 +AoAADq4CKMYWD+4CLsYUJtadLbAHiif1oABGsAwFAOvUAAVQgQAAWDM/0qDRD+kSAyZyYYAA0w9t +yQUFQIYJAmVj/i/aIPxAaB2gG8UAWDhlwCDRDwD7bwAKv++iAP/wWA2gCQUA2iDr7BgpYASAAFg4 +XcAg0Q+TGv5CsBXv8wUAA+MBA+gMKCQUKCEJBP8Q45QDLEYCgAD/BgAMcA8FAP8gBh3gAxUAA4gC +mJEjVq3yIUgV7++uAAAAbBAGKCAFLCAH9OAABvAPNQD4AoId78sFAPkAC31hzAEAaNIQjiId06rk +4GluVwKAAMAg0Q+NJ4naiNvl0ggmsIEAAAtuAe4WASo/AoAApXquiKeZ6dYKJEEBAACYEPsACdOi +AJ0A7RIAIYDRgADpVAACAJGAAG1JBQMAhgkCYYpgB6oI/UALDGIAnQCaYPKgaB3v/koAraouop5u +4w0kop0Y09bu09UaALYAACvMGOokAAlgBIAAWDgdwCDRDxzTpZxAiSDAwexGAizOAoAAD5kCmUGJ +MyiCfwmJFPkAAERwHQUA6EYDIkhBAAD+AAoVoAgFALGI6YMeDA/oAACdRx7TfhnTv5lInkaIIAiI +EQ+IAphJL6adjiItIAaJJwzuAu4mAiboBQAA7SQGJMiBAACIkY6SC50B6pIDJENBAADolgEncMEA +AO6WAibpAQAAfYsbHNN0qKiYkZyAiyDAIOKGAi3eAoAAD7sCm4HRDxzTbZyAiyDAIOKGAi3eAoAA +D7sCm4HRDwAAAAAA6iQACtgEgABYOOPSoNEPAOWKDAGBuYAACk4U7ewIKcAEgADtTTYKyASAANMP +bdkFCACGCQJhiRGqOO5NDATJAQAAbdkFCCCGCQJjjREKfgyu3S3cQPzABhXv+qYAiBEojED4wAYV +r/pyAAAAbBAEFdNHFtMz8IgAE7AJRQDk03gZxgKAAAmIAihmLQU1AudmLioYBIAA5WY0KTAEgAAD +YIYGAmcDQIYGAmUDIIYGAmMDAIbmDAABGQEAAPXIaB2gigUAqiIDAm8EwIYDAm0EoIYDAmsEgIYD +AmnRDwAAAABsEAYoIHDAVOTTFxR1qIAAKyAHCwtBDLMRBDMIKTKe5CIALKFgAAAqMp1koE0ESwJY +7C3AwfwAAh3gDhUA+aYUBaAJBQD4ICYV4A8FAOkWAi1YBIAA6BYAKlAEgABYNVslNp0qIHArCvsL +qgH6TgYdoAIFANEPwCDRDwDaIOu8GClgBIAAWDeOxyTRD2wQBCsgBxTTSxjS8wsLQeRCfy2fAoAA +qDMoMp4PAgAPAgDrRAgMEQwAACoyncuo20D8AAIdoA0lAP4AQh2gHwUAWXQG/6Z6BaAIFQDupgAq +fgKAAAj/Ap+hjSCdosDC/HOmFaACBQDRD9og67wYKWAEgABYN3DHJNEPAABsEBguMBD3paoF4B9F +APHfAA3gBgUA9cA/MJIAnQBo4gPAINEPKyAHBQlH0w/4I6YV4bsBAOsWHiyUaAAALCAF94BS5FIA +nQAtIHLzoFKPkgCdANogWDeIZaeMjyJl94coEh4tIhDuMgUsRwKAAKeIKBYQKIKewajt6h8CSA0A +APkAUQPiAJ0ALBIQLMKd+4BQkBIAnQCKKYgqDAs+CogMe4t4LSAiKSAjDZkM+yBUWBIAnQAoIAcd +0qgICEENiAkojQIvgUgJ9zYH/wwvhUgtICKn3Q0NRy0kIvugU6gSAJ0AGNKdKIKw7yILJsv9AAD7 +AAQA0AgVAOCZGgxACoAA6f8IBEP9AAAI/wIvJgoK+Qz7IFJD4gCdAC0iEBjS6iQWICogByQhBx/S +5vhBJBXgqhEA9VAAFTpEAQDvqgIKIwKAAASZAiQhIi8hJJrACEQCiCCdxR3S3OnGAydQXQAA9YBG +FaSqHQDt/QIMRgKAAO3GBCVoDQAACNgCmMEkIDjAl/+lpAXgSHUA/4EGFaBEGQAEiTkY0s6Wx5bL +9e0ADDAPFQD/gUYV4AQlAJTJCYgC6MYGJkjBAADkEiAhwEEAAG2pBQgAhgkCYRrSbprMKRIQLZad +KCAUpIjoJBQlgKmAAI0pLCA4q92dKfOASLeSAJ0ALhId+cBHkVIAnQDAINEPLiAHKCAFLzAR+EBI +FeG+AQArFh75AC30UN85AO8CAA3nAoAA+yBCcJIAnQCnzCjCnv4hRhWgGaUA+QBDy+IAnQApwp0p +FhHulAAIBAqAAPsgQ1gSAJ0AKHKu9wBBhVIAnQApcq3pFhsoBAqAAPsgQOgSAJ0AJRYjJxYkKDAU +KBYZF9KUKCQ4KjAVJiQ7KiQ5ijaJOCklCSolIok5ijoqJSQpJSOKPIk7KSUlKiRMiT0pJE0qMhAp +MhEmJE4mJE8mJhsmJh0mJHAmJHImJHEqJSgpJhX+Q0QV468BAJ8d+kdGHa/5xQD54AQH8AkVACkl +KSkmFykmGCkmGfhOZh3gCSUA+QAEBPAKFQD4I0YV4AklAOmAJHf7sQAAiB0iFiH5AAABMAkVAPMt +AAk5iB0AqCIOIhEC/wwiEiEPeCz0I0gV4AkVAA93LgeXOah3GNIpKhYl5ZU5C1AEgAAFijkoEhnA +VAWIAQiYORXSNSkgFOMWIisYBIAACFM5pJkpJBQDqgLn+BwHq/EAAAdXHOglNCqsAoAABaUCJyU1 +5xIkL5wCgAADqgIlJhAjEiIlEiOaL+oSJSavSYAALhIRiymIGpssij4qFhIa0fH0JAYVoIgRAOTR +7BxCgoAACogCKiEImOD+QAgV4CgFAJjjlOL94AAUMAQ1AASIApjhhCuW5Zvo9cEmFaAIFQDrEh4s +ogKAAPiGAAowGEUAmBvk5gct3AKAAAuqAvukWAXgBAUAJBYTJBIgC/8CC6oCmuSf5isgB/oAIh2g +H2UA7xYcJ3DBAAD2QoYdobsBAJ0c6NIfFchRAADsFhAsgQqAAOkyDy14CoAACP8CGNG4KRYULxYV +L4ZAH9IX7xYJL0gEgAAPIIYJAmMPAIYJAmEsIDjqZAALWASAAPIkRhXgDSUA/YAEBHD8EQD/rQAN +8BMFAPhtAA0w/BkA++YAD/DMAQD4wGgdoCsFAAy4OSsgOelkAAsYBIAA+wYADDCMBQD9YAQG8EoF +AP2CAAzwuwEAC6M4HNH5+kAIFaANBQCdEQkzApwQ6DMCB1iBAADz5gAP8A4FAP/gABewA0UA8+YA +D/ANBQD+IEYV4AwVAPIkSBXgDwUAWDPgwMHv0egdWASAAPpACBWgCQUA+CAmFeQIBQD4IAYVoA0F +APggRhWgDhUAWDPVKBIU6RISLVgEgAD6QAgVr/71AJ4Q/ESkFe//9QD8RIQVqJkBAPs4ABS4iAEA +6YgCDuwCgAD9hgAOcB6lAPggRhWgDQUA/CAmFaAMFQBYM8HboPpACBWv/fUA/CAGFeAMBQCcESkh +IighCcHs+SAAFL//9QD5BgAMcAwVAPggRhWgDQUAWDOzKhYWKiEoWVXj7dG6HWAEgAD6QAgVr/71 +AJ4QLhITLdCMG9FW7t0CBmP9AADi6RAO6EKAAO2ZAg5mQoAADJkCC5kCmREoIhUZ0az//+Id4B7l +APoiyBXmiB0A+QYADHANBQD4IEYVoAwVAFgzmBjRPIwZLxIV74ZALUgEgAAMYIYJAmcMQIYJAmWJ +MPMgF4qSAJ0AG9EwLCEHHdGWLxIQLhIcKtKVLvadi7GPII4gKCANKSAMrrvuIBUt3kKAAKuqKhYX +KyAHK6QHKaQMLKUHKKQNjDkupBUt0hwuMhH4YggVoAkVACmlKSilKC+mHv1BJB2gG0UA+0CmHe/M +AQAspSP6I2gV5u4dAP+gAEaw//UA/CMGFaAOBQD9QsYV4A0VAFjqPSwSFysSGCbEFP2CsBWgLQUA +WUbSjRxk0vIuIDrA///AF5RiAJ0AKTBXxIAJiAyYHsDR/h/iHeAOBQDsIQktWASAAOwWDylQBIAA +WOoqJiQUix8sIBWNHllGwcDMiycd0PaLvokb/AAIHeAKFQALAmELAmELAmELAmELAmELAmELAmEL +AmGOHCx2rSkkBeokFycBWYAALyA6wI948R4Z0U4oMFAJiAooggzsMFch2UEAAPpAaB2gDSUAC4AA +BQpH+UAXoVIAnQDAINEPAOokAAnYBIAA7EQACugEgABYNRnSoNEPAAULRysWHflgBuFSAJ0AiSeM +mi2cIOTCJ2TwwQAAjJmL4Cn6wPmgBATwCgUA7rgMBdshAADoujkGAyGAAJkXiNB8gVgrwAD/YARc +YBlVAPlgBBxgGGUA+W9mDaAZhQD5bmYN4BiVAPltZg2gGaUAebFjixcpwAco0gMoFgjriAgMzwKA +AOnMCARBAQAA6Ms7flgEgADstAAN/TYAAMmows0roAB8sS6LrsCg6+0MBdshAAANujllr+ctIE76 +wGgd4BxlAP2NAA3wADoAixj7jwAN//8OACwgBeskcS5B0AAALSByft9p2iBYNWNloHGOImXgbCgg +FASICCgkFC8yAHr2TSogBwoKQQypEaeZK5Ke0w/3YBCiUgCdACuSnekWHyWQSYAALyBx5ZQACeAE +gAD6QGgdoO6lAO/mOQpoBIAA/sBoHaAPFQBYNPLAhChWnSkSHfkgDbFSAJ0AwCDRDwDqJAAJ2ASA +AOxEAAroBIAAWDS70qDRDwDsNAAKaASAAPtEABXgDgUA+kBoHaAPFQBYNOAqEhy0qvojhhWv874A +KRIeH9DVGNDVAJEE//AQFeAJNQAphIDvFgQtQAqAAPggphWniAEAmBZ/iDmJFvmgxAWv+/UAC5kD +CfkBKxIejxUIuwoJ/wIY0GKJFCi2qBvQwg8PR++0gCSCeYAAZPBSKyAHCwtBwJH4ImYV4AgFAPgi +RhWgHzUA/iFmFeAfNQD+I4YV7+jeAP/1MA2gDGUAxID4IcYVr/RaAAAAAAAAAP/3bA2gDAUAZP+0 +8AAYDaAJFQDAkBjQqi+C0se+C/8BKyAHD58CL4bS//5kDaG7AQAAAAAAAAAA6iQACdgEgADsRAAK +6ASAAFg0ddKg0Q8A2iD8QGgdoBvFAFg0x2P/18Ag0Q8rEh7aIOu8GClgBIAAWDTBY/0wAP/eKA2g +CQUAKxIe2iDrvBgpYASAAFg0umP/pIon+oBoHeAMBQDqrCAqaASAAFgvhNKg0Q+KJ/qAaB3gDAUA +6qwgKmgEgABYL37SoNEP2iBYNB1j9uWKJ+tEAApoBIAA+0QAFaAMBQBYL3bSoNEPAAAAACusGOwk +AAlQBIAAWDSgY/4kKyAF9X/lMJIAnQDAwgz8AvxARhWv8mYAmir/QGgd79bWACogBx7P/vevAA/x +qgEADq4J7yQiJ3ALAAAt4Uin3S3lSC0gIszYiyn6QUYV4ADGABjP8tMPKIKw/EFoFaAOFQDggQQG ++/0AAOD/Gg9wCoAA78wIB3P9AAAOzAKcKiusH+wkAAlQBIAAWDR8Y/wcAGwQBBvP34kgGNA5i7Eo +gor7IABE8AsFAOskFCzOQoAA+QAARHAZBQApJAXrhBQpUASAAFvqmdEPbBAEGdA/ijIpkn8JqhGq +mSyQBoiSwNn9IKYd7/vlAOuIAQZj/QAA7JQGLNAEgAD5IEYVoAsFAFvqisAg0Q8AAGwQBiogDCsg +DZUSWXDxiSIoIAcnMgAPAgD1QGgd4YgBAPE+zA3ndwEA6BYBI4m5gAD6QGgdoAslAFlvSvFbSA3v +idUA4hYAI4d5gADncgkJsASAAOc8ECkXAoAA8kAAQXAAsgAAAAAAaYEN62IFKtAEgABY6Qop+o1m +oO/nfDAjMMEAAPLABXwiAJ0AKGAQyI1ogUppguQoYBFlj8pgAH4oYBHIimiBI2ev0HmhzWAAutpQ +62IFK+AEgABY6Uj58aId7/+aAAAAAAAAAOtiBSrQBIAAWOk8+fGiHe//NgAoYBHIimiBJGevkXmh +jmAAe9pQ62IFK+AEgABY6Tj58aId7/+aAAAAAAAAAADrYgUq0ASAAFjpLPnxoh3v/zIA2lDrYgUr +4ASAAFjo4fnxoh3v/SYAAAAAihD8H6IdoAsFAFlwZPwgSBWviNUA+UAGxC8GBQCJMAaZAfhgBhXg +AD4AAAAA8iAGFaAKBQCHERjPagx3Eah3K3KeghD3YAmCUgCdAClyneuUAASJeYAAKYKuZJEKKYKt +ZJEELCAUpMwMDEcsJBT1gAkeUgCdANww/IBoHefqAQD6QGgdoA8VAFgzxI0S/OAABvAORQDudp0m +lHUAAIon+oBoHeAMBQDqrCAqaASAAFgus9Kg0Q/AINEPAAAA8iAGFa/7RQD7X/tlYgCdANog/EBo +HaAbxQBYL9TqJAAJ2ASAAO0SAipgBIAAWDN+0qDRDwwMR/2BoAFQAgUAjTAG3QGdMNEPiRCJl4ia +/SEIFe/LBQDlkgskkIEAAOsrAQo/AoAArXqrVaeI6JYKIqkBAAD6oAUDogCdAMkwyE7Z0G1JBQMA +hgkCYYogB6oI9UAG5GIAnQCL0JogBrsB+6AGFeACBQDRDwAA2iD8QGgdoBvFAFgvrWP/YYIQ//tE +DaAJBQCLEdog67wYKWAEgABYL6Zj/0UALiEJ/kKwFe/1BQAFxQEFzQz8QoYd4AYFAOWUAy/5AoAA +5pQAL3YCgAD/xgAPcA0VAA3uAp6R/RWmFe/6ngAAAO1aDAGBsYAACkwU7swIKcAEgADuTjYOyASA +ANMPbekFCACGCQJhCjgI7E8MBckBAABt+QUIIIYJAmMKeAyouIvQKIxAmCAGuwH7oAYV4AIFANEP +AAAAAADr0gAlyQEAAJkgBrsB+6AGFeACBQDRDwBsEBYcz1GTFSYWHCQWHycWHpcRKBItJRYbKRIs +mReZEi8SG5gWmBMnEh/8I4gV4ApVAPwgBhXgCwUA7SQAC/AEgABZbgkcz0EjEi4kEjAmEi8Yzz8p +EMf4IQYV4ApVAPggBhXgCwUA+CAmFaAtBQDuZAAOggqAAP6AaB3g050AWW36GM80Fc8u9OAzARAJ +BQD+/6AV4A6lAP/CAAvwDQUA/CEmFeAMBQD8IUYVoAsFAPohZhXgChUAmhz4YAQEMAoVAAmpOQio +OQmIAvcEEA3gOXUAAJAEAwobCgpDmh0AhAQGPBjwgC3qUgCdAARdUPwhxhXgtKEAmx/ygC8jEgCd +AC5S2w6OQS4WEMDwLxYd8IArTRIAnQAEyEEoFhHygCvLUgCdAClS2wkpQSkWEvwAIh3gCgUA+60A +DTAbBQALawEL2zkLqgJkpdMezwP+ImYVoA0FAC0WFATIUPQdAAa/+I0A+eYAD7+9jQDtuwIHrgmA +APmdyAXgCgUAKhYVKRYWBOhQCP8T6P8CBa3pgAD7neQFoA4FAC4WFwS9UA35E+2ZAgetoYAA/53a +BaALBQBkla79ndAF4A8FAC8WGCUWIB/OuScWISoWIvgAAh2gChUACKg5JxIdDz8B/00AD/CJBQDo +/wILqASAAP8tAAvwLwUAD28BD685/wYAD/AZBQAPlTkfztYPPwH/TQAP8AnFAPnmAA+wCEUAD5g5 +CFUCB1UChx+IHueIEQu9goAACHcCGM7LBKlQ9qYACvEHBQAJhzkpEhAHVQL0VwADv4WNAO53EAzM +AoAA9yYAC/+ZjQD5BgAMcQA9AAY5GAkJQQSZEQlVAikSEi8SFAqZEPamAAr/eY0AB/8CJxITD4gC +LxIKCXcCKRIRB1UCJxIVA5kQ6VUCD/+CgAD2pgAK/5mNAA+ZAicSFwmIAi8SFikSDPrmAAv/+/UA +KxYA51UCDM9CgAAPmQInEhgJiAIpEiIrEgUHVQIOmQIJiAIuEggpEgsnEiElFgHm7hAMykKAAP8m +AAy+AD0ABj4Y+QYADHvzIQDpzpQf/QKAAOUSIC9yAoAAD+4C+aYADP//9QD5BgAMc9wBAO0WBC1g +BIAA7t0CCVAEgAD4IyYVoA4FAPwgRhXgDQUAWDBr7RIdK/wCgAD+IagVoLRRAP2dAAWrAD0A9msA +DDeUAQD8IAYVpYgBAPsQABQwDBUA6505D3MCgADpEhktWASAAP/GAA9wKgUA+0AIAN3zkQD5pgAO +s4PhAOiIEA/5AoAA6P8CCVAEgAD/xgAPf//1AP+mAA6wmZ0A+CBGFeAOJQD8ICYV4A0FAFgwSOQS +BC1YBIAA7hIbKVAEgAD4I4gV4AwVAPi9iBWv//UA7xYAL3QCgAD/JgAMsA0FAPggRhXviAEA+CNG +Fa//9QD4ICYVoA5FAFgwNicSHvwAIh2gDQUA/gDCHa/49QD4IMgV4A8FAOkWAi1YBIAA7xYBKVAE +gAD4IAYVr//1AFgwKJcR/AAiHaANBQD6I0gV4A6FAPogRhXv//UA+0BoHe/69QDqFgApUASAAFgw +HfYhKBXgDBUA/AACHe/49QD4IAYVoA6lAPTgABS0hx0A6YgCC9kCgAD65gAL///1AOcWAi1YBIAA +6BYBKVAEgABYMAzboNog9rsIFeAMFQD8AAId4A7FAP4AAh3v+PUA+CAGFaJ3wQDvFgIrzAKAAPgg +JhXv//UAWC/+26DaIP67KBXgDBUA9/AABPANBQD54AIdr/71APggJhWv/wEA7hYAL/0CgAD/JgAM +8A7lAPggRhXv//UAWC/v/AAiHaANBQD4IOgV7/j1APtAaB3mAD0A9msACbP69QD4IAYVqTMBAPZg +ABQ5ebEA6HcCDM2CgAD7JgAMsB4FAPggRhXv//UA5xYBKVAEgABYL9r8ACIdoA0FAP4CQh2v//UA +8ywABfAJBQDrFgItWASAAPggJhXv+vUA6hYAKVAEgABYL83AwfwAAh3gHkUA///iHeAJBQD4ICYV +7/j1AOkWAi1YBIAA6BYAKVAEgABYL8L9m7YFoB5lAPtAaB3v/fUA/CAGFeAKBQD6IEYVr//1AOwW +ASlQBIAA/AAiHaANBQBYL7XAwfwAAh3gHoUA///iHe/59QD4IAYV4AgFAOkWAi1YBIAA6BYBKVAE +gABYL6pkQa/0gA1hEgCdAPSACCCSAJ0A9IAH4pIAnQDSoNEPwNIqUtsKDkD/rQAPsKoJAA+qAioW +EfCf1HtSAJ0ABO9B/iJGFe/qNgDAoPxgAAawCxUA/b/gFeAJBQD9YgAM8AgFAAq4OHmAB/oh5hXg +ADIAL1LCD59Qnx/AgJge8J/RIxIAnQAECVH4IgYV7+iKAMDR/CEmFeAMFQD8IUYVoAslAPohZhXg +CgUA+iGGFa/mwgAAAC5S8A4OU/4hphWv5xIAwID4ImYVoA8FAP4ihhXv6LIAwKD6IqYVoAkFAPgi +xhXv6Q4AAAAAAAAA+gACHaALBQD6IuYV7+kaAMCw/+lIDaAOBQDA0C0WGP/pTA2gDQUAAPwAIh2g +DQUA+LtoFaAepQD7QGgd7//1APpAaB2gCQUA+CBGFeCIwQDvFgAsQ4KAAPggJhWv//UAWC9WwMH8 +AAId4B7FAP//4h3gCQUA+CAmFe/49QDpFgItWASAAOgWAClQBIAAWC9LwMH8AAId4B7lAP//4h3g +CQUA+CAmFe/49QDpFgItWASAAOgWAClQBIAAWC9A0qDRDwAAAAAAAAD9mrIFoB6lAO3NVh1YBIAA +/CAGFeAKBQD6IEYVr//1AOwWASlQBIAA/AAiHaANBQBYLzD8ACIdoA0FAP+algWv+PUA+CAGFaH/ +9QDvFgEtWASAAO4WAilQBIAA/5qCBeAexQBYLyTAwfwAAh3gHuUA+f/iHe4PFQD4IAYV4AgFAOgW +AS1YBIAA6BYCKVAEgABYLxjSoNEPAGwQBBrM3RjMxRvMvJswCkoCiSCVNZc3ljb4YEYVoBIFAJIz +mjT9IAAUsAolAAqZAuk2ASGQgQAA0Q8AAGwQBBXM9xjM3RnNEBvMtRrMrJowhiD6YEYV4AqFAJoz +mTX4hgAMMAclAOg2BCs2AoAAB2YCljHlABUBkGEAAAIAiiI8INEPAGwQBus0AAlQBIAA/AAiHaAI +BQD4IAYVoA0FAPggJhWgDgUA+CBGFaAPJQBYLuvvzQkdWASAAPuaDAWgCYUA+CBGFeAMxQD8IAYV +oA0FAPogJhWgDiUA+kBoHaAMFQBYLt4sCgHuzP0afAKAAPtAaB3gDQUA7RYBKVAEgAD+IAYVoA0F +AP6mAA/wDkUA/iBGFeAPBQBYLtCXEvwAIh2gDQUA/gDCHaAPBQD4AAIdr/n1AOkWAC1YBIAA6BYB +KVAEgABYLsX60AAWs//1APc2AAc8DAUA7hYBLVgEgADsFgApUASAAPwgRhXgDBUA/AACHeAeBQBY +LrjSoNEPAGwQBPRACBWgAxUABMRT9J+gFaACBQAEMjjRDwBsEAQUzNCCICRCfxPMzwQiDAMiAtEP +AABsEAQsQhonQhniQhgpWASAANow/ZlCBeEAPQD2SwAJeXwBAPDBUA3hIgEAKEIUCMlT7YgBBMv5 +AAAJhTiLsPwAIh3gzNEA/gCCHaA/BQBZbV0bzDnizLgZRAKAAAh4AusABQ1IBIAACQJhCQJhCQJh +GcxCkqIJiALopgAieCEAAO8GAAVwQQAADgCKlaYsQhQGDQb9Q6Yd48zhAOykHCUQwQAA0Q8AAABs +EARkQFYUzG7C8OQAFQkgBIAA5IMeD4IKgACEMZQijTiOOf5AhhWg3Z0AnSOLOow7/EDGFaC7nQCb +JYk0ijX6QQYVoJmdAJkniDaJN/hBRhXgiJ0AmCmFM5Ur0Q8VzAzlAAUJIASAAAQCYQQCYYsxmyiK +NZopiTSZKogzmCvRD2wQBBTMBAQiCvJVCBWgQ3EA7kUQCiPCgAAFRAIEIgECMgLRD2wQBCogIikg +Ix7L+QqZDPEl0A3gDxUALCAHDAxBDswJLM0CK8FICb02DbsMK8VIKiAijCmtqvpBaBXnqgEA6iQi +JQIxgAAo4rDggQQFS/0AAOCZGg/ACoAA6bsIBEP9AAAIuwKbKgy5DHOTJ8Ag0Q8qIAVooXOLIsDC +DLsC+kBGFe/yRQDRDwCLKZsq/WBoHa//WgArIAf9TwANcbsBAA65CeokIiTICwAAKJFIrYgolUgq +ICLLpSnisIwr4JEEBUP9AADgiBoP6AqAAOjMCAbr/QAADcwCnCraIOwkAAXYfQAAWDBbxyTRD8ck +0Q+KKfpBRhWv/5YAbBASKCAFF8w7LCAHizAncX72gEAVoP31APrgAAXxrAEA/QEABFB3CQDAINEP +iCLlFgksFe4AAC4gFh/ML/3Phg3gBRUAIhYX+ZhaBaJiBQACwh0jFhjoKAgHGEEAAOOCfimBCoAA +AFkaCTMBKYJ/A5kCE8uhKYZ/DukLoyLzIAEEtuIFAKKZIpJ/4xIYIRAFAAAiln8ogoDpFgcvAQqA +AOISFyrwCoAA/wAS6KIAnQAMzBGvzIzADOwBZMJsGcwQHMuPKZCADK4R7O4IBMjdAAD508gVpJkd +AAlpCbKZ+QATc+IAnQAp4p3llAAEknGAACrCrmSh6ynCrWSR5RrMAekWBSuVfgAAKjAgKArt+UAW +NCIAnQDAnnmhCigK7vlAH3UiAJ0AnhT6IGYV4AgFAOgWDiHIgQAA+CImFeAKBQCaHZkaHcvxixos +ICwpIReLsOoiDi5kAoAADJkCDbsBC5kCKRYQWOjIHcvpDQCHwMEKzGD9QBSsIgCdAMCwLiAWLwr/ +/8mGDeANBQArFhMqEhFb4kkuIAf5l7wFom8FAA8CAA/vHSwgFqj4KIJ/+iJoFeAZ9QAMmQz5ABsi +YA0FAB/LzgjIEOioAg9PAoAAD5kImJMfy9IoIQcZy84ay8//YAEH+ogBAO/yACxHAoAACogCmJCO +IIgTn5PtlQUvdgKAAA5uAu6WASHgQQAA7AceBNBBAAAKAmPolg8rkMYAAMDwKSAUpJkJCUcpJBT1 +IBL+UgCdAIcZ7Ez+KncCgADuFgguVwKAAPohhhWndwEAJxYLJxIAHsuv/KBoHeALBQDoEgsvSASA +AOkLHgXYBQAA7UwADafQAAD5AAbhUAsFAO0SESLxAQAA/IJAAVAHBQANYIbubAAF2AUAAHy58Ykd +ZZDkihyNHisSEKWqrV3r1hAlKQEAAOUWDy+HBgAAiTHbUOQyAiyQMgAA8yAREFADBQCja4wU68ad +K5AEgADRDwAAANog/EBoHaAbxQBYL5rqJAAJ2ASAAO0SCSpgBIAAWC8/0qDRDwAALp0C6eEILMAE +gAAu4QcogoLp7gEK4ASAAPnf7KKiAJ0AK6wS7CQACVAEgABYL4hj/7QrrBjsJAAJUASAAFgvhGP/ +owAAAAD/9lQNoAkFAIsnLBYV5fIVZdCBAAD+IoYV4AslAO1EAALhAQAAWCpIiB0sEhUvEhTnpAAE +ePmAAIoW+qIGFaAJBQD4okYV7/w2AB3LYSsSEA9mEf1mAA3wDwUA+iIGFe/6mgAoICwZy1IDAonq +ABcMQMKAACiWJgqAh/oQIADf9OoAAAAAAAAA7hYEIdDBAADqFgohwIEAAPgiJhWgGQUAmR6YHYk4 +GMtLGstLmxMImQEKmQL4IMYV7/TyAIsuLLAA84ANrhIAnQDAwC+wAfPgDpYSAJ0AwJAPmxELywJn +vUtj+/QcyzQbyzIDo4wMAGsvICwrsiT74AQA0A4VAP3AAQdY+7kA/8AEB3AM9QD/gAc2IgCdAC4w +EPPAD9/SAJ0ACwlC9SAHQJIAnQAqnP74ACIdoA8FAPsCAA+/9l4AAIgVLiEJ+kKwFa/7BQALmwEL +nAwsJBTkqhAPdgKAAAruAi2EAPsAZh3gCxUAC+4CnoEcyo77laYV7/W2ANog61QACmAEgABb3y+L +H4kxDKwR7LsIDRgEgADxP+8wUgCdAOokAApgBIAAW97+o62tbY4U7eadK5AEgADRDwAAAAAA6iQA +CdgEgABY57LAINEPABnKdgzIC6n5+QABBHf5BQCpiC6BfwruDA3uNf8P5B2v8lIAAAAAAAD6QAAG +cAoVAP2fYBWgDwUA/UIAD7/zGgAYyvMuEhD5xgAPMA8FAP4iBhWv8sIAjrv9YSgV78gFAAiqAarr +7dwgJdkBAAD7oAb64gCdAIkY9T/oHhIAnQCp2O5cQCRDgQAA+WAH26IAnQD0n+dJEAsFAA3Ahu7M +AAXYBQAAfLnxY/zTCwGHjjYtMQsNDj8ODT8L4If5wQgd5KwBAPsgBJKiAJ0A//iwDaAMFQAAiRqJ +kvEgBLDSAJ0ACc5PC0OHCyKHDg5J2uD6hIgdpN8BAP1A1g3gCxUAwLB69wz5YGgd4ABSAAAAAAAA +/gAiHeAJBQAL+TjsFhIs7z4AAIwy+kBoHaALFQD98AAGMA0FAFjnSywSEv/3JA2v+fUAAAAAAAD/ +7tgNoA8VAP+vAA6//IYAAIwy2iD98AAGMAsFAFjnP4su//Y0Da/89QAeyqctMQ7/oAQlIgCdAP5h +5BWv/X4A/W8ADPALBQD4IEYV5JkdAOkWASSA+YAAiBENYIbubAAF2AUAAHi57ycWFokRLBYVLBIV +jhIsFhXl7ggFaQEAAOlJDAdxAQAA9T/dURALBQDnFhYk4/kAAA2Ahu6MAAXYBQAAfLnxJxIW/CKo +Fa/uJgAAAAAAAAAA8f/oFlIAnQAsFhL+IAIdr/xSAAAAAAAAbBAEJiAH9ZToBaJnBQAHZx0iIBak +dCRCf8FfAlUMdU0TGsp2CCgQ6DgCC08CgACqmZiQ0Q8byeICKgure/tAAQV3+wUAq6opoX/zLwAM +8AsFAAuZNSmlf9EPAABsEAQbydgmIAckIBbzlK4F4moFAApqHQRJC6Oj+0AARXACFQDnMn8iWEEA +AOgyfi2BCoAA+yABBLbqBQDqmQgJUAqAAAqIAQh3Aic2fyWSf7FVJZZ/IzKAAEEEACUadTgOE8pA +DGIRoyKCIAJSAdEPJJ0CKEEIJEEHJZKCCEQBdUsDwCDRD9EPbBAGKyAHiCIdyjf7k2oFobsBAOWA +pW23AoAALdCAqmbsYp4m6N0AAA1NFLLd/YAFm+IAnQApYp3slAAEhZGAAC6irmTgjSmirWSQhysg +FKS7CwtH6yQUKAQKgAD1YAT+UgCdAC0gBP2lIAPQ+vUABQ5HaOIYiif6gGgd4AwFAOqsICpoBIAA +WCj90qDRD8Ag0Q8AACsgLHqx1Ikx7BYALlgEgADnMgIshKoAAPMgBbBQAwUA8tOmFe/+3gDqJAAJ +2ASAAOxEAAroBIAAWC3F0qDRDwDaIPxAaB2gG8UAWC4XY//X//1ADaAJBQAAACu8GOokAAlgBIAA +WC4QY/+8LiEJ/kKwFe/3BQAHtwEHvQz8QoYd4AgFAOeUAy/5AoAA6JQAL3YCgAD/xgAPcA0VAA3u +Ap6R/VWmFe/8rgDbwOokAAvgBIAAW94MixCJMeoWAS1nAoAA7LsIDRgEgADxP/qQUgCdAOokAAvg +BIAAW93a80AAQf/8/gAAAABsEAQiLO7RD2wQCpMSj0TqVAACOEEAAOoWASsoBIAA9+AQvGALFQAT +yd4ZybiVEPpABADQDgUA7hYELbAKgAD2IGYVr/j1APjXAAswCgUAjPElkn+O8J7AjfDoQQ8n2/sA +AJsWnNGa8I5EmvH7b8gV4A0VAPfPAA9wDAUADtw47BYHLd5CgACrVYtSjFefFfdgBAWwAgUA61YC +JljBAADjRRAkBWmAAIjML8IK64sMBEMhAADrgjkHhIGAACvCCSsWCGUgSo0Y0w/jybUWgaGAABnJ +iijQABPJsgmICoiM7NAHLtgEgAD6oGgdoA01AAuAAI1GLEEPmhjtw159WASAAMwrjxhl/7n6oEgV +oAFmABnJeyggAAmICoiM7CAHKVgEgAD6oGgdoA1FAAuAAI1GLEEP26Dty4x9EASAAIpSzqJgARAA +AAAA//3MDaALBQAuQQ7+geQdr/1CAIpSzKRlIEdlsEQfyY/TD3rwMllNieukAArQBIAAWCllihaN +UowTiRWLRA3MApxSmbEnpoErpoD4gIYV4AgFAChFENEPAH6nHcftDqoBmlKIFosTjxWJQQq7AptS +n5AkhoAphoGfQYwXwKDqRQ8uBL4AAI0Usd3tFgQmoD+AAI9E+ZKYBe/5wgAAjkB06U6PF+USACeC +SYAAihFY50EeyRQYyWuPEvqgBADQAhUA/EABAV/59QAJIgMt8pIIqAEs8pCKEQjdAgLMASz2kA3t +OO3MAgrYBIAAWUq30Q8A0Q+IQHSBs+pEAAvYBIAAWOclwLH+gIgV7/deAABlv1GJGGWfTGP/BCpB +DosQCLsQC6oCixEcyUsMuxGsu/tgBhWv/a4AAAAAbBAIBmQLA0QK4kIAKVAEgACTEfKAC0wgDRUA +lhCVFhPJGxzJL/tABADf/vUA/aABA9APBQDvFgMrAQqAAO53Aw7wCoAA7hYEKscCgACsiPggRhWg +CQUAiiGMIJygiyCasZkhmSDuQgAhQ/sAACiCfiYyf+TuDAxGQoAAqGaMZ49ilhWKzPfgBAfwDRUA +/sBGFeACBQD5gUgVoAYFAO7WOAZYwQAA66sMBVMhAADrojkEAzmAAIrJ1aDPJcleGcjvKFAACYgK +iIzsUAcq2ASAAPogqBWgDTUAC4AA1aDNIWVf1ooSixSKoHugUGAAMgAAAAAZyOIoIAAJiAqIjOwg +BylYBIAA+iCoFaANRQALgADzQGgdr/6eAP/+bA2gCgUAAM1nixOxu+sWAyWgR4AAE8jXgkD//HwN +oAkFAIxAdMk6hRbaUFjmzR7IoI8RGcj2iBQs8pD98kgV7/v1AAuIAwmpAYsQCd0CCMwBLPaQDe04 +7cwCCtAEgABZSkXRDwAA5hYAKwEKgADlFgYu4AqAAPwghhWv/rYAbBAEGMjkhSAogn8UyOP4rwAK +smkFAAlZKASUCCtCfwsLX/FmUA3gAwUAHMhH/twCHa//9QD/gABGMA0FAP0gAEYwDhUAbQgXKMJ/ +8QFADeG7HQAtxn+xM+SwL2ZgkQAAY//hKUJ++JAIFaAa9QADqgx6nd4qPBAAoQQA6RoPmQMJiAH4 +kAYVr/8+ACtCgMm6wMAtQn7svAIK0ASAAOzcAgnYBIAAWUoUwCDRD9ogW+OvHMhf+pAIFe//agAA +AAAAbBAEGci2wKT5MBAV4CsFAOzItBloBIAA+AECHaAUBQDphDkJ8ASAAFlnS9og60QACeAEgABZ +AcfRDwAAAAAAAGwQBMAg0Q8AbBAE+5AeBeAJBQD6YAgVoAjVAPRAaB3v/PUA/KLGHaACBQDyo2Qd +p6oBAOOkCwUMyYAAKjAIGciZ+UAL4qIAnQAJqQqJkAqQAAAAhjP2SAADt2YBAOp0AAtYBIAAWWkn +G8f4J1QMJlQNKKEH+KDkHaAFLgAqUAf6YGgV4aoBAFkKgBvH7/qixh2gBMoAAIwz/KLGHaAEngCK +M/VACOoSAJ0A9UAIqxIAnQBopSpopyf9RIAEUA2VAP1AB/1iAJ0ALlAgwIL4oKYdoA9FAA/uAv6k +Bh2gA54AKVAgwKgKmQL4pAYd4ANeAIwz/KNkHaADNgCNM/yjRB3gAw4AKLKtjjMvsrIpsrCo7v/f +4BWgiE0A6O4BDIIKgAD+nwAPMAglAAjuN//BAA9w//UAD+42/qRmHaACIgCPM/6hhhXgAfoAKVAi +ijOaW+pWCSSBYYAALLKwsJj7gAQA0AwVAOCIGg5gCoAA6KgIBmP9AAAMiAL4oUYVoAEeAPqhRhWg +AP4AAI0z/KEEHeAA0gAYyEWPMy5QB6j4KICAKQr76e4BDEeCgAD5xgAPMPjFAAjuAQ/uAv6g5h2g +ABoAxiq4M/R/85UgCNUAKVEbZZBYLrKtHcg1KlAWLFEa/6EADrD59QD5SyYN4mgFAC5QB/+QNgXh +7gEACO4cr+8v8n/7QAIEsBj1AAqIDHj1H6vvD5kKKZ0IKZF2Cdg2DIg3DIgsCMgcKFUb0Q/RDwAA +GcfNCdg2DIg3DIgsCMgcKFUb0Q8M2SwJyRwpVRvRDwBsEAgcx34oIAT04AAE8AoVAOac/im4BIAA +9QAK+RAPdQDmpjkIBAqAAPUgBBkSAJ0AjiIpIAfx0WwN4bkBACogIQodQmXRiMClCwlHDJkRrJkt +kp73oAiR0gCdACySnWTBBysgFKS7KyQUjXDzoA0CkgCdACogIQocFP3gECCiAJ0AZGAm/EDoFeD+ +FQDurgEKWASAAP5EJh2gDAUA7UQABtCBAABYJrzSoNEPwCDRDykgBRvH6/UgD4iSAJ0AaJc59SAV +dBIAnQBln2Qpsl+NkYiQmNCOkIog/cAmFeAIBQCYkOiWASTr+wAA6tZ+JMvhAACZJygkICgkIRvH +2hzH2v2PtAXgCQUAKSQUKSQX+ENkHeAKhQAqJAXpJRopUASAAFvi3togW+LBKyAhLAr+7LsBCVAE +gADrJCEp2ASAAFv/HRzHLv/7nA2gD3UAAADqJAAJ2ASAAOxEAAroBIAAWCtn0qDRDwAAACu8GOok +AAlgBIAAWCu4Y//UAIowmRT1IAhhF6oBAIsiKSAH83msDeGpAQAMqxGsuy2ynvegG+HSAJ0ALLKd +ZMNxLSAUpN0tJBSOMPPAHEqSAJ0AjhT5wB+pUgCdAMAg0Q8AAAAAAPWgB0iSAJ0A9aAIKRIAnQD1 +oBdhkgCdAPWgGToSAJ0Ax7UL/VD4ACId4AgFAP0iAAxwClUA6/o7DHIGAABj/z8jIAclIQgYxwby +IAAG8DMRAAozEOgzAg7sAoAADVUCGMdSHcb8k8CDIP2ARhXgLgUAnsP4pgAKsA41AOg4AgmeAoAA +DjMCk8GNK4MplcSYxpPI/YEmFeADBQDjxgUt6gKAAA2tAp3HIyQU/zOmFa/32gAoCvEIqgH6RCYd +r/faAGSu9OOnCwmwBIAA/47eBaD/tQDwBfANoA21ACqxeYkgepsFLLGGZcOLwCDRD44rjSl+0QvA +gvhARhWv/JoAAAApCvH5QAQE8A1FAA2ZAikkIQy5EayZKpKe90AXKdIAnQAtkp3pFgUmltGAABnH +WPpACBWgCwUAmxGZEIhw/AACHaAOFQD44AAEMA8FAOSIEQ7YBIAA+CBGFaCNFQBYKQ39jWYFoA91 +AIkVwIMolp0pIAYtICGIIi4K8f+gBAawChUA6ogCBMgFAAApJAaYIvxEJh3gDmUADt0C/EQmHe/6 +CgAAiSeImvshCBXvxwUA5ZILJPCBAADn5wEKNwKAAKttp1WmiOiWCiKpAQAA/KASe+IAnQDJN9kw +6rQAAgCZgABtSQUJAIYKAmEt4gAG3Qj1oBO0YgCdAJ3girDXsPlgaB3n6gEAbekHKJAIaIELuJnA +Yf/xKA2gBTUAjZMu+gAOqgENqgKasC0gIS4K8f+gBAawDiUADt0C/EQmHe//SgB9qQSIYygkFrhm +9t/rTGIAnQAqYAhkoGlooT5ooulooy5pqduJY26T3mmT24on+UQAFe/LBQD7IAQE8AsFAOumCiTJ +AQAAman5QQYV7/7yAIhj+EEEHa/+ygCKYykgB66rK7CA75kBDd+CgAD7JgAM8PvFAAuZAQqZAvhA +5h3v/ioAi2MLikL6IMYVp7sBAJsXWWeEHMZVHsbsKKEHiReLFvpBhh3gDbUA+EGmHeD/tQD4QOQd +r/1OAAAAAAAAAPPf6OfSAJ0A/uAIFaD4xQD5IAQEMP0VAP1ABAbwCYUA+aYADv8JBQAJ6QH7JgAM +9+4BAAjuAi4kB5lw/EQmHeAAGgCJcP/zZA2nuQEAK6wY7CQACVAEgABYKsvqJAAJ2ASAAOxEAAro +BIAAWCpx0qDRDxXGO/5BBBWgOREA6MaKGZqCgADlMwINfAKAAA/uAgjuAhXGMJPA/kAIFeAjBQCT +w/WARhXgAzUA6PgCD/4CgAAD/wKfwYUpjyufyZ7E9YEGFeAORQD5gMYVoAUFAOXGBS7CAoAADogC +mMclJBTzc6YV7/AqAACKJ/qAaB3gDAUA6qwgKmgEgABYJXPSoNEPACu8GOokAAlgBIAAWCqe/YwO +BaAPdQD/8BgNr/tFAOtdDAGBsYAADUUU6FwIKcgEgADoSDYN0ASAANMPbYkFCSCGCgJjDTkI5UgM +A9EBAABtiQUJQIYKAmUNaQypeSmcQPnABhXv9lIAKnxA+8AGFa/2JgDAsPpDRB3gAgUA0Q8AAABs +EASJJyggBouaKpwg7ZIJJEP9AADxZzAN54gBAOgkBiQAWYAAwCDRDwAAAPGksA3gLKUAK9AAfLlA +/yFoFa/4BQD5ogAV788FAO+vAQJT/QAA7+4IDV8CgADoMR13cQEAAKvbK7wQ6+MsccBBAABoQQht +qQUIAIYJAmH6QGgdoAsVAFvgi8Ag0Q8AAOgkBix8rgAAY//jDe0MLNzwDEwUuMsLqzZtuQUIAIYJ +AmGj2AxKDOn8QCUPEQAAsK1t2QUIIIYJAmNj/7EAAABsEASMMYgy6iQACdgEgAD84AAGMA01AAuA +ANKg0Q8AAGwQBCggBCMgB/0BAANRMwEAwCDRDxvGRtMPK7F++kBoHaK7HQBZCDxlr+XaIOs8GClg +BIAAWCo4wCDRD2wQBBjGPYouLiAHHMYH+EDoFeADBQD5QAW0Ie4BACPCfwmkEaQzhDeEToia65IJ +JAUhgAApsBTasO2wFSSAeYAA2iBb4RfAINEPAADpwn8mhGGAAImXj5r8AQIdoA1FAOuSCSeEQYAA +L7AWsP8PzTgfxYQM7BGvzCjCnv0ABgviAJ0ALMKd8YtgDeBJtQCPsSggBR7GGp6w+QkGDef/AQDA +kAiYEQj/Ai+2AS6gFO+gFS8ArgAAZPCgKbAW6JE0ZMP9AAAotBbaIFvg9cAg0Q9j/1YA//1wDaAL +BQD//kANoA1FAPgQIh3v/uoA//3gDaALBQDaIFkvz2Q/yilAKCpAKetAKizOAoAACpkC6kArLM4C +gAALmQIImREKmQKxmfiFZh3omR0A+IVGHeiZHQD4hSYd6JkdAPiFBh3v/i4AG8Xw66YAKWAEgADr +7BgpUASAAFgp4sAg0Q/aIFkvtWQ/ZCxAKC1AKe5AKi5mAoAADcwC7UArLmYCgAAOzAIIzBENzAKx +zPyFZh2ozB0A/IVGHajMHQD8hSYdqMwdAPyFBh2v/JYAAABsEAgoIAQmIAf5AByDkgCdAPcAHEIX +1QEA9aAcIRFmAQAZxZeKLimSf+sxCC1WQoAAqpkpkAUrJQj6QtAV4DrlAPsgHfwgSCUA+SAdvCA6 +1QD7IB89IPz1ACgyCfggAASwBEUACUQMBARB9IHgFa/5hQAJRAEEiAgojDToFgQiIf0AAP1jBg2k +RB0A/b/AFaAKFQAMrDkqIEFYEnxko7wYxQ4MaRGomSuSnrRH92Abo+IAnQAlkp1kU2kYxakZxaf6 +REQV4AYFAJYQjjkqIEEfxaX6IKYV4A1FAPtAAIUxvgEA690MDVcCgAD74ABHsd0BAJ0TDe4IL/J/ ++EVEHeAMNQDvFgYncPEAAP4g5hWgD4UA7yRkKNgEgAD5pgAOsAh1AOgkXC7uAoAA7RYAIVGVAABZ +YJQmJTUmJGiOFSshB/4gyBXgLOUA/ErmHaBdJQAtJAX9icYFoE0lAC0kdP7AAARyn0EA+0AABf3e +HQDk3REN3wKAAOy7AgzOAoAA+QYADHD/OQDpxNcf/UKAAA/dAgjdAh/FdStWACoiACsSB+lWAi91 +AoAA7+4CDVYCgAAKSgL6oCYVoEpFACpWAywgQRrFay5WButVCy5kAoAADcwCHcVmJlUKKlYHDcwC +7FYEIUkhAADpBx4CwIEAAAgCY/xFRBXgDwUAL1QxL1Qy/qZmHeAOBQAuVDUuVDb+puYdoAwFAPym +Bh2gCwUA+qaGHeimHQAqVC4tVC32peYdqN0dAC1ULCkgV+pcPCFZcQAA+KdmHeiZHQD4p0Yd6Jkd +APinJh3omR0A+KcGHeAMRQBZYEjpXEAhQYEAAOgmAALRYQAACQSKCACICQCKJlRTHMSg+CBoFajm +HQD+qkYdqO4dAP6qJh2o7h0ALlRQ6F4IAciBAAAJYIgKDIoJQIjqix4KTwKAAOxWGiR4IQAAL1Yb +LSB0LeR0izGpWfxA5BXnuwEAmzEoIAf7iRoFqt0BAO7Eih7vAoAA+kEEFeBIEQD0kAASMYgBAOTd +Agx8AoAAD7sCCrsCDt0CnZCPIJySK5YEKpYGJpYF9yDmFaA0BQAklgP94AAXsARFAAT/Au+WASSg *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 07:17:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A6B2106564A; Thu, 13 Sep 2012 07:17:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65C098FC0C; Thu, 13 Sep 2012 07:17:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D7HU5x042791; Thu, 13 Sep 2012 07:17:30 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D7HU1j042789; Thu, 13 Sep 2012 07:17:30 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209130717.q8D7HU1j042789@svn.freebsd.org> From: Adrian Chadd Date: Thu, 13 Sep 2012 07:17: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: r240444 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 07:17:30 -0000 Author: adrian Date: Thu Sep 13 07:17:29 2012 New Revision: 240444 URL: http://svn.freebsd.org/changeset/base/240444 Log: Compensate for half/quarter rate differences in MAC clock speed. This fixes the incorrect slot (and likely ACK/RTS timeout) values which I see when enabling half/quarter rate support on the AR9280. The resulting math matches the expected calculated default values. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Thu Sep 13 06:32:52 2012 (r240443) +++ head/sys/dev/ath/ath_hal/ah.c Thu Sep 13 07:17:29 2012 (r240444) @@ -514,6 +514,13 @@ ath_hal_mac_clks(struct ath_hal *ah, u_i clks <<= 1; } else clks = usecs * CLOCK_RATE[WIRELESS_MODE_11b]; + + /* Compensate for half/quarter rate */ + if (c != AH_NULL && IEEE80211_IS_CHAN_HALF(c)) + clks = clks / 2; + else if (c != AH_NULL && IEEE80211_IS_CHAN_QUARTER(c)) + clks = clks / 4; + return clks; } From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 07:17:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9809710656D0; Thu, 13 Sep 2012 07:17:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 042078FC0A; Thu, 13 Sep 2012 07:17:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D7Hw9F042915; Thu, 13 Sep 2012 07:17:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D7HwBB042913; Thu, 13 Sep 2012 07:17:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209130717.q8D7HwBB042913@svn.freebsd.org> From: Adrian Chadd Date: Thu, 13 Sep 2012 07:17: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: r240445 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 07:17:59 -0000 Author: adrian Date: Thu Sep 13 07:17:58 2012 New Revision: 240445 URL: http://svn.freebsd.org/changeset/base/240445 Log: Add register defintions for the AR5416 TX/RX latency fields. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu Sep 13 07:17:29 2012 (r240444) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu Sep 13 07:17:58 2012 (r240445) @@ -123,6 +123,12 @@ #define AR_RTC_DERIVED_CLK_PERIOD_S 1 #endif /* AH_SUPPORT_AR9130 */ +/* AR_USEC: 0x801c */ +#define AR5416_USEC_TX_LAT 0x007FC000 /* tx latency to start of SIGNAL (usec) */ +#define AR5416_USEC_TX_LAT_S 14 /* tx latency to start of SIGNAL (usec) */ +#define AR5416_USEC_RX_LAT 0x1F800000 /* rx latency to start of SIGNAL (usec) */ +#define AR5416_USEC_RX_LAT_S 23 /* rx latency to start of SIGNAL (usec) */ + #define AR_RESET_TSF 0x8020 /* From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 07:19:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77BFF1065673; Thu, 13 Sep 2012 07:19:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 625468FC17; Thu, 13 Sep 2012 07:19:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D7JsJu043242; Thu, 13 Sep 2012 07:19:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D7JsxW043240; Thu, 13 Sep 2012 07:19:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209130719.q8D7JsxW043240@svn.freebsd.org> From: Adrian Chadd Date: Thu, 13 Sep 2012 07:19: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: r240446 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 07:19:54 -0000 Author: adrian Date: Thu Sep 13 07:19:53 2012 New Revision: 240446 URL: http://svn.freebsd.org/changeset/base/240446 Log: Call the ar5212SetCoverageClass() function for now. Some of the math is a little wrong thanks to clocks in 11a mode running at 44MHz when in fast clock mode (rather than 40MHz, which the chips before AR9280 ran 11a in). That'll have to be addressed in a future commit. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Sep 13 07:17:58 2012 (r240445) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Sep 13 07:19:53 2012 (r240446) @@ -178,7 +178,8 @@ ar5416SetDecompMask(struct ath_hal *ah, void ar5416SetCoverageClass(struct ath_hal *ah, uint8_t coverageclass, int now) { - AH_PRIVATE(ah)->ah_coverageClass = coverageclass; + + ar5212SetCoverageClass(ah, coverageclass, now); } /* From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 07:22:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 645EB106566B; Thu, 13 Sep 2012 07:22:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3398FC1A; Thu, 13 Sep 2012 07:22:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D7Mf5h043644; Thu, 13 Sep 2012 07:22:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D7Mf5t043642; Thu, 13 Sep 2012 07:22:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209130722.q8D7Mf5t043642@svn.freebsd.org> From: Adrian Chadd Date: Thu, 13 Sep 2012 07:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240447 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 07:22:41 -0000 Author: adrian Date: Thu Sep 13 07:22:40 2012 New Revision: 240447 URL: http://svn.freebsd.org/changeset/base/240447 Log: Introduce an AR5416 flavour of the IFS and mac usec/timing configuration used when running the chips in half/quarter rate. This sets up some default parameters which are then overridden by the driver (which manually configures things like slot timing at interface start time.) Although this is a copy-and-modify from the AR5212 HAL, I did peek at the reference HAL and the ath9k driver to see what they did. Ath9k in particular doesn't hard-code this - instead, their version of ar5416InitUserSettings() does all of the relevant math. TODO: * do the math, not hard code things! * fix the mac clock calculation for the AR9287; since it runs the MAC clock at a higher rate, requiring all the duration calculations to change; * Do a whole lot more validation for half/quarter rates. Obtained from: Qualcomm Atheros, Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu Sep 13 07:19:53 2012 (r240446) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu Sep 13 07:22:40 2012 (r240447) @@ -62,6 +62,8 @@ static HAL_BOOL ar5416SetPowerPerRateTab uint16_t powerLimit); static void ar5416Set11nRegs(struct ath_hal *ah, const struct ieee80211_channel *chan); static void ar5416MarkPhyInactive(struct ath_hal *ah); +static void ar5416SetIFSTiming(struct ath_hal *ah, + const struct ieee80211_channel *chan); /* * Places the device in and out of reset and then places sane @@ -310,11 +312,26 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO ah->ah_resetTxQueue(ah, i); ar5416InitIMR(ah, opmode); - ar5212SetCoverageClass(ah, AH_PRIVATE(ah)->ah_coverageClass, 1); + ar5416SetCoverageClass(ah, AH_PRIVATE(ah)->ah_coverageClass, 1); ar5416InitQoS(ah); /* This may override the AR_DIAG_SW register */ ar5416InitUserSettings(ah); + /* XXX this won't work for AR9287! */ + if (IEEE80211_IS_CHAN_HALF(chan) || IEEE80211_IS_CHAN_QUARTER(chan)) { + ar5416SetIFSTiming(ah, chan); +#if 0 + /* + * AR5413? + * Force window_length for 1/2 and 1/4 rate channels, + * the ini file sets this to zero otherwise. + */ + OS_REG_RMW_FIELD(ah, AR_PHY_FRAME_CTL, + AR_PHY_FRAME_CTL_WINLEN, 3); + } +#endif + } + if (AR_SREV_KIWI_13_OR_LATER(ah)) { /* * Enable ASYNC FIFO @@ -2751,3 +2768,125 @@ ar5416MarkPhyInactive(struct ath_hal *ah { OS_REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS); } + +#define AR5416_IFS_SLOT_FULL_RATE_40 0x168 /* 9 us half, 40 MHz core clock (9*40) */ +#define AR5416_IFS_SLOT_HALF_RATE_40 0x104 /* 13 us half, 20 MHz core clock (13*20) */ +#define AR5416_IFS_SLOT_QUARTER_RATE_40 0xD2 /* 21 us quarter, 10 MHz core clock (21*10) */ + +#define AR5416_IFS_EIFS_FULL_RATE_40 0xE60 /* (74 + (2 * 9)) * 40MHz core clock */ +#define AR5416_IFS_EIFS_HALF_RATE_40 0xDAC /* (149 + (2 * 13)) * 20MHz core clock */ +#define AR5416_IFS_EIFS_QUARTER_RATE_40 0xD48 /* (298 + (2 * 21)) * 10MHz core clock */ + +#define AR5416_IFS_SLOT_FULL_RATE_44 0x18c /* 9 us half, 44 MHz core clock (9*44) */ +#define AR5416_IFS_SLOT_HALF_RATE_44 0x11e /* 13 us half, 22 MHz core clock (13*22) */ +#define AR5416_IFS_SLOT_QUARTER_RATE_44 0xe7 /* 21 us quarter, 11 MHz core clock (21*11) */ + +#define AR5416_IFS_EIFS_FULL_RATE_44 0xfd0 /* (74 + (2 * 9)) * 44MHz core clock */ +#define AR5416_IFS_EIFS_HALF_RATE_44 0xf0a /* (149 + (2 * 13)) * 22MHz core clock */ +#define AR5416_IFS_EIFS_QUARTER_RATE_44 0xe9c /* (298 + (2 * 21)) * 11MHz core clock */ + +#define AR5416_INIT_USEC_40 40 +#define AR5416_HALF_RATE_USEC_40 19 /* ((40 / 2) - 1 ) */ +#define AR5416_QUARTER_RATE_USEC_40 9 /* ((40 / 4) - 1 ) */ + +#define AR5416_INIT_USEC_44 44 +#define AR5416_HALF_RATE_USEC_44 21 /* ((44 / 2) - 1 ) */ +#define AR5416_QUARTER_RATE_USEC_44 10 /* ((44 / 4) - 1 ) */ + + +/* XXX What should these be for 40/44MHz clocks (and half/quarter) ? */ +#define AR5416_RX_NON_FULL_RATE_LATENCY 63 +#define AR5416_TX_HALF_RATE_LATENCY 108 +#define AR5416_TX_QUARTER_RATE_LATENCY 216 + +/* + * Adjust various register settings based on half/quarter rate clock setting. + * This includes: + * + * + USEC, TX/RX latency, + * + IFS params: slot, eifs, misc etc. + * + * TODO: + * + * + Verify which other registers need to be tweaked; + * + Verify the behaviour of this for 5GHz fast and non-fast clock mode; + * + This just plain won't work for long distance links - the coverage class + * code isn't aware of the slot/ifs/ACK/RTS timeout values that need to + * change; + * + Verify whether the 32KHz USEC value needs to be kept for the 802.11n + * series chips? + * + Calculate/derive values for 2GHz, 5GHz, 5GHz fast clock + */ +static void +ar5416SetIFSTiming(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ + uint32_t txLat, rxLat, usec, slot, refClock, eifs, init_usec; + int clk_44 = 0; + + HALASSERT(IEEE80211_IS_CHAN_HALF(chan) || + IEEE80211_IS_CHAN_QUARTER(chan)); + + /* 2GHz and 5GHz fast clock - 44MHz; else 40MHz */ + if (IEEE80211_IS_CHAN_2GHZ(chan)) + clk_44 = 1; + else if (IEEE80211_IS_CHAN_5GHZ(chan) && + IS_5GHZ_FAST_CLOCK_EN(ah, chan)) + clk_44 = 1; + + /* XXX does this need save/restoring for the 11n chips? */ + refClock = OS_REG_READ(ah, AR_USEC) & AR_USEC_USEC32; + + /* + * XXX This really should calculate things, not use + * hard coded values! Ew. + */ + if (IEEE80211_IS_CHAN_HALF(chan)) { + if (clk_44) { + slot = AR5416_IFS_SLOT_HALF_RATE_44; + rxLat = AR5416_RX_NON_FULL_RATE_LATENCY << + AR5416_USEC_RX_LAT_S; + txLat = AR5416_TX_HALF_RATE_LATENCY << + AR5416_USEC_TX_LAT_S; + usec = AR5416_HALF_RATE_USEC_44; + eifs = AR5416_IFS_EIFS_HALF_RATE_44; + init_usec = AR5416_INIT_USEC_44 >> 1; + } else { + slot = AR5416_IFS_SLOT_HALF_RATE_40; + rxLat = AR5416_RX_NON_FULL_RATE_LATENCY << + AR5416_USEC_RX_LAT_S; + txLat = AR5416_TX_HALF_RATE_LATENCY << + AR5416_USEC_TX_LAT_S; + usec = AR5416_HALF_RATE_USEC_40; + eifs = AR5416_IFS_EIFS_HALF_RATE_40; + init_usec = AR5416_INIT_USEC_40 >> 1; + } + } else { /* quarter rate */ + if (clk_44) { + slot = AR5416_IFS_SLOT_QUARTER_RATE_44; + rxLat = AR5416_RX_NON_FULL_RATE_LATENCY << + AR5416_USEC_RX_LAT_S; + txLat = AR5416_TX_QUARTER_RATE_LATENCY << + AR5416_USEC_TX_LAT_S; + usec = AR5416_QUARTER_RATE_USEC_44; + eifs = AR5416_IFS_EIFS_QUARTER_RATE_44; + init_usec = AR5416_INIT_USEC_44 >> 2; + } else { + slot = AR5416_IFS_SLOT_QUARTER_RATE_40; + rxLat = AR5416_RX_NON_FULL_RATE_LATENCY << + AR5416_USEC_RX_LAT_S; + txLat = AR5416_TX_QUARTER_RATE_LATENCY << + AR5416_USEC_TX_LAT_S; + usec = AR5416_QUARTER_RATE_USEC_40; + eifs = AR5416_IFS_EIFS_QUARTER_RATE_40; + init_usec = AR5416_INIT_USEC_40 >> 2; + } + } + + /* XXX verify these! */ + OS_REG_WRITE(ah, AR_USEC, (usec | refClock | txLat | rxLat)); + OS_REG_WRITE(ah, AR_D_GBL_IFS_SLOT, slot); + OS_REG_WRITE(ah, AR_D_GBL_IFS_EIFS, eifs); + OS_REG_RMW_FIELD(ah, AR_D_GBL_IFS_MISC, + AR_D_GBL_IFS_MISC_USEC_DURATION, init_usec); +} + From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 07:24:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2072106566B; Thu, 13 Sep 2012 07:24:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0048FC12; Thu, 13 Sep 2012 07:24:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D7OEqP043866; Thu, 13 Sep 2012 07:24:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D7OESX043864; Thu, 13 Sep 2012 07:24:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209130724.q8D7OESX043864@svn.freebsd.org> From: Adrian Chadd Date: Thu, 13 Sep 2012 07:24: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: r240448 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 07:24:14 -0000 Author: adrian Date: Thu Sep 13 07:24:14 2012 New Revision: 240448 URL: http://svn.freebsd.org/changeset/base/240448 Log: Flip on half/quarter rate support. No, this isn't HT/5 and HT/10 support. This is the 11a half/quarter rate support primarily used by the 4.9GHz and GSM band regulatory domains. This is definitely a work in progress. TODO: * everything in the last commit; * lots more interoperability testing with the AR5212 half/quarter rate support for the relevant chips; * Do some interop testing on half/quarter rate support between _all_ the 11n chips - AR5416, AR9160, AR9280 (and AR9285/AR9287 when 2GHz half/quarter rate support is coded up.) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Thu Sep 13 07:22:40 2012 (r240447) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Thu Sep 13 07:24:14 2012 (r240448) @@ -911,9 +911,9 @@ ar5416FillCapabilityInfo(struct ath_hal else pCap->halKeyCacheSize = AR5416_KEYTABLE_SIZE; - /* XXX not needed */ - pCap->halChanHalfRate = AH_FALSE; /* XXX ? */ - pCap->halChanQuarterRate = AH_FALSE; /* XXX ? */ + /* XXX Which chips? */ + pCap->halChanHalfRate = AH_TRUE; + pCap->halChanQuarterRate = AH_TRUE; pCap->halTstampPrecision = 32; pCap->halHwPhyCounterSupport = AH_TRUE; From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 07:25:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA61A106564A; Thu, 13 Sep 2012 07:25:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C57E58FC12; Thu, 13 Sep 2012 07:25:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D7PfI8044081; Thu, 13 Sep 2012 07:25:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D7PfLT044079; Thu, 13 Sep 2012 07:25:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209130725.q8D7PfLT044079@svn.freebsd.org> From: Adrian Chadd Date: Thu, 13 Sep 2012 07:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240449 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 07:25:42 -0000 Author: adrian Date: Thu Sep 13 07:25:41 2012 New Revision: 240449 URL: http://svn.freebsd.org/changeset/base/240449 Log: Enable fractional 5G mode on half/quarter rate channels. Obtained from: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280.c Thu Sep 13 07:24:14 2012 (r240448) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280.c Thu Sep 13 07:25:41 2012 (r240449) @@ -112,7 +112,17 @@ ar9280SetChannel(struct ath_hal *ah, con switch (frac_n_5g) { case 0: - if ((freq % 20) == 0) { + /* + * Enable fractional mode for half/quarter rate + * channels. + * + * This is from the Linux ath9k code, rather than + * the Atheros HAL code. + */ + if (IEEE80211_IS_CHAN_QUARTER(chan) || + IEEE80211_IS_CHAN_HALF(chan)) + aModeRefSel = 0; + else if ((freq % 20) == 0) { aModeRefSel = 3; } else if ((freq % 10) == 0) { aModeRefSel = 2; From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 08:13:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EDDC106566B; Thu, 13 Sep 2012 08:13: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 798438FC0A; Thu, 13 Sep 2012 08:13:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D8D292050516; Thu, 13 Sep 2012 08:13:02 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D8D2pU050511; Thu, 13 Sep 2012 08:13:02 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201209130813.q8D8D2pU050511@svn.freebsd.org> From: Ed Schouten Date: Thu, 13 Sep 2012 08:13: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: r240450 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 08:13:02 -0000 Author: ed Date: Thu Sep 13 08:13:01 2012 New Revision: 240450 URL: http://svn.freebsd.org/changeset/base/240450 Log: Rename __member2struct() to __containerof(). Compared to __member2struct(), this macro has the following advantages: - It ensures that the type of the pointer is compatible with the member field of the structure (or a void pointer). - It works properly in combination with volatile and const, though unfortunately it drops these qualifiers from the returned value. mdf@ proposed to add the container_of() macro, just like Linux has. Eventually I decided against this, as is included all over the place. It seems container_of() on Linux is specific to the kernel, not userspace. I'd rather not pollute userspace with this. I also thought about adding __container_of(), but this would have two advantages. Xorg seems to already have a __container_of(), which is not compatible with this version. Also, the underscore in the middle conflicts with our existing macros (__offsetof, __rangeof, etc). I'm changing member2struct() to use its old code, as the extra strictness of this new macro conflicts with existing code (read: cxgb). MFC after: 1 month Modified: head/sys/sys/cdefs.h head/sys/sys/param.h head/sys/sys/queue.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Sep 13 07:25:41 2012 (r240449) +++ head/sys/sys/cdefs.h Thu Sep 13 08:13:01 2012 (r240450) @@ -402,8 +402,22 @@ #endif #define __rangeof(type, start, end) \ (__offsetof(type, end) - __offsetof(type, start)) -#define __member2struct(s, m, x) \ - ((struct s *)(void *)((char *)(x) - __offsetof(struct s, m))) + +/* + * Given the pointer x to the member m of the struct s, return + * a pointer to the containing structure. When using GCC, we first + * assign pointer x to a local variable, to check that its type is + * compatible with member m. + */ +#if __GNUC_PREREQ__(3, 1) +#define __containerof(x, s, m) ({ \ + const volatile __typeof(((s *)0)->m) *__x = (x); \ + __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ +}) +#else +#define __containerof(x, s, m) \ + __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) +#endif /* * Compiler-dependent macros to declare that functions take printf-like Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Sep 13 07:25:41 2012 (r240449) +++ head/sys/sys/param.h Thu Sep 13 08:13:01 2012 (r240450) @@ -331,10 +331,10 @@ __END_DECLS ((db) << (PAGE_SHIFT - DEV_BSHIFT)) /* - * Given the pointer x to the member m of the struct s, return - * a pointer to the containing structure. + * Old spelling of __containerof(). */ -#define member2struct(s, m, x) __member2struct(s, m, x) +#define member2struct(s, m, x) \ + ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) /* * Access a variable length array that has been declared as a fixed Modified: head/sys/sys/queue.h ============================================================================== --- head/sys/sys/queue.h Thu Sep 13 07:25:41 2012 (r240449) +++ head/sys/sys/queue.h Thu Sep 13 08:13:01 2012 (r240450) @@ -287,9 +287,8 @@ struct { \ } while (0) #define STAILQ_LAST(head, type, field) \ - (STAILQ_EMPTY((head)) ? \ - NULL : \ - __member2struct(type, field.stqe_next, (head)->stqh_last)) + (STAILQ_EMPTY((head)) ? NULL : \ + __containerof((head)->stqh_last, struct type, field.stqe_next)) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) @@ -425,9 +424,8 @@ struct { \ #define LIST_NEXT(elm, field) ((elm)->field.le_next) #define LIST_PREV(elm, head, type, field) \ - ((elm)->field.le_prev == &LIST_FIRST((head)) ? \ - NULL : \ - __member2struct(type, field.le_next, (elm)->field.le_prev)) + ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \ + __containerof((elm)->field.le_prev, struct type, field.le_next)) #define LIST_REMOVE(elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.le_next); \ From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 09:01:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CEA31065670; Thu, 13 Sep 2012 09:01:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EABA8FC16; Thu, 13 Sep 2012 09:01:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D91rTO059342; Thu, 13 Sep 2012 09:01:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D91r5c059339; Thu, 13 Sep 2012 09:01:53 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201209130901.q8D91r5c059339@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 13 Sep 2012 09:01: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: r240451 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 09:01:53 -0000 Author: np Date: Thu Sep 13 09:01:52 2012 New Revision: 240451 URL: http://svn.freebsd.org/changeset/base/240451 Log: Allow cxgbe to be built into a kernel with "device cxgbe." MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.pre.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Sep 13 08:13:01 2012 (r240450) +++ head/sys/conf/files Thu Sep 13 09:01:52 2012 (r240451) @@ -1090,6 +1090,40 @@ dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +t4fw_cfg.c optional cxgbe \ + compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "t4fw_cfg.c" +t4fw_cfg.fwo optional cxgbe \ + dependency "t4fw_cfg.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t4fw_cfg.fwo" +t4fw_cfg.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t4fw_cfg.fw" +t4fw_cfg_uwire.fwo optional cxgbe \ + dependency "t4fw_cfg_uwire.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t4fw_cfg_uwire.fwo" +t4fw_cfg_uwire.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t4fw_cfg_uwire.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t4fw_cfg_uwire.fw" +t4fw.fwo optional cxgbe \ + dependency "t4fw.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t4fw.fwo" +t4fw.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "t4fw.fw" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu Sep 13 08:13:01 2012 (r240450) +++ head/sys/conf/kern.pre.mk Thu Sep 13 09:01:52 2012 (r240451) @@ -18,6 +18,7 @@ LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} M= ${MACHINE_CPUARCH} AWK?= awk +CP?= cp LINT?= lint NM?= nm OBJCOPY?= objcopy From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 09:10:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D18B9106566B; Thu, 13 Sep 2012 09:10:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC74C8FC14; Thu, 13 Sep 2012 09:10:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D9AABX061156; Thu, 13 Sep 2012 09:10:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D9AAI3061151; Thu, 13 Sep 2012 09:10:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201209130910.q8D9AAI3061151@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 13 Sep 2012 09:10: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: r240452 - in head/sys/dev/cxgbe: . tom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 09:10:10 -0000 Author: np Date: Thu Sep 13 09:10:10 2012 New Revision: 240452 URL: http://svn.freebsd.org/changeset/base/240452 Log: Use native FreeBSD facilities everywhere except the shared code in common/ MFC after: 1 week Modified: head/sys/dev/cxgbe/osdep.h head/sys/dev/cxgbe/t4_l2t.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/osdep.h ============================================================================== --- head/sys/dev/cxgbe/osdep.h Thu Sep 13 09:01:52 2012 (r240451) +++ head/sys/dev/cxgbe/osdep.h Thu Sep 13 09:10:10 2012 (r240452) @@ -83,7 +83,7 @@ typedef boolean_t bool; #define simple_strtoul strtoul #define DIV_ROUND_UP(x, y) howmany(x, y) -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ARRAY_SIZE(x) nitems(x) #define container_of(p, s, f) ((s *)(((uint8_t *)(p)) - offsetof(s, f))) #define swab16(x) bswap16(x) Modified: head/sys/dev/cxgbe/t4_l2t.h ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.h Thu Sep 13 09:01:52 2012 (r240451) +++ head/sys/dev/cxgbe/t4_l2t.h Thu Sep 13 09:10:10 2012 (r240452) @@ -94,7 +94,7 @@ int do_l2t_write_rpl(struct sge_iq *, co static inline void t4_l2t_release(struct l2t_entry *e) { - struct l2t_data *d = container_of(e, struct l2t_data, l2tab[e->idx]); + struct l2t_data *d = member2struct(l2t_data, l2tab[e->idx], e); if (atomic_fetchadd_int(&e->refcnt, -1) == 1) atomic_add_int(&d->nfree, 1); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Sep 13 09:01:52 2012 (r240451) +++ head/sys/dev/cxgbe/t4_main.c Thu Sep 13 09:10:10 2012 (r240452) @@ -381,8 +381,8 @@ CTASSERT(offsetof(struct sge_ofld_rxq, f #endif /* No easy way to include t4_msg.h before adapter.h so we check this way */ -CTASSERT(ARRAY_SIZE(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); -CTASSERT(ARRAY_SIZE(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); +CTASSERT(nitems(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); +CTASSERT(nitems(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); static int t4_probe(device_t dev) @@ -399,7 +399,7 @@ t4_probe(device_t dev) if (d == 0xa000 && f != 0) return (ENXIO); - for (i = 0; i < ARRAY_SIZE(t4_pciids); i++) { + for (i = 0; i < nitems(t4_pciids); i++) { if (d == t4_pciids[i].device) { device_set_desc(dev, t4_pciids[i].desc); return (BUS_PROBE_DEFAULT); @@ -459,9 +459,9 @@ t4_attach(device_t dev) memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); sc->an_handler = an_not_handled; - for (i = 0; i < ARRAY_SIZE(sc->cpl_handler); i++) + for (i = 0; i < nitems(sc->cpl_handler); i++) sc->cpl_handler[i] = cpl_not_handled; - for (i = 0; i < ARRAY_SIZE(sc->fw_msg_handler); i++) + for (i = 0; i < nitems(sc->fw_msg_handler); i++) sc->fw_msg_handler[i] = fw_msg_not_handled; t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, t4_filter_rpl); @@ -1839,12 +1839,7 @@ get_params__pre_init(struct adapter *sc) } sc->params.portvec = val[0]; - sc->params.nports = 0; - while (val[0]) { - sc->params.nports++; - val[0] &= val[0] - 1; - } - + sc->params.nports = bitcount32(val[0]); sc->params.vpd.cclk = val[1]; /* Read device log parameters. */ @@ -2394,7 +2389,7 @@ adapter_full_init(struct adapter *sc) if (rc != 0) goto done; - for (i = 0; i < ARRAY_SIZE(sc->tq); i++) { + for (i = 0; i < nitems(sc->tq); i++) { sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT, taskqueue_thread_enqueue, &sc->tq[i]); if (sc->tq[i] == NULL) { @@ -2501,7 +2496,7 @@ adapter_full_uninit(struct adapter *sc) for (i = 0; i < sc->intr_count; i++) t4_free_irq(sc, &sc->irq[i]); - for (i = 0; i < ARRAY_SIZE(sc->tq) && sc->tq[i]; i++) { + for (i = 0; i < nitems(sc->tq) && sc->tq[i]; i++) { taskqueue_free(sc->tq[i]); sc->tq[i] = NULL; } @@ -2925,7 +2920,7 @@ t4_get_regs(struct adapter *sc, struct t }; regs->version = 4 | (sc->params.rev << 10); - for (i = 0; i < ARRAY_SIZE(reg_ranges); i += 2) + for (i = 0; i < nitems(reg_ranges); i += 2) reg_block_dump(sc, buf, reg_ranges[i], reg_ranges[i + 1]); } @@ -3001,7 +2996,7 @@ t4_register_cpl_handler(struct adapter * { uintptr_t *loc, new; - if (opcode >= ARRAY_SIZE(sc->cpl_handler)) + if (opcode >= nitems(sc->cpl_handler)) return (EINVAL); new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled; @@ -3055,7 +3050,7 @@ t4_register_fw_msg_handler(struct adapte { uintptr_t *loc, new; - if (type >= ARRAY_SIZE(sc->fw_msg_handler)) + if (type >= nitems(sc->fw_msg_handler)) return (EINVAL); new = h ? (uintptr_t)h : (uintptr_t)fw_msg_not_handled; @@ -3829,9 +3824,9 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "%10d %15ju %8s %8s ", e->seqno, e->timestamp, - (e->level < ARRAY_SIZE(devlog_level_strings) ? + (e->level < nitems(devlog_level_strings) ? devlog_level_strings[e->level] : "UNKNOWN"), - (e->facility < ARRAY_SIZE(devlog_facility_strings) ? + (e->facility < nitems(devlog_facility_strings) ? devlog_facility_strings[e->facility] : "UNKNOWN")); sbuf_printf(sb, e->fmt, e->params[0], e->params[1], e->params[2], e->params[3], e->params[4], @@ -3973,7 +3968,7 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "%s Loopback %u" " Loopback %u", i == 0 ? "" : "\n", i, i + 1); - for (j = 0; j < ARRAY_SIZE(stat_name); j++) + for (j = 0; j < nitems(stat_name); j++) sbuf_printf(sb, "\n%-17s %20ju %20ju", stat_name[j], *p0++, *p1++); } @@ -4028,7 +4023,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) "ULPTX state:", "On-chip queues:" }; struct mem_desc avail[3]; - struct mem_desc mem[ARRAY_SIZE(region) + 3]; /* up to 3 holes */ + struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */ struct mem_desc *md = mem; rc = sysctl_wire_old_buffer(req, 0); @@ -4039,7 +4034,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) if (sb == NULL) return (ENOMEM); - for (i = 0; i < ARRAY_SIZE(mem); i++) { + for (i = 0; i < nitems(mem); i++) { mem[i].limit = 0; mem[i].idx = i; } @@ -4101,7 +4096,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) md->limit = (sc->tids.ntids - hi) * 16 + md->base - 1; } else { md->base = 0; - md->idx = ARRAY_SIZE(region); /* hide it */ + md->idx = nitems(region); /* hide it */ } md++; @@ -4130,7 +4125,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) if (sc->vres.ocq.size) md->limit = md->base + sc->vres.ocq.size - 1; else - md->idx = ARRAY_SIZE(region); /* hide it */ + md->idx = nitems(region); /* hide it */ md++; /* add any address-space holes, there can be up to 3 */ @@ -4149,7 +4144,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "\n"); for (i = 0; i < n; i++) { - if (mem[i].idx >= ARRAY_SIZE(region)) + if (mem[i].idx >= nitems(region)) continue; /* skip holes */ if (!mem[i].limit) mem[i].limit = i < n - 1 ? mem[i + 1].base - 1 : ~0; @@ -5197,7 +5192,7 @@ t4_os_portmod_changed(const struct adapt if_printf(pi->ifp, "unknown transceiver inserted.\n"); else if (pi->mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED) if_printf(pi->ifp, "unsupported transceiver inserted.\n"); - else if (pi->mod_type > 0 && pi->mod_type < ARRAY_SIZE(mod_str)) { + else if (pi->mod_type > 0 && pi->mod_type < nitems(mod_str)) { if_printf(pi->ifp, "%s transceiver inserted.\n", mod_str[pi->mod_type]); } else { Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 13 09:01:52 2012 (r240451) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 13 09:10:10 2012 (r240452) @@ -197,7 +197,7 @@ release_ddp_resources(struct toepcb *toe { int i; - for (i = 0; i < ARRAY_SIZE(toep->db); i++) { + for (i = 0; i < nitems(toep->db); i++) { if (toep->db[i] != NULL) { free_ddp_buffer(toep->td, toep->db[i]); toep->db[i] = NULL; @@ -662,7 +662,7 @@ alloc_ddp_buffer(struct tom_data *td, vm return (NULL); } - for (idx = ARRAY_SIZE(t4_ddp_pgsz) - 1; idx > 0; idx--) { + for (idx = nitems(t4_ddp_pgsz) - 1; idx > 0; idx--) { if (hcf % t4_ddp_pgsz[idx] == 0) break; } @@ -745,7 +745,7 @@ write_page_pods(struct adapter *sc, stru V_PPOD_OFST(db->offset)); ppod->rsvd = 0; idx = i * PPOD_PAGES * (ddp_pgsz / PAGE_SIZE); - for (k = 0; k < ARRAY_SIZE(ppod->addr); k++) { + for (k = 0; k < nitems(ppod->addr); k++) { if (idx < db->npages) { ppod->addr[k] = htobe64(db->pages[idx]->phys_addr); @@ -782,7 +782,7 @@ select_ddp_buffer(struct adapter *sc, st int i, empty_slot = -1; /* Try to reuse */ - for (i = 0; i < ARRAY_SIZE(toep->db); i++) { + for (i = 0; i < nitems(toep->db); i++) { if (bufcmp(toep->db[i], pages, npages, db_off, db_len) == 0) { free(pages, M_CXGBE); return (i); /* pages still held */ @@ -805,7 +805,7 @@ select_ddp_buffer(struct adapter *sc, st i = empty_slot; if (i < 0) { - i = arc4random() % ARRAY_SIZE(toep->db); + i = arc4random() % nitems(toep->db); free_ddp_buffer(td, toep->db[i]); } toep->db[i] = db; From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 09:18:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 474581065672; Thu, 13 Sep 2012 09:18:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 284D78FC0C; Thu, 13 Sep 2012 09:18:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8D9IERI062836; Thu, 13 Sep 2012 09:18:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8D9ID4e062834; Thu, 13 Sep 2012 09:18:13 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201209130918.q8D9ID4e062834@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 13 Sep 2012 09:18: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: r240453 - head/sys/dev/cxgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 09:18:14 -0000 Author: np Date: Thu Sep 13 09:18:13 2012 New Revision: 240453 URL: http://svn.freebsd.org/changeset/base/240453 Log: Install interrupt handlers early, during attach, for the reason explained in r239913 by jhb. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Sep 13 09:10:10 2012 (r240452) +++ head/sys/dev/cxgbe/t4_main.c Thu Sep 13 09:18:13 2012 (r240453) @@ -288,6 +288,7 @@ static int cxgbe_init_locked(struct port static int cxgbe_init_synchronized(struct port_info *); static int cxgbe_uninit_locked(struct port_info *); static int cxgbe_uninit_synchronized(struct port_info *); +static int setup_intr_handlers(struct adapter *); static int adapter_full_init(struct adapter *); static int adapter_full_uninit(struct adapter *); static int port_full_init(struct port_info *); @@ -701,6 +702,13 @@ t4_attach(device_t dev) #endif } + rc = setup_intr_handlers(sc); + if (rc != 0) { + device_printf(dev, + "failed to setup interrupt handlers: %d\n", rc); + goto done; + } + rc = bus_generic_attach(dev); if (rc != 0) { device_printf(dev, @@ -760,6 +768,9 @@ t4_detach(device_t dev) return (rc); } + for (i = 0; i < sc->intr_count; i++) + t4_free_irq(sc, &sc->irq[i]); + for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { @@ -2360,16 +2371,14 @@ cxgbe_uninit_synchronized(struct port_in return (0); } -#define T4_ALLOC_IRQ(sc, irq, rid, handler, arg, name) do { \ - rc = t4_alloc_irq(sc, irq, rid, handler, arg, name); \ - if (rc != 0) \ - goto done; \ -} while (0) - +/* + * It is ok for this function to fail midway and return right away. t4_detach + * will walk the entire sc->irq list and clean up whatever is valid. + */ static int -adapter_full_init(struct adapter *sc) +setup_intr_handlers(struct adapter *sc) { - int rc, i, rid, p, q; + int rc, rid, p, q; char s[8]; struct irq *irq; struct port_info *pi; @@ -2378,30 +2387,6 @@ adapter_full_init(struct adapter *sc) struct sge_ofld_rxq *ofld_rxq; #endif - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - KASSERT((sc->flags & FULL_INIT_DONE) == 0, - ("%s: FULL_INIT_DONE already", __func__)); - - /* - * queues that belong to the adapter (not any particular port). - */ - rc = t4_setup_adapter_queues(sc); - if (rc != 0) - goto done; - - for (i = 0; i < nitems(sc->tq); i++) { - sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT, - taskqueue_thread_enqueue, &sc->tq[i]); - if (sc->tq[i] == NULL) { - device_printf(sc->dev, - "failed to allocate task queue %d\n", i); - rc = ENOMEM; - goto done; - } - taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", - device_get_nameunit(sc->dev), i); - } - /* * Setup interrupts. */ @@ -2411,19 +2396,26 @@ adapter_full_init(struct adapter *sc) KASSERT(!(sc->flags & INTR_DIRECT), ("%s: single interrupt && INTR_DIRECT?", __func__)); - T4_ALLOC_IRQ(sc, irq, rid, t4_intr_all, sc, "all"); + rc = t4_alloc_irq(sc, irq, rid, t4_intr_all, sc, "all"); + if (rc != 0) + return (rc); } else { /* Multiple interrupts. */ KASSERT(sc->intr_count >= T4_EXTRA_INTR + sc->params.nports, ("%s: too few intr.", __func__)); /* The first one is always error intr */ - T4_ALLOC_IRQ(sc, irq, rid, t4_intr_err, sc, "err"); + rc = t4_alloc_irq(sc, irq, rid, t4_intr_err, sc, "err"); + if (rc != 0) + return (rc); irq++; rid++; /* The second one is always the firmware event queue */ - T4_ALLOC_IRQ(sc, irq, rid, t4_intr_evt, &sc->sge.fwq, "evt"); + rc = t4_alloc_irq(sc, irq, rid, t4_intr_evt, &sc->sge.fwq, + "evt"); + if (rc != 0) + return (rc); irq++; rid++; @@ -2450,7 +2442,10 @@ adapter_full_init(struct adapter *sc) rxq = &sc->sge.rxq[pi->first_rxq]; for (q = 0; q < pi->nrxq; q++, rxq++) { snprintf(s, sizeof(s), "%d.%d", p, q); - T4_ALLOC_IRQ(sc, irq, rid, t4_intr, rxq, s); + rc = t4_alloc_irq(sc, irq, rid, t4_intr, rxq, + s); + if (rc != 0) + return (rc); irq++; rid++; } @@ -2466,7 +2461,10 @@ ofld_queues: ofld_rxq = &sc->sge.ofld_rxq[pi->first_ofld_rxq]; for (q = 0; q < pi->nofldrxq; q++, ofld_rxq++) { snprintf(s, sizeof(s), "%d,%d", p, q); - T4_ALLOC_IRQ(sc, irq, rid, t4_intr, ofld_rxq, s); + rc = t4_alloc_irq(sc, irq, rid, t4_intr, + ofld_rxq, s); + if (rc != 0) + return (rc); irq++; rid++; } @@ -2474,6 +2472,38 @@ ofld_queues: } } + return (0); +} + +static int +adapter_full_init(struct adapter *sc) +{ + int rc, i; + + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + KASSERT((sc->flags & FULL_INIT_DONE) == 0, + ("%s: FULL_INIT_DONE already", __func__)); + + /* + * queues that belong to the adapter (not any particular port). + */ + rc = t4_setup_adapter_queues(sc); + if (rc != 0) + goto done; + + for (i = 0; i < nitems(sc->tq); i++) { + sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT, + taskqueue_thread_enqueue, &sc->tq[i]); + if (sc->tq[i] == NULL) { + device_printf(sc->dev, + "failed to allocate task queue %d\n", i); + rc = ENOMEM; + goto done; + } + taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", + device_get_nameunit(sc->dev), i); + } + t4_intr_enable(sc); sc->flags |= FULL_INIT_DONE; done: @@ -2482,7 +2512,6 @@ done: return (rc); } -#undef T4_ALLOC_IRQ static int adapter_full_uninit(struct adapter *sc) @@ -2493,9 +2522,6 @@ adapter_full_uninit(struct adapter *sc) t4_teardown_adapter_queues(sc); - for (i = 0; i < sc->intr_count; i++) - t4_free_irq(sc, &sc->irq[i]); - for (i = 0; i < nitems(sc->tq) && sc->tq[i]; i++) { taskqueue_free(sc->tq[i]); sc->tq[i] = NULL; From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 10:12:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CFD910657C2; Thu, 13 Sep 2012 10:12:17 +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 2606D8FC15; Thu, 13 Sep 2012 10:12:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DACHRO071298; Thu, 13 Sep 2012 10:12:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DACG5b071289; Thu, 13 Sep 2012 10:12:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209131012.q8DACG5b071289@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 13 Sep 2012 10: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: r240455 - in head/sys: amd64/conf conf dev/random i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 10:12:17 -0000 Author: kib Date: Thu Sep 13 10:12:16 2012 New Revision: 240455 URL: http://svn.freebsd.org/changeset/base/240455 Log: Rename the IVY_RNG option to RDRAND_RNG. Based on submission by: Arthur Mesh MFC after: 2 weeks Modified: head/sys/amd64/conf/GENERIC head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/dev/random/ivy.c head/sys/dev/random/probe.c head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/amd64/conf/GENERIC Thu Sep 13 10:12:16 2012 (r240455) @@ -293,7 +293,7 @@ device wpi # Intel 3945ABG wireless NI device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG -options IVY_RNG # Intel Bull Mountain RNG +options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/conf/files.amd64 Thu Sep 13 10:12:16 2012 (r240455) @@ -214,7 +214,7 @@ dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/nvram/nvram.c optional nvram isa -dev/random/ivy.c optional random ivy_rng +dev/random/ivy.c optional random rdrand_rng dev/random/nehemiah.c optional random padlock_rng dev/qlxgb/qla_dbg.c optional qlxgb pci dev/qlxgb/qla_hw.c optional qlxgb pci Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/conf/files.i386 Thu Sep 13 10:12:16 2012 (r240455) @@ -227,7 +227,7 @@ dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/nvram/nvram.c optional nvram isa dev/pcf/pcf_isa.c optional pcf -dev/random/ivy.c optional random ivy_rng +dev/random/ivy.c optional random rdrand_rng dev/random/nehemiah.c optional random padlock_rng dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/conf/options.amd64 Thu Sep 13 10:12:16 2012 (r240455) @@ -71,4 +71,4 @@ ISCI_LOGGING opt_isci.h # hw random number generators for random(4) PADLOCK_RNG opt_cpu.h -IVY_RNG opt_cpu.h +RDRAND_RNG opt_cpu.h Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/conf/options.i386 Thu Sep 13 10:12:16 2012 (r240455) @@ -126,4 +126,4 @@ ISCI_LOGGING opt_isci.h # hw random number generators for random(4) PADLOCK_RNG opt_cpu.h -IVY_RNG opt_cpu.h +RDRAND_RNG opt_cpu.h Modified: head/sys/dev/random/ivy.c ============================================================================== --- head/sys/dev/random/ivy.c Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/dev/random/ivy.c Thu Sep 13 10:12:16 2012 (r240455) @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_cpu.h" -#ifdef IVY_RNG +#ifdef RDRAND_RNG #include #include Modified: head/sys/dev/random/probe.c ============================================================================== --- head/sys/dev/random/probe.c Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/dev/random/probe.c Thu Sep 13 10:12:16 2012 (r240455) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #ifdef PADLOCK_RNG extern struct random_systat random_nehemiah; #endif -#ifdef IVY_RNG +#ifdef RDRAND_RNG extern struct random_systat random_ivy; #endif #endif @@ -79,7 +79,7 @@ random_ident_hardware(struct random_syst *systat = random_nehemiah; } #endif -#ifdef IVY_RNG +#ifdef RDRAND_RNG if (cpu_feature2 & CPUID2_RDRAND) { int enable; Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Sep 13 10:11:40 2012 (r240454) +++ head/sys/i386/conf/GENERIC Thu Sep 13 10:12:16 2012 (r240455) @@ -306,7 +306,7 @@ device wpi # Intel 3945ABG wireless NI device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG -options IVY_RNG # Intel Bull Mountain RNG +options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. From owner-svn-src-head@FreeBSD.ORG Thu Sep 13 10:17:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56B1D106566C; Thu, 13 Sep 2012 10:17:02 +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 3F6998FC14; Thu, 13 Sep 2012 10:17:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DAH2Aa072292; Thu, 13 Sep 2012 10:17:02 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DAH12x072274; Thu, 13 Sep 2012 10:17:01 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201209131017.q8DAH12x072274@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 13 Sep 2012 10:17: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: r240457 - head/contrib/tzdata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 10:17:02 -0000 Author: edwin Date: Thu Sep 13 10:17:01 2012 New Revision: 240457 URL: http://svn.freebsd.org/changeset/base/240457 Log: MFV of 240454, tzdata2012f - Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013. - Fix offset for Pacific/Tokelau. - Gaza and West Bank had DST from 29 March to 28 September 2012. - Syria has DST from April till October - Morocco had DST from April to September 2012 except for 20 July to 20 August. - Cuba changed to DST from 1 April 2012 only. - Haiti has DST between 8 March and 1 November in 2012. Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backward head/contrib/tzdata/etcetera head/contrib/tzdata/europe head/contrib/tzdata/factory head/contrib/tzdata/leapseconds head/contrib/tzdata/northamerica head/contrib/tzdata/pacificnew head/contrib/tzdata/southamerica head/contrib/tzdata/systemv head/contrib/tzdata/yearistype.sh head/contrib/tzdata/zone.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Thu Sep 13 10:12:45 2012 (r240456) +++ head/contrib/tzdata/africa Thu Sep 13 10:17:01 2012 (r240457) @@ -1,5 +1,4 @@ #
-# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -238,7 +237,7 @@ Rule	Egypt	2006	only	-	Sep	21	23:00s	0	-
 # I received a mail from an airline which says that the daylight
 # saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
 # From Jesper Norgaard Welen (2007-08-15): [The following agree:]
-# http://www.nentjes.info/Bill/bill5.htm 
+# http://www.nentjes.info/Bill/bill5.htm
 # http://www.timeanddate.com/worldclock/city.html?n=53
 # From Steffen Thorsen (2007-09-04): The official information...:
 # http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm
@@ -292,18 +291,18 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # in September.
 
 # From Steffen Thorsen (2009-08-11):
-# We have been able to confirm the August change with the Egyptian Cabinet 
+# We have been able to confirm the August change with the Egyptian Cabinet
 # Information and Decision Support Center:
 # 
 # http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html
 # 
-# 
+#
 # The Middle East News Agency
 # 
 # http://www.mena.org.eg/index.aspx
 # 
 # also reports "Egypt starts winter time on August 21"
-# today in article numbered "71, 11/08/2009 12:25 GMT." 
+# today in article numbered "71, 11/08/2009 12:25 GMT."
 # Only the title above is available without a subscription to their service,
 # and can be found by searching for "winter" in their search engine
 # (at least today).
@@ -482,7 +481,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # From Steffen Thorsen (2008-06-25):
 # Mauritius plans to observe DST from 2008-11-01 to 2009-03-31 on a trial
 # basis....
-# It seems that Mauritius observed daylight saving time from 1982-10-10 to 
+# It seems that Mauritius observed daylight saving time from 1982-10-10 to
 # 1983-03-20 as well, but that was not successful....
 # http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html
 
@@ -506,12 +505,12 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # than previously announced (2008-11-01 to 2009-03-31).  The new start
 # date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time
 # given, but it is probably at either 2 or 3 wall clock time).
-# 
-# A little strange though, since the article says that they moved the date 
-# to align itself with Europe and USA which also change time on that date, 
-# but that means they have not paid attention to what happened in 
-# USA/Canada last year (DST ends first Sunday in November). I also wonder 
-# why that they end on a Friday, instead of aligning with Europe which 
+#
+# A little strange though, since the article says that they moved the date
+# to align itself with Europe and USA which also change time on that date,
+# but that means they have not paid attention to what happened in
+# USA/Canada last year (DST ends first Sunday in November). I also wonder
+# why that they end on a Friday, instead of aligning with Europe which
 # changes two days later.
 
 # From Alex Krivenyshev (2008-07-11):
@@ -570,7 +569,7 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # 
 
 # From Arthur David Olson (2009-07-11):
-# The "mauritius-dst-will-not-repeat" wrapup includes this: 
+# The "mauritius-dst-will-not-repeat" wrapup includes this:
 # "The trial ended on March 29, 2009, when the clocks moved back by one hour
 # at 2am (or 02:00) local time..."
 
@@ -664,8 +663,8 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # XXX--guess that it is only Morocco for now; guess only 2008 for now.
 
 # From Steffen Thorsen (2008-08-27):
-# Morocco will change the clocks back on the midnight between August 31 
-# and September 1. They originally planned to observe DST to near the end 
+# Morocco will change the clocks back on the midnight between August 31
+# and September 1. They originally planned to observe DST to near the end
 # of September:
 #
 # One article about it (in French):
@@ -768,6 +767,54 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # wall clock time (i.e. 11pm UTC), but that's what I would assume. It has
 # also been like that in the past.
 
+# From Alexander Krivenyshev (2012-03-09):
+# According to Infomédiaire web site from Morocco (infomediaire.ma),
+# on March 9, 2012, (in French) Heure légale:
+# Le Maroc adopte officiellement l'heure d'été
+# 
+# http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9
+# 
+# Governing Council adopted draft decree, that Morocco DST starts on
+# the last Sunday of March (March 25, 2012) and ends on
+# last Sunday of September (September 30, 2012)
+# except the month of Ramadan.
+# or (brief)
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_morocco06.html
+# 
+
+# From Arthur David Olson (2012-03-10):
+# The infomediaire.ma source indicates that the system is to be in
+# effect every year. It gives 03H00 as the "fall back" time of day;
+# it lacks a "spring forward" time of day; assume 2:00 XXX.
+# Wait on specifying the Ramadan exception for details about
+# start date, start time of day, end date, and end time of day XXX.
+
+# From Christophe Tropamer (2012-03-16):
+# Seen Morocco change again:
+# 
+# http://www.le2uminutes.com/actualite.php
+# 
+# "...à partir du dernier dimance d'avril et non fins mars,
+# comme annoncé précédemment."
+
+# From Milamber Space Network (2012-07-17):
+# The official return to GMT is announced by the Moroccan government:
+# 
+# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French]
+# 
+#
+# Google translation, lightly edited:
+# Back to the standard time of the Kingdom (GMT)
+# Pursuant to Decree No. 2-12-126 issued on 26 Jumada (I) 1433 (April 18,
+# 2012) and in accordance with the order of Mr. President of the
+# Government No. 3-47-12 issued on 24 Sha'ban (11 July 2012), the Ministry
+# of Public Service and Administration Modernization announces the return
+# of the legal time of the Kingdom (GMT) from Friday, July 20, 2012 until
+# Monday, August 20, 2012.  So the time will be delayed by 60 minutes from
+# 3:00 am Friday, July 20, 2012 and will again be advanced by 60 minutes
+# August 20, 2012 from 2:00 am.
+
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 
 Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	S
@@ -793,6 +840,11 @@ Rule	Morocco	2010	only	-	May	 2	 0:00	1:
 Rule	Morocco	2010	only	-	Aug	 8	 0:00	0	-
 Rule	Morocco	2011	only	-	Apr	 3	 0:00	1:00	S
 Rule	Morocco	2011	only	-	Jul	 31	 0	0	-
+Rule	Morocco	2012	max	-	Apr	 lastSun 2:00	1:00	S
+Rule	Morocco	2012	max	-	Sep	 lastSun 3:00	0	-
+Rule	Morocco	2012	only	-	Jul	 20	 3:00	0	-
+Rule	Morocco	2012	only	-	Aug	 20	 2:00	1:00	S
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
 			 0:00	Morocco	WE%sT	1984 Mar 16
@@ -820,7 +872,7 @@ Zone	Africa/Maputo	2:10:20 -	LMT	1903 Ma
 # Forecasting Riaan van Zyl explained that the far eastern parts of
 # the country are close to 40 minutes earlier in sunrise than the rest
 # of the country.
-# 
+#
 # From Paul Eggert (2007-03-31):
 # Apparently the Caprivi Strip informally observes Botswana time, but
 # we have no details.  In the meantime people there can use Africa/Gaborone.

Modified: head/contrib/tzdata/antarctica
==============================================================================
--- head/contrib/tzdata/antarctica	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/antarctica	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)antarctica	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/asia
==============================================================================
--- head/contrib/tzdata/asia	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/asia	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,4 +1,4 @@
-# @(#)asia	8.70
+# 
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -101,7 +101,7 @@ Zone	Asia/Kabul	4:36:48 -	LMT	1890
 # From Alexander Krivenyshev (2012-02-10):
 # According to News Armenia, on Feb 9, 2012,
 # http://newsarmenia.ru/society/20120209/42609695.html
-# 
+#
 # The Armenia National Assembly adopted final reading of Amendments to the
 # Law "On procedure of calculation time on the territory of the Republic of
 # Armenia" according to which Armenia [is] abolishing Daylight Saving Time.
@@ -181,15 +181,15 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # 
 
 # From A. N. M. Kamrus Saadat (2009-06-15):
-# Finally we've got the official mail regarding DST start time where DST start 
-# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh 
-# Telecommunication Regulatory Commission). 
+# Finally we've got the official mail regarding DST start time where DST start
+# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh
+# Telecommunication Regulatory Commission).
 #
 # No DST end date has been announced yet.
 
 # From Alexander Krivenyshev (2009-09-25):
-# Bangladesh won't go back to Standard Time from October 1, 2009, 
-# instead it will continue DST measure till the cabinet makes a fresh decision. 
+# Bangladesh won't go back to Standard Time from October 1, 2009,
+# instead it will continue DST measure till the cabinet makes a fresh decision.
 #
 # Following report by same newspaper-"The Daily Star Friday":
 # "DST change awaits cabinet decision-Clock won't go back by 1-hr from Oct 1"
@@ -203,8 +203,8 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 
 # From Steffen Thorsen (2009-10-13):
 # IANS (Indo-Asian News Service) now reports:
-# Bangladesh has decided that the clock advanced by an hour to make 
-# maximum use of daylight hours as an energy saving measure would 
+# Bangladesh has decided that the clock advanced by an hour to make
+# maximum use of daylight hours as an energy saving measure would
 # "continue for an indefinite period."
 #
 # One of many places where it is published:
@@ -232,7 +232,7 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 
 # From Alexander Krivenyshev (2010-03-22):
 # According to Bangladesh newspaper "The Daily Star,"
-# Cabinet cancels Daylight Saving Time 
+# Cabinet cancels Daylight Saving Time
 # 
 # http://www.thedailystar.net/newDesign/latest_news.php?nid=22817
 # 
@@ -360,11 +360,11 @@ Rule	PRC	1987	1991	-	Apr	Sun>=10	0:00	1:
 # observing daylight saving time in 1986.
 #
 # From Thomas S. Mullaney (2008-02-11):
-# I think you're combining two subjects that need to treated 
-# separately: daylight savings (which, you're correct, wasn't 
-# implemented until the 1980s) and the unified time zone centered near 
-# Beijing (which was implemented in 1949). Briefly, there was also a 
-# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was 
+# I think you're combining two subjects that need to treated
+# separately: daylight savings (which, you're correct, wasn't
+# implemented until the 1980s) and the unified time zone centered near
+# Beijing (which was implemented in 1949). Briefly, there was also a
+# "Lhasa Time" in Tibet and "Urumqi Time" in Xinjiang. The first was
 # ceased, and the second eventually recognized (again, in the 1980s).
 #
 # From Paul Eggert (2008-06-30):
@@ -501,7 +501,7 @@ Zone	Asia/Kashgar	5:03:56	-	LMT	1928 # o
 # as of 2009-10-28:
 # Year        Period
 # 1941        1 Apr to 30 Sep
-# 1942        Whole year 
+# 1942        Whole year
 # 1943        Whole year
 # 1944        Whole year
 # 1945        Whole year
@@ -592,16 +592,16 @@ Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 O
 # From Arthur David Olson (2010-04-07):
 # Here's Google's translation of the table at the bottom of the "summert.htm" page:
 # Decade 	                                                    Name                      Start and end date
-# Republic of China 34 years to 40 years (AD 1945-1951 years) Summer Time               May 1 to September 30 
-# 41 years of the Republic of China (AD 1952)                 Daylight Saving Time      March 1 to October 31 
-# Republic of China 42 years to 43 years (AD 1953-1954 years) Daylight Saving Time      April 1 to October 31 
-# In the 44 years to 45 years (AD 1955-1956 years)            Daylight Saving Time      April 1 to September 30 
-# Republic of China 46 years to 48 years (AD 1957-1959)       Summer Time               April 1 to September 30 
-# Republic of China 49 years to 50 years (AD 1960-1961)       Summer Time               June 1 to September 30 
-# Republic of China 51 years to 62 years (AD 1962-1973 years) Stop Summer Time 
-# Republic of China 63 years to 64 years (1974-1975 AD)       Daylight Saving Time      April 1 to September 30 
-# Republic of China 65 years to 67 years (1976-1978 AD)       Stop Daylight Saving Time 
-# Republic of China 68 years (AD 1979)                        Daylight Saving Time      July 1 to September 30 
+# Republic of China 34 years to 40 years (AD 1945-1951 years) Summer Time               May 1 to September 30
+# 41 years of the Republic of China (AD 1952)                 Daylight Saving Time      March 1 to October 31
+# Republic of China 42 years to 43 years (AD 1953-1954 years) Daylight Saving Time      April 1 to October 31
+# In the 44 years to 45 years (AD 1955-1956 years)            Daylight Saving Time      April 1 to September 30
+# Republic of China 46 years to 48 years (AD 1957-1959)       Summer Time               April 1 to September 30
+# Republic of China 49 years to 50 years (AD 1960-1961)       Summer Time               June 1 to September 30
+# Republic of China 51 years to 62 years (AD 1962-1973 years) Stop Summer Time
+# Republic of China 63 years to 64 years (1974-1975 AD)       Daylight Saving Time      April 1 to September 30
+# Republic of China 65 years to 67 years (1976-1978 AD)       Stop Daylight Saving Time
+# Republic of China 68 years (AD 1979)                        Daylight Saving Time      July 1 to September 30
 # Republic of China since 69 years (AD 1980)                  Stop Daylight Saving Time
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -1835,15 +1835,15 @@ Zone	Asia/Muscat	3:54:20 -	LMT	1920
 # shown 8 per cent higher consumption of electricity.
 
 # From Alex Krivenyshev (2008-05-15):
-# 
-# Here is an article that Pakistan plan to introduce Daylight Saving Time 
+#
+# Here is an article that Pakistan plan to introduce Daylight Saving Time
 # on June 1, 2008 for 3 months.
-# 
-# "... The federal cabinet on Wednesday announced a new conservation plan to help 
-# reduce load shedding by approving the closure of commercial centres at 9pm and 
-# moving clocks forward by one hour for the next three months. 
+#
+# "... The federal cabinet on Wednesday announced a new conservation plan to help
+# reduce load shedding by approving the closure of commercial centres at 9pm and
+# moving clocks forward by one hour for the next three months.
 # ...."
-# 
+#
 # 
 # http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html
 # 
@@ -1903,7 +1903,7 @@ Zone	Asia/Muscat	3:54:20 -	LMT	1920
 # Government has decided to restore the previous time by moving the
 # clocks backward by one hour from October 1. A formal announcement to
 # this effect will be made after the Prime Minister grants approval in
-# this regard." 
+# this regard."
 # 
 # http://www.thenews.com.pk/updates.asp?id=87168
 # 
@@ -2199,7 +2199,7 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # 
 # http://www.maannews.net/eng/ViewDetails.aspx?ID=306795
 # 
-# the clocks were set back one hour at 2010-08-11 00:00:00 local time in 
+# the clocks were set back one hour at 2010-08-11 00:00:00 local time in
 # Gaza and the West Bank.
 # Some more background info:
 # 
@@ -2238,7 +2238,7 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # The rules for Egypt are stolen from the `africa' file.
 
 # From Steffen Thorsen (2011-09-30):
-# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30
 # 00:00).
 # So West Bank and Gaza now have the same time again.
 #
@@ -2247,6 +2247,29 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
 # 
 
+# From Steffen Thorsen (2012-03-26):
+# Palestinian news sources tell that both Gaza and West Bank will start DST
+# on Friday (Thursday midnight, 2012-03-29 24:00).
+# Some of many sources in Arabic:
+# 
+# http://www.samanews.com/index.php?act=Show&id=122638
+# 
+#
+# 
+# http://safa.ps/details/news/74352/%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-%D8%A8%D8%A7%D9%84%D8%B6%D9%81%D8%A9-%D9%88%D8%BA%D8%B2%D8%A9-%D9%84%D9%8A%D9%84%D8%A9-%D8%A7%D9%84%D8%AC%D9%85%D8%B9%D8%A9.html
+# 
+#
+# Our brief summary:
+# 
+# http://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html
+# 
+
+# From Arthur David Olson (2012-03-27):
+# The timeanddate article for 2012 says that "the end date has not yet been
+# announced" and that "Last year, both...paused daylight saving time during...
+# Ramadan. It is not yet known [for] 2012."
+# For now, assume both switch back on the last Friday in September. XXX
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2279,6 +2302,8 @@ Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Jordan	EE%sT	1999
 			2:00 Palestine	EE%sT	2011 Apr  2 12:01
 			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2012 Mar 30
+			2:00	1:00	EEST	2012 Sep 28
 			2:00	-	EET
 
 Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
@@ -2292,6 +2317,8 @@ Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
 			2:00	1:00	EEST	2011 Aug  1
 			2:00	-	EET	2011 Aug 30
 			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET	2012 Mar 30
+			2:00	1:00	EEST	2012 Sep 28 3:00
 			2:00	-	EET
 
 # Paracel Is
@@ -2485,19 +2512,19 @@ Rule	Syria	2007	only	-	Mar	lastFri	0:00	
 # having it between Wednesday and Thursday (two workdays in Syria) since the
 # weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
 # it is implemented at midnight of the last workday before weekend...
-# 
+#
 # From Steffen Thorsen (2007-10-27):
 # Jesper Norgaard Welen wrote:
-# 
+#
 # > "Winter local time in Syria will be observed at midnight of Thursday 1
 # > November 2007, and the clock will be put back 1 hour."
-# 
+#
 # I found confirmation on this in this gov.sy-article (Arabic):
 # http://wehda.alwehda.gov.sy/_print_veiw.asp?FileName=12521710520070926111247
-# 
+#
 # which using Google's translate tools says:
-# Council of Ministers also approved the commencement of work on 
-# identifying the winter time as of Friday, 2/11/2007 where the 60th 
+# Council of Ministers also approved the commencement of work on
+# identifying the winter time as of Friday, 2/11/2007 where the 60th
 # minute delay at midnight Thursday 1/11/2007.
 Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	0	-
 
@@ -2563,8 +2590,8 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # 
 
 # From Steffen Thorsen (2009-10-27):
-# The Syrian Arab News Network on 2009-09-29 reported that Syria will 
-# revert back to winter (standard) time on midnight between Thursday 
+# The Syrian Arab News Network on 2009-09-29 reported that Syria will
+# revert back to winter (standard) time on midnight between Thursday
 # 2009-10-29 and Friday 2009-10-30:
 # 
 # http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic)
@@ -2583,10 +2610,28 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://sns.sy/sns/?path=news/read/11421 (Arabic)
 # 
 
+# From Steffen Thorsen (2012-03-26):
+# Today, Syria's government announced that they will start DST early on Friday
+# (00:00). This is a bit earlier than the past two years.
+#
+# From Syrian Arab News Agency, in Arabic:
+# 
+# http://www.sana.sy/ara/2/2012/03/26/408215.htm
+# 
+#
+# Our brief summary:
+# 
+# http://www.timeanddate.com/news/time/syria-dst-2012.html
+# 
+
+# From Arthur David Olson (2012-03-27):
+# Assume last Friday in March going forward XXX.
+
 Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
 Rule	Syria	2008	only	-	Nov	1	0:00	0	-
 Rule	Syria	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule	Syria	2010	max	-	Apr	Fri>=1	0:00	1:00	S
+Rule	Syria	2010	2011	-	Apr	Fri>=1	0:00	1:00	S
+Rule	Syria	2012	max	-	Mar	lastFri	0:00	1:00	S
 Rule	Syria	2009	max	-	Oct	lastFri	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: head/contrib/tzdata/australasia
==============================================================================
--- head/contrib/tzdata/australasia	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/australasia	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)australasia	8.30
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -284,9 +283,9 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # 
 
 # From Alexander Krivenyshev (2010-10-24):
-# According to Radio Fiji and Fiji Times online, Fiji will end DST 3 
+# According to Radio Fiji and Fiji Times online, Fiji will end DST 3
 # weeks earlier than expected - on March 6, 2011, not March 27, 2011...
-# Here is confirmation from Government of the Republic of the Fiji Islands, 
+# Here is confirmation from Government of the Republic of the Fiji Islands,
 # Ministry of Information (fiji.gov.fj) web site:
 # 
 # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155
@@ -297,15 +296,15 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # 
 
 # From Steffen Thorsen (2011-10-03):
-# Now the dates have been confirmed, and at least our start date 
+# Now the dates have been confirmed, and at least our start date
 # assumption was correct (end date was one week wrong).
 #
 # 
 # www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
 # 
 # which says
-# Members of the public are reminded to change their time to one hour in 
-# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# Members of the public are reminded to change their time to one hour in
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to
 # 2am on February 26 next year.
 
 # From Ken Rylander (2011-10-24)
@@ -322,15 +321,23 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # The commencement of daylight saving will remain unchanged and start
 # on the  23rd of October, 2011.
 
+# From the Fiji Government Online Portal (2012-08-21) via Steffen Thorsen:
+# The Minister for Labour, Industrial Relations and Employment Mr Jone Usamate
+# today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
+# October 2012 and end at 3 am on Sunday 20th January 2013.
+# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
+#
+# From Paul Eggert (2012-08-31):
+# For now, guess a pattern of the penultimate Sundays in October and January.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
-Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
+Rule	Fiji	2010	max	-	Oct	Sun>=18	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
-Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
-Rule	Fiji	2012	only	-	Jan	22	3:00	0	-
+Rule	Fiji	2012	max	-	Jan	Sun>=18	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -559,7 +566,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 
 # From David Zuelke (2011-05-09):
 # Subject: Samoa to move timezone from east to west of international date line
-# 
+#
 # 
 # http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
 # 
@@ -641,25 +648,25 @@ Zone Pacific/Guadalcanal 10:39:48 -	LMT	
 #
 # From Gwillim Law (2011-12-29)
 # A correspondent informed me that Tokelau, like Samoa, will be skipping
-# December 31 this year, thereby changing its time zone from UTC-10 to
-# UTC+14. When I tried to verify this statement, I found a confirming
-# article in Time magazine online
-# 
-# (http://www.time.com/time/world/article/0,8599,2103243,00.html).
-# 
+# December 31 this year ...
 #
-# From Jonathan Leffler (2011-12-29)
-# Information from the BBC to the same effect:
-# 
-# http://www.bbc.co.uk/news/world-asia-16351377
-# 
-#
-# Patch supplied by Tim Parenti (2011-12-29)
+# From Steffen Thorsen (2012-07-25)
+# ... we double checked by calling hotels and offices based in Tokelau asking
+# about the time there, and they all told a time that agrees with UTC+13....
+# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change
+# actually was to UTC-11 back then.
+#
+# From Paul Eggert (2012-07-25)
+# A Google Books snippet of Appendix to the Journals of the House of
+# Representatives of New Zealand, Session 1948,
+# , page 65, says Tokelau
+# was "11 hours slow on G.M.T."  Go with Thorsen and assume Shanks & Pottenger
+# are off by an hour starting in 1901.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fakaofo	-11:24:56 -	LMT	1901
-			-10:00	-	TKT 2011 Dec 30	# Tokelau Time
-			14:00	-	TKT
+			-11:00	-	TKT 2011 Dec 30	# Tokelau Time
+			13:00	-	TKT
 
 # Tonga
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -1340,22 +1347,22 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # See "southeast Australia" above for 2008 and later.
 
 # From Steffen Thorsen (2009-04-28):
-# According to the official press release, South Australia's extended daylight 
-# saving period will continue with the same rules as used during the 2008-2009 
+# According to the official press release, South Australia's extended daylight
+# saving period will continue with the same rules as used during the 2008-2009
 # summer (southern hemisphere).
-# 
+#
 # From
 # 
 # http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf
 # 
-# The extended daylight saving period that South Australia has been trialling 
+# The extended daylight saving period that South Australia has been trialling
 # for over the last year is now set to be ongoing.
-# Daylight saving will continue to start on the first Sunday in October each 
+# Daylight saving will continue to start on the first Sunday in October each
 # year and finish on the first Sunday in April the following year.
-# Industrial Relations Minister, Paul Caica, says this provides South Australia 
-# with a consistent half hour time difference with NSW, Victoria, Tasmania and 
+# Industrial Relations Minister, Paul Caica, says this provides South Australia
+# with a consistent half hour time difference with NSW, Victoria, Tasmania and
 # the ACT for all 52 weeks of the year...
-# 
+#
 # We have a wrap-up here:
 # 
 # http://www.timeanddate.com/news/time/south-australia-extends-dst.html

Modified: head/contrib/tzdata/backward
==============================================================================
--- head/contrib/tzdata/backward	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/backward	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)backward	8.11
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/etcetera
==============================================================================
--- head/contrib/tzdata/etcetera	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/etcetera	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)etcetera	8.3
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/europe
==============================================================================
--- head/contrib/tzdata/europe	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/europe	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)europe	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -575,12 +574,12 @@ Rule	Russia	1996	2010	-	Oct	lastSun	 2:0
 # According to Kremlin press service, Russian President Dmitry Medvedev
 # signed a federal law "On calculation of time" on June 9, 2011.
 # According to the law Russia is abolishing daylight saving time.
-# 
-# Medvedev signed a law "On the Calculation of Time" (in russian): 
+#
+# Medvedev signed a law "On the Calculation of Time" (in russian):
 # 
 # http://bmockbe.ru/events/?ID=7583
 # 
-# 
+#
 # Medvedev signed a law on the calculation of the time (in russian):
 # 
 # http://www.regnum.ru/news/polit/1413906.html
@@ -1688,7 +1687,7 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # From Alexander Krivenyshev (2011-10-26)
 # NO need to divide Moldova into two timezones at this point.
 # As of today, Transnistria (Pridnestrovie)- Tiraspol reversed its own
-# decision to abolish DST this winter. 
+# decision to abolish DST this winter.
 # Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)-
 # Tiraspol will go back to winter time on October 30, 2011.
 # News from Moldova (in russian):
@@ -2578,11 +2577,11 @@ Zone	Europe/Zurich	0:34:08 -	LMT	1848 Se
 # http://www.alomaliye.com/bkk_2002_3769.htm
 
 # From Gökdeniz Karadağ (2011-03-10):
-# 
+#
 # According to the articles linked below, Turkey will change into summer
 # time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27.
 # This change is due to a nationwide exam on 27th.
-# 
+#
 # 
 # http://www.worldbulletin.net/?aType=haber&ArticleID=70872
 # 
@@ -2699,7 +2698,7 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # time this year after all.
 #
 # From Udo Schwedt (2011-10-18):
-# As far as I understand, the recent change to the Ukranian time zone 
+# As far as I understand, the recent change to the Ukranian time zone
 # (Europe/Kiev) to introduce permanent daylight saving time (similar
 # to Russia) was reverted today:
 #

Modified: head/contrib/tzdata/factory
==============================================================================
--- head/contrib/tzdata/factory	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/factory	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)factory	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/leapseconds
==============================================================================
--- head/contrib/tzdata/leapseconds	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/leapseconds	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)leapseconds	8.13
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -78,8 +77,8 @@ Leap	2012	Jun	30	23:59:60	+	S
 #
 #
 # A positive leap second will be introduced at the end of June 2012.
-# The sequence of dates of the UTC second markers will be:		
-# 		
+# The sequence of dates of the UTC second markers will be:
+#
 #                          2012 June 30,     23h 59m 59s
 #                          2012 June 30,     23h 59m 60s
 #                          2012 July  1,      0h  0m  0s
@@ -96,6 +95,6 @@ Leap	2012	Jun	30	23:59:60	+	S
 #
 #
 # Daniel GAMBIS
-# Head		
+# Head
 # Earth Orientation Center of IERS
 # Observatoire de Paris, France

Modified: head/contrib/tzdata/northamerica
==============================================================================
--- head/contrib/tzdata/northamerica	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/northamerica	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)northamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -479,7 +478,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1980 Apr 27 2:00
-			 -9:00	US	Y%sT	1980 Oct 26 2:00	
+			 -9:00	US	Y%sT	1980 Oct 26 2:00
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
@@ -1844,7 +1843,7 @@ Zone America/Edmonton	-7:33:52 -	LMT	190
 # Here is a summary of the three clock change events in Creston's history:
 # 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7)
 # Exact date unknown
-# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) 
+# 2. Oct 1916: switch to Pacific Standard Time (GMT-8)
 # Exact date in October unknown;  Sunday October 1 is a reasonable guess.
 # 3. June 1918: switch to Pacific Daylight Time (GMT-7)
 # Exact date in June unknown; Sunday June 2 is a reasonable guess.
@@ -2674,20 +2673,20 @@ Zone America/Costa_Rica	-5:36:20 -	LMT	1
 # except that it switches at midnight standard time as usual.
 #
 # From Steffen Thorsen (2007-10-25):
-# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week 
+# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week
 # earlier - on the last Sunday of October, just like in 2006.
-# 
+#
 # He supplied these references:
-# 
+#
 # http://www.prensalatina.com.mx/article.asp?ID=%7B4CC32C1B-A9F7-42FB-8A07-8631AFC923AF%7D&language=ES
 # http://actualidad.terra.es/sociedad/articulo/cuba_llama_ahorrar_energia_cambio_1957044.htm
-# 
+#
 # From Alex Kryvenishev (2007-10-25):
 # Here is also article from Granma (Cuba):
-# 
+#
 # [Regira] el Horario Normal desde el [proximo] domingo 28 de octubre
 # http://www.granma.cubaweb.cu/2007/10/24/nacional/artic07.html
-# 
+#
 # http://www.worldtimezone.com/dst_news/dst_news_cuba03.html
 
 # From Arthur David Olson (2008-03-09):
@@ -2771,7 +2770,7 @@ Zone America/Costa_Rica	-5:36:20 -	LMT	1
 # 
 #
 # From Steffen Thorsen (2011-10-30)
-# Cuba will end DST two weeks later this year. Instead of going back 
+# Cuba will end DST two weeks later this year. Instead of going back
 # tonight, it has been delayed to 2011-11-13 at 01:00.
 #
 # One source (Spanish)
@@ -2783,6 +2782,20 @@ Zone America/Costa_Rica	-5:36:20 -	LMT	1
 # 
 # http://www.timeanddate.com/news/time/cuba-time-changes-2011.html
 # 
+#
+# From Steffen Thorsen (2012-03-01)
+# According to Radio Reloj, Cuba will start DST on Midnight between March
+# 31 and April 1.
+#
+# Radio Reloj has the following info (Spanish):
+# 
+# http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril
+# 
+#
+# Our info on it:
+# 
+# http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html
+# 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
@@ -2820,8 +2833,9 @@ Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	
 Rule	Cuba	2009	2010	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2011	only	-	Mar	Sun>=15	0:00s	1:00	D
 Rule	Cuba	2011	only	-	Nov	13	0:00s	0	S
-Rule	Cuba	2012	max	-	Mar	Sun>=8	0:00s	1:00	D
+Rule	Cuba	2012	only	-	Apr	1	0:00s	1:00	D
 Rule	Cuba	2012	max	-	Oct	lastSun	0:00s	0	S
+Rule	Cuba	2013	max	-	Mar	Sun>=8	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890
@@ -2955,6 +2969,29 @@ Zone America/Guatemala	-6:02:04 -	LMT	19
 # From Stephen Colebourne (2007-02-22):
 # Some IATA info: Haiti won't be having DST in 2007.
 
+# From Steffen Thorsen (2012-03-11):
+# According to several news sources, Haiti will observe DST this year,
+# apparently using the same start and end date as USA/Canada.
+# So this means they have already changed their time.
+#
+# (Sources in French):
+# 
+# http://www.alterpresse.org/spip.php?article12510
+# 
+# 
+# http://radiovision2000haiti.net/home/?p=13253
+# 
+#
+# Our coverage:
+# 
+# http://www.timeanddate.com/news/time/haiti-dst-2012.html
+# 
+
+# From Arthur David Olson (2012-03-11):
+# The alterpresse.org source seems to show a US-style leap from 2:00 a.m. to
+# 3:00 a.m. rather than the traditional Haitian jump at midnight.
+# Assume a US-style fall back as well XXX.
+# Do not yet assume that the change carries forward past 2012 XXX.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Haiti	1983	only	-	May	8	0:00	1:00	D
@@ -2966,6 +3003,8 @@ Rule	Haiti	1988	1997	-	Apr	Sun>=1	1:00s	
 Rule	Haiti	1988	1997	-	Oct	lastSun	1:00s	0	S
 Rule	Haiti	2005	2006	-	Apr	Sun>=1	0:00	1:00	D
 Rule	Haiti	2005	2006	-	Oct	lastSun	0:00	0	S
+Rule	Haiti	2012	only	-	Mar	Sun>=8	2:00	1:00	D
+Rule	Haiti	2012	only	-	Nov	Sun>=1	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Port-au-Prince -4:49:20 -	LMT	1890
 			-4:49	-	PPMT	1917 Jan 24 12:00 # P-a-P MT

Modified: head/contrib/tzdata/pacificnew
==============================================================================
--- head/contrib/tzdata/pacificnew	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/pacificnew	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)pacificnew	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/southamerica
==============================================================================
--- head/contrib/tzdata/southamerica	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/southamerica	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)southamerica	8.53
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -232,7 +231,7 @@ Rule	Arg	2000	only	-	Mar	3	0:00	0	-
 Rule	Arg	2007	only	-	Dec	30	0:00	1:00	S
 Rule	Arg	2008	2009	-	Mar	Sun>=15	0:00	0	-
 Rule	Arg	2008	only	-	Oct	Sun>=15	0:00	1:00	S
- 
+
 # From Mariano Absatz (2004-05-21):
 # Today it was officially published that the Province of Mendoza is changing
 # its timezone this winter... starting tomorrow night....
@@ -322,9 +321,9 @@ Rule	Arg	2008	only	-	Oct	Sun>=15	0:00	1:
 # confirms what Alex Krivenyshev has earlier sent to the tz
 # emailing list about that San Luis plans to return to standard
 # time much earlier than the rest of the country. It also
-# confirms that upon request the provinces San Juan and Mendoza 
-# refused to follow San Luis in this change. 
-# 
+# confirms that upon request the provinces San Juan and Mendoza
+# refused to follow San Luis in this change.
+#
 # The change is supposed to take place Monday the 21.st at 0:00
 # hours. As far as I understand it if this goes ahead, we need
 # a new timezone for San Luis (although there are also documented
@@ -386,7 +385,7 @@ Rule	Arg	2008	only	-	Oct	Sun>=15	0:00	1:
 # 
 # http://www.lanacion.com.ar/nota.asp?nota_id=1107912
 # 
-# 
+#
 # The press release says:
 #  (...) anunció que el próximo domingo a las 00:00 los puntanos deberán
 # atrasar una hora sus relojes.
@@ -800,8 +799,8 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # From Alexander Krivenyshev (2011-10-04):
 # State Bahia will return to Daylight savings time this year after 8 years off.
-# The announcement was made by Governor Jaques Wagner in an interview to a 
-# television station in Salvador. 
+# The announcement was made by Governor Jaques Wagner in an interview to a
+# television station in Salvador.
 
 # In Portuguese:
 # 
@@ -1160,7 +1159,7 @@ Zone America/Rio_Branco	-4:31:12 -	LMT	1
 # Due to drought, Chile extends Daylight Time in three weeks.  This
 # is one-time change (Saturday 3/29 at 24:00 for America/Santiago
 # and Saturday 3/29 at 22:00 for Pacific/Easter)
-# The Supreme Decree is located at 
+# The Supreme Decree is located at
 # 
 # http://www.shoa.cl/servicios/supremo316.pdf
 # 
@@ -1171,7 +1170,7 @@ Zone America/Rio_Branco	-4:31:12 -	LMT	1
 
 # From Jose Miguel Garrido (2008-03-05):
 # ...
-# You could see the announces of the change on 
+# You could see the announces of the change on
 # 
 # http://www.shoa.cl/noticias/2008/04hora/hora.htm
 # .

Modified: head/contrib/tzdata/systemv
==============================================================================
--- head/contrib/tzdata/systemv	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/systemv	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)systemv	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/yearistype.sh
==============================================================================
--- head/contrib/tzdata/yearistype.sh	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/yearistype.sh	Thu Sep 13 10:17:01 2012	(r240457)
@@ -3,8 +3,6 @@
 : 'This file is in the public domain, so clarified as of'
 : '2006-07-17 by Arthur David Olson.'
 
-: '@(#)yearistype.sh	8.2'
-
 case $#-$1 in
 	2-|2-0*|2-*[!0-9]*)
 		echo "$0: wild year - $1" >&2

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Thu Sep 13 10:12:45 2012	(r240456)
+++ head/contrib/tzdata/zone.tab	Thu Sep 13 10:17:01 2012	(r240457)
@@ -1,5 +1,4 @@
 # 
-# @(#)zone.tab	8.54
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -131,7 +130,7 @@ CA	+5333-11328	America/Edmonton	Mountain
 CA	+690650-1050310	America/Cambridge_Bay	Mountain Time - west Nunavut
 CA	+6227-11421	America/Yellowknife	Mountain Time - central Northwest Territories
 CA	+682059-1334300	America/Inuvik	Mountain Time - west Northwest Territories
-CA	+4906-11631	America/Creston		Mountain Standard Time - Creston, British Columbia
+CA	+4906-11631	America/Creston	Mountain Standard Time - Creston, British Columbia
 CA	+5946-12014	America/Dawson_Creek	Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
 CA	+4916-12307	America/Vancouver	Pacific Time - west British Columbia
 CA	+6043-13503	America/Whitehorse	Pacific Time - south Yukon

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 10:19:16 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id EB829106564A;
	Thu, 13 Sep 2012 10:19:16 +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 645D78FC18;
	Thu, 13 Sep 2012 10:19:14 +0000 (UTC)
Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8DAJKUM069638;
	Thu, 13 Sep 2012 13:19:20 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id
	q8DAJ7Ye020945; Thu, 13 Sep 2012 13:19:07 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8DAJ74a020944; 
	Thu, 13 Sep 2012 13:19:07 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Thu, 13 Sep 2012 13:19:07 +0300
From: Konstantin Belousov 
To: Arthur Mesh 
Message-ID: <20120913101907.GT37286@deviant.kiev.zoral.com.ua>
References: <20120911205345.GD14077@x96.org>
	<20120912043302.GN37286@deviant.kiev.zoral.com.ua>
	<20120912154941.GG14077@x96.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="JHjDRUnf1JOMxzko"
Content-Disposition: inline
In-Reply-To: <20120912154941.GG14077@x96.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r240135 - in head/sys: amd64/conf conf dev/random
 i386/conf modules/random
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 10:19:17 -0000


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

On Wed, Sep 12, 2012 at 08:49:41AM -0700, Arthur Mesh wrote:
> On Wed, Sep 12, 2012 at 07:33:02AM +0300, Konstantin Belousov wrote:
> > Can you submit the desired patch ?
>=20
> Sure,
>=20
> Index: sys/i386/conf/GENERIC
=2E..
This did not compile, since the files.{i386,amd64} missed the required
changes (the option names are spelled lowercase in files.*).

I committed the updated patch, thanks.

--JHjDRUnf1JOMxzko
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlBRsxsACgkQC3+MBN1Mb4i78ACgrA01DQAlnTvfpQdrrO8hAi3O
BgYAoLIPK92b3TMU5ut+DNp1CF6NQS5B
=tkUU
-----END PGP SIGNATURE-----

--JHjDRUnf1JOMxzko--

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 10:26:56 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9004D1065670;
	Thu, 13 Sep 2012 10:26:56 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B2A68FC08;
	Thu, 13 Sep 2012 10:26:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DAQuhq074197;
	Thu, 13 Sep 2012 10:26:56 GMT (envelope-from ivoras@svn.freebsd.org)
Received: (from ivoras@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DAQuTq074195;
	Thu, 13 Sep 2012 10:26:56 GMT (envelope-from ivoras@svn.freebsd.org)
Message-Id: <201209131026.q8DAQuTq074195@svn.freebsd.org>
From: Ivan Voras 
Date: Thu, 13 Sep 2012 10:26: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: r240462 - head/share/man/man5
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 10:26:56 -0000

Author: ivoras
Date: Thu Sep 13 10:26:55 2012
New Revision: 240462
URL: http://svn.freebsd.org/changeset/base/240462

Log:
  Document the *_chroot, *_user, *_group and *_nice knobs for services started
  by rcng.
  
  Reviewed by:	wblock, dougb

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

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Thu Sep 13 10:25:42 2012	(r240461)
+++ head/share/man/man5/rc.conf.5	Thu Sep 13 10:26:55 2012	(r240462)
@@ -168,6 +168,22 @@ If set to
 .Dq Li NO ,
 no swapfile is installed, otherwise the value is used as the full
 pathname to a file to use for additional swap space.
+.It Va Ns Ao Ar name Ac Ns Va _chroot
+.Pq Vt str
+.Xr chroot
+to this directory before running the service.
+.It Va Ns Ao Ar name Ac Ns Va _user
+.Pq Vt str
+Run the service under this user account.
+.It Va Ns Ao Ar name Ac Ns Va _group
+.Pq Vt str
+Run the chrooted service under this system group. Unlike the _user
+setting, this setting has no effect if the service is not chrooted.
+.It Ns Ao Ar name Ac Ns Va _nice
+.Pq Vt int
+The
+.Xr nice 1
+value to run the service under.
 .It Va apm_enable
 .Pq Vt bool
 If set to

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 12:55:11 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2C593106566C;
	Thu, 13 Sep 2012 12:55:11 +0000 (UTC)
	(envelope-from zont@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 127A88FC12;
	Thu, 13 Sep 2012 12:55:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DCtAY7000631;
	Thu, 13 Sep 2012 12:55:10 GMT (envelope-from zont@svn.freebsd.org)
Received: (from zont@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DCtAgc000630;
	Thu, 13 Sep 2012 12:55:10 GMT (envelope-from zont@svn.freebsd.org)
Message-Id: <201209131255.q8DCtAgc000630@svn.freebsd.org>
From: Andrey Zonov 
Date: Thu, 13 Sep 2012 12:55: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: r240463 - head/sbin/fsck_ffs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 12:55:11 -0000

Author: zont
Date: Thu Sep 13 12:55:10 2012
New Revision: 240463
URL: http://svn.freebsd.org/changeset/base/240463

Log:
  - Fix a typo in debug message.
  
  Approved by:	kib (mentor)
  MFC after:	3 days

Modified:
  head/sbin/fsck_ffs/suj.c

Modified: head/sbin/fsck_ffs/suj.c
==============================================================================
--- head/sbin/fsck_ffs/suj.c	Thu Sep 13 10:26:55 2012	(r240462)
+++ head/sbin/fsck_ffs/suj.c	Thu Sep 13 12:55:10 2012	(r240463)
@@ -882,7 +882,7 @@ ino_isat(ino_t parent, off_t diroff, ino
 				printf("Directory %d has bad mode %o\n",
 				    parent, *mode);
 			else
-				printf("Directory %d zero inode\n", parent);
+				printf("Directory %d has zero mode\n", parent);
 		}
 		return (0);
 	}

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 13:05:46 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 91BE7106566C;
	Thu, 13 Sep 2012 13:05: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 645908FC08;
	Thu, 13 Sep 2012 13:05:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DD5kDx002794;
	Thu, 13 Sep 2012 13:05:46 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DD5kbF002792;
	Thu, 13 Sep 2012 13:05:46 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201209131305.q8DD5kbF002792@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 13 Sep 2012 13:05: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: r240464 - head/sys/fs/deadfs
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 13:05:46 -0000

Author: kib
Date: Thu Sep 13 13:05:45 2012
New Revision: 240464
URL: http://svn.freebsd.org/changeset/base/240464

Log:
  The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively,
  which is an elaborate way to cause kernel panic. Change the VOPs
  implementation to return EBADF for a reclaimed vnode.
  
  While the calls to vop_bmap should not reach deadfs, it is indeed
  possible for vop_ioctl, because the VOP locking protocol is to pass
  the vnode to VOP unlocked. The actual panic was observed when ioctl
  was called on procfs filedescriptor which pointed to an exited
  process.
  
  Reported by:	zont
  Tested by:	pho
  MFC after:	1 week

Modified:
  head/sys/fs/deadfs/dead_vnops.c

Modified: head/sys/fs/deadfs/dead_vnops.c
==============================================================================
--- head/sys/fs/deadfs/dead_vnops.c	Thu Sep 13 12:55:10 2012	(r240463)
+++ head/sys/fs/deadfs/dead_vnops.c	Thu Sep 13 13:05:45 2012	(r240464)
@@ -41,8 +41,6 @@
 /*
  * Prototypes for dead operations on vnodes.
  */
-static vop_bmap_t	dead_bmap;
-static vop_ioctl_t	dead_ioctl;
 static vop_lookup_t	dead_lookup;
 static vop_open_t	dead_open;
 static vop_poll_t	dead_poll;
@@ -56,12 +54,12 @@ struct vop_vector dead_vnodeops = {
 
 	.vop_access =		VOP_EBADF,
 	.vop_advlock =		VOP_EBADF,
-	.vop_bmap =		dead_bmap,
+	.vop_bmap =		VOP_EBADF,
 	.vop_create =		VOP_PANIC,
 	.vop_getattr =		VOP_EBADF,
 	.vop_getwritemount =	dead_getwritemount,
 	.vop_inactive =		VOP_NULL,
-	.vop_ioctl =		dead_ioctl,
+	.vop_ioctl =		VOP_EBADF,
 	.vop_link =		VOP_PANIC,
 	.vop_lookup =		dead_lookup,
 	.vop_mkdir =		VOP_PANIC,
@@ -166,43 +164,6 @@ dead_write(ap)
 }
 
 /*
- * Device ioctl operation.
- */
-/* ARGSUSED */
-static int
-dead_ioctl(ap)
-	struct vop_ioctl_args /* {
-		struct vnode *a_vp;
-		u_long  a_command;
-		caddr_t  a_data;
-		int  a_fflag;
-		struct ucred *a_cred;
-		struct proc *a_p;
-	} */ *ap;
-{
-	/* XXX: Doesn't this just recurse back here ? */
-	return (VOP_IOCTL_AP(ap));
-}
-
-/*
- * Wait until the vnode has finished changing state.
- */
-static int
-dead_bmap(ap)
-	struct vop_bmap_args /* {
-		struct vnode *a_vp;
-		daddr_t  a_bn;
-		struct bufobj **a_bop;
-		daddr_t *a_bnp;
-		int *a_runp;
-		int *a_runb;
-	} */ *ap;
-{
-
-	return (VOP_BMAP(ap->a_vp, ap->a_bn, ap->a_bop, ap->a_bnp, ap->a_runp, ap->a_runb));
-}
-
-/*
  * Trivial poll routine that always returns POLLHUP.
  * This is necessary so that a process which is polling a file
  * gets notified when that file is revoke()d.

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 13:27:10 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 37D5A1065674;
	Thu, 13 Sep 2012 13:27:10 +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 20DB58FC15;
	Thu, 13 Sep 2012 13:27:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DDRAD0006443;
	Thu, 13 Sep 2012 13:27:10 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DDR9xQ006428;
	Thu, 13 Sep 2012 13:27:09 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201209131327.q8DDR9xQ006428@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 13 Sep 2012 13:27: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: r240465 - in head: sbin/geom/class/raid sys/geom/raid
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 13:27:10 -0000

Author: mav
Date: Thu Sep 13 13:27:09 2012
New Revision: 240465
URL: http://svn.freebsd.org/changeset/base/240465

Log:
  Add global and per-module sysctls/tunables to enable/disable metadata taste.
  That should help to handle some cases when disk has some RAID metadata that
  should be ignored, especially during boot.
  
  MFC after:	3 days

Modified:
  head/sbin/geom/class/raid/graid.8
  head/sys/geom/raid/g_raid.c
  head/sys/geom/raid/g_raid.h
  head/sys/geom/raid/md_ddf.c
  head/sys/geom/raid/md_intel.c
  head/sys/geom/raid/md_jmicron.c
  head/sys/geom/raid/md_nvidia.c
  head/sys/geom/raid/md_promise.c
  head/sys/geom/raid/md_sii.c
  head/sys/geom/raid/tr_concat.c
  head/sys/geom/raid/tr_raid0.c
  head/sys/geom/raid/tr_raid1.c
  head/sys/geom/raid/tr_raid1e.c
  head/sys/geom/raid/tr_raid5.c

Modified: head/sbin/geom/class/raid/graid.8
==============================================================================
--- head/sbin/geom/class/raid/graid.8	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sbin/geom/class/raid/graid.8	Thu Sep 13 13:27:09 2012	(r240465)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 6, 2012
+.Dd September 13, 2012
 .Dt GRAID 8
 .Os
 .Sh NAME
@@ -293,6 +293,8 @@ Mark volume as clean when idle for the s
 Debug level of the
 .Nm RAID
 GEOM class.
+.It Va kern.geom.raid.enable : No 1
+Enable on-disk metadata taste.
 .It Va kern.geom.raid.idle_threshold : No 1000000
 Time in microseconds to consider a volume idle for rebuild purposes.
 .It Va kern.geom.raid.name_format : No 0
@@ -302,6 +304,8 @@ Number of read errors equated to disk fa
 Write errors are always considered as disk failures.
 .It Va kern.geom.raid.start_timeout : No 30
 Time to wait for missing array components on startup.
+.It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1
+Enable taste for specific metadata or transformation module.
 .El
 .Sh EXIT STATUS
 Exit status is 0 on success, and non-zero if the command fails.

Modified: head/sys/geom/raid/g_raid.c
==============================================================================
--- head/sys/geom/raid/g_raid.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/g_raid.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -52,6 +52,10 @@ static MALLOC_DEFINE(M_RAID, "raid_data"
 
 SYSCTL_DECL(_kern_geom);
 SYSCTL_NODE(_kern_geom, OID_AUTO, raid, CTLFLAG_RW, 0, "GEOM_RAID stuff");
+int g_raid_enable = 1;
+TUNABLE_INT("kern.geom.raid.enable", &g_raid_enable);
+SYSCTL_INT(_kern_geom_raid, OID_AUTO, enable, CTLFLAG_RW,
+    &g_raid_enable, 0, "Enable on-disk metadata taste");
 u_int g_raid_aggressive_spare = 0;
 TUNABLE_INT("kern.geom.raid.aggressive_spare", &g_raid_aggressive_spare);
 SYSCTL_UINT(_kern_geom_raid, OID_AUTO, aggressive_spare, CTLFLAG_RW,
@@ -1922,6 +1926,8 @@ int g_raid_start_volume(struct g_raid_vo
 
 	G_RAID_DEBUG1(2, vol->v_softc, "Starting volume %s.", vol->v_name);
 	LIST_FOREACH(class, &g_raid_tr_classes, trc_list) {
+		if (!class->trc_enable)
+			continue;
 		G_RAID_DEBUG1(2, vol->v_softc,
 		    "Tasting volume %s for %s transformation.",
 		    vol->v_name, class->name);
@@ -2144,6 +2150,8 @@ g_raid_taste(struct g_class *mp, struct 
 
 	g_topology_assert();
 	g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name);
+	if (!g_raid_enable)
+		return (NULL);
 	G_RAID_DEBUG(2, "Tasting provider %s.", pp->name);
 
 	gp = g_new_geomf(mp, "raid:taste");
@@ -2156,6 +2164,8 @@ g_raid_taste(struct g_class *mp, struct 
 
 	geom = NULL;
 	LIST_FOREACH(class, &g_raid_md_classes, mdc_list) {
+		if (!class->mdc_enable)
+			continue;
 		G_RAID_DEBUG(2, "Tasting provider %s for %s metadata.",
 		    pp->name, class->name);
 		obj = (void *)kobj_create((kobj_class_t)class, M_RAID,

Modified: head/sys/geom/raid/g_raid.h
==============================================================================
--- head/sys/geom/raid/g_raid.h	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/g_raid.h	Thu Sep 13 13:27:09 2012	(r240465)
@@ -33,6 +33,9 @@
 #include 
 #include 
 #include 
+#ifdef _KERNEL
+#include 
+#endif
 
 #define	G_RAID_CLASS_NAME	"RAID"
 
@@ -51,6 +54,7 @@ struct g_raid_tr_object;
 #ifdef _KERNEL
 extern u_int g_raid_aggressive_spare;
 extern u_int g_raid_debug;
+extern int g_raid_enable;
 extern int g_raid_read_err_thresh;
 extern u_int g_raid_start_timeout;
 extern struct g_class g_raid_class;
@@ -322,11 +326,14 @@ struct g_raid_softc {
 };
 #define	sc_name	sc_geom->name
 
+SYSCTL_DECL(_kern_geom_raid);
+
 /*
  * KOBJ parent class of metadata processing modules.
  */
 struct g_raid_md_class {
 	KOBJ_CLASS_FIELDS;
+	int		 mdc_enable;
 	int		 mdc_priority;
 	LIST_ENTRY(g_raid_md_class) mdc_list;
 };
@@ -342,20 +349,29 @@ struct g_raid_md_object {
 
 int g_raid_md_modevent(module_t, int, void *);
 
-#define	G_RAID_MD_DECLARE(name)					\
-    static moduledata_t name##_mod = {				\
-	#name,							\
+#define	G_RAID_MD_DECLARE(name, label)				\
+    static moduledata_t g_raid_md_##name##_mod = {		\
+	"g_raid_md_" __XSTRING(name),				\
 	g_raid_md_modevent,					\
-	&name##_class						\
+	&g_raid_md_##name##_class				\
     };								\
-    DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND);	\
-    MODULE_DEPEND(name, geom_raid, 0, 0, 0)
+    DECLARE_MODULE(g_raid_md_##name, g_raid_md_##name##_mod,	\
+	SI_SUB_DRIVERS, SI_ORDER_SECOND);			\
+    MODULE_DEPEND(g_raid_md_##name, geom_raid, 0, 0, 0);	\
+    SYSCTL_NODE(_kern_geom_raid, OID_AUTO, name, CTLFLAG_RD,	\
+	NULL, label " metadata module");			\
+    SYSCTL_INT(_kern_geom_raid_##name, OID_AUTO, enable,	\
+	CTLFLAG_RW, &g_raid_md_##name##_class.mdc_enable, 0,	\
+	"Enable " label " metadata format taste");		\
+    TUNABLE_INT("kern.geom.raid." __XSTRING(name) ".enable",	\
+	&g_raid_md_##name##_class.mdc_enable)
 
 /*
  * KOBJ parent class of data transformation modules.
  */
 struct g_raid_tr_class {
 	KOBJ_CLASS_FIELDS;
+	int		 trc_enable;
 	int		 trc_priority;
 	LIST_ENTRY(g_raid_tr_class) trc_list;
 };
@@ -371,14 +387,22 @@ struct g_raid_tr_object {
 
 int g_raid_tr_modevent(module_t, int, void *);
 
-#define	G_RAID_TR_DECLARE(name)					\
-    static moduledata_t name##_mod = {				\
-	#name,							\
+#define	G_RAID_TR_DECLARE(name, label)				\
+    static moduledata_t g_raid_tr_##name##_mod = {		\
+	"g_raid_tr_" __XSTRING(name),				\
 	g_raid_tr_modevent,					\
-	&name##_class						\
+	&g_raid_tr_##name##_class				\
     };								\
-    DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);	\
-    MODULE_DEPEND(name, geom_raid, 0, 0, 0)
+    DECLARE_MODULE(g_raid_tr_##name, g_raid_tr_##name##_mod,	\
+	SI_SUB_DRIVERS, SI_ORDER_FIRST);			\
+    MODULE_DEPEND(g_raid_tr_##name, geom_raid, 0, 0, 0);	\
+    SYSCTL_NODE(_kern_geom_raid, OID_AUTO, name, CTLFLAG_RD,	\
+	NULL, label " transformation module");			\
+    SYSCTL_INT(_kern_geom_raid_##name, OID_AUTO, enable,	\
+	CTLFLAG_RW, &g_raid_tr_##name##_class.trc_enable, 0,	\
+	"Enable " label " transformation module taste");	\
+    TUNABLE_INT("kern.geom.raid." __XSTRING(name) ".enable",	\
+	&g_raid_tr_##name##_class.trc_enable)
 
 const char * g_raid_volume_level2str(int level, int qual);
 int g_raid_volume_str2level(const char *str, int *level, int *qual);

Modified: head/sys/geom/raid/md_ddf.c
==============================================================================
--- head/sys/geom/raid/md_ddf.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/md_ddf.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -125,6 +125,7 @@ static struct g_raid_md_class g_raid_md_
 	"DDF",
 	g_raid_md_ddf_methods,
 	sizeof(struct g_raid_md_ddf_object),
+	.mdc_enable = 1,
 	.mdc_priority = 100
 };
 
@@ -3065,4 +3066,4 @@ g_raid_md_free_ddf(struct g_raid_md_obje
 	return (0);
 }
 
-G_RAID_MD_DECLARE(g_raid_md_ddf);
+G_RAID_MD_DECLARE(ddf, "DDF");

Modified: head/sys/geom/raid/md_intel.c
==============================================================================
--- head/sys/geom/raid/md_intel.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/md_intel.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -224,6 +224,7 @@ static struct g_raid_md_class g_raid_md_
 	"Intel",
 	g_raid_md_intel_methods,
 	sizeof(struct g_raid_md_intel_object),
+	.mdc_enable = 1,
 	.mdc_priority = 100
 };
 
@@ -2432,4 +2433,4 @@ g_raid_md_free_intel(struct g_raid_md_ob
 	return (0);
 }
 
-G_RAID_MD_DECLARE(g_raid_md_intel);
+G_RAID_MD_DECLARE(intel, "Intel");

Modified: head/sys/geom/raid/md_jmicron.c
==============================================================================
--- head/sys/geom/raid/md_jmicron.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/md_jmicron.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -132,6 +132,7 @@ static struct g_raid_md_class g_raid_md_
 	"JMicron",
 	g_raid_md_jmicron_methods,
 	sizeof(struct g_raid_md_jmicron_object),
+	.mdc_enable = 1,
 	.mdc_priority = 100
 };
 
@@ -1581,4 +1582,4 @@ g_raid_md_free_jmicron(struct g_raid_md_
 	return (0);
 }
 
-G_RAID_MD_DECLARE(g_raid_md_jmicron);
+G_RAID_MD_DECLARE(jmicron, "JMicron");

Modified: head/sys/geom/raid/md_nvidia.c
==============================================================================
--- head/sys/geom/raid/md_nvidia.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/md_nvidia.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -143,6 +143,7 @@ static struct g_raid_md_class g_raid_md_
 	"NVIDIA",
 	g_raid_md_nvidia_methods,
 	sizeof(struct g_raid_md_nvidia_object),
+	.mdc_enable = 1,
 	.mdc_priority = 100
 };
 
@@ -1600,4 +1601,4 @@ g_raid_md_free_nvidia(struct g_raid_md_o
 	return (0);
 }
 
-G_RAID_MD_DECLARE(g_raid_md_nvidia);
+G_RAID_MD_DECLARE(nvidia, "NVIDIA");

Modified: head/sys/geom/raid/md_promise.c
==============================================================================
--- head/sys/geom/raid/md_promise.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/md_promise.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -171,6 +171,7 @@ static struct g_raid_md_class g_raid_md_
 	"Promise",
 	g_raid_md_promise_methods,
 	sizeof(struct g_raid_md_object),
+	.mdc_enable = 1,
 	.mdc_priority = 100
 };
 
@@ -1967,4 +1968,4 @@ g_raid_md_free_promise(struct g_raid_md_
 	return (0);
 }
 
-G_RAID_MD_DECLARE(g_raid_md_promise);
+G_RAID_MD_DECLARE(promise, "Promise");

Modified: head/sys/geom/raid/md_sii.c
==============================================================================
--- head/sys/geom/raid/md_sii.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/md_sii.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -140,6 +140,7 @@ static struct g_raid_md_class g_raid_md_
 	"SiI",
 	g_raid_md_sii_methods,
 	sizeof(struct g_raid_md_sii_object),
+	.mdc_enable = 1,
 	.mdc_priority = 100
 };
 
@@ -1688,4 +1689,4 @@ g_raid_md_free_sii(struct g_raid_md_obje
 	return (0);
 }
 
-G_RAID_MD_DECLARE(g_raid_md_sii);
+G_RAID_MD_DECLARE(sii, "SiI");

Modified: head/sys/geom/raid/tr_concat.c
==============================================================================
--- head/sys/geom/raid/tr_concat.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/tr_concat.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -73,6 +73,7 @@ static struct g_raid_tr_class g_raid_tr_
 	"CONCAT",
 	g_raid_tr_concat_methods,
 	sizeof(struct g_raid_tr_concat_object),
+	.trc_enable = 1,
 	.trc_priority = 50
 };
 
@@ -340,4 +341,4 @@ g_raid_tr_free_concat(struct g_raid_tr_o
 	return (0);
 }
 
-G_RAID_TR_DECLARE(g_raid_tr_concat);
+G_RAID_TR_DECLARE(concat, "CONCAT");

Modified: head/sys/geom/raid/tr_raid0.c
==============================================================================
--- head/sys/geom/raid/tr_raid0.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/tr_raid0.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -73,6 +73,7 @@ static struct g_raid_tr_class g_raid_tr_
 	"RAID0",
 	g_raid_tr_raid0_methods,
 	sizeof(struct g_raid_tr_raid0_object),
+	.trc_enable = 1,
 	.trc_priority = 100
 };
 
@@ -323,4 +324,4 @@ g_raid_tr_free_raid0(struct g_raid_tr_ob
 	return (0);
 }
 
-G_RAID_TR_DECLARE(g_raid_tr_raid0);
+G_RAID_TR_DECLARE(raid0, "RAID0");

Modified: head/sys/geom/raid/tr_raid1.c
==============================================================================
--- head/sys/geom/raid/tr_raid1.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/tr_raid1.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$");
 #include "geom/raid/g_raid.h"
 #include "g_raid_tr_if.h"
 
-SYSCTL_DECL(_kern_geom_raid);
-static SYSCTL_NODE(_kern_geom_raid, OID_AUTO, raid1, CTLFLAG_RW, 0,
-    "RAID1 parameters");
+SYSCTL_DECL(_kern_geom_raid_raid1);
 
 #define RAID1_REBUILD_SLAB	(1 << 20) /* One transation in a rebuild */
 static int g_raid1_rebuild_slab = RAID1_REBUILD_SLAB;
@@ -131,6 +129,7 @@ static struct g_raid_tr_class g_raid_tr_
 	"RAID1",
 	g_raid_tr_raid1_methods,
 	sizeof(struct g_raid_tr_raid1_object),
+	.trc_enable = 1,
 	.trc_priority = 100
 };
 
@@ -996,4 +995,4 @@ g_raid_tr_free_raid1(struct g_raid_tr_ob
 	return (0);
 }
 
-G_RAID_TR_DECLARE(g_raid_tr_raid1);
+G_RAID_TR_DECLARE(raid1, "RAID1");

Modified: head/sys/geom/raid/tr_raid1e.c
==============================================================================
--- head/sys/geom/raid/tr_raid1e.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/tr_raid1e.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$");
 
 #define N	2
 
-SYSCTL_DECL(_kern_geom_raid);
-static SYSCTL_NODE(_kern_geom_raid, OID_AUTO, raid1e, CTLFLAG_RW, 0,
-    "RAID1E parameters");
+SYSCTL_DECL(_kern_geom_raid_raid1e);
 
 #define RAID1E_REBUILD_SLAB	(1 << 20) /* One transation in a rebuild */
 static int g_raid1e_rebuild_slab = RAID1E_REBUILD_SLAB;
@@ -135,6 +133,7 @@ static struct g_raid_tr_class g_raid_tr_
 	"RAID1E",
 	g_raid_tr_raid1e_methods,
 	sizeof(struct g_raid_tr_raid1e_object),
+	.trc_enable = 1,
 	.trc_priority = 200
 };
 
@@ -1236,4 +1235,4 @@ g_raid_tr_free_raid1e(struct g_raid_tr_o
 	return (0);
 }
 
-G_RAID_TR_DECLARE(g_raid_tr_raid1e);
+G_RAID_TR_DECLARE(raid1e, "RAID1E");

Modified: head/sys/geom/raid/tr_raid5.c
==============================================================================
--- head/sys/geom/raid/tr_raid5.c	Thu Sep 13 13:05:45 2012	(r240464)
+++ head/sys/geom/raid/tr_raid5.c	Thu Sep 13 13:27:09 2012	(r240465)
@@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$");
 #include "geom/raid/g_raid.h"
 #include "g_raid_tr_if.h"
 
-SYSCTL_DECL(_kern_geom_raid);
-
 static MALLOC_DEFINE(M_TR_RAID5, "tr_raid5_data", "GEOM_RAID RAID5 data");
 
 #define TR_RAID5_NONE 0
@@ -95,6 +93,7 @@ static struct g_raid_tr_class g_raid_tr_
 	"RAID5",
 	g_raid_tr_raid5_methods,
 	sizeof(struct g_raid_tr_raid5_object),
+	.trc_enable = 1,
 	.trc_priority = 100
 };
 
@@ -419,4 +418,4 @@ g_raid_tr_free_raid5(struct g_raid_tr_ob
 	return (0);
 }
 
-G_RAID_TR_DECLARE(g_raid_tr_raid5);
+G_RAID_TR_DECLARE(raid5, "RAID5");

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 14:27:55 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2D8631065706;
	Thu, 13 Sep 2012 14:27:55 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id F37D58FC17;
	Thu, 13 Sep 2012 14:27:54 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 61B36B972;
	Thu, 13 Sep 2012 10:27:54 -0400 (EDT)
From: John Baldwin 
To: Peter Grehan 
Date: Thu, 13 Sep 2012 08:59:38 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; )
References: <201209130036.q8D0aleB080371@svn.freebsd.org>
In-Reply-To: <201209130036.q8D0aleB080371@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201209130859.38153.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
	(bigwig.baldwin.cx); Thu, 13 Sep 2012 10:27:54 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 14:27:55 -0000

On Wednesday, September 12, 2012 8:36:47 pm Peter Grehan wrote:
> Author: grehan
> Date: Thu Sep 13 00:36:46 2012
> New Revision: 240427
> URL: http://svn.freebsd.org/changeset/base/240427
> 
> Log:
>   Relax requirement of certain mb()s
>   
>   Submitted by:	Bryan Venteicher bryanv at daemoninthecloset org
> 
> Modified:
>   head/sys/dev/virtio/virtqueue.c
> 
> Modified: head/sys/dev/virtio/virtqueue.c
> 
==============================================================================
> --- head/sys/dev/virtio/virtqueue.c	Wed Sep 12 22:54:11 2012	(r240426)
> +++ head/sys/dev/virtio/virtqueue.c	Thu Sep 13 00:36:46 2012	(r240427)
> @@ -525,7 +525,7 @@ virtqueue_dequeue(struct virtqueue *vq, 
>  	used_idx = vq->vq_used_cons_idx++ & (vq->vq_nentries - 1);
>  	uep = &vq->vq_ring.used->ring[used_idx];
>  
> -	mb();
> +	rmb();
>  	desc_idx = (uint16_t) uep->id;
>  	if (len != NULL)
>  		*len = uep->len;
> @@ -623,7 +623,7 @@ vq_ring_update_avail(struct virtqueue *v
>  	avail_idx = vq->vq_ring.avail->idx & (vq->vq_nentries - 1);
>  	vq->vq_ring.avail->ring[avail_idx] = desc_idx;
>  
> -	mb();
> +	wmb();
>  	vq->vq_ring.avail->idx++;
>  
>  	/* Keep pending count until virtqueue_notify(). */

Would it be possible to use atomic_load/store() instead of direct
memory barriers?  For example:

	desc_idx = (uint16_t)atomic_load_acq_int(&uep->id);

and

	atomic_store_rel_int(&vq->vq_ring.avail->ring[avail_idx], desc_idx);

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 14:40:25 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36022106566B;
	Thu, 13 Sep 2012 14:40:25 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 212338FC08;
	Thu, 13 Sep 2012 14:40:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DEeOaS017118;
	Thu, 13 Sep 2012 14:40:24 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DEeOsV017116;
	Thu, 13 Sep 2012 14:40:24 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201209131440.q8DEeOsV017116@svn.freebsd.org>
From: Eitan Adler 
Date: Thu, 13 Sep 2012 14:40: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: r240466 - head/sys/dev/ixgbe
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 14:40:25 -0000

Author: eadler
Date: Thu Sep 13 14:40:24 2012
New Revision: 240466
URL: http://svn.freebsd.org/changeset/base/240466

Log:
  Define missing DEBUGOUT# macros. DEBUGOUT[45] are not yet used but are
  being defined pre-emptively to avoid future build breakage
  
  PR:		kern/168967
  Submitted by:	fuzhli 
  Approved by:	cperciva
  MFC after:	1 week

Modified:
  head/sys/dev/ixgbe/ixgbe_osdep.h

Modified: head/sys/dev/ixgbe/ixgbe_osdep.h
==============================================================================
--- head/sys/dev/ixgbe/ixgbe_osdep.h	Thu Sep 13 13:27:09 2012	(r240465)
+++ head/sys/dev/ixgbe/ixgbe_osdep.h	Thu Sep 13 14:40:24 2012	(r240466)
@@ -69,12 +69,17 @@
 	#define DEBUGOUT1(S,A)      printf(S "\n",A)
 	#define DEBUGOUT2(S,A,B)    printf(S "\n",A,B)
 	#define DEBUGOUT3(S,A,B,C)  printf(S "\n",A,B,C)
+	#define DEBUGOUT4(S,A,B,C,D)  printf(S "\n",A,B,C,D)
+	#define DEBUGOUT5(S,A,B,C,D,E)  printf(S "\n",A,B,C,D,E)
+	#define DEBUGOUT6(S,A,B,C,D,E,F)  printf(S "\n",A,B,C,D,E,F)
 	#define DEBUGOUT7(S,A,B,C,D,E,F,G)  printf(S "\n",A,B,C,D,E,F,G)
 #else
 	#define DEBUGOUT(S)
 	#define DEBUGOUT1(S,A)
 	#define DEBUGOUT2(S,A,B)
 	#define DEBUGOUT3(S,A,B,C)
+	#define DEBUGOUT4(S,A,B,C,D)
+	#define DEBUGOUT5(S,A,B,C,D,E)
 	#define DEBUGOUT6(S,A,B,C,D,E,F)
 	#define DEBUGOUT7(S,A,B,C,D,E,F,G)
 #endif

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 15:51:18 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4B091065672;
	Thu, 13 Sep 2012 15:51: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 963418FC0A;
	Thu, 13 Sep 2012 15:51:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DFpIkU027968;
	Thu, 13 Sep 2012 15:51:18 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DFpIQZ027965;
	Thu, 13 Sep 2012 15:51:18 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201209131551.q8DFpIQZ027965@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 13 Sep 2012 15:51: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: r240467 - head/sys/kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 15:51:18 -0000

Author: jhb
Date: Thu Sep 13 15:51:18 2012
New Revision: 240467
URL: http://svn.freebsd.org/changeset/base/240467

Log:
  Ignore stop and continue signals sent to an exiting process.  Stop signals
  set p_xstat to the signal that triggered the stop, but p_xstat is also
  used to hold the exit status of an exiting process.  Without this change,
  a stop signal that arrived after a process was marked P_WEXIT but before
  it was marked a zombie would overwrite the exit status with the stop signal
  number.
  
  Reviewed by:	kib
  MFC after:	1 week

Modified:
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_exit.c
==============================================================================
--- head/sys/kern/kern_exit.c	Thu Sep 13 14:40:24 2012	(r240466)
+++ head/sys/kern/kern_exit.c	Thu Sep 13 15:51:18 2012	(r240467)
@@ -200,6 +200,14 @@ exit1(struct thread *td, int rv)
 	_STOPEVENT(p, S_EXIT, rv);
 
 	/*
+	 * Ignore any pending request to stop due to a stop signal.
+	 * Once P_WEXIT is set, future requests will be ignored as
+	 * well.
+	 */
+	p->p_flag &= ~P_STOPPED_SIG;
+	KASSERT(!P_SHOULDSTOP(p), ("exiting process is stopped"));
+
+	/*
 	 * Note that we are exiting and do another wakeup of anyone in
 	 * PIOCWAIT in case they aren't listening for S_EXIT stops or
 	 * decided to wait again after we told them we are exiting.

Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c	Thu Sep 13 14:40:24 2012	(r240466)
+++ head/sys/kern/kern_sig.c	Thu Sep 13 15:51:18 2012	(r240467)
@@ -2134,6 +2134,8 @@ tdsendsignal(struct proc *p, struct thre
 	 * We try do the per-process part here.
 	 */
 	if (P_SHOULDSTOP(p)) {
+		KASSERT(!(p->p_flag & P_WEXIT),
+		    ("signal to stopped but exiting process"));
 		if (sig == SIGKILL) {
 			/*
 			 * If traced process is already stopped,
@@ -2248,7 +2250,7 @@ tdsendsignal(struct proc *p, struct thre
 		MPASS(action == SIG_DFL);
 
 		if (prop & SA_STOP) {
-			if (p->p_flag & P_PPWAIT)
+			if (p->p_flag & (P_PPWAIT|P_WEXIT))
 				goto out;
 			p->p_flag |= P_STOPPED_SIG;
 			p->p_xstat = sig;
@@ -2410,6 +2412,7 @@ ptracestop(struct thread *td, int sig)
 	struct proc *p = td->td_proc;
 
 	PROC_LOCK_ASSERT(p, MA_OWNED);
+	KASSERT(!(p->p_flag & P_WEXIT), ("Stopping exiting process"));
 	WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK,
 	    &p->p_mtx.lock_object, "Stopping for traced signal");
 
@@ -2648,7 +2651,7 @@ issignal(struct thread *td, int stop_all
 			 * process group, ignore tty stop signals.
 			 */
 			if (prop & SA_STOP) {
-				if (p->p_flag & P_TRACED ||
+				if (p->p_flag & (P_TRACED|P_WEXIT) ||
 		    		    (p->p_pgrp->pg_jobc == 0 &&
 				     prop & SA_TTYSTOP))
 					break;	/* == ignore */

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 16:00:46 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D35D6106566B;
	Thu, 13 Sep 2012 16:00:46 +0000 (UTC)
	(envelope-from brooks@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BDCFB8FC15;
	Thu, 13 Sep 2012 16:00:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DG0kJI029341;
	Thu, 13 Sep 2012 16:00:46 GMT (envelope-from brooks@svn.freebsd.org)
Received: (from brooks@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DG0k81029333;
	Thu, 13 Sep 2012 16:00:46 GMT (envelope-from brooks@svn.freebsd.org)
Message-Id: <201209131600.q8DG0k81029333@svn.freebsd.org>
From: Brooks Davis 
Date: Thu, 13 Sep 2012 16:00: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: r240468 - in head: . share/mk sys/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 16:00:47 -0000

Author: brooks
Date: Thu Sep 13 16:00:46 2012
New Revision: 240468
URL: http://svn.freebsd.org/changeset/base/240468

Log:
  Introduce a new make variable COMPILER_TYPE that specifies what
  type of compiler is being used (currently clang or gcc).  COMPILER_TYPE
  is set in the new bsd.compiler.mk file based on the value of the CC
  variable or, should it prove informative, by running ${CC} --version
  and examining the output.
  
  To avoid negative performance impacts in the default case and correct
  value for COMPILER_TYPE type is determined and passed in the environment
  of submake instances while building world.
  
  Replace adhoc attempts at determining the compiler type by examining
  CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE.  This eliminates
  bootstrapping complications when first setting WITH_CLANG_IS_CC.
  
  Sponsored by:	DARPA, AFRL
  Reviewed by:	Yamaya Takashi , imp, linimon
  		(with some modifications post review)
  MFC after:	2 weeks

Added:
  head/share/mk/bsd.compiler.mk   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/share/mk/Makefile
  head/share/mk/bsd.sys.mk
  head/sys/conf/kern.mk
  head/sys/conf/kern.pre.mk
  head/sys/conf/kmod.mk

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Thu Sep 13 15:51:18 2012	(r240467)
+++ head/Makefile.inc1	Thu Sep 13 16:00:46 2012	(r240468)
@@ -46,6 +46,7 @@ TARGET_ARCH=${TARGET}
 
 .include 
 .include 
+.include 
 
 # We must do share/info early so that installation of info `dir'
 # entries works correctly.  Do it first since it is less likely to
@@ -235,7 +236,8 @@ BMAKEENV=	INSTALL="sh ${.CURDIR}/tools/i
 		PATH=${BPATH}:${PATH} \
 		WORLDTMP=${WORLDTMP} \
 		VERSION="${VERSION}" \
-		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
+		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
+		COMPILER_TYPE=${COMPILER_TYPE}
 BMAKE=		MAKEOBJDIRPREFIX=${WORLDTMP} \
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
 		DESTDIR= \
@@ -270,6 +272,16 @@ WMAKEENV=	${CROSSENV} \
 .if ${MK_CDDL} == "no"
 WMAKEENV+=	NO_CTF=1
 .endif
+.if ${CC:T:Mgcc} == "gcc"
+WMAKE_COMPILER_TYPE=	gcc
+.elif ${CC:T:Mclang} == "clang"
+WMAKE_COMPILER_TYPE=	clang
+.elif ${MK_CLANG_IS_CC} == "no"
+WMAKE_COMPILER_TYPE=	gcc
+.else
+WMAKE_COMPILER_TYPE=	clang
+.endif
+WMAKEENV+=	COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
 WMAKE=		${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
 
 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
@@ -313,7 +325,8 @@ LIB32WMAKEENV+=	MAKEOBJDIRPREFIX=${OBJTR
 		CC="${CC} ${LIB32FLAGS}" \
 		CXX="${CXX} ${LIB32FLAGS}" \
 		LIBDIR=/usr/lib32 \
-		SHLIBDIR=/usr/lib32
+		SHLIBDIR=/usr/lib32 \
+		COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
 
 LIB32WMAKE=	${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
 		-DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \

Modified: head/share/mk/Makefile
==============================================================================
--- head/share/mk/Makefile	Thu Sep 13 15:51:18 2012	(r240467)
+++ head/share/mk/Makefile	Thu Sep 13 16:00:46 2012	(r240468)
@@ -3,7 +3,8 @@
 
 FILES=	bsd.README
 FILES+=	bsd.arch.inc.mk
-FILES+=	bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk
+FILES+=	bsd.compat.mk bsd.compiler.mk bsd.cpu.mk
+FILES+=	bsd.dep.mk bsd.doc.mk bsd.dtrace.mk
 FILES+=	bsd.endian.mk
 FILES+=	bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk
 FILES+=	bsd.kmod.mk

Added: head/share/mk/bsd.compiler.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/mk/bsd.compiler.mk	Thu Sep 13 16:00:46 2012	(r240468)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+.if !defined(COMPILER_TYPE)
+. if ${CC:T:Mgcc} == "gcc"
+COMPILER_TYPE:=	gcc  
+. elif ${CC:T:Mclang} == "clang"
+COMPILER_TYPE:=	clang
+. else
+_COMPILER_VERSION!=	${CC} --version
+.  if ${_COMPILER_VERSION:Mgcc} == "gcc"
+COMPILER_TYPE:=	gcc
+.  elif ${_COMPILER_VERSION:M\(GCC\)} == "(GCC)"
+COMPILER_TYPE:=	gcc
+.  elif ${_COMPILER_VERSION:Mclang} == "clang"
+COMPILER_TYPE:=	clang
+.  else
+.error Unable to determing compiler type for ${CC}
+.  endif
+.  undef _COMPILER_VERSION
+. endif
+.endif

Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk	Thu Sep 13 15:51:18 2012	(r240467)
+++ head/share/mk/bsd.sys.mk	Thu Sep 13 16:00:46 2012	(r240468)
@@ -8,6 +8,8 @@
 
 # for GCC:   http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html
 
+.include 
+
 # the default is gnu99 for now
 CSTD?=		gnu99
 
@@ -28,8 +30,8 @@ CFLAGS+=	-std=${CSTD}
 .if defined(WARNS)
 .if ${WARNS} >= 1
 CWARNFLAGS+=	-Wsystem-headers
-.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \
-    ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang))
+.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \
+    || !defined(NO_WERROR.clang))
 CWARNFLAGS+=	-Werror
 .endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang)
 .endif # WARNS >= 1
@@ -43,8 +45,8 @@ CWARNFLAGS+=	-W -Wno-unused-parameter -W
 .if ${WARNS} >= 4
 CWARNFLAGS+=	-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\
 		-Wunused-parameter
-.if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} == "no" && \
-    ${CC:T:Mclang} != "clang") || !defined(NO_WCAST_ALIGN.clang))
+.if !defined(NO_WCAST_ALIGN) && (${COMPILER_TYPE} != "clang" \
+    || !defined(NO_WCAST_ALIGN.clang))
 CWARNFLAGS+=	-Wcast-align
 .endif # !NO_WCAST_ALIGN && (!CLANG || !NO_WCAST_ALIGN.clang)
 .endif # WARNS >= 4
@@ -61,8 +63,7 @@ CWARNFLAGS+=	-Wno-uninitialized
 CWARNFLAGS+=	-Wno-pointer-sign
 # Clang has more warnings enabled by default, and when using -Wall, so if WARNS
 # is set to low values, these have to be disabled explicitly.
-.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \
-    !defined(EARLY_BUILD)
+.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD)
 .if ${WARNS} <= 6
 CWARNFLAGS+=	-Wno-empty-body -Wno-string-plus-int
 .endif # WARNS <= 6
@@ -89,20 +90,18 @@ WFORMAT=	1
 .if ${WFORMAT} > 0
 #CWARNFLAGS+=	-Wformat-nonliteral -Wformat-security -Wno-format-extra-args
 CWARNFLAGS+=	-Wformat=2 -Wno-format-extra-args
-.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \
-    !defined(EARLY_BUILD)
+.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD)
 .if ${WARNS} <= 3
 CWARNFLAGS+=	-Wno-format-nonliteral
 .endif # WARNS <= 3
 .endif # CLANG
-.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \
-    ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang))
+.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \
+    || !defined(NO_WERROR.clang))
 CWARNFLAGS+=	-Werror
 .endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang)
 .endif # WFORMAT > 0
 .endif # WFORMAT
-.if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || \
-    ${CC:T:Mclang} == "clang") && defined(NO_WFORMAT.clang))
+.if defined(NO_WFORMAT) || (${COMPILER_TYPE} == "clang" && defined(NO_WFORMAT.clang))
 CWARNFLAGS+=	-Wno-format
 .endif # NO_WFORMAT || (CLANG && NO_WFORMAT.clang)
 .endif # !NO_WARNS
@@ -111,8 +110,7 @@ CWARNFLAGS+=	-Wno-format
 CWARNFLAGS+=	-Wno-unknown-pragmas
 .endif # IGNORE_PRAGMA
 
-.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \
-    !defined(EARLY_BUILD)
+.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD)
 CLANG_NO_IAS=	 -no-integrated-as
 CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
 		 -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Thu Sep 13 15:51:18 2012	(r240467)
+++ head/sys/conf/kern.mk	Thu Sep 13 16:00:46 2012	(r240468)
@@ -15,7 +15,7 @@ CWARNFLAGS?=	-Wall -Wredundant-decls -Wn
 # Disable a few warnings for clang, since there are several places in the
 # kernel where fixing them is more trouble than it is worth, or where there is
 # a false positive.
-.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if ${COMPILER_TYPE} == "clang"
 NO_WCONSTANT_CONVERSION=	-Wno-constant-conversion
 NO_WARRAY_BOUNDS=		-Wno-array-bounds
 NO_WSHIFT_COUNT_NEGATIVE=	-Wno-shift-count-negative
@@ -52,7 +52,7 @@ CWARNEXTRA?=	-Wno-error-tautological-com
 # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
 #
 .if ${MACHINE_CPUARCH} == "i386"
-.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${COMPILER_TYPE} != "clang"
 CFLAGS+=	-mno-align-long-strings -mpreferred-stack-boundary=2
 .else
 CFLAGS+=	-mno-aes -mno-avx
@@ -100,7 +100,7 @@ INLINE_LIMIT?=	15000
 # (-mfpmath= is not supported)
 #
 .if ${MACHINE_CPUARCH} == "amd64"
-.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if ${COMPILER_TYPE} == "clang"
 CFLAGS+=	-mno-aes -mno-avx
 .endif
 CFLAGS+=	-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Thu Sep 13 15:51:18 2012	(r240467)
+++ head/sys/conf/kern.pre.mk	Thu Sep 13 16:00:46 2012	(r240468)
@@ -4,6 +4,7 @@
 # of the definitions that need to be before %BEFORE_DEPEND.
 
 .include 
+.include 
 
 # backwards compat option for older systems.
 MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
@@ -35,7 +36,7 @@ _MINUS_O=	-O2
 .endif
 .endif
 .if ${MACHINE_CPUARCH} == "amd64"
-.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${COMPILER_TYPE} != "clang"
 COPTFLAGS?=-O2 -frename-registers -pipe
 .else
 COPTFLAGS?=-O2 -pipe
@@ -85,7 +86,7 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe
 
 CFLAGS=	${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
 CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
-.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${COMPILER_TYPE} != "clang"
 CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
 .if ${MACHINE_CPUARCH} != "mips"
 CFLAGS+= --param inline-unit-growth=100
@@ -102,7 +103,7 @@ WERROR?= -Werror
 # XXX LOCORE means "don't declare C stuff" not "for locore.s".
 ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
 
-.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if ${COMPILER_TYPE} == "clang"
 CLANG_NO_IAS= -no-integrated-as
 .endif
 

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Thu Sep 13 15:51:18 2012	(r240467)
+++ head/sys/conf/kmod.mk	Thu Sep 13 16:00:46 2012	(r240468)
@@ -73,6 +73,7 @@ OBJCOPY?=	objcopy
 .endif
 
 .include 
+.include 
 
 .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
 
@@ -108,7 +109,7 @@ CFLAGS+=	-I. -I@
 # for example.
 CFLAGS+=	-I@/contrib/altq
 
-.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
+.if ${COMPILER_TYPE} != "clang"
 CFLAGS+=	-finline-limit=${INLINE_LIMIT}
 CFLAGS+= --param inline-unit-growth=100
 CFLAGS+= --param large-function-growth=1000

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 16:41:05 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B0777106564A;
	Thu, 13 Sep 2012 16:41:05 +0000 (UTC)
	(envelope-from bryanv@daemoninthecloset.org)
Received: from torment.daemoninthecloset.org (torment.daemoninthecloset.org
	[94.242.209.234])
	by mx1.freebsd.org (Postfix) with ESMTP id 260148FC18;
	Thu, 13 Sep 2012 16:41:04 +0000 (UTC)
X-Virus-Scanned: amavisd-new at daemoninthecloset.org
Received: from sage.daemoninthecloset.org (sage.daemoninthecloset.org
	[127.0.1.1])
	by sage.daemoninthecloset.org (Postfix) with ESMTP id 37BE766AF0;
	Thu, 13 Sep 2012 11:40:42 -0500 (CDT)
Date: Thu, 13 Sep 2012 11:40:42 -0500 (CDT)
From: Bryan Venteicher 
To: John Baldwin 
Message-ID: <651175615.1815.1347554442005.JavaMail.root@daemoninthecloset.org>
In-Reply-To: <201209130859.38153.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [10.51.1.14]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - GC21 (Mac)/7.2.0_GA_2669)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Peter Grehan 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 16:41:05 -0000

Hi,

----- Original Message -----
> From: "John Baldwin" 
> To: "Peter Grehan" 
> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
> Sent: Thursday, September 13, 2012 7:59:38 AM
> Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> 
> On Wednesday, September 12, 2012 8:36:47 pm Peter Grehan wrote:
> > Author: grehan
> > Date: Thu Sep 13 00:36:46 2012
> > New Revision: 240427
> > URL: http://svn.freebsd.org/changeset/base/240427
> > 
> > Log:
> >   Relax requirement of certain mb()s
> >   
> >   Submitted by:	Bryan Venteicher bryanv at daemoninthecloset org
> > 
> > Modified:
> >   head/sys/dev/virtio/virtqueue.c
> > 
> > Modified: head/sys/dev/virtio/virtqueue.c
> > 
> ==============================================================================
> > --- head/sys/dev/virtio/virtqueue.c	Wed Sep 12 22:54:11 2012
> > 	(r240426)
> > +++ head/sys/dev/virtio/virtqueue.c	Thu Sep 13 00:36:46 2012
> > 	(r240427)
> > @@ -525,7 +525,7 @@ virtqueue_dequeue(struct virtqueue *vq,
> >  	used_idx = vq->vq_used_cons_idx++ & (vq->vq_nentries - 1);
> >  	uep = &vq->vq_ring.used->ring[used_idx];
> >  
> > -	mb();
> > +	rmb();
> >  	desc_idx = (uint16_t) uep->id;
> >  	if (len != NULL)
> >  		*len = uep->len;
> > @@ -623,7 +623,7 @@ vq_ring_update_avail(struct virtqueue *v
> >  	avail_idx = vq->vq_ring.avail->idx & (vq->vq_nentries - 1);
> >  	vq->vq_ring.avail->ring[avail_idx] = desc_idx;
> >  
> > -	mb();
> > +	wmb();
> >  	vq->vq_ring.avail->idx++;
> >  
> >  	/* Keep pending count until virtqueue_notify(). */
> 
> Would it be possible to use atomic_load/store() instead of direct
> memory barriers?  For example:
> 

I've been sitting on a (lightly tested) patch [1] for awhile that
does just that, but am not very happy with it. A lot of the fields
are 16-bit, which not all architectures have atomic(9) support for. 
And I think the atomic(9) behavior on UP kernels does not provide
the same guarantees as on an SMP kernel (could have an UP kernel
on an SMP host). 

I also found myself wanting an atomic_load_rel_*() type function.

> 	desc_idx = (uint16_t)atomic_load_acq_int(&uep->id);
> 
> and
> 
> 	atomic_store_rel_int(&vq->vq_ring.avail->ring[avail_idx], desc_idx);

avail->ring is an array of uint16's so I'm a bit leery of using a
(presumably) 32bit op on it. 

[1] http://www.daemoninthecloset.org/~bryanv/patches/freebsd/vq_atomic.patch

> 
> --
> John Baldwin
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to
> "svn-src-head-unsubscribe@freebsd.org"
> 

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 16:59:21 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 412B2106566C;
	Thu, 13 Sep 2012 16:59:21 +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 2CE988FC12;
	Thu, 13 Sep 2012 16:59:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DGxLpK038508;
	Thu, 13 Sep 2012 16:59:21 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DGxKAV038505;
	Thu, 13 Sep 2012 16:59:20 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201209131659.q8DGxKAV038505@svn.freebsd.org>
From: Joel Dahl 
Date: Thu, 13 Sep 2012 16:59: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: r240469 - head/share/man/man5
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 16:59:21 -0000

Author: joel (doc committer)
Date: Thu Sep 13 16:59:20 2012
New Revision: 240469
URL: http://svn.freebsd.org/changeset/base/240469

Log:
  Minor mdoc fix.

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

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Thu Sep 13 16:00:46 2012	(r240468)
+++ head/share/man/man5/rc.conf.5	Thu Sep 13 16:59:20 2012	(r240469)
@@ -168,18 +168,18 @@ If set to
 .Dq Li NO ,
 no swapfile is installed, otherwise the value is used as the full
 pathname to a file to use for additional swap space.
-.It Va Ns Ao Ar name Ac Ns Va _chroot
+.It Ao Ar name Ac Ns Va _chroot
 .Pq Vt str
 .Xr chroot
 to this directory before running the service.
-.It Va Ns Ao Ar name Ac Ns Va _user
+.It Ao Ar name Ac Ns Va _user
 .Pq Vt str
 Run the service under this user account.
-.It Va Ns Ao Ar name Ac Ns Va _group
+.It Ao Ar name Ac Ns Va _group
 .Pq Vt str
 Run the chrooted service under this system group. Unlike the _user
 setting, this setting has no effect if the service is not chrooted.
-.It Ns Ao Ar name Ac Ns Va _nice
+.It Ao Ar name Ac Ns Va _nice
 .Pq Vt int
 The
 .Xr nice 1

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 17:49:12 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F3D0106566C;
	Thu, 13 Sep 2012 17:49:12 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 60C2F8FC08;
	Thu, 13 Sep 2012 17:49:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DHnCbc045567;
	Thu, 13 Sep 2012 17:49:12 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DHnCmv045564;
	Thu, 13 Sep 2012 17:49:12 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201209131749.q8DHnCmv045564@svn.freebsd.org>
From: Eitan Adler 
Date: Thu, 13 Sep 2012 17:49: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: r240470 - in head/tools: diag diag/ac tools
	tools/backout_commit tools/mfc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 17:49:12 -0000

Author: eadler
Date: Thu Sep 13 17:49:11 2012
New Revision: 240470
URL: http://svn.freebsd.org/changeset/base/240470

Log:
  Remove scripts and tools which only functioned when src was using CVS
  
  Approved by:	cperciva
  MFC after:	1 week

Deleted:
  head/tools/diag/ac/
  head/tools/tools/backout_commit/
  head/tools/tools/mfc/
Modified:
  head/tools/diag/README
  head/tools/tools/README

Modified: head/tools/diag/README
==============================================================================
--- head/tools/diag/README	Thu Sep 13 16:59:20 2012	(r240469)
+++ head/tools/diag/README	Thu Sep 13 17:49:11 2012	(r240470)
@@ -8,8 +8,6 @@ the integrity.
 
 Please make a subdir per program, and add a brief description to this file.
 
-ac 		Various scripts that checks of style/content correctness of
-		committers lists in doc/ area.
 dumpvfscache	program that can be used to examine the contents of the vfs
 		name cache.
 httpd-error	check for Web files which does not exists on your host

Modified: head/tools/tools/README
==============================================================================
--- head/tools/tools/README	Thu Sep 13 16:59:20 2012	(r240469)
+++ head/tools/tools/README	Thu Sep 13 17:49:11 2012	(r240470)
@@ -10,8 +10,6 @@ file.
 
 ansify		Convert K&R-style function definitions to ANSI style
 ath		Tools specific to the Atheros 802.11 support
-backout_commit	A tool for reading in a commit message and generating
-		a script that will backout the commit.
 cfi		Common Flash Interface (CFI) tool
 commitsdb	A tool for reconstructing commit history using md5
 		checksums of the commit logs.
@@ -45,8 +43,6 @@ kerninclude	Shellscript to find unused #
 kernxref	Shellscript to cross reference symbols in the LINT kernel.
 kttcp		An in-kernel version of the ttcp network performance tool
 mctest		A multicast test program
-mfc		Merge a directory from HEAD to a branch where it does not
-		already exist and other MFC related script(s).
 mid	 	Create a Message-ID database for mailing lists.
 mwl		Tools specific to the Marvell 88W8363 support
 ncpus		Count the number of processors

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 18:24:14 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 262D21065670;
	Thu, 13 Sep 2012 18:24:14 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EB7A58FC17;
	Thu, 13 Sep 2012 18:24:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DIODfn050643;
	Thu, 13 Sep 2012 18:24:13 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DIODxJ050639;
	Thu, 13 Sep 2012 18:24:13 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201209131824.q8DIODxJ050639@svn.freebsd.org>
From: Adrian Chadd 
Date: Thu, 13 Sep 2012 18:24: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: r240471 - in head/sys/dev/ath/ath_hal: ar5416 ar9002
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 18:24:14 -0000

Author: adrian
Date: Thu Sep 13 18:24:13 2012
New Revision: 240471
URL: http://svn.freebsd.org/changeset/base/240471

Log:
  Don't use AR_PHY_MODE to setup half/quarter rate.
  
  I'm not sure where in the deep, distant past I found the AR_PHY_MODE
  registers for half/quarter rate mode, but unfortunately that doesn't
  seem to work "right" for non-AR9280 chips.
  
  Specifically:
  
  * don't touch AR_PHY_MODE
  * set the PLL bits when configuring half/quarter rate
  
  I've verified this on the AR9280 (5ghz fast clock) and the AR5416.
  
  The AR9280 works in both half/quarter rate; the AR5416 unfortunately
  only currently works at half rate.  It fails to calibrate on quarter rate.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Thu Sep 13 17:49:11 2012	(r240470)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Thu Sep 13 18:24:13 2012	(r240471)
@@ -746,19 +746,6 @@ ar5416SetRfMode(struct ath_hal *ah, cons
 			AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ;
 	}
 
-	/*
-	 * Set half/quarter mode flags if required.
-	 *
-	 * This doesn't change the IFS timings at all; that needs to
-	 * be done as part of the MAC setup.  Similarly, the PLL
-	 * configuration also needs some changes for the half/quarter
-	 * rate clock.
-	 */
-	if (IEEE80211_IS_CHAN_HALF(chan))
-		rfMode |= AR_PHY_MODE_HALF;
-	else if (IEEE80211_IS_CHAN_QUARTER(chan))
-		rfMode |= AR_PHY_MODE_QUARTER;
-
 	OS_REG_WRITE(ah, AR_PHY_MODE, rfMode);
 }
 

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c	Thu Sep 13 17:49:11 2012	(r240470)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c	Thu Sep 13 18:24:13 2012	(r240471)
@@ -114,6 +114,10 @@ ar9280InitPLL(struct ath_hal *ah, const 
 		 * Else, set PLL to 0x2850 to prevent reset-to-reset variation 
 		 */
 		pll = IS_5GHZ_FAST_CLOCK_EN(ah, chan) ? 0x142c : 0x2850;
+		if (IEEE80211_IS_CHAN_HALF(chan))
+			pll |= SM(0x1, AR_RTC_SOWL_PLL_CLKSEL);
+		else if (IEEE80211_IS_CHAN_QUARTER(chan))
+			pll |= SM(0x2, AR_RTC_SOWL_PLL_CLKSEL);
 	} else if (AR_SREV_MERLIN_10_OR_LATER(ah)) {
 		pll = SM(0x5, AR_RTC_SOWL_PLL_REFDIV);
 		if (chan != AH_NULL) {

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 18:40:36 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E63281065679;
	Thu, 13 Sep 2012 18:40:35 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id A91768FC0C;
	Thu, 13 Sep 2012 18:40:35 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 76E37B946;
	Thu, 13 Sep 2012 14:40:34 -0400 (EDT)
From: John Baldwin 
To: Bryan Venteicher 
Date: Thu, 13 Sep 2012 14:40:32 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; )
References: <651175615.1815.1347554442005.JavaMail.root@daemoninthecloset.org>
In-Reply-To: <651175615.1815.1347554442005.JavaMail.root@daemoninthecloset.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201209131440.32903.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
	(bigwig.baldwin.cx); Thu, 13 Sep 2012 14:40:34 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Peter Grehan 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 18:40:36 -0000

On Thursday, September 13, 2012 12:40:42 pm Bryan Venteicher wrote:
> Hi,
> 
> ----- Original Message -----
> > From: "John Baldwin" 
> > To: "Peter Grehan" 
> > Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-
committers@freebsd.org
> > Sent: Thursday, September 13, 2012 7:59:38 AM
> > Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> > 
> > On Wednesday, September 12, 2012 8:36:47 pm Peter Grehan wrote:
> > > Author: grehan
> > > Date: Thu Sep 13 00:36:46 2012
> > > New Revision: 240427
> > > URL: http://svn.freebsd.org/changeset/base/240427
> > > 
> > > Log:
> > >   Relax requirement of certain mb()s
> > >   
> > >   Submitted by:	Bryan Venteicher bryanv at daemoninthecloset org
> > > 
> > > Modified:
> > >   head/sys/dev/virtio/virtqueue.c
> > > 
> > > Modified: head/sys/dev/virtio/virtqueue.c
> > > 
> > 
==============================================================================
> > > --- head/sys/dev/virtio/virtqueue.c	Wed Sep 12 22:54:11 2012
> > > 	(r240426)
> > > +++ head/sys/dev/virtio/virtqueue.c	Thu Sep 13 00:36:46 2012
> > > 	(r240427)
> > > @@ -525,7 +525,7 @@ virtqueue_dequeue(struct virtqueue *vq,
> > >  	used_idx = vq->vq_used_cons_idx++ & (vq->vq_nentries - 1);
> > >  	uep = &vq->vq_ring.used->ring[used_idx];
> > >  
> > > -	mb();
> > > +	rmb();
> > >  	desc_idx = (uint16_t) uep->id;
> > >  	if (len != NULL)
> > >  		*len = uep->len;
> > > @@ -623,7 +623,7 @@ vq_ring_update_avail(struct virtqueue *v
> > >  	avail_idx = vq->vq_ring.avail->idx & (vq->vq_nentries - 1);
> > >  	vq->vq_ring.avail->ring[avail_idx] = desc_idx;
> > >  
> > > -	mb();
> > > +	wmb();
> > >  	vq->vq_ring.avail->idx++;
> > >  
> > >  	/* Keep pending count until virtqueue_notify(). */
> > 
> > Would it be possible to use atomic_load/store() instead of direct
> > memory barriers?  For example:
> > 
> 
> I've been sitting on a (lightly tested) patch [1] for awhile that
> does just that, but am not very happy with it. A lot of the fields
> are 16-bit, which not all architectures have atomic(9) support for. 
> And I think the atomic(9) behavior on UP kernels does not provide
> the same guarantees as on an SMP kernel (could have an UP kernel
> on an SMP host). 
> 
> I also found myself wanting an atomic_load_rel_*() type function.
> 
> > 	desc_idx = (uint16_t)atomic_load_acq_int(&uep->id);
> > 
> > and
> > 
> > 	atomic_store_rel_int(&vq->vq_ring.avail->ring[avail_idx], desc_idx);
> 
> avail->ring is an array of uint16's so I'm a bit leery of using a
> (presumably) 32bit op on it. 
> 
> [1] http://www.daemoninthecloset.org/~bryanv/patches/freebsd/vq_atomic.patch
> 
> > 
> > --
> > John Baldwin
> > _______________________________________________
> > svn-src-head@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/svn-src-head
> > To unsubscribe, send any mail to
> > "svn-src-head-unsubscribe@freebsd.org"
> > 
> 

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 19:05:25 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0A3931065674;
	Thu, 13 Sep 2012 19:05:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E77758FC08;
	Thu, 13 Sep 2012 19:05:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DJ5OFT056611;
	Thu, 13 Sep 2012 19:05:24 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DJ5OMY056609;
	Thu, 13 Sep 2012 19:05:24 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201209131905.q8DJ5OMY056609@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 13 Sep 2012 19:05: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: r240473 - head/sys/dev/pci
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 19:05:25 -0000

Author: jhb
Date: Thu Sep 13 19:05:24 2012
New Revision: 240473
URL: http://svn.freebsd.org/changeset/base/240473

Log:
  - Add some registers defined in PCI 3.0 including new AER bits.
  - Add constants for the rest of the fields in the PCI-express device
    capability and control registers.
  - Tweak some of the recently added PCI-e capability constants (always
    use hex for offsets in config space, and include a shortened
    version of the relevant register in the name of field constants).
  
  MFC after:	1 week

Modified:
  head/sys/dev/pci/pcireg.h

Modified: head/sys/dev/pci/pcireg.h
==============================================================================
--- head/sys/dev/pci/pcireg.h	Thu Sep 13 18:47:24 2012	(r240472)
+++ head/sys/dev/pci/pcireg.h	Thu Sep 13 19:05:24 2012	(r240473)
@@ -64,6 +64,7 @@
 #define	PCIM_CMD_BACKTOBACK	0x0200
 #define	PCIM_CMD_INTxDIS	0x0400
 #define	PCIR_STATUS	0x06
+#define	PCIM_STATUS_INTxSTATE	0x0008
 #define	PCIM_STATUS_CAPPRESENT	0x0010
 #define	PCIM_STATUS_66CAPABLE	0x0020
 #define	PCIM_STATUS_BACKTOBACK	0x0080
@@ -134,11 +135,22 @@
 #define	PCIZ_VC		0x0002	/* Virtual Channel */
 #define	PCIZ_SERNUM	0x0003	/* Device Serial Number */
 #define	PCIZ_PWRBDGT	0x0004	/* Power Budgeting */
+#define	PCIZ_RCLINK_DCL	0x0005	/* Root Complex Link Declaration */
+#define	PCIZ_RCLINK_CTL	0x0006	/* Root Complex Internal Link Control */
+#define	PCIZ_RCEC_ASSOC	0x0007	/* Root Complex Event Collector Association */
+#define	PCIZ_MFVC	0x0008	/* Multi-Function Virtual Channel */
+#define	PCIZ_RCRB	0x000a	/* RCRB Header */
 #define	PCIZ_VENDOR	0x000b	/* Vendor Unique */
 #define	PCIZ_ACS	0x000d	/* Access Control Services */
 #define	PCIZ_ARI	0x000e	/* Alternative Routing-ID Interpretation */
 #define	PCIZ_ATS	0x000f	/* Address Translation Services */
 #define	PCIZ_SRIOV	0x0010	/* Single Root IO Virtualization */
+#define	PCIZ_MULTICAST	0x0012	/* Multicast */
+#define	PCIZ_RESIZE_BAR	0x0015	/* Resizable BAR */
+#define	PCIZ_DPA	0x0016	/* Dynamic Power Allocation */
+#define	PCIZ_TPH_REQ	0x0017	/* TPH Requester */
+#define	PCIZ_LTR	0x0018	/* Latency Tolerance Reporting */
+#define	PCIZ_SEC_PCIE	0x0019	/* Secondary PCI Express */
 
 /* config registers for header type 0 devices */
 
@@ -632,15 +644,29 @@
 #define	PCIM_EXP_FLAGS_SLOT		0x0100
 #define	PCIM_EXP_FLAGS_IRQ		0x3e00
 #define	PCIR_EXPRESS_DEVICE_CAP	0x4
-#define	PCIM_EXP_CAP_MAX_PAYLOAD	0x0007
+#define	PCIM_EXP_CAP_MAX_PAYLOAD	0x00000007
+#define	PCIM_EXP_CAP_PHANTHOM_FUNCS	0x00000018
+#define	PCIM_EXP_CAP_EXT_TAG_FIELD	0x00000020
+#define	PCIM_EXP_CAP_L0S_LATENCY	0x000001c0
+#define	PCIM_EXP_CAP_L1_LATENCY		0x00000e00
+#define	PCIM_EXP_CAP_ROLE_ERR_RPT	0x00008000
+#define	PCIM_EXP_CAP_SLOT_PWR_LIM_VAL	0x03fc0000
+#define	PCIM_EXP_CAP_SLOT_PWR_LIM_SCALE	0x0c000000
+#define	PCIM_EXP_CAP_FLR		0x10000000
 #define	PCIR_EXPRESS_DEVICE_CTL	0x8
+#define	PCIM_EXP_CTL_COR_ENABLE		0x0001
 #define	PCIM_EXP_CTL_NFER_ENABLE	0x0002
 #define	PCIM_EXP_CTL_FER_ENABLE		0x0004
 #define	PCIM_EXP_CTL_URR_ENABLE		0x0008
 #define	PCIM_EXP_CTL_RELAXED_ORD_ENABLE	0x0010
 #define	PCIM_EXP_CTL_MAX_PAYLOAD	0x00e0
+#define	PCIM_EXP_CTL_EXT_TAG_FIELD	0x0100
+#define	PCIM_EXP_CTL_PHANTHOM_FUNCS	0x0200
+#define	PCIM_EXP_CTL_AUX_POWER_PM	0x0400
 #define	PCIM_EXP_CTL_NOSNOOP_ENABLE	0x0800
 #define	PCIM_EXP_CTL_MAX_READ_REQUEST	0x7000
+#define	PCIM_EXP_CTL_BRDG_CFG_RETRY	0x8000	/* PCI-E - PCI/PCI-X bridges */
+#define	PCIM_EXP_CTL_INITIATE_FLR	0x8000	/* FLR capable endpoints */
 #define	PCIR_EXPRESS_DEVICE_STA	0xa
 #define	PCIM_EXP_STA_CORRECTABLE_ERROR	0x0001
 #define	PCIM_EXP_STA_NON_FATAL_ERROR	0x0002
@@ -654,6 +680,11 @@
 #define	PCIM_LINK_CAP_ASPM		0x00000c00
 #define	PCIM_LINK_CAP_L0S_EXIT		0x00007000
 #define	PCIM_LINK_CAP_L1_EXIT		0x00038000
+#define	PCIM_LINK_CAP_CLOCK_PM		0x00040000
+#define	PCIM_LINK_CAP_SURPRISE_DOWN	0x00080000
+#define	PCIM_LINK_CAP_DL_ACTIVE		0x00100000
+#define	PCIM_LINK_CAP_LINK_BW_NOTIFY	0x00200000
+#define	PCIM_LINK_CAP_ASPM_COMPLIANCE	0x00400000
 #define	PCIM_LINK_CAP_PORT		0xff000000
 #define	PCIR_EXPRESS_LINK_CTL	0x10
 #define	PCIR_EXPRESS_LINK_STA	0x12
@@ -662,6 +693,9 @@
 #define	PCIM_LINK_STA_TRAINING_ERROR	0x0400
 #define	PCIM_LINK_STA_TRAINING		0x0800
 #define	PCIM_LINK_STA_SLOT_CLOCK	0x1000
+#define	PCIM_LINK_STA_DL_ACTIVE		0x2000
+#define	PCIM_LINK_STA_LINK_BW_MGMT	0x4000
+#define	PCIM_LINK_STA_LINK_AUTO_BW	0x8000
 #define	PCIR_EXPRESS_SLOT_CAP	0x14
 #define	PCIM_EXP_SLOT_CAP_APB		0x00000001
 #define	PCIM_EXP_SLOT_CAP_PCP		0x00000002
@@ -699,16 +733,29 @@
 #define	PCIM_EXP_SLOT_STA_DLLSC		0x0100
 #define	PCIR_EXPRESS_ROOT_CTL	0x1c
 #define	PCIR_EXPRESS_ROOT_STA	0x20
-#define	PCIR_EXPRESS_DEVICE_CTL2	40
-#define	PCIM_EXPRESS_DEVICE_CTL2_ARI	0x20
-#define	PCIM_EXPRESS_ID_ORDERED_REQ_EN	0x100
-#define	PCIM_EXPRESS_ID_ORDERED_CMP_EN	0x200
-#define	PCIM_EXPRESS_LTR_ENABLE		0x400
-#define	PCIM_EXPRESS_OBFF_MSGA_ENABLE	0x2000
-#define	PCIM_EXPRESS_OBFF_MSGB_ENABLE	0x4000
-#define PCIM_EXPRESS_OBFF_WAKE_ENABLE	0x6000
-#define PCIR_EXPRESS_LINK_CTL2		48
-#define PCIR_EXPRESS_SLOT_CTL2		56
+#define	PCIR_EXPRESS_DEVICE_CAP2	0x24
+#define	PCIR_EXPRESS_DEVICE_CTL2	0x28
+#define	PCIM_EXP_CTL2_COMP_TIMEOUT_VAL	0x000f
+#define	PCIM_EXP_CTL2_COMP_TIMEOUT_DIS	0x0010
+#define	PCIM_EXP_CTL2_ARI		0x0020
+#define	PCIM_EXP_CTL2_ATOMIC_REQ_ENABLE	0x0040
+#define	PCIM_EXP_CTL2_ATOMIC_EGR_BLOCK	0x0080
+#define	PCIM_EXP_CTL2_ID_ORDERED_REQ_EN	0x0100
+#define	PCIM_EXP_CTL2_ID_ORDERED_CMP_EN	0x0200
+#define	PCIM_EXP_CTL2_LTR_ENABLE	0x0400
+#define	PCIM_EXP_CTL2_OBFF		0x6000
+#define	PCIM_EXP_OBFF_DISABLE		0x0000
+#define	PCIM_EXP_OBFF_MSGA_ENABLE	0x2000
+#define	PCIM_EXP_OBFF_MSGB_ENABLE	0x4000
+#define	PCIM_EXP_OBFF_WAKE_ENABLE	0x6000
+#define	PCIM_EXP_CTL2_END2END_TLP	0x8000
+#define	PCIR_EXPRESS_DEVICE_STA2	0x2a
+#define	PCIR_EXPRESS_LINK_CAP2	0x2c
+#define	PCIR_EXPRESS_LINK_CTL2	0x30
+#define	PCIR_EXPRESS_LINK_STA2	0x32
+#define	PCIR_EXPRESS_SLAT_CAP2	0x34
+#define	PCIR_EXPRESS_SLOT_CTL2	0x38
+#define	PCIR_EXPRESS_SLOT_STA2	0x3a
 
 /* MSI-X definitions */
 #define	PCIR_MSIX_CTRL		0x2
@@ -750,6 +797,10 @@
 #define	PCIM_AER_UC_ECRC_ERROR		0x00080000
 #define	PCIM_AER_UC_UNSUPPORTED_REQUEST	0x00100000
 #define	PCIM_AER_UC_ACS_VIOLATION	0x00200000
+#define	PCIM_AER_UC_INTERNAL_ERROR	0x00400000
+#define	PCIM_AER_UC_MC_BLOCKED_TLP	0x00800000
+#define	PCIM_AER_UC_ATOMIC_EGRESS_BLK	0x01000000
+#define	PCIM_AER_UC_TLP_PREFIX_BLOCKED	0x02000000
 #define	PCIR_AER_UC_MASK	0x08	/* Shares bits with UC_STATUS */
 #define	PCIR_AER_UC_SEVERITY	0x0c	/* Shares bits with UC_STATUS */
 #define	PCIR_AER_COR_STATUS	0x10
@@ -759,6 +810,8 @@
 #define	PCIM_AER_COR_REPLAY_ROLLOVER	0x00000100
 #define	PCIM_AER_COR_REPLAY_TIMEOUT	0x00001000
 #define	PCIM_AER_COR_ADVISORY_NF_ERROR	0x00002000
+#define	PCIM_AER_COR_INTERNAL_ERROR	0x00004000
+#define	PCIM_AER_COR_HEADER_LOG_OVFLOW	0x00008000
 #define	PCIR_AER_COR_MASK	0x14	/* Shares bits with COR_STATUS */
 #define	PCIR_AER_CAP_CONTROL	0x18
 #define	PCIM_AER_FIRST_ERROR_PTR	0x0000001f
@@ -766,6 +819,9 @@
 #define	PCIM_AER_ECRC_GEN_ENABLE	0x00000040
 #define	PCIM_AER_ECRC_CHECK_CAPABLE	0x00000080
 #define	PCIM_AER_ECRC_CHECK_ENABLE	0x00000100
+#define	PCIM_AER_MULT_HDR_CAPABLE	0x00000200
+#define	PCIM_AER_MULT_HDR_ENABLE	0x00000400
+#define	PCIM_AER_TLP_PREFIX_LOG_PRESENT	0x00000800
 #define	PCIR_AER_HEADER_LOG	0x1c
 #define	PCIR_AER_ROOTERR_CMD	0x2c	/* Only for root complex ports */
 #define	PCIM_AER_ROOTERR_COR_ENABLE	0x00000001
@@ -782,6 +838,7 @@
 #define	PCIM_AER_ROOTERR_INT_MESSAGE	0xf8000000
 #define	PCIR_AER_COR_SOURCE_ID	0x34	/* Only for root complex ports */
 #define	PCIR_AER_ERR_SOURCE_ID	0x36	/* Only for root complex ports */
+#define	PCIR_AER_TLP_PREFIX_LOG	0x38	/* Only for TLP prefix functions */
 
 /* Virtual Channel definitions */
 #define	PCIR_VC_CAP1		0x04

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 19:08:31 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B9474106566C;
	Thu, 13 Sep 2012 19:08:31 +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 9ABE58FC17;
	Thu, 13 Sep 2012 19:08:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DJ8V2w057061;
	Thu, 13 Sep 2012 19:08:31 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DJ8V4s057058;
	Thu, 13 Sep 2012 19:08:31 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201209131908.q8DJ8V4s057058@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 13 Sep 2012 19:08: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: r240474 - head/usr.sbin/pciconf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 19:08:31 -0000

Author: jhb
Date: Thu Sep 13 19:08:31 2012
New Revision: 240474
URL: http://svn.freebsd.org/changeset/base/240474

Log:
  - Denote PCI-e endpoints that support FLR.
  - Make parsing of PCI-e extended capabilities assume that future version
    numbers are backwards compatible.
  - Add new AER error descriptions.
  - Add descriptions for more PCI-e extended capabilities.
  
  MFC after:	1 week

Modified:
  head/usr.sbin/pciconf/cap.c
  head/usr.sbin/pciconf/err.c

Modified: head/usr.sbin/pciconf/cap.c
==============================================================================
--- head/usr.sbin/pciconf/cap.c	Thu Sep 13 19:05:24 2012	(r240473)
+++ head/usr.sbin/pciconf/cap.c	Thu Sep 13 19:08:31 2012	(r240474)
@@ -412,6 +412,8 @@ cap_express(int fd, struct pci_conf *p, 
 	printf(" max data %d(%d)",
 	    MAX_PAYLOAD((flags & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5),
 	    MAX_PAYLOAD(val & PCIM_EXP_CAP_MAX_PAYLOAD));
+	if (val & PCIM_EXP_CAP_FLR)
+		printf(" FLR");
 	val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_LINK_CAP, 4);
 	flags = read_config(fd, &p->pc_sel, ptr+ PCIR_EXPRESS_LINK_STA, 2);
 	printf(" link x%d(x%d)", (flags & PCIM_LINK_STA_WIDTH) >> 4,
@@ -561,7 +563,7 @@ ecap_aer(int fd, struct pci_conf *p, uin
 	uint32_t sta, mask;
 
 	printf("AER %d", ver);
-	if (ver != 1)
+	if (ver < 1)
 		return;
 	sta = read_config(fd, &p->pc_sel, ptr + PCIR_AER_UC_STATUS, 4);
 	mask = read_config(fd, &p->pc_sel, ptr + PCIR_AER_UC_SEVERITY, 4);
@@ -577,7 +579,7 @@ ecap_vc(int fd, struct pci_conf *p, uint
 	uint32_t cap1;
 
 	printf("VC %d", ver);
-	if (ver != 1)
+	if (ver < 1)
 		return;
 	cap1 = read_config(fd, &p->pc_sel, ptr + PCIR_VC_CAP1, 4);
 	printf(" max VC%d", cap1 & PCIM_VC_CAP1_EXT_COUNT);
@@ -592,7 +594,7 @@ ecap_sernum(int fd, struct pci_conf *p, 
 	uint32_t high, low;
 
 	printf("Serial %d", ver);
-	if (ver != 1)
+	if (ver < 1)
 		return;
 	low = read_config(fd, &p->pc_sel, ptr + PCIR_SERIAL_LOW, 4);
 	high = read_config(fd, &p->pc_sel, ptr + PCIR_SERIAL_HIGH, 4);
@@ -600,10 +602,58 @@ ecap_sernum(int fd, struct pci_conf *p, 
 }
 
 static void
+ecap_vendor(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver)
+{
+	uint32_t val;
+
+	printf("Vendor %d", ver);
+	if (ver < 1)
+		return;
+	val = read_config(fd, &p->pc_sel, ptr + 4, 4);
+	printf(" ID %d", val & 0xffff);
+}
+
+static void
+ecap_sec_pcie(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver)
+{
+	uint32_t val;
+
+	printf("PCIe Sec %d", ver);
+	if (ver < 1)
+		return;
+	val = read_config(fd, &p->pc_sel, ptr + 8, 4);
+	printf(" lane errors %#x", val);
+}
+
+struct {
+	uint16_t id;
+	const char *name;
+} ecap_names[] = {
+	{ PCIZ_PWRBDGT, "Power Budgeting" },
+	{ PCIZ_RCLINK_DCL, "Root Complex Link Declaration" },
+	{ PCIZ_RCLINK_CTL, "Root Complex Internal Link Control" },
+	{ PCIZ_RCEC_ASSOC, "Root Complex Event Collector ASsociation" },
+	{ PCIZ_MFVC, "MFVC" },
+	{ PCIZ_RCRB, "RCRB" },
+	{ PCIZ_ACS, "ACS" },
+	{ PCIZ_ARI, "ARI" },
+	{ PCIZ_ATS, "ATS" },
+	{ PCIZ_SRIOV, "SRIOV" },
+	{ PCIZ_MULTICAST, "Multicast" },
+	{ PCIZ_RESIZE_BAR, "Resizable BAR" },
+	{ PCIZ_DPA, "DPA" },
+	{ PCIZ_TPH_REQ, "TPH Requester" },
+	{ PCIZ_LTR, "LTR" },
+	{ 0, NULL }
+};
+
+static void
 list_ecaps(int fd, struct pci_conf *p)
 {
+	const char *name;
 	uint32_t ecap;
 	uint16_t ptr;
+	int i;
 
 	ptr = PCIR_EXTCAP;
 	ecap = read_config(fd, &p->pc_sel, ptr, 4);
@@ -621,8 +671,20 @@ list_ecaps(int fd, struct pci_conf *p)
 		case PCIZ_SERNUM:
 			ecap_sernum(fd, p, ptr, PCI_EXTCAP_VER(ecap));
 			break;
+		case PCIZ_VENDOR:
+			ecap_vendor(fd, p, ptr, PCI_EXTCAP_VER(ecap));
+			break;
+		case PCIZ_SEC_PCIE:
+			ecap_sec_pcie(fd, p, ptr, PCI_EXTCAP_VER(ecap));
+			break;
 		default:
-			printf("unknown %d", PCI_EXTCAP_VER(ecap));
+			name = "unknown";
+			for (i = 0; ecap_names[i].name != NULL; i++)
+				if (ecap_names[i].id == PCI_EXTCAP_ID(ecap)) {
+					name = ecap_names[i].name;
+					break;
+				}
+			printf("%s %d", name, PCI_EXTCAP_VER(ecap));
 			break;
 		}
 		printf("\n");

Modified: head/usr.sbin/pciconf/err.c
==============================================================================
--- head/usr.sbin/pciconf/err.c	Thu Sep 13 19:05:24 2012	(r240473)
+++ head/usr.sbin/pciconf/err.c	Thu Sep 13 19:08:31 2012	(r240474)
@@ -91,6 +91,10 @@ static struct bit_table aer_uc[] = {
 	{ PCIM_AER_UC_ECRC_ERROR, "ECRC Error" },
 	{ PCIM_AER_UC_UNSUPPORTED_REQUEST, "Unsupported Request" },
 	{ PCIM_AER_UC_ACS_VIOLATION, "ACS Violation" },
+	{ PCIM_AER_UC_INTERNAL_ERROR, "Uncorrectable Internal Error" },
+	{ PCIM_AER_UC_MC_BLOCKED_TLP, "MC Blocked TLP" },
+	{ PCIM_AER_UC_ATOMIC_EGRESS_BLK, "AtomicOp Egress Blocked" },
+	{ PCIM_AER_UC_TLP_PREFIX_BLOCKED, "TLP Prefix Blocked Error" },
 	{ 0, NULL },
 };
 
@@ -102,6 +106,8 @@ static struct bit_table aer_cor[] = {
 	{ PCIM_AER_COR_REPLAY_ROLLOVER, "REPLAY_NUM Rollover" },
 	{ PCIM_AER_COR_REPLAY_TIMEOUT, "Replay Timer Timeout" },
 	{ PCIM_AER_COR_ADVISORY_NF_ERROR, "Advisory Non-Fatal Error" },
+	{ PCIM_AER_COR_INTERNAL_ERROR, "Corrected Internal Error" },
+	{ PCIM_AER_COR_HEADER_LOG_OVFLOW, "Header Log Overflow" },
 	{ 0, NULL },
 };
 

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 20:11:27 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 15A891065679;
	Thu, 13 Sep 2012 20:11:27 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id DD6228FC1B;
	Thu, 13 Sep 2012 20:11:26 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3A93CB93B;
	Thu, 13 Sep 2012 16:11:26 -0400 (EDT)
From: John Baldwin 
To: Bryan Venteicher 
Date: Thu, 13 Sep 2012 14:56:03 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; )
References: <651175615.1815.1347554442005.JavaMail.root@daemoninthecloset.org>
In-Reply-To: <651175615.1815.1347554442005.JavaMail.root@daemoninthecloset.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201209131456.03422.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
	(bigwig.baldwin.cx); Thu, 13 Sep 2012 16:11:26 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Peter Grehan 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 20:11:27 -0000

On Thursday, September 13, 2012 12:40:42 pm Bryan Venteicher wrote:
> > Would it be possible to use atomic_load/store() instead of direct
> > memory barriers?  For example:
> > 
> 
> I've been sitting on a (lightly tested) patch [1] for awhile that
> does just that, but am not very happy with it. A lot of the fields
> are 16-bit, which not all architectures have atomic(9) support for. 
> And I think the atomic(9) behavior on UP kernels does not provide
> the same guarantees as on an SMP kernel (could have an UP kernel
> on an SMP host). 

That is the one thing I was worried about (the fields being defined
to be 16-bit).  I presume that is required by the virtio de facto
standard?  Shame we can't clue-by-four people putting 16-bit fields
in these sort of things. :-P

> I also found myself wanting an atomic_load_rel_*() type function.

That would be odd I think.  _rel barriers only affect stores, so
there would be no defined ordering between the load and the
subsequent stores.  (With our current definitions of _acq and
_rel.)  If you need a full fence for some reason, than a plain
mb() may be the best thing in that case.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Sep 13 22:26:23 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5084F1065675;
	Thu, 13 Sep 2012 22:26:23 +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 3A3698FC18;
	Thu, 13 Sep 2012 22:26:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DMQNvH088178;
	Thu, 13 Sep 2012 22:26:23 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DMQMFC088169;
	Thu, 13 Sep 2012 22:26:22 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201209132226.q8DMQMFC088169@svn.freebsd.org>
From: Attilio Rao 
Date: Thu, 13 Sep 2012 22:26: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: r240475 - in head/sys: dev/hwpmc kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 13 Sep 2012 22:26:23 -0000

Author: attilio
Date: Thu Sep 13 22:26:22 2012
New Revision: 240475
URL: http://svn.freebsd.org/changeset/base/240475

Log:
  Remove all the checks on curthread != NULL with the exception of some MD
  trap checks (eg. printtrap()).
  
  Generally this check is not needed anymore, as there is not a legitimate
  case where curthread != NULL, after pcpu 0 area has been properly
  initialized.
  
  Reviewed by:	bde, jhb
  MFC after:	1 week

Modified:
  head/sys/dev/hwpmc/hwpmc_arm.c
  head/sys/dev/hwpmc/hwpmc_x86.c
  head/sys/kern/kern_condvar.c
  head/sys/kern/kern_mutex.c
  head/sys/kern/kern_rwlock.c
  head/sys/kern/kern_sx.c
  head/sys/kern/kern_thread.c
  head/sys/kern/vfs_subr.c

Modified: head/sys/dev/hwpmc/hwpmc_arm.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_arm.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/dev/hwpmc/hwpmc_arm.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -75,12 +75,10 @@ pmc_save_kernel_callchain(uintptr_t *cc,
 	KASSERT(TRAPF_USERMODE(tf) == 0,("[arm,%d] not a kernel backtrace",
 	    __LINE__));
 
+	td = curthread;
 	pc = PMC_TRAPFRAME_TO_PC(tf);
 	*cc++ = pc;
 
-	if ((td = curthread) == NULL)
-		return (1);
-
 	if (maxsamples <= 1)
 		return (1);
 
@@ -126,12 +124,10 @@ pmc_save_user_callchain(uintptr_t *cc, i
 	KASSERT(TRAPF_USERMODE(tf), ("[x86,%d] Not a user trap frame tf=%p",
 	    __LINE__, (void *) tf));
 
+	td = curthread;
 	pc = PMC_TRAPFRAME_TO_PC(tf);
 	*cc++ = pc;
 
-	if ((td = curthread) == NULL)
-		return (1);
-
 	if (maxsamples <= 1)
 		return (1);
 

Modified: head/sys/dev/hwpmc/hwpmc_x86.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_x86.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/dev/hwpmc/hwpmc_x86.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -161,6 +161,7 @@ pmc_save_kernel_callchain(uintptr_t *cc,
 	KASSERT(TRAPF_USERMODE(tf) == 0,("[x86,%d] not a kernel backtrace",
 	    __LINE__));
 
+	td = curthread;
 	pc = PMC_TRAPFRAME_TO_PC(tf);
 	fp = PMC_TRAPFRAME_TO_FP(tf);
 	sp = PMC_TRAPFRAME_TO_KERNEL_SP(tf);
@@ -168,9 +169,6 @@ pmc_save_kernel_callchain(uintptr_t *cc,
 	*cc++ = pc;
 	r = fp + sizeof(uintptr_t); /* points to return address */
 
-	if ((td = curthread) == NULL)
-		return (1);
-
 	if (nframes <= 1)
 		return (1);
 

Modified: head/sys/kern/kern_condvar.c
==============================================================================
--- head/sys/kern/kern_condvar.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/kern/kern_condvar.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
  * Common sanity checks for cv_wait* functions.
  */
 #define	CV_ASSERT(cvp, lock, td) do {					\
-	KASSERT((td) != NULL, ("%s: curthread NULL", __func__));	\
+	KASSERT((td) != NULL, ("%s: td NULL", __func__));		\
 	KASSERT(TD_IS_RUNNING(td), ("%s: not TDS_RUNNING", __func__));	\
 	KASSERT((cvp) != NULL, ("%s: cvp NULL", __func__));		\
 	KASSERT((lock) != NULL, ("%s: lock NULL", __func__));		\

Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/kern/kern_mutex.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -200,7 +200,6 @@ _mtx_lock_flags(struct mtx *m, int opts,
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(!TD_IS_IDLETHREAD(curthread),
 	    ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d",
 	    curthread, m->lock_object.lo_name, file, line));
@@ -225,7 +224,6 @@ _mtx_unlock_flags(struct mtx *m, int opt
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(m->mtx_lock != MTX_DESTROYED,
 	    ("mtx_unlock() of destroyed mutex @ %s:%d", file, line));
 	KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep,
@@ -248,7 +246,6 @@ _mtx_lock_spin_flags(struct mtx *m, int 
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(m->mtx_lock != MTX_DESTROYED,
 	    ("mtx_lock_spin() of destroyed mutex @ %s:%d", file, line));
 	KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin,
@@ -272,7 +269,6 @@ _mtx_unlock_spin_flags(struct mtx *m, in
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(m->mtx_lock != MTX_DESTROYED,
 	    ("mtx_unlock_spin() of destroyed mutex @ %s:%d", file, line));
 	KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin,
@@ -303,7 +299,6 @@ mtx_trylock_flags_(struct mtx *m, int op
 	if (SCHEDULER_STOPPED())
 		return (1);
 
-	MPASS(curthread != NULL);
 	KASSERT(!TD_IS_IDLETHREAD(curthread),
 	    ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d",
 	    curthread, m->lock_object.lo_name, file, line));

Modified: head/sys/kern/kern_rwlock.c
==============================================================================
--- head/sys/kern/kern_rwlock.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/kern/kern_rwlock.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -241,7 +241,6 @@ _rw_wlock(struct rwlock *rw, const char 
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(!TD_IS_IDLETHREAD(curthread),
 	    ("rw_wlock() by idle thread %p on rwlock %s @ %s:%d",
 	    curthread, rw->lock_object.lo_name, file, line));
@@ -292,7 +291,6 @@ _rw_wunlock(struct rwlock *rw, const cha
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(rw->rw_lock != RW_DESTROYED,
 	    ("rw_wunlock() of destroyed rwlock @ %s:%d", file, line));
 	_rw_assert(rw, RA_WLOCKED, file, line);

Modified: head/sys/kern/kern_sx.c
==============================================================================
--- head/sys/kern/kern_sx.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/kern/kern_sx.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -249,7 +249,6 @@ _sx_slock(struct sx *sx, int opts, const
 
 	if (SCHEDULER_STOPPED())
 		return (0);
-	MPASS(curthread != NULL);
 	KASSERT(!TD_IS_IDLETHREAD(curthread),
 	    ("sx_slock() by idle thread %p on sx %s @ %s:%d",
 	    curthread, sx->lock_object.lo_name, file, line));
@@ -303,7 +302,6 @@ _sx_xlock(struct sx *sx, int opts, const
 
 	if (SCHEDULER_STOPPED())
 		return (0);
-	MPASS(curthread != NULL);
 	KASSERT(!TD_IS_IDLETHREAD(curthread),
 	    ("sx_xlock() by idle thread %p on sx %s @ %s:%d",
 	    curthread, sx->lock_object.lo_name, file, line));
@@ -330,7 +328,6 @@ sx_try_xlock_(struct sx *sx, const char 
 	if (SCHEDULER_STOPPED())
 		return (1);
 
-	MPASS(curthread != NULL);
 	KASSERT(!TD_IS_IDLETHREAD(curthread),
 	    ("sx_try_xlock() by idle thread %p on sx %s @ %s:%d",
 	    curthread, sx->lock_object.lo_name, file, line));
@@ -361,7 +358,6 @@ _sx_sunlock(struct sx *sx, const char *f
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
 	    ("sx_sunlock() of destroyed sx @ %s:%d", file, line));
 	_sx_assert(sx, SA_SLOCKED, file, line);
@@ -378,7 +374,6 @@ _sx_xunlock(struct sx *sx, const char *f
 
 	if (SCHEDULER_STOPPED())
 		return;
-	MPASS(curthread != NULL);
 	KASSERT(sx->sx_lock != SX_LOCK_DESTROYED,
 	    ("sx_xunlock() of destroyed sx @ %s:%d", file, line));
 	_sx_assert(sx, SA_XLOCKED, file, line);

Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/kern/kern_thread.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -622,7 +622,6 @@ thread_single(int mode)
 	p = td->td_proc;
 	mtx_assert(&Giant, MA_NOTOWNED);
 	PROC_LOCK_ASSERT(p, MA_OWNED);
-	KASSERT((td != NULL), ("curthread is NULL"));
 
 	if ((p->p_flag & P_HADTHREADS) == 0)
 		return (0);

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Thu Sep 13 19:08:31 2012	(r240474)
+++ head/sys/kern/vfs_subr.c	Thu Sep 13 22:26:22 2012	(r240475)
@@ -3416,7 +3416,6 @@ vfs_unmountall(void)
 	struct thread *td;
 	int error;
 
-	KASSERT(curthread != NULL, ("vfs_unmountall: NULL curthread"));
 	CTR1(KTR_VFS, "%s: unmounting all filesystems", __func__);
 	td = curthread;
 

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 00:19:07 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 43D0E106564A;
	Fri, 14 Sep 2012 00:19:07 +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 2EDA08FC0A;
	Fri, 14 Sep 2012 00:19:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E0J7A3004865;
	Fri, 14 Sep 2012 00:19:07 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E0J6hX004859;
	Fri, 14 Sep 2012 00:19:06 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201209140019.q8E0J6hX004859@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 14 Sep 2012 00:19: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: r240476 - in head/usr.sbin/pkg_install: add lib
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 00:19:07 -0000

Author: jkim
Date: Fri Sep 14 00:19:06 2012
New Revision: 240476
URL: http://svn.freebsd.org/changeset/base/240476

Log:
  Do not change owner, group, or mode when package database directory and
  its contents are created with pkg_add(1).  It may happen when the packing
  list contains @owner, @group, or @mode.
  
  Reported by:	Donald Bostrom (dbostrom at niksun dot com)
  Reviewed by:	portmgr (bapt)

Modified:
  head/usr.sbin/pkg_install/add/add.h
  head/usr.sbin/pkg_install/add/extract.c
  head/usr.sbin/pkg_install/add/futil.c
  head/usr.sbin/pkg_install/add/perform.c
  head/usr.sbin/pkg_install/lib/lib.h

Modified: head/usr.sbin/pkg_install/add/add.h
==============================================================================
--- head/usr.sbin/pkg_install/add/add.h	Thu Sep 13 22:26:22 2012	(r240475)
+++ head/usr.sbin/pkg_install/add/add.h	Fri Sep 14 00:19:06 2012	(r240476)
@@ -41,7 +41,7 @@ extern char	*PkgAddCmd;
 extern char	FirstPen[];
 extern add_mode_t AddMode;
 
-int		make_hierarchy(char *);
+int		make_hierarchy(char *, Boolean);
 void		extract_plist(const char *, Package *);
 void		apply_perms(const char *, const char *);
 

Modified: head/usr.sbin/pkg_install/add/extract.c
==============================================================================
--- head/usr.sbin/pkg_install/add/extract.c	Thu Sep 13 22:26:22 2012	(r240475)
+++ head/usr.sbin/pkg_install/add/extract.c	Fri Sep 14 00:19:06 2012	(r240476)
@@ -225,7 +225,7 @@ extract_plist(const char *home, Package 
 		printf("extract: CWD to %s\n", p->name);
 	    PUSHOUT(Directory);
 	    if (strcmp(p->name, ".")) {
-		if (!Fake && make_hierarchy(p->name) == FAIL) {
+		if (!Fake && make_hierarchy(p->name, TRUE) == FAIL) {
 		    cleanup(0);
 		    errx(2, "%s: unable to cwd to '%s'", __func__, p->name);
 		}

Modified: head/usr.sbin/pkg_install/add/futil.c
==============================================================================
--- head/usr.sbin/pkg_install/add/futil.c	Thu Sep 13 22:26:22 2012	(r240475)
+++ head/usr.sbin/pkg_install/add/futil.c	Fri Sep 14 00:19:06 2012	(r240476)
@@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
  */
 
 int
-make_hierarchy(char *dir)
+make_hierarchy(char *dir, Boolean set_perm)
 {
     char *cp1, *cp2;
 
@@ -55,7 +55,8 @@ make_hierarchy(char *dir)
 		    *cp2 = '/';
 		return FAIL;
 	    }
-	    apply_perms(NULL, dir);
+	    if (set_perm)
+		apply_perms(NULL, dir);
 	}
 	/* Put it back */
 	if (cp2) {

Modified: head/usr.sbin/pkg_install/add/perform.c
==============================================================================
--- head/usr.sbin/pkg_install/add/perform.c	Thu Sep 13 22:26:22 2012	(r240475)
+++ head/usr.sbin/pkg_install/add/perform.c	Fri Sep 14 00:19:06 2012	(r240476)
@@ -511,7 +511,7 @@ pkg_do(char *pkg)
 	zapLogDir = 1;
 	if (Verbose)
 	    printf("Attempting to record package into %s..\n", LogDir);
-	if (make_hierarchy(LogDir)) {
+	if (make_hierarchy(LogDir, FALSE)) {
 	    warnx("can't record package into '%s', you're on your own!",
 		   LogDir);
 	    bzero(LogDir, FILENAME_MAX);

Modified: head/usr.sbin/pkg_install/lib/lib.h
==============================================================================
--- head/usr.sbin/pkg_install/lib/lib.h	Thu Sep 13 22:26:22 2012	(r240475)
+++ head/usr.sbin/pkg_install/lib/lib.h	Fri Sep 14 00:19:06 2012	(r240476)
@@ -99,7 +99,7 @@
  * Version of the package tools - increase whenever you make a change
  * in the code that is not cosmetic only.
  */
-#define PKG_INSTALL_VERSION	20120530
+#define PKG_INSTALL_VERSION	20120913
 
 #define PKG_WRAPCONF_FNAME	"/var/db/pkg_install.conf"
 #define main(argc, argv)	real_main(argc, argv)

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 01:23:28 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B5865106566B;
	Fri, 14 Sep 2012 01:23:28 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A05838FC12;
	Fri, 14 Sep 2012 01:23:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E1NSG1014928;
	Fri, 14 Sep 2012 01:23:28 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E1NS6g014926;
	Fri, 14 Sep 2012 01:23:28 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201209140123.q8E1NS6g014926@svn.freebsd.org>
From: Eitan Adler 
Date: Fri, 14 Sep 2012 01:23: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: r240480 - head/share/misc
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 01:23:28 -0000

Author: eadler
Date: Fri Sep 14 01:23:28 2012
New Revision: 240480
URL: http://svn.freebsd.org/changeset/base/240480

Log:
  Belatedly add myself
  
  MFC after:	3 days

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

Modified: head/share/misc/committers-src.dot
==============================================================================
--- head/share/misc/committers-src.dot	Fri Sep 14 00:37:12 2012	(r240479)
+++ head/share/misc/committers-src.dot	Fri Sep 14 01:23:28 2012	(r240480)
@@ -133,6 +133,7 @@ dougb [label="Doug Barton\ndougb@FreeBSD
 dteske [label="Devin Teske\ndteske@FreeBSD.org\n2012/04/10"]
 dumbbell [label="Jean-Sebastien Pedron\ndumbbell@FreeBSD.org\n2004/11/29"]
 dwmalone [label="David Malone\ndwmalone@FreeBSD.org\n2000/07/11"]
+eadler [label="Eitan Adler\neadler@FreeBSD.org\n2012/01/18"]
 ed [label="Ed Schouten\ned@FreeBSD.org\n2008/05/22"]
 edwin [label="Edwin Groothuis\nedwin@FreeBSD.org\n2007/06/25"]
 eivind [label="Eivind Eklund\neivind@FreeBSD.org\n????/??/??"]
@@ -331,6 +332,7 @@ bz -> syrinx
 cognet -> jceel
 cognet -> kevlo
 
+cperciva -> eadler
 cperciva -> flz
 cperciva -> randi
 cperciva -> simon

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 04:20:47 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 03B52106566B;
	Fri, 14 Sep 2012 04:20:47 +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 725ED8FC08;
	Fri, 14 Sep 2012 04:20:45 +0000 (UTC)
Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8E4KhNf068039;
	Fri, 14 Sep 2012 07:20:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id
	q8E4KV0a099874; Fri, 14 Sep 2012 07:20:31 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8E4KVIi099873; 
	Fri, 14 Sep 2012 07:20:31 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Fri, 14 Sep 2012 07:20:31 +0300
From: Konstantin Belousov 
To: Attilio Rao 
Message-ID: <20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
References: <201209132226.q8DMQMFC088169@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="eP8xGX2lG1UwfyBj"
Content-Disposition: inline
In-Reply-To: <201209132226.q8DMQMFC088169@svn.freebsd.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r240475 - in head/sys: dev/hwpmc kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 04:20:47 -0000


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

On Thu, Sep 13, 2012 at 10:26:22PM +0000, Attilio Rao wrote:
> Author: attilio
> Date: Thu Sep 13 22:26:22 2012
> New Revision: 240475
> URL: http://svn.freebsd.org/changeset/base/240475
>=20
> Log:
>   Remove all the checks on curthread !=3D NULL with the exception of some=
 MD
>   trap checks (eg. printtrap()).
>  =20
>   Generally this check is not needed anymore, as there is not a legitimate
>   case where curthread !=3D NULL, after pcpu 0 area has been properly
>   initialized.
I do not disagree with the patch, but I do with this statement.
During the AP startup, there is indeed a window while curthread is NULL.
Unfortunately, trying to panic there is worse then not panic.


--eP8xGX2lG1UwfyBj
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlBSsI4ACgkQC3+MBN1Mb4iUmACgh15COGVK51luTjxM2/H9qZa2
64EAn3hUbntpvxmym5hh85pK6/lY2j2Z
=c/hB
-----END PGP SIGNATURE-----

--eP8xGX2lG1UwfyBj--

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 05:24:06 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D3F0F1065670;
	Fri, 14 Sep 2012 05:24:06 +0000 (UTC)
	(envelope-from kientzle@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BE9B58FC0C;
	Fri, 14 Sep 2012 05:24:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E5O6xt050350;
	Fri, 14 Sep 2012 05:24:06 GMT
	(envelope-from kientzle@svn.freebsd.org)
Received: (from kientzle@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E5O6Ev050348;
	Fri, 14 Sep 2012 05:24:06 GMT
	(envelope-from kientzle@svn.freebsd.org)
Message-Id: <201209140524.q8E5O6Ev050348@svn.freebsd.org>
From: Tim Kientzle 
Date: Fri, 14 Sep 2012 05:24: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: r240481 - head/sys/boot/common
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 05:24:06 -0000

Author: kientzle
Date: Fri Sep 14 05:24:06 2012
New Revision: 240481
URL: http://svn.freebsd.org/changeset/base/240481

Log:
  The MBR data is not necessarily aligned.  This is a problem on ARM.

Modified:
  head/sys/boot/common/part.c

Modified: head/sys/boot/common/part.c
==============================================================================
--- head/sys/boot/common/part.c	Fri Sep 14 01:23:28 2012	(r240480)
+++ head/sys/boot/common/part.c	Fri Sep 14 05:24:06 2012	(r240481)
@@ -661,8 +661,8 @@ ptable_open(void *dev, off_t sectors, ui
 	for (i = has_ext = 0; i < NDOSPART; i++) {
 		if (dp[i].dp_typ == 0)
 			continue;
-		start = le32toh(dp[i].dp_start);
-		end = le32toh(dp[i].dp_size);
+		start = le32dec(&(dp[i].dp_start));
+		end = le32dec(&(dp[i].dp_size));
 		if (start == 0 || end == 0)
 			continue;
 #if 0	/* Some BIOSes return an incorrect number of sectors */

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 05:48:11 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 985A21065679;
	Fri, 14 Sep 2012 05:48:11 +0000 (UTC)
	(envelope-from bryanv@daemoninthecloset.org)
Received: from torment.daemoninthecloset.org (torment.daemoninthecloset.org
	[94.242.209.234])
	by mx1.freebsd.org (Postfix) with ESMTP id 983258FC1B;
	Fri, 14 Sep 2012 05:48:10 +0000 (UTC)
X-Virus-Scanned: amavisd-new at daemoninthecloset.org
Received: from sage.daemoninthecloset.org (sage.daemoninthecloset.org
	[127.0.1.1])
	by sage.daemoninthecloset.org (Postfix) with ESMTP id C279B673EC;
	Fri, 14 Sep 2012 00:47:52 -0500 (CDT)
Date: Fri, 14 Sep 2012 00:47:52 -0500 (CDT)
From: Bryan Venteicher 
To: John Baldwin 
Message-ID: <2045684227.3044.1347601672495.JavaMail.root@daemoninthecloset.org>
In-Reply-To: <201209131456.03422.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.10.20]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - GC20
	([unknown])/7.2.0_GA_2669)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Peter Grehan 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 05:48:11 -0000

Hi

----- Original Message -----
> From: "John Baldwin" 
> To: "Bryan Venteicher" 
> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Peter Grehan"
> 
> Sent: Thursday, September 13, 2012 1:56:03 PM
> Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> 
> On Thursday, September 13, 2012 12:40:42 pm Bryan Venteicher wrote:
> > > Would it be possible to use atomic_load/store() instead of direct
> > > memory barriers?  For example:
> > > 
> > 
> > I've been sitting on a (lightly tested) patch [1] for awhile that
> > does just that, but am not very happy with it. A lot of the fields
> > are 16-bit, which not all architectures have atomic(9) support for.
> > And I think the atomic(9) behavior on UP kernels does not provide
> > the same guarantees as on an SMP kernel (could have an UP kernel
> > on an SMP host).
> 
> That is the one thing I was worried about (the fields being defined
> to be 16-bit).  I presume that is required by the virtio de facto
> standard?  Shame we can't clue-by-four people putting 16-bit fields
> in these sort of things. :-P
> 

Yes, the 16-bit fields are mandated by the VirtIO spec. The guest/host
shared memory is rounded up to next full page, so there actually isn't
any memory savings for typical queue sizes. Doubt it is any worse than
actual hardware regardless.

> > I also found myself wanting an atomic_load_rel_*() type function.
> 
> That would be odd I think.  _rel barriers only affect stores, so
> there would be no defined ordering between the load and the
> subsequent stores.  (With our current definitions of _acq and
> _rel.)  If you need a full fence for some reason, than a plain
> mb() may be the best thing in that case.
> 

I'm able to batch add descriptors (via vq_ring_update_avail()),
but when checking if I must notify the host, I need to make sure
the latest avail->idx is visible before checking the flag from
the host on whether notifications are disabled. Gratuitous
notifications are fine, but skipping one is not.

In the patch, I kludge this with:
    atomic_add_rel_16(&flags, 0);
    foo = flags;

Hoping the dependency would prevent the assignment to foo from
floating above the atomic_add_rel(). 

I originally did the atomic(9) work just to see if there would be
any performance difference between the two - I wasn't able to
measure any, but I don't have the most modern hardware either.

Bryan

> --
> John Baldwin
> 

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 07:52:58 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 70273106564A;
	Fri, 14 Sep 2012 07:52:58 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 597138FC16;
	Fri, 14 Sep 2012 07:52:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E7qwNR073508;
	Fri, 14 Sep 2012 07:52:58 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E7qwKx073504;
	Fri, 14 Sep 2012 07:52:58 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201209140752.q8E7qwKx073504@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Fri, 14 Sep 2012 07:52: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: r240482 - head/sys/dev/usb/controller
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 07:52:58 -0000

Author: hselasky
Date: Fri Sep 14 07:52:57 2012
New Revision: 240482
URL: http://svn.freebsd.org/changeset/base/240482

Log:
  DWC OTG improvements. Implement full support for SPLIT transactions, in other
  words FULL/LOW speed devices through HIGH speed HUBs. Improve support for
  suspend and resume in host mode.

Modified:
  head/sys/dev/usb/controller/dwc_otg.c
  head/sys/dev/usb/controller/dwc_otg.h
  head/sys/dev/usb/controller/dwc_otgreg.h

Modified: head/sys/dev/usb/controller/dwc_otg.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg.c	Fri Sep 14 05:24:06 2012	(r240481)
+++ head/sys/dev/usb/controller/dwc_otg.c	Fri Sep 14 07:52:57 2012	(r240482)
@@ -510,7 +510,7 @@ dwc_otg_host_channel_alloc(struct dwc_ot
 	}
 
 	for (; x != max_channel; x++) {
-		if (sc->sc_hcchar[x] == 0) {
+		if (sc->sc_chan_state[x].hcchar == 0) {
 
 			/* check if channel is enabled */
 			temp = DWC_OTG_READ_4(sc, DOTG_HCCHAR(x));
@@ -519,7 +519,8 @@ dwc_otg_host_channel_alloc(struct dwc_ot
 				continue;
 			}
 
-			sc->sc_hcchar[x] = td->hcchar;
+			sc->sc_chan_state[x].hcchar = td->hcchar;
+			sc->sc_chan_state[x].hcsplt = td->hcsplt;
 
 			DPRINTF("HCCHAR=0x%08x(0x%08x) HCSPLT=0x%08x\n",
 			    td->hcchar, temp, td->hcsplt);
@@ -528,14 +529,14 @@ dwc_otg_host_channel_alloc(struct dwc_ot
 			temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
 			DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
 
-			/* enable interrupts */
-			DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x),
-			    HCINT_STALL | HCINT_BBLERR |
-			    HCINT_AHBERR | HCINT_XACTERR |
-			    HCINT_XFERCOMPL | HCINT_NAK);
+			/* clear buffered interrupts */
+			sc->sc_chan_state[x].hcint = 0;
+
+			/* clear state */
+			sc->sc_chan_state[x].state = 0;
 
-			DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt);
-			DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0);
+			/* we've requested SOF interrupt */
+			sc->sc_chan_state[x].sof_requested = 1;
 
 			/* set channel */
 			td->channel = x;
@@ -558,8 +559,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 	struct usb_device_request req __aligned(4);
 	struct dwc_otg_softc *sc;
 	uint32_t temp;
-	uint32_t max_buffer;
-	uint8_t max_frames;
 
 	if (dwc_otg_host_channel_alloc(td))
 		return (1);		/* busy */
@@ -567,57 +566,103 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 	/* get pointer to softc */
 	sc = DWC_OTG_PC2SC(td->pc);
 
-	temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel));
-	DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp);
+	temp = sc->sc_chan_state[td->channel].hcint;
 
-	DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
-	    td->channel,
-	    temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
+	DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
+	    td->channel, sc->sc_chan_state[td->channel].state, temp,
+	    DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
 	    DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)));
 
-	if (temp & HCINT_NAK)
-		td->did_nak = 1;
-
 	if (temp & HCINT_STALL) {
 		td->error_stall = 1;
 		td->error_any = 1;
 		return (0);		/* complete */
 	}
 
-	if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) {
+	if (temp & (HCINT_BBLERR | HCINT_XACTERR)) {
 		td->error_any = 1;
 		return (0);		/* complete */
 	}
 
-	if (temp & HCINT_XFERCOMPL)
-		td->did_complete = 1;
+	if (temp & HCINT_NAK) {
+		if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
+			return (1);	/* busy */
+		td->sof_val += 1;
+	}
+
+	/* channel must be disabled before we can complete the transfer */
+
+	if (temp & (HCINT_NAK | HCINT_ACK | HCINT_NYET)) {
+		uint32_t hcchar = DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel));
+		if (hcchar & HCCHAR_CHENA) {
+			DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
+			    HCCHAR_CHENA | HCCHAR_CHDIS);
+		} else {
+			sc->sc_chan_state[td->channel].hcint |= HCINT_CHHLTD;
+		}
+	}
 
-	if (td->did_complete) {
-		if (td->did_nak == 0) {
+	switch (sc->sc_chan_state[td->channel].state) {
+	case DWC_CHAN_ST_START:
+		if (sc->sc_chan_state[td->channel].hcsplt != 0) {
+			sc->sc_chan_state[td->channel].hcsplt &=
+			    ~HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_S_ANE;
+		} else {
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_ANE;
+		}
+		goto send_pkt;
+	case DWC_CHAN_ST_WAIT_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto send_pkt;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
 			td->offset += td->tx_bytes;
 			td->remainder -= td->tx_bytes;
 			td->toggle = 1;
+			sc->sc_chan_state[td->channel].hcint = 0;
+			sc->sc_chan_state[td->channel].state = 0;
 			return (0);	/* complete */
-		} else {
-			if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
-				return (1);	/* busy */
-			td->sof_val += 1;
 		}
-	} else {
-		return (1);	/* busy */
+		break;
+	case DWC_CHAN_ST_WAIT_S_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto send_pkt;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
+			sc->sc_chan_state[td->channel].hcsplt |= HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_C_ANE;
+			goto send_cpkt;
+		}
+		break;
+	case DWC_CHAN_ST_WAIT_C_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto send_cpkt;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
+			td->offset += td->tx_bytes;
+			td->remainder -= td->tx_bytes;
+			td->toggle = 1;
+			sc->sc_chan_state[td->channel].hcint = 0;
+			sc->sc_chan_state[td->channel].state = 0;
+			return (0);	/* complete */
+		}
+		break;
+	default:
+		break;
 	}
-	temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS);
-
-	DPRINTF("HPTXSTS=0x%08x\n", temp);
-
-	max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK);
-	max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK)
-	    >> HPTXSTS_PTXQSPCAVAIL_SHIFT;
-
-	max_buffer = max_buffer - (max_buffer % td->max_packet_size);
-	if (max_buffer == 0 || max_frames == 0)
-		return (1);	/* busy */
+	return (1);		/* busy */
 
+send_pkt:
 	if (sizeof(req) != td->remainder) {
 		td->error_any = 1;
 		return (0);		/* complete */
@@ -630,7 +675,10 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 	    (1 << HCTSIZ_PKTCNT_SHIFT) |
 	    (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT));
 
-	temp = sc->sc_hcchar[td->channel];
+	DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel),
+	    sc->sc_chan_state[td->channel].hcsplt);
+
+	temp = sc->sc_chan_state[td->channel].hcchar;
 	temp &= ~HCCHAR_EPDIR_IN;
 
 	/* must enable channel before writing data to FIFO */
@@ -640,11 +688,30 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 	bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl,
 	    DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4);
 
-	/* reset statemachine */
-	td->did_complete = 0;
-	td->did_nak = 0;
+	/* store number of bytes transmitted */
 	td->tx_bytes = sizeof(req);
 
+	/* clear interrupts */
+	sc->sc_chan_state[td->channel].hcint = 0;
+
+	return (1);	/* busy */
+
+send_cpkt:
+	DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel),
+	    (HCTSIZ_PID_SETUP << HCTSIZ_PID_SHIFT));
+
+	DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel),
+	    sc->sc_chan_state[td->channel].hcsplt);
+
+	temp = sc->sc_chan_state[td->channel].hcchar;
+	temp &= ~HCCHAR_EPDIR_IN;
+
+	/* must enable channel before writing data to FIFO */
+	DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp);
+
+	/* clear interrupts */
+	sc->sc_chan_state[td->channel].hcint = 0;
+
 	return (1);	/* busy */
 }
 
@@ -793,21 +860,15 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 	/* get pointer to softc */
 	sc = DWC_OTG_PC2SC(td->pc);
 
-	temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel));
-	DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp);
-
-	DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
-	    td->channel,
-	    temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
-	    DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)));
+	ep_type = ((sc->sc_chan_state[td->channel].hcchar &
+	    HCCHAR_EPTYPE_MASK) >> HCCHAR_EPTYPE_SHIFT);
 
-	if (temp & HCINT_NAK) {
-		td->did_nak = 1;
+	temp = sc->sc_chan_state[td->channel].hcint;
 
-		/* disable channel - will generate a halted event */
-		DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
-		    HCCHAR_CHENA | HCCHAR_CHDIS);
-	}
+	DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
+	    td->channel, sc->sc_chan_state[td->channel].state, temp,
+	    DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
+	    DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)));
 
 	if (temp & HCINT_STALL) {
 		td->error_stall = 1;
@@ -815,11 +876,23 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 		return (0);		/* complete */
 	}
 
-	if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) {
+	if (temp & (HCINT_BBLERR | HCINT_XACTERR)) {
 		td->error_any = 1;
 		return (0);		/* complete */
 	}
 
+	/* channel must be disabled before we can complete the transfer */
+
+	if (temp & (HCINT_NAK | HCINT_ACK | HCINT_NYET)) {
+		uint32_t hcchar = DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel));
+		if (hcchar & HCCHAR_CHENA) {
+			DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
+			    HCCHAR_CHENA | HCCHAR_CHDIS);
+		} else {
+			sc->sc_chan_state[td->channel].hcint |= HCINT_CHHLTD;
+		}
+	}
+
 	/* check endpoint status */
 	if (sc->sc_last_rx_status == 0)
 		goto not_complete;
@@ -828,16 +901,6 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 		goto not_complete;
 
 	switch (sc->sc_last_rx_status & GRXSTSRD_PKTSTS_MASK) {
-	case GRXSTSRH_HALTED:
-		DPRINTF("HALTED\n");
-		td->did_complete = 1;
-		break;
-	case GRXSTSRH_IN_COMPLETE:
-		DPRINTF("COMPLETE\n");
-		/* disable channel - will generate a halted event */
-		DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
-		    HCCHAR_CHENA | HCCHAR_CHDIS);
-		break;
 	case GRXSTSRH_IN_DATA:
 
 		DPRINTF("DATA\n");
@@ -878,6 +941,7 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 
 		td->remainder -= count;
 		td->offset += count;
+		sc->sc_chan_state[td->channel].hcint |= HCINT_SOFTWARE_ONLY;
 		break;
 
 	default:
@@ -888,45 +952,102 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
 	dwc_otg_common_rx_ack(sc);
 
 not_complete:
-	if (td->did_complete == 0)
+	if (temp & HCINT_SUSPEND_ONLY)
 		return (1);	/* busy */
 
-	/* check if we are complete */
-	if ((td->remainder == 0) || (td->got_short != 0)) {
-		if (td->short_pkt) {
-			/* we are complete */
-			return (0);
-		}
-		/* else need to receive a zero length packet */
-	}
-
-	temp = sc->sc_hcchar[td->channel];
-
-	ep_type = ((temp & HCCHAR_EPTYPE_MASK) >>
-	    HCCHAR_EPTYPE_SHIFT);
-
 	if (ep_type == UE_ISOCHRONOUS) {
 		if ((sc->sc_sof_val & 0xFF) != td->sof_val)
 			return (1);	/* busy */
 		if (td->sof_val & 1)
-			temp |= HCCHAR_ODDFRM;
+			sc->sc_chan_state[td->channel].hcchar |= HCCHAR_ODDFRM;
+		else
+			sc->sc_chan_state[td->channel].hcchar &= ~HCCHAR_ODDFRM;
 		td->sof_val += td->sof_res;
-		/* DATA 0 */
-		td->toggle = 0;
 	} else if (ep_type == UE_INTERRUPT) {
 		if ((sc->sc_sof_val & 0xFF) != td->sof_val)
 			return (1);	/* busy */
 		td->sof_val += td->sof_res;
-	} else {
-		if (td->did_nak) {
-			if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
-				return (1);	/* busy */
-			td->sof_val += 1;
+	} else if (temp & HCINT_NAK) {
+		if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
+			return (1);	/* busy */
+		td->sof_val += 1;
+	}
+
+	switch (sc->sc_chan_state[td->channel].state) {
+	case DWC_CHAN_ST_START:
+		if (sc->sc_chan_state[td->channel].hcsplt != 0) {
+			sc->sc_chan_state[td->channel].hcsplt &=
+			    ~HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_S_ANE;
+			goto receive_spkt;
+		} else {
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_ANE;
+			goto receive_pkt;
 		}
-		if (td->set_toggle) {
-			td->set_toggle = 0;
-			td->toggle = 1;
+	case DWC_CHAN_ST_WAIT_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto receive_pkt;
+		if (!(sc->sc_chan_state[td->channel].hcint &
+		    HCINT_SOFTWARE_ONLY))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
+			/* check if we are complete */
+			if ((td->remainder == 0) || (td->got_short != 0)) {
+				if (td->short_pkt) {
+					/* we are complete */
+					sc->sc_chan_state[
+					    td->channel].hcint = 0;
+					sc->sc_chan_state[
+					    td->channel].state = 0;
+					return (0);
+				}
+				/*
+				 * Else need to receive a zero length
+				 * packet.
+				 */
+			}
+			if (sc->sc_chan_state[td->channel].hcsplt != 0) {
+				sc->sc_chan_state[td->channel].hcsplt &=
+				    ~HCSPLT_COMPSPLT;
+				sc->sc_chan_state[td->channel].state =
+				    DWC_CHAN_ST_WAIT_S_ANE;
+				goto receive_spkt;
+			} else {
+				sc->sc_chan_state[td->channel].state =
+				    DWC_CHAN_ST_WAIT_ANE;
+				goto receive_pkt;
+			}
 		}
+		break;
+	case DWC_CHAN_ST_WAIT_S_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto receive_spkt;
+		if (sc->sc_chan_state[td->channel].hcint & (HCINT_ACK | HCINT_NYET)) {
+			sc->sc_chan_state[td->channel].hcsplt |=
+			    HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_ANE;
+			goto receive_pkt;
+		}
+		break;
+	default:
+		break;
+	}
+	return (1);		/* busy */
+
+receive_pkt:
+	if (ep_type == UE_ISOCHRONOUS) {
+		td->toggle = 0;
+	} else if (td->set_toggle) {
+		td->set_toggle = 0;
+		td->toggle = 1;
 	}
 
 	/* receive one packet */
@@ -936,16 +1057,46 @@ not_complete:
 	    (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) :
 	    (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT)));
 
+	DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel),
+	    sc->sc_chan_state[td->channel].hcsplt);
+
+	temp = sc->sc_chan_state[td->channel].hcchar;
 	temp |= HCCHAR_EPDIR_IN;
 
 	/* must enable channel before data can be received */
 	DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp);
 
-	/* reset statemachine */
-	td->did_complete = 0;
-	td->did_nak = 0;
+	/* clear interrupts */
+	sc->sc_chan_state[td->channel].hcint = 0;
 
-	return (1);			/* not complete */
+	return (1);	/* busy */
+
+receive_spkt:
+	if (ep_type == UE_ISOCHRONOUS) {
+		td->toggle = 0;
+	} else if (td->set_toggle) {
+		td->set_toggle = 0;
+		td->toggle = 1;
+	}
+
+	/* receive one packet */
+	DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel),
+	    (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) :
+	    (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT)));
+
+	DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel),
+	    sc->sc_chan_state[td->channel].hcsplt);
+
+	temp = sc->sc_chan_state[td->channel].hcchar;
+	temp |= HCCHAR_EPDIR_IN;
+
+	/* must enable channel before data can be received */
+	DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp);
+
+	/* clear interrupts */
+	sc->sc_chan_state[td->channel].hcint = 0;
+
+	return (1);	/* busy */
 }
 
 static uint8_t
@@ -1065,11 +1216,9 @@ static uint8_t
 dwc_otg_host_data_tx(struct dwc_otg_td *td)
 {
 	struct dwc_otg_softc *sc;
-	uint32_t max_buffer;
 	uint32_t count;
 	uint32_t temp;
 	uint8_t ep_type;
-	uint8_t max_frames;
 
 	if (dwc_otg_host_channel_alloc(td))
 		return (1);		/* busy */
@@ -1077,18 +1226,15 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 	/* get pointer to softc */
 	sc = DWC_OTG_PC2SC(td->pc);
 
-	temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel));
-	DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp);
+	ep_type = ((sc->sc_chan_state[td->channel].hcchar &
+	    HCCHAR_EPTYPE_MASK) >> HCCHAR_EPTYPE_SHIFT);
 
-	DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
-	    td->channel,
-	    temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
-	    DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)));
+	temp = sc->sc_chan_state[td->channel].hcint;
 
-	if (temp & HCINT_NAK) {
-		td->did_nak = 1;
-		td->did_complete = 1;
-	}
+	DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
+	    td->channel, sc->sc_chan_state[td->channel].state, temp,
+	    DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
+	    DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)));
 
 	if (temp & HCINT_STALL) {
 		td->error_stall = 1;
@@ -1096,70 +1242,132 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 		return (0);		/* complete */
 	}
 
-	if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) {
+	if (temp & (HCINT_BBLERR | HCINT_XACTERR)) {
 		td->error_any = 1;
 		return (0);		/* complete */
 	}
 
-	if (temp & HCINT_XFERCOMPL)
-		td->did_complete = 1;
+	/* channel must be disabled before we can complete the transfer */
+
+	if (temp & (HCINT_NAK | HCINT_ACK | HCINT_NYET)) {
+		uint32_t hcchar = DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel));
+		if (hcchar & HCCHAR_CHENA) {
+			DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
+			    HCCHAR_CHENA | HCCHAR_CHDIS);
+		} else {
+			sc->sc_chan_state[td->channel].hcint |= HCINT_CHHLTD;
+		}
+	}
 
-	if (td->did_complete) {
-		if (td->did_nak == 0) {
+	if (ep_type == UE_ISOCHRONOUS) {
+		if ((sc->sc_sof_val & 0xFF) != td->sof_val)
+			return (1);	/* busy */
+		if (td->sof_val & 1)
+			sc->sc_chan_state[td->channel].hcchar |= HCCHAR_ODDFRM;
+		else
+			sc->sc_chan_state[td->channel].hcchar &= ~HCCHAR_ODDFRM;
+		td->sof_val += td->sof_res;
+	} else if (ep_type == UE_INTERRUPT) {
+		if ((sc->sc_sof_val & 0xFF) != td->sof_val)
+			return (1);	/* busy */
+		td->sof_val += td->sof_res;
+	} else if (temp & HCINT_NAK) {
+		if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
+			return (1);	/* busy */
+		td->sof_val += 1;
+	}
+
+	switch (sc->sc_chan_state[td->channel].state) {
+	case DWC_CHAN_ST_START:
+		if (sc->sc_chan_state[td->channel].hcsplt != 0) {
+			sc->sc_chan_state[td->channel].hcsplt &= ~HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_S_ANE;
+		} else {
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_ANE;
+		}
+		goto send_pkt;
+	case DWC_CHAN_ST_WAIT_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto send_pkt;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
 			td->offset += td->tx_bytes;
 			td->remainder -= td->tx_bytes;
 			td->toggle ^= 1;
-			td->did_nak = 1;
 
 			/* check remainder */
 			if (td->remainder == 0) {
-				if (td->short_pkt)
+				if (td->short_pkt) {
+					sc->sc_chan_state[td->channel].hcint = 0;
+					sc->sc_chan_state[td->channel].state = 0;
 					return (0);	/* complete */
+				}
 
 				/* else we need to transmit a short packet */
 			}
-		} else {
-			if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
-				return (1);	/* busy */
-			td->sof_val += 1;
- 		}
-	} else {
-		return (1);	/* busy */
-	}
-	temp = sc->sc_hcchar[td->channel];
+			goto send_pkt;
+		}
+		break;
+	case DWC_CHAN_ST_WAIT_S_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto send_pkt;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
+			sc->sc_chan_state[td->channel].hcsplt |= HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_C_ANE;
+			goto send_cpkt;
+		}
+		break;
+	case DWC_CHAN_ST_WAIT_C_ANE:
+		if (!(sc->sc_chan_state[td->channel].hcint & HCINT_CHHLTD))
+			break;
+		if (sc->sc_chan_state[td->channel].hcint & HCINT_NAK)
+			goto send_cpkt;
+		if (sc->sc_chan_state[td->channel].hcint &
+		    (HCINT_ACK | HCINT_NYET)) {
+			td->offset += td->tx_bytes;
+			td->remainder -= td->tx_bytes;
+			td->toggle ^= 1;
+
+			/* check remainder */
+			if (td->remainder == 0) {
+				if (td->short_pkt) {
+					sc->sc_chan_state[
+					    td->channel].hcint = 0;
+					sc->sc_chan_state[
+					    td->channel].state = 0;
+					return (0);	/* complete */
+				}
 
-	ep_type = ((temp & HCCHAR_EPTYPE_MASK) >>
-	    HCCHAR_EPTYPE_SHIFT);
+				/* else we need to transmit a short packet */
+			}
+			sc->sc_chan_state[td->channel].hcsplt &=
+			    ~HCSPLT_COMPSPLT;
+			sc->sc_chan_state[td->channel].state =
+			    DWC_CHAN_ST_WAIT_S_ANE;
+			goto send_pkt;
+		}
+		break;
+	default:
+		break;
+	}
+	return (1);		/* busy */
 
+send_pkt:
 	if (ep_type == UE_ISOCHRONOUS) {
-		if ((sc->sc_sof_val & 0xFF) != td->sof_val)
-			return (1);	/* busy */
-		if (td->sof_val & 1)
-			sc->sc_hcchar[td->channel] |= HCCHAR_ODDFRM;
-		else
-			sc->sc_hcchar[td->channel] &= ~HCCHAR_ODDFRM;
-		td->sof_val += td->sof_res;
 		td->toggle = 0;
-
-	} else if (ep_type == UE_INTERRUPT) {
-		if ((sc->sc_sof_val & 0xFF) != td->sof_val)
-			return (1);	/* busy */
-		td->sof_val += td->sof_res;
 	} else if (td->set_toggle) {
 		td->set_toggle = 0;
 		td->toggle = 1;
 	}
 
-	temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS);
-
-	max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK);
-	max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK)
-	    >> HPTXSTS_PTXQSPCAVAIL_SHIFT;
-
-	max_buffer = max_buffer - (max_buffer % td->max_packet_size);
-	if (max_buffer == 0 || max_frames == 0)
-		return (1);	/* busy */
-
 	/* send one packet at a time */
 	count = td->max_packet_size;
 	if (td->remainder < count) {
@@ -1176,7 +1384,10 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 	    (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) :
 	    (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT)));
 
-	temp = sc->sc_hcchar[td->channel];
+	DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel),
+	    sc->sc_chan_state[td->channel].hcsplt);
+
+	temp = sc->sc_chan_state[td->channel].hcchar;
 	temp &= ~HCCHAR_EPDIR_IN;
 
 	/* must enable before writing data to FIFO */
@@ -1197,11 +1408,31 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 		    sc->sc_tx_bounce_buffer, (count + 3) / 4);
 	}
 
-	/* reset statemachine */
-	td->did_complete = 0;
-	td->did_nak = 0;
+	/* store number of bytes transmitted */
 	td->tx_bytes = count;
 
+	/* clear interrupts */
+	sc->sc_chan_state[td->channel].hcint = 0;
+
+	return (1);	/* busy */
+
+send_cpkt:
+	DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(td->channel),
+	    (td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) :
+	    (HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT)));
+
+	DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(td->channel),
+	    sc->sc_chan_state[td->channel].hcsplt);
+
+	temp = sc->sc_chan_state[td->channel].hcchar;
+	temp &= ~HCCHAR_EPDIR_IN;
+
+	/* must enable channel before writing data to FIFO */
+	DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp);
+
+	/* clear interrupts */
+	sc->sc_chan_state[td->channel].hcint = 0;
+
 	return (1);	/* busy */
 }
 
@@ -1524,23 +1755,12 @@ repeat:
 			/* non-data messages we simply skip */
 			if (temp != GRXSTSRD_STP_DATA &&
 			    temp != GRXSTSRD_OUT_DATA) {
-				if (sc->sc_flags.status_device_mode) {
-					dwc_otg_common_rx_ack(sc);
-					goto repeat;
-				} else if (temp != GRXSTSRD_OUT_COMPLETE &&
-				    temp != GRXSTSRH_HALTED) {
-					dwc_otg_common_rx_ack(sc);
-					goto repeat;
-				}
+				dwc_otg_common_rx_ack(sc);
+				goto repeat;
 			}
 
-			if (temp == GRXSTSRH_HALTED || 
-			    temp == GRXSTSRD_OUT_COMPLETE) {
-				temp = 0;
-			} else {
-				temp = GRXSTSRD_BCNT_GET(
-				    sc->sc_last_rx_status);
-			}
+			temp = GRXSTSRD_BCNT_GET(
+			    sc->sc_last_rx_status);
 			ep_no = GRXSTSRD_CHNUM_GET(
 			    sc->sc_last_rx_status);
 
@@ -1633,7 +1853,7 @@ void
 dwc_otg_interrupt(struct dwc_otg_softc *sc)
 {
 	uint32_t status;
-	uint32_t haint;
+	uint8_t x;
 
 	USB_BUS_LOCK(&sc->sc_bus);
 
@@ -1641,24 +1861,20 @@ dwc_otg_interrupt(struct dwc_otg_softc *
 	status = DWC_OTG_READ_4(sc, DOTG_GINTSTS);
 	DWC_OTG_WRITE_4(sc, DOTG_GINTSTS, status);
 
-	haint = DWC_OTG_READ_4(sc, DOTG_HAINT);
-
 	DPRINTFN(14, "GINTSTS=0x%08x HAINT=0x%08x HFNUM=0x%08x\n",
-	    status, haint, DWC_OTG_READ_4(sc, DOTG_HFNUM));
+	    status, DWC_OTG_READ_4(sc, DOTG_HAINT),
+	    DWC_OTG_READ_4(sc, DOTG_HFNUM));
 
-	if (haint != 0) {
-		uint8_t x;
+	/* get all channel interrupts */
+	for (x = 0; x != sc->sc_host_ch_max; x++) {
+		uint32_t temp;
 
-		/* clear left-over interrupts */
-		for (x = 0; x != sc->sc_host_ch_max; x++) {
-			if (!(haint & (1 << x)))
-				continue;
-			/* check if channel is disabled */
-			if (sc->sc_hcchar[x] == 0) {
-				uint32_t temp;
-				temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
-				DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
-			}
+		temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
+		if (temp != 0) {
+			DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
+			sc->sc_chan_state[x].hcint |=
+			    (temp & ~(HCINT_SOFTWARE_ONLY |
+			    HCINT_SUSPEND_ONLY | HCINT_CHHLTD));
 		}
 	}
 
@@ -1856,8 +2072,6 @@ dwc_otg_setup_standard_chain_sub(struct 
 	td->error_any = 0;
 	td->npkt = 0;
 	td->did_stall = temp->did_stall;
-	td->did_nak = 1;
-	td->did_complete = 1;
 	td->short_pkt = temp->short_pkt;
 	td->alt_next = temp->setup_alt_next;
 	td->set_toggle = 0;
@@ -2324,13 +2538,14 @@ dwc_otg_device_done(struct usb_xfer *xfe
 			DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
 			    HCCHAR_CHENA | HCCHAR_CHDIS);
 
-			sc->sc_hcchar[td->channel] = 0;
+			sc->sc_chan_state[td->channel].hcchar = 0;
 			sc->sc_active_rx_ep &= ~(1 << td->channel);
 
-			td->channel = DWC_OTG_MAX_CHANNELS;
-
 			/* release SOF's */
-			dwc_otg_release_sof(sc);
+			if (sc->sc_chan_state[td->channel].sof_requested != 0)
+				dwc_otg_release_sof(sc);
+
+			td->channel = DWC_OTG_MAX_CHANNELS;
 		}
 	}
 	/* dequeue transfer and start next transfer */
@@ -2671,8 +2886,12 @@ dwc_otg_init(struct dwc_otg_softc *sc)
 		uint8_t x;
 
 		for (x = 0; x != sc->sc_host_ch_max; x++) {
-			/* disable channel interrupts */
-			DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x), 0);
+			/* enable interrupts */
+			DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x),
+			    HCINT_STALL | HCINT_BBLERR |
+			    HCINT_XACTERR | HCINT_XFERCOMPL |
+			    HCINT_NAK | HCINT_ACK | HCINT_NYET |
+			    HCINT_CHHLTD);
 			DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x),
 			    HCCHAR_CHENA | HCCHAR_CHDIS);
 		}
@@ -3613,18 +3832,21 @@ dwc_otg_device_resume(struct usb_device 
 			td = xfer->td_transfer_cache;
 			if (td != NULL &&
 			    td->channel < DWC_OTG_MAX_CHANNELS) {
+				sc->sc_chan_state[td->channel].hcint &= 
+				    ~HCINT_SUSPEND_ONLY;
 
-				sc->sc_hcchar[td->channel] =
-				    (sc->sc_hcchar[td->channel] & ~HCCHAR_CHDIS) |
-				    HCCHAR_CHENA;
-
-				DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
-				    sc->sc_hcchar[td->channel]);
+				if (sc->sc_chan_state[td->channel].sof_requested == 0) {
+					sc->sc_chan_state[td->channel].sof_requested = 1;
+					dwc_otg_request_sof(sc);
+				}
 			}
 		}
 	}
 
 	USB_BUS_UNLOCK(udev->bus);
+
+	/* poll all transfers again to restart resumed ones */
+	dwc_otg_do_poll(udev->bus);
 }
 
 static void
@@ -3648,12 +3870,15 @@ dwc_otg_device_suspend(struct usb_device
 			if (td != NULL &&
 			    td->channel < DWC_OTG_MAX_CHANNELS) {
 
-				sc->sc_hcchar[td->channel] =
-				    (DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)) |
-				    HCCHAR_CHDIS) & ~HCCHAR_CHENA;
-
+				sc->sc_chan_state[td->channel].hcint |= 
+				    HCINT_NAK | HCINT_CHHLTD | HCINT_SUSPEND_ONLY;
 				DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
-				    sc->sc_hcchar[td->channel]);
+				    HCCHAR_CHENA | HCCHAR_CHDIS);
+
+				if (sc->sc_chan_state[td->channel].sof_requested != 0) {
+					sc->sc_chan_state[td->channel].sof_requested = 0;
+					dwc_otg_release_sof(sc);
+				}
 			}
 		}
 	}

Modified: head/sys/dev/usb/controller/dwc_otg.h
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg.h	Fri Sep 14 05:24:06 2012	(r240481)
+++ head/sys/dev/usb/controller/dwc_otg.h	Fri Sep 14 07:52:57 2012	(r240482)
@@ -68,8 +68,6 @@ struct dwc_otg_td {
 	uint8_t	did_stall:1;
 	uint8_t toggle:1;
 	uint8_t set_toggle:1;
-	uint8_t did_nak:1;
-	uint8_t did_complete:1;
 	uint8_t got_short:1;
 };
 
@@ -128,6 +126,18 @@ struct dwc_otg_profile {
 	uint16_t max_buffer;
 };
 
+struct dwc_otg_chan_state {
+	uint32_t hcchar;
+	uint32_t hcint;
+	uint32_t hcsplt;
+	uint8_t state;
+#define	DWC_CHAN_ST_START 0
+#define	DWC_CHAN_ST_WAIT_ANE 1
+#define	DWC_CHAN_ST_WAIT_S_ANE 2
+#define	DWC_CHAN_ST_WAIT_C_ANE 3
+	uint8_t sof_requested;
+};
+
 struct dwc_otg_softc {
 	struct usb_bus sc_bus;
 	union dwc_otg_hub_temp sc_hub_temp;
@@ -149,7 +159,7 @@ struct dwc_otg_softc {
 	uint32_t sc_last_rx_status;
 	uint32_t sc_out_ctl[DWC_OTG_MAX_ENDPOINTS];
 	uint32_t sc_in_ctl[DWC_OTG_MAX_ENDPOINTS];
-	uint32_t sc_hcchar[DWC_OTG_MAX_CHANNELS];
+	struct dwc_otg_chan_state sc_chan_state[DWC_OTG_MAX_CHANNELS];
 	uint32_t sc_sof_refs;
 	uint32_t sc_sof_val;
 	uint32_t sc_hprt_val;

Modified: head/sys/dev/usb/controller/dwc_otgreg.h
==============================================================================
--- head/sys/dev/usb/controller/dwc_otgreg.h	Fri Sep 14 05:24:06 2012	(r240481)
+++ head/sys/dev/usb/controller/dwc_otgreg.h	Fri Sep 14 07:52:57 2012	(r240482)
@@ -541,6 +541,8 @@
 #define	HCSPLT_PRTADDR_SHIFT		0
 #define	HCSPLT_PRTADDR_MASK		0x0000007f
 
+#define	HCINT_SUSPEND_ONLY		(1<<21)	/* BSD only */
+#define	HCINT_SOFTWARE_ONLY		(1<<20)	/* BSD only */
 #define	HCINT_DATATGLERR		(1<<10)
 #define	HCINT_FRMOVRUN			(1<<9)
 #define	HCINT_BBLERR			(1<<8)

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 07:55:34 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 035CD106566B;
	Fri, 14 Sep 2012 07:55:34 +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 732828FC0C;
	Fri, 14 Sep 2012 07:55:32 +0000 (UTC)
Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8E7tZev086264;
	Fri, 14 Sep 2012 10:55:35 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id
	q8E7tKiV000737; Fri, 14 Sep 2012 10:55:20 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8E7tK8a000736; 
	Fri, 14 Sep 2012 10:55:20 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Fri, 14 Sep 2012 10:55:20 +0300
From: Konstantin Belousov 
To: Bryan Venteicher 
Message-ID: <20120914075520.GA37286@deviant.kiev.zoral.com.ua>
References: <201209131456.03422.jhb@freebsd.org>
	<2045684227.3044.1347601672495.JavaMail.root@daemoninthecloset.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="edESjMboOAwUFn6i"
Content-Disposition: inline
In-Reply-To: <2045684227.3044.1347601672495.JavaMail.root@daemoninthecloset.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Peter Grehan ,
	John Baldwin 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 07:55:34 -0000


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

On Fri, Sep 14, 2012 at 12:47:52AM -0500, Bryan Venteicher wrote:
> Hi
>=20
> ----- Original Message -----
> > From: "John Baldwin" 
> > To: "Bryan Venteicher" 
> > Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@f=
reebsd.org, "Peter Grehan"
> > 
> > Sent: Thursday, September 13, 2012 1:56:03 PM
> > Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> >=20
> > On Thursday, September 13, 2012 12:40:42 pm Bryan Venteicher wrote:
> > > > Would it be possible to use atomic_load/store() instead of direct
> > > > memory barriers?  For example:
> > > >=20
> > >=20
> > > I've been sitting on a (lightly tested) patch [1] for awhile that
> > > does just that, but am not very happy with it. A lot of the fields
> > > are 16-bit, which not all architectures have atomic(9) support for.
> > > And I think the atomic(9) behavior on UP kernels does not provide
> > > the same guarantees as on an SMP kernel (could have an UP kernel
> > > on an SMP host).
> >=20
> > That is the one thing I was worried about (the fields being defined
> > to be 16-bit).  I presume that is required by the virtio de facto
> > standard?  Shame we can't clue-by-four people putting 16-bit fields
> > in these sort of things. :-P
> >=20
>=20
> Yes, the 16-bit fields are mandated by the VirtIO spec. The guest/host
> shared memory is rounded up to next full page, so there actually isn't
> any memory savings for typical queue sizes. Doubt it is any worse than
> actual hardware regardless.
>=20
> > > I also found myself wanting an atomic_load_rel_*() type function.
> >=20
> > That would be odd I think.  _rel barriers only affect stores, so
> > there would be no defined ordering between the load and the
> > subsequent stores.  (With our current definitions of _acq and
> > _rel.)  If you need a full fence for some reason, than a plain
> > mb() may be the best thing in that case.
> >=20
>=20
> I'm able to batch add descriptors (via vq_ring_update_avail()),
> but when checking if I must notify the host, I need to make sure
> the latest avail->idx is visible before checking the flag from
> the host on whether notifications are disabled. Gratuitous
> notifications are fine, but skipping one is not.
>=20
> In the patch, I kludge this with:
>     atomic_add_rel_16(&flags, 0);
>     foo =3D flags;
Don't you need
	atomic_store_rel_16(&foo, flags);
instead ?

You might do a cas_rel over the containing 32bit word as well.
>=20
> Hoping the dependency would prevent the assignment to foo from
> floating above the atomic_add_rel().=20
>=20
> I originally did the atomic(9) work just to see if there would be
> any performance difference between the two - I wasn't able to
> measure any, but I don't have the most modern hardware either.
>=20
> Bryan
>=20
> > --
> > John Baldwin
> >=20

--edESjMboOAwUFn6i
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlBS4ugACgkQC3+MBN1Mb4hk0wCgmOgvk2HSrmNPZDs/91H7xVe5
kCUAoKfYlsybYMewFcFIiyYFokrQgiWg
=ziFt
-----END PGP SIGNATURE-----

--edESjMboOAwUFn6i--

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 08:12:00 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9AF1D106566C;
	Fri, 14 Sep 2012 08:12:00 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8685D8FC14;
	Fri, 14 Sep 2012 08:12:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E8C0YK076513;
	Fri, 14 Sep 2012 08:12:00 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E8C0XO076510;
	Fri, 14 Sep 2012 08:12:00 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201209140812.q8E8C0XO076510@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Fri, 14 Sep 2012 08:12: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: r240483 - head/sys/arm/conf
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 08:12:00 -0000

Author: hselasky
Date: Fri Sep 14 08:11:59 2012
New Revision: 240483
URL: http://svn.freebsd.org/changeset/base/240483

Log:
  Add basic USB support to Raspberry PI target.

Modified:
  head/sys/arm/conf/RPI-B

Modified: head/sys/arm/conf/RPI-B
==============================================================================
--- head/sys/arm/conf/RPI-B	Fri Sep 14 07:52:57 2012	(r240482)
+++ head/sys/arm/conf/RPI-B	Fri Sep 14 08:11:59 2012	(r240483)
@@ -59,6 +59,7 @@ options 	SYSVMSG			#SYSV-style message q
 options 	SYSVSEM			#SYSV-style semaphores
 options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
+#options 	ROOTDEVNAME=\"ufs:/dev/da0s1a\"
 
 options 	PREEMPTION
 
@@ -85,15 +86,20 @@ options 	INVARIANT_SUPPORT	#Extra sanity
 device		md
 device		random		# Entropy device
 
-# Not yet: USB support
-# device		usb
-# options 	USB_DEBUG
-
-
-# Not yet: USB Ethernet support, requires miibus
-# device		mii
-# device		smc
-# device		smcphy
+# USB support
+device		usb
+options 	USB_DEBUG
+device		dwcotg		#DWC OTG controller
+
+# USB storage support
+device		scbus
+device		da
+device		umass
+
+# USB ethernet support
+device		smcphy
+device		mii
+device		smsc
 
 # Flattened Device Tree
 options         FDT

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:33:36 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4114E106566B;
	Fri, 14 Sep 2012 09:33:36 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2CAB48FC12;
	Fri, 14 Sep 2012 09:33:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9XaIX088623;
	Fri, 14 Sep 2012 09:33:36 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9XZnd088621;
	Fri, 14 Sep 2012 09:33:35 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140933.q8E9XZnd088621@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:33: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: r240484 - head/sys/dev/fdt
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:33:36 -0000

Author: gber
Date: Fri Sep 14 09:33:35 2012
New Revision: 240484
URL: http://svn.freebsd.org/changeset/base/240484

Log:
  Set busaddr and bussize to 0 when fdt_get_range() fails.
  
  Obtained from:	Semihalf

Modified:
  head/sys/dev/fdt/fdt_common.c

Modified: head/sys/dev/fdt/fdt_common.c
==============================================================================
--- head/sys/dev/fdt/fdt_common.c	Fri Sep 14 08:11:59 2012	(r240483)
+++ head/sys/dev/fdt/fdt_common.c	Fri Sep 14 09:33:35 2012	(r240484)
@@ -431,7 +431,10 @@ fdt_reg_to_rl(phandle_t node, struct res
 
 	if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells) != 0)
 		return (ENXIO);
-	fdt_get_range(OF_parent(node), 0, &busaddr, &bussize);
+	if (fdt_get_range(OF_parent(node), 0, &busaddr, &bussize)) {
+		busaddr = 0;
+		bussize = 0;
+	}
 
 	tuple_size = sizeof(pcell_t) * (addr_cells + size_cells);
 	tuples = OF_getprop_alloc(node, "reg", tuple_size, (void **)®);

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:36:37 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9BEEA1065756;
	Fri, 14 Sep 2012 09:36:35 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C7B5D8FC0C;
	Fri, 14 Sep 2012 09:36:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9aZdr089114;
	Fri, 14 Sep 2012 09:36:35 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9aZTI089111;
	Fri, 14 Sep 2012 09:36:35 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140936.q8E9aZTI089111@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:36: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: r240485 - head/sys/dev/fdt
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:36:37 -0000

Author: gber
Date: Fri Sep 14 09:36:35 2012
New Revision: 240485
URL: http://svn.freebsd.org/changeset/base/240485

Log:
  Add fdt_get_unit() function.
  
  Obtained from:	Semihalf

Modified:
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/fdt/fdt_common.h

Modified: head/sys/dev/fdt/fdt_common.c
==============================================================================
--- head/sys/dev/fdt/fdt_common.c	Fri Sep 14 09:33:35 2012	(r240484)
+++ head/sys/dev/fdt/fdt_common.c	Fri Sep 14 09:36:35 2012	(r240485)
@@ -697,3 +697,14 @@ fdt_get_mem_regions(struct mem_region *m
 out:
 	return (rv);
 }
+
+int
+fdt_get_unit(device_t dev)
+{
+	const char * name;
+
+	name = ofw_bus_get_name(dev);
+	name = strchr(name, '@') + 1;
+
+	return (strtol(name,NULL,0));
+}

Modified: head/sys/dev/fdt/fdt_common.h
==============================================================================
--- head/sys/dev/fdt/fdt_common.h	Fri Sep 14 09:33:35 2012	(r240484)
+++ head/sys/dev/fdt/fdt_common.h	Fri Sep 14 09:36:35 2012	(r240485)
@@ -110,5 +110,6 @@ int fdt_pci_route_intr(int, int, int, in
 int fdt_ranges_verify(pcell_t *, int, int, int, int);
 int fdt_reg_to_rl(phandle_t, struct resource_list *);
 int fdt_pm(phandle_t);
+int fdt_get_unit(device_t);
 
 #endif /* _FDT_COMMON_H_ */

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:38:55 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16EA61065670;
	Fri, 14 Sep 2012 09:38:55 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EC42C8FC17;
	Fri, 14 Sep 2012 09:38:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9csM6089501;
	Fri, 14 Sep 2012 09:38:54 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9csJB089497;
	Fri, 14 Sep 2012 09:38:54 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140938.q8E9csJB089497@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:38: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: r240486 - in head/sys/arm: arm include
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:38:55 -0000

Author: gber
Date: Fri Sep 14 09:38:54 2012
New Revision: 240486
URL: http://svn.freebsd.org/changeset/base/240486

Log:
  Support identification of new PJ4B cores.
  
  Obtained from:	Semihalf

Modified:
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/arm/identcpu.c
  head/sys/arm/include/armreg.h

Modified: head/sys/arm/arm/cpufunc.c
==============================================================================
--- head/sys/arm/arm/cpufunc.c	Fri Sep 14 09:36:35 2012	(r240485)
+++ head/sys/arm/arm/cpufunc.c	Fri Sep 14 09:38:54 2012	(r240486)
@@ -1415,6 +1415,7 @@ set_cpufuncs()
 #if defined(CPU_MV_PJ4B)
 	if (cputype == CPU_ID_MV88SV581X_V6 ||
 	    cputype == CPU_ID_MV88SV581X_V7 ||
+	    cputype == CPU_ID_MV88SV584X_V7 ||
 	    cputype == CPU_ID_ARM_88SV581X_V6 ||
 	    cputype == CPU_ID_ARM_88SV581X_V7) {
 		if (cpu_pfr(0) & ARM_PFR0_THUMBEE_MASK)
@@ -1425,8 +1426,8 @@ set_cpufuncs()
 		get_cachetype_cp15();
 		pmap_pte_init_mmu_v6();
 		goto out;
-	} else if (cputype == CPU_ID_ARM_88SV584X ||
-	    cputype == CPU_ID_MV88SV584X) {
+	} else if (cputype == CPU_ID_ARM_88SV584X_V6 ||
+	    cputype == CPU_ID_MV88SV584X_V6) {
 		cpufuncs = pj4bv6_cpufuncs;
 		get_cachetype_cp15();
 		pmap_pte_init_mmu_v6();

Modified: head/sys/arm/arm/identcpu.c
==============================================================================
--- head/sys/arm/arm/identcpu.c	Fri Sep 14 09:36:35 2012	(r240485)
+++ head/sys/arm/arm/identcpu.c	Fri Sep 14 09:38:54 2012	(r240486)
@@ -321,9 +321,11 @@ const struct cpuidtab cpuids[] = {
 	  generic_steppings },
 	{ CPU_ID_ARM_88SV581X_V7, CPU_CLASS_MARVELL,	"Sheeva 88SV581x",
 	  generic_steppings },
-	{ CPU_ID_MV88SV584X,	CPU_CLASS_MARVELL,	"Sheeva 88SV584x",
+	{ CPU_ID_MV88SV584X_V6,	CPU_CLASS_MARVELL,	"Sheeva 88SV584x",
 	  generic_steppings },
-	{ CPU_ID_ARM_88SV584X,	CPU_CLASS_MARVELL,	"Sheeva 88SV584x",
+	{ CPU_ID_ARM_88SV584X_V6, CPU_CLASS_MARVELL,	"Sheeva 88SV584x",
+	  generic_steppings },
+	{ CPU_ID_MV88SV584X_V7,	CPU_CLASS_MARVELL,	"Sheeva 88SV584x",
 	  generic_steppings },
 
 	{ 0, CPU_CLASS_NONE, NULL, NULL }

Modified: head/sys/arm/include/armreg.h
==============================================================================
--- head/sys/arm/include/armreg.h	Fri Sep 14 09:36:35 2012	(r240485)
+++ head/sys/arm/include/armreg.h	Fri Sep 14 09:38:54 2012	(r240486)
@@ -170,11 +170,12 @@
 
 #define CPU_ID_MV88SV581X_V6		0x560F5810 /* Marvell Sheeva 88SV581x v6 Core */
 #define CPU_ID_MV88SV581X_V7		0x561F5810 /* Marvell Sheeva 88SV581x v7 Core */
-#define CPU_ID_MV88SV584X		0x561F5840 /* Marvell Sheeva 88SV584x v6 Core */
+#define CPU_ID_MV88SV584X_V6		0x561F5840 /* Marvell Sheeva 88SV584x v6 Core */
+#define CPU_ID_MV88SV584X_V7		0x562F5840 /* Marvell Sheeva 88SV584x v7 Core */
 /* Marvell's CPUIDs with ARM ID in implementor field */
 #define CPU_ID_ARM_88SV581X_V6		0x410fb760 /* Marvell Sheeva 88SV581x v6 Core */
 #define CPU_ID_ARM_88SV581X_V7		0x413FC080 /* Marvell Sheeva 88SV581x v7 Core */
-#define CPU_ID_ARM_88SV584X		0x410FB024 /* Marvell Sheeva 88SV584x v6 Core */
+#define CPU_ID_ARM_88SV584X_V6		0x410FB020 /* Marvell Sheeva 88SV584x v6 Core */
 
 #define	CPU_ID_FA526		0x66015260
 #define	CPU_ID_FA626TE		0x66056260

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:45:13 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C8E87106566C;
	Fri, 14 Sep 2012 09:45:13 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B496A8FC08;
	Fri, 14 Sep 2012 09:45:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9jD8w090449;
	Fri, 14 Sep 2012 09:45:13 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9jD1Z090447;
	Fri, 14 Sep 2012 09:45:13 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140945.q8E9jD1Z090447@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:45: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: r240487 - head/sys/dev/fdt
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:45:13 -0000

Author: gber
Date: Fri Sep 14 09:45:13 2012
New Revision: 240487
URL: http://svn.freebsd.org/changeset/base/240487

Log:
  If virtual addresses are not set use one to one mapping.
  Do not map memory and IO space at address 0.
  
  Obtained from: Semihalf

Modified:
  head/sys/dev/fdt/fdt_pci.c

Modified: head/sys/dev/fdt/fdt_pci.c
==============================================================================
--- head/sys/dev/fdt/fdt_pci.c	Fri Sep 14 09:38:54 2012	(r240486)
+++ head/sys/dev/fdt/fdt_pci.c	Fri Sep 14 09:45:13 2012	(r240487)
@@ -341,14 +341,14 @@ fdt_pci_devmap(phandle_t node, struct pm
 	if ((error = fdt_pci_ranges_decode(node, &io_space, &mem_space)) != 0)
 		return (error);
 
-	devmap->pd_va = io_va;
+	devmap->pd_va = (io_va ? io_va : io_space.base_parent);
 	devmap->pd_pa = io_space.base_parent;
 	devmap->pd_size = io_space.len;
 	devmap->pd_prot = VM_PROT_READ | VM_PROT_WRITE;
 	devmap->pd_cache = PTE_NOCACHE;
 	devmap++;
 
-	devmap->pd_va = mem_va;
+	devmap->pd_va = (mem_va ? mem_va : mem_space.base_parent);
 	devmap->pd_pa = mem_space.base_parent;
 	devmap->pd_size = mem_space.len;
 	devmap->pd_prot = VM_PROT_READ | VM_PROT_WRITE;

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:55:20 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EF6FE106564A;
	Fri, 14 Sep 2012 09:55:19 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CA9B48FC0A;
	Fri, 14 Sep 2012 09:55:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9tJRH091826;
	Fri, 14 Sep 2012 09:55:19 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9tJHO091813;
	Fri, 14 Sep 2012 09:55:19 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140955.q8E9tJHO091813@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:55: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: r240488 - in head/sys: arm/conf arm/include arm/mv
	arm/mv/armadaxp boot/fdt/dts
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:55:20 -0000

Author: gber
Date: Fri Sep 14 09:55:19 2012
New Revision: 240488
URL: http://svn.freebsd.org/changeset/base/240488

Log:
  Add support for Armada XP A0.
  
  - Add functions to calculate clocks instead using hardcoded values
  - Update reset and timers functions
  - Update number of interrupts
  - Change name of platform from db88f78100 to db78460
  - Correct DRAM size and PCI IRQ routing in dts file.
  
  Obtained from:	Semihalf

Added:
  head/sys/boot/fdt/dts/db78460.dts   (contents, props changed)
Deleted:
  head/sys/boot/fdt/dts/db88f78160.dts
Modified:
  head/sys/arm/conf/ARMADAXP
  head/sys/arm/include/intr.h
  head/sys/arm/mv/armadaxp/armadaxp.c
  head/sys/arm/mv/common.c
  head/sys/arm/mv/mvreg.h
  head/sys/arm/mv/mvvar.h
  head/sys/arm/mv/mvwin.h
  head/sys/arm/mv/timer.c

Modified: head/sys/arm/conf/ARMADAXP
==============================================================================
--- head/sys/arm/conf/ARMADAXP	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/conf/ARMADAXP	Fri Sep 14 09:55:19 2012	(r240488)
@@ -99,4 +99,4 @@ device		vlan
 #FDT
 options 	FDT
 options 	FDT_DTB_STATIC
-makeoptions	FDT_DTS_FILE=db88f78160.dts
+makeoptions	FDT_DTS_FILE=db78460.dts

Modified: head/sys/arm/include/intr.h
==============================================================================
--- head/sys/arm/include/intr.h	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/include/intr.h	Fri Sep 14 09:55:19 2012	(r240488)
@@ -54,6 +54,8 @@
 #define NIRQ		128
 #elif defined(CPU_ARM11)
 #define NIRQ		128
+#elif defined(SOC_MV_ARMADAXP)
+#define NIRQ		148
 #else
 #define NIRQ		32
 #endif

Modified: head/sys/arm/mv/armadaxp/armadaxp.c
==============================================================================
--- head/sys/arm/mv/armadaxp/armadaxp.c	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/mv/armadaxp/armadaxp.c	Fri Sep 14 09:55:19 2012	(r240488)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -43,24 +44,120 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#define CPU_FREQ_FIELD(sar)	(((0x01 & (sar >> 52)) << 3) | \
+				    (0x07 & (sar >> 21)))
+#define FAB_FREQ_FIELD(sar)	(((0x01 & (sar >> 51)) << 4) | \
+				    (0x0F & (sar >> 24)))
+
+static uint32_t count_l2clk(void);
+
+/* XXX Make gpio driver optional and remove it */
 struct resource_spec mv_gpio_res[] = {
 	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
 	{ SYS_RES_IRQ,		0,	RF_ACTIVE },
 	{ -1, 0 }
 };
 
+struct vco_freq_ratio {
+	uint8_t	vco_cpu;	/* VCO to CLK0(CPU) clock ratio */
+	uint8_t	vco_l2c;	/* VCO to NB(L2 cache) clock ratio */
+	uint8_t	vco_hcl;	/* VCO to HCLK(DDR controller) clock ratio */
+	uint8_t	vco_ddr;	/* VCO to DR(DDR memory) clock ratio */
+};
+
+static struct vco_freq_ratio freq_conf_table[] = {
+/*00*/	{ 1, 1,	 4,  2 },
+/*01*/	{ 1, 2,	 2,  2 },
+/*02*/	{ 2, 2,	 6,  3 },
+/*03*/	{ 2, 2,	 3,  3 },
+/*04*/	{ 1, 2,	 3,  3 },
+/*05*/	{ 1, 2,	 4,  2 },
+/*06*/	{ 1, 1,	 2,  2 },
+/*07*/	{ 2, 3,	 6,  6 },
+/*08*/	{ 2, 3,	 5,  5 },
+/*09*/	{ 1, 2,	 6,  3 },
+/*10*/	{ 2, 4,	10,  5 },
+/*11*/	{ 1, 3,	 6,  6 },
+/*12*/	{ 1, 2,	 5,  5 },
+/*13*/	{ 1, 3,	 6,  3 },
+/*14*/	{ 1, 2,	 5,  5 },
+/*15*/	{ 2, 2,	 5,  5 },
+/*16*/	{ 1, 1,	 3,  3 },
+/*17*/	{ 2, 5,	10, 10 },
+/*18*/	{ 1, 3,	 8,  4 },
+/*19*/	{ 1, 1,	 2,  1 },
+/*20*/	{ 2, 3,	 6,  3 },
+/*21*/	{ 1, 2,	 8,  4 },
+/*22*/	{ 2, 5,	10,  5 }
+};
+
+static uint16_t	cpu_clock_table[] = {
+    1000, 1066, 1200, 1333, 1500, 1666, 1800, 2000, 600,  667,  800,  1600,
+    2133, 2200, 2400 };
+
 uint32_t
 get_tclk(void)
 {
+ 	uint32_t cputype;
 
-	return (TCLK_200MHZ);
+	cputype = cpufunc_id();
+	cputype &= CPU_ID_CPU_MASK;
+
+	if (cputype == CPU_ID_MV88SV584X_V7)
+		return (TCLK_250MHZ);
+	else
+		return (TCLK_200MHZ);
+}
+
+static uint32_t
+count_l2clk(void)
+{
+	uint64_t sar_reg;
+	uint32_t freq_vco, freq_l2clk;
+	uint8_t  sar_cpu_freq, sar_fab_freq, array_size;
+
+	/* Get value of the SAR register and process it */
+	sar_reg = get_sar_value();
+	sar_cpu_freq = CPU_FREQ_FIELD(sar_reg);
+	sar_fab_freq = FAB_FREQ_FIELD(sar_reg);
+
+	/* Check if CPU frequency field has correct value */
+	array_size = sizeof(cpu_clock_table) / sizeof(cpu_clock_table[0]);
+	if (sar_cpu_freq >= array_size)
+		panic("Reserved value in cpu frequency configuration field: "
+		    "%d", sar_cpu_freq);
+
+	/* Check if fabric frequency field has correct value */
+	array_size = sizeof(freq_conf_table) / sizeof(freq_conf_table[0]);
+	if (sar_fab_freq >= array_size)
+		panic("Reserved value in fabric frequency configuration field: "
+		    "%d", sar_fab_freq);
+
+	/* Get CPU clock frequency */
+	freq_vco = cpu_clock_table[sar_cpu_freq] *
+	    freq_conf_table[sar_fab_freq].vco_cpu;
+
+	/* Get L2CLK clock frequency */
+	freq_l2clk = freq_vco / freq_conf_table[sar_fab_freq].vco_l2c;
+
+	/* Round L2CLK value to integer MHz */
+	if (((freq_vco % freq_conf_table[sar_fab_freq].vco_l2c) * 10 /
+	    freq_conf_table[sar_fab_freq].vco_l2c) >= 5)
+		freq_l2clk++;
+
+	return (freq_l2clk * 1000000);
 }
 
 uint32_t
 get_l2clk(void)
 {
+	static uint32_t	l2clk_freq = 0;
+
+	/* If get_l2clk is called first time get L2CLK value from register */
+	if (l2clk_freq == 0)
+		l2clk_freq = count_l2clk();
 
-	return (TCLK_667MHZ);
+	return (l2clk_freq);
 }
 
 int

Modified: head/sys/arm/mv/common.c
==============================================================================
--- head/sys/arm/mv/common.c	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/mv/common.c	Fri Sep 14 09:55:19 2012	(r240488)
@@ -249,12 +249,47 @@ write_cpu_ctrl(uint32_t reg, uint32_t va
 	bus_space_write_4(fdtbus_bs_tag, MV_CPU_CONTROL_BASE, reg, val);
 }
 
+#if defined(SOC_MV_ARMADAXP)
+uint32_t
+read_cpu_mp_clocks(uint32_t reg)
+{
+
+	return (bus_space_read_4(fdtbus_bs_tag, MV_MP_CLOCKS_BASE, reg));
+}
+
+void
+write_cpu_mp_clocks(uint32_t reg, uint32_t val)
+{
+
+	bus_space_write_4(fdtbus_bs_tag, MV_MP_CLOCKS_BASE, reg, val);
+}
+
+uint32_t
+read_cpu_misc(uint32_t reg)
+{
+
+	return (bus_space_read_4(fdtbus_bs_tag, MV_MISC_BASE, reg));
+}
+
+void
+write_cpu_misc(uint32_t reg, uint32_t val)
+{
+
+	bus_space_write_4(fdtbus_bs_tag, MV_MISC_BASE, reg, val);
+}
+#endif
+
 void
 cpu_reset(void)
 {
 
+#if defined(SOC_MV_ARMADAXP)
+	write_cpu_misc(RSTOUTn_MASK, SOFT_RST_OUT_EN);
+	write_cpu_misc(SYSTEM_SOFT_RESET, SYS_SOFT_RST);
+#else
 	write_cpu_ctrl(RSTOUTn_MASK, SOFT_RST_OUT_EN);
 	write_cpu_ctrl(SYSTEM_SOFT_RESET, SYS_SOFT_RST);
+#endif
 	while (1);
 }
 
@@ -2062,19 +2097,26 @@ fdt_fixup_busfreq(phandle_t root)
 	phandle_t sb;
 	pcell_t freq;
 
+	freq = cpu_to_fdt32(get_tclk());
+
 	/*
-	 * This fixup sets the simple-bus bus-frequency property.
+	 * Fix bus speed in cpu node
 	 */
+	if ((sb = OF_finddevice("cpu")) != 0)
+		if (fdt_is_compatible_strict(sb, "ARM,88VS584"))
+			OF_setprop(sb, "bus-frequency", (void *)&freq,
+			    sizeof(freq));
 
-	if ((sb = fdt_find_compatible(root, "simple-bus", 1)) == 0)
-		return;
-
-	freq = cpu_to_fdt32(get_tclk());
-	OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq));
+	/*
+	 * This fixup sets the simple-bus bus-frequency property.
+	 */
+	if ((sb = fdt_find_compatible(root, "simple-bus", 1)) != 0)
+		OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq));
 }
 
 struct fdt_fixup_entry fdt_fixup_table[] = {
 	{ "mrvl,DB-88F6281", &fdt_fixup_busfreq },
+	{ "mrvl,DB-78460", &fdt_fixup_busfreq },
 	{ NULL, NULL }
 };
 
@@ -2098,3 +2140,24 @@ fdt_pic_decode_t fdt_pic_table[] = {
 	&fdt_pic_decode_ic,
 	NULL
 };
+
+uint64_t
+get_sar_value(void)
+{
+	uint32_t sar_low, sar_high;
+
+#if defined(SOC_MV_ARMADAXP)
+	sar_high = bus_space_read_4(fdtbus_bs_tag, MV_MISC_BASE,
+	    SAMPLE_AT_RESET_HI);
+	sar_low = bus_space_read_4(fdtbus_bs_tag, MV_MISC_BASE,
+	    SAMPLE_AT_RESET_LO);
+#else
+	/*
+	 * TODO: Add getting proper values for other SoC configurations
+	 */
+	sar_high = 0;
+	sar_low = 0;
+#endif
+
+	return (((uint64_t)sar_high << 32) | sar_low);
+}

Modified: head/sys/arm/mv/mvreg.h
==============================================================================
--- head/sys/arm/mv/mvreg.h	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/mv/mvreg.h	Fri Sep 14 09:55:19 2012	(r240488)
@@ -123,11 +123,21 @@
 /*
  * System reset
  */
+#if defined(SOC_MV_ARMADAXP)
+#define RSTOUTn_MASK		0x60
+#define SYSTEM_SOFT_RESET	0x64
+#define WD_RSTOUTn_MASK		0x4
+#define WD_GLOBAL_MASK		0x00000100
+#define WD_CPU0_MASK		0x00000001
+#define SOFT_RST_OUT_EN		0x00000001
+#define SYS_SOFT_RST		0x00000001
+#else
 #define RSTOUTn_MASK		0x8
 #define WD_RST_OUT_EN		0x00000002
 #define SOFT_RST_OUT_EN		0x00000004
 #define SYSTEM_SOFT_RESET	0xc
 #define SYS_SOFT_RST		0x00000001
+#endif
 
 /*
  * Power Control
@@ -334,6 +344,9 @@
 #define SAMPLE_AT_RESET_HI	0x18
 #elif defined(SOC_MV_FREY)
 #define SAMPLE_AT_RESET		0x100
+#elif defined(SOC_MV_ARMADAXP)
+#define SAMPLE_AT_RESET_LO	0x30
+#define SAMPLE_AT_RESET_HI	0x34
 #endif
 
 /*

Modified: head/sys/arm/mv/mvvar.h
==============================================================================
--- head/sys/arm/mv/mvvar.h	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/mv/mvvar.h	Fri Sep 14 09:55:19 2012	(r240488)
@@ -89,6 +89,7 @@ void soc_id(uint32_t *dev, uint32_t *rev
 void soc_dump_decode_win(void);
 uint32_t soc_power_ctrl_get(uint32_t mask);
 void soc_power_ctrl_set(uint32_t mask);
+uint64_t get_sar_value(void);
 
 int decode_win_cpu_set(int target, int attr, vm_paddr_t base, uint32_t size,
     vm_paddr_t remap);
@@ -108,6 +109,13 @@ uint32_t get_l2clk(void);
 uint32_t read_cpu_ctrl(uint32_t);
 void write_cpu_ctrl(uint32_t, uint32_t);
 
+#if defined(SOC_MV_ARMADAXP)
+uint32_t read_cpu_mp_clocks(uint32_t reg);
+void write_cpu_mp_clocks(uint32_t reg, uint32_t val);
+uint32_t read_cpu_misc(uint32_t reg);
+void write_cpu_misc(uint32_t reg, uint32_t val);
+#endif
+
 int mv_pcib_bar_win_set(device_t dev, uint32_t base, uint32_t size,
     uint32_t remap, int winno, int busno);
 int mv_pcib_cpu_win_remap(device_t dev, uint32_t remap, uint32_t size);

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/mv/mvwin.h	Fri Sep 14 09:55:19 2012	(r240488)
@@ -128,8 +128,10 @@
 #define MV_MPP_BASE		(MV_BASE + 0x10000)
 
 #if defined(SOC_MV_ARMADAXP)
+#define MV_MISC_BASE		(MV_BASE + 0x18200)
 #define MV_MBUS_BRIDGE_BASE	(MV_BASE + 0x20000)
 #define MV_INTREGS_BASE		(MV_MBUS_BRIDGE_BASE + 0x80)
+#define MV_MP_CLOCKS_BASE	(MV_MBUS_BRIDGE_BASE + 0x700)
 #define MV_CPU_CONTROL_BASE	(MV_MBUS_BRIDGE_BASE + 0x1800)
 #elif !defined(SOC_MV_FREY)
 #define MV_MBUS_BRIDGE_BASE	(MV_BASE + 0x20000)

Modified: head/sys/arm/mv/timer.c
==============================================================================
--- head/sys/arm/mv/timer.c	Fri Sep 14 09:45:13 2012	(r240487)
+++ head/sys/arm/mv/timer.c	Fri Sep 14 09:55:19 2012	(r240488)
@@ -311,15 +311,19 @@ mv_watchdog_enable(void)
 	irq_cause &= IRQ_TIMER_WD_CLR;
 	write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause);
 
-#if !defined(SOC_MV_ARMADAXP)
+#if defined(SOC_MV_ARMADAXP)
+	val = read_cpu_mp_clocks(WD_RSTOUTn_MASK);
+	val |= (WD_GLOBAL_MASK | WD_CPU0_MASK);
+	write_cpu_mp_clocks(WD_RSTOUTn_MASK, val);
+#else
 	irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK);
 	irq_mask |= IRQ_TIMER_WD_MASK;
 	write_cpu_ctrl(BRIDGE_IRQ_MASK, irq_mask);
-#endif
 
 	val = read_cpu_ctrl(RSTOUTn_MASK);
 	val |= WD_RST_OUT_EN;
 	write_cpu_ctrl(RSTOUTn_MASK, val);
+#endif
 
 	val = mv_get_timer_control();
 	val |= CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO;
@@ -338,11 +342,15 @@ mv_watchdog_disable(void)
 	val &= ~(CPU_TIMER_WD_EN | CPU_TIMER_WD_AUTO);
 	mv_set_timer_control(val);
 
+#if defined(SOC_MV_ARMADAXP)
+	val = read_cpu_mp_clocks(WD_RSTOUTn_MASK);
+	val &= ~(WD_GLOBAL_MASK | WD_CPU0_MASK);
+	write_cpu_mp_clocks(WD_RSTOUTn_MASK, val);
+#else
 	val = read_cpu_ctrl(RSTOUTn_MASK);
 	val &= ~WD_RST_OUT_EN;
 	write_cpu_ctrl(RSTOUTn_MASK, val);
 
-#if !defined(SOC_MV_ARMADAXP)
 	irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK);
 	irq_mask &= ~(IRQ_TIMER_WD_MASK);
 	write_cpu_ctrl(BRIDGE_IRQ_MASK, irq_mask);

Added: head/sys/boot/fdt/dts/db78460.dts
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/boot/fdt/dts/db78460.dts	Fri Sep 14 09:55:19 2012	(r240488)
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2010 The FreeBSD Foundation
+ * Copyright (c) 2010-2011 Semihalf
+ * 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.
+ *
+ * Marvell DB-78460 Device Tree Source.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+
+/ {
+	model = "mrvl,DB-78460";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		serial0 = &serial0;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "ARM,88VS584";
+			reg = <0x0>;
+			d-cache-line-size = <32>;	// 32 bytes
+			i-cache-line-size = <32>;	// 32 bytes
+			d-cache-size = <0x8000>;	// L1, 32K
+			i-cache-size = <0x8000>;	// L1, 32K
+			timebase-frequency = <0>;
+			bus-frequency = <200000000>;
+			clock-frequency = <0>;
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x80000000>;		// 2G at 0x0
+	};
+
+	soc78460@d0000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		ranges = <0x0 0xd0000000 0x00100000>;
+		bus-frequency = <0>;
+
+
+		MPIC: mpic@20a00 {
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+			reg = <0x20a00 0x500 0x21000 0x800>;
+			compatible = "mrvl,mpic";
+		};
+
+		rtc@10300 {
+			compatible = "mrvl,rtc";
+			reg = <0x10300 0x08>;
+		};
+
+		timer@21840 {
+			compatible = "mrvl,timer";
+			reg = <0x21840 0x30>;
+			interrupts = <5>;
+			interrupt-parent = <&MPIC>;
+			mrvl,has-wdt;
+		};
+
+		twsi@11000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mrvl,twsi";
+			reg = <0x11000 0x20>;
+			interrupts = <31>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		twsi@11100 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "mrvl,twsi";
+			reg = <0x11100 0x20>;
+			interrupts = <32>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		serial0: serial@12000 {
+			compatible = "ns16550";
+			reg = <0x12000 0x20>;
+			reg-shift = <2>;
+			current-speed = <115200>;
+			clock-frequency = <0>;
+			interrupts = <41>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		serial1: serial@12100 {
+			compatible = "ns16550";
+			reg = <0x12100 0x20>;
+			reg-shift = <2>;
+			current-speed = <115200>;
+			clock-frequency = <0>;
+			interrupts = <42>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		serial2: serial@12200 {
+			compatible = "ns16550";
+			reg = <0x12200 0x20>;
+			reg-shift = <2>;
+			current-speed = <115200>;
+			clock-frequency = <0>;
+			interrupts = <43>;
+			interrupt-parent = <&MPIC>;
+		};
+		
+		serial3: serial@12300 {
+			compatible = "ns16550";
+			reg = <0x12300 0x20>;
+			reg-shift = <2>;
+			current-speed = <115200>;
+			clock-frequency = <0>;
+			interrupts = <44>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		MPP: mpp@10000 {
+			#pin-cells = <2>;
+			compatible = "mrvl,mpp";
+			reg = <0x18000 0x34>;
+			pin-count = <68>;
+			pin-map = <
+				0  1		/* MPP[0]:  GE1_TXCLK */
+				1  1		/* MPP[1]:  GE1_TXCTL */
+				2  1		/* MPP[2]:  GE1_RXCTL */
+				3  1		/* MPP[3]:  GE1_RXCLK */
+				4  1		/* MPP[4]:  GE1_TXD[0] */
+				5  1		/* MPP[5]:  GE1_TXD[1] */
+				6  1		/* MPP[6]:  GE1_TXD[2] */
+				7  1		/* MPP[7]:  GE1_TXD[3] */
+				8  1		/* MPP[8]:  GE1_RXD[0] */
+				9  1		/* MPP[9]:  GE1_RXD[1] */
+				10 1		/* MPP[10]: GE1_RXD[2] */
+				11 1		/* MPP[11]: GE1_RXD[3] */
+				12 2		/* MPP[13]: SYSRST_OUTn */
+				13 2		/* MPP[13]: SYSRST_OUTn */
+				14 2		/* MPP[14]: SATA1_ACTn */
+				15 2		/* MPP[15]: SATA0_ACTn */
+				16 2		/* MPP[16]: UA2_TXD */
+				17 2		/* MPP[17]: UA2_RXD */
+				18 2		/* MPP[18]:  */
+				19 2		/* MPP[19]:  */
+				20 2		/* MPP[20]:  */
+				21 2		/* MPP[21]:  */
+				22 2		/* MPP[22]: UA3_TXD */
+				23 2
+				24 0
+				25 0
+				26 0
+				27 0
+				28 4
+				29 0
+				30 1
+				31 1
+				32 1
+				33 1
+				34 1
+				35 1
+				36 1
+				37 1
+				38 1
+				39 1
+				40 0
+				41 3
+				42 1
+				43 1
+				44 2
+				45 2
+				46 4
+				47 3
+				48 0
+				49 1
+				50 1
+				51 1
+				52 1
+				53 1
+				54 1
+				55 1
+				56 1
+				57 0
+				58 1
+				59 1
+				60 1
+				61 1
+				62 1
+				63 1
+				64 1
+				65 1
+				66 1
+				67 2 >;
+		};
+
+		usb@50000 {
+			compatible = "mrvl,usb-ehci", "usb-ehci";
+			reg = <0x50000 0x1000>;
+			interrupts = <124 45>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		usb@51000 {
+			compatible = "mrvl,usb-ehci", "usb-ehci";
+			reg = <0x51000 0x1000>;
+			interrupts = <124 46>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		usb@52000 {
+			compatible = "mrvl,usb-ehci", "usb-ehci";
+			reg = <0x52000 0x1000>;
+			interrupts = <124 47>;
+			interrupt-parent = <&MPIC>;
+		};
+
+		enet0: ethernet@72000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			model = "V2";
+			compatible = "mrvl,ge";
+			reg = <0x72000 0x2000>;
+			ranges = <0x0 0x72000 0x2000>;
+			local-mac-address = [ 00 04 01 07 84 60 ];
+			interrupts = <67 68 122 >;
+			interrupt-parent = <&MPIC>;
+			phy-handle = <&phy0>;
+			has-neta;
+
+			mdio@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "mrvl,mdio";
+
+				phy0: ethernet-phy@0 {
+					reg = <0x0>;
+				};
+				phy1: ethernet-phy@1 {
+					reg = <0x1>;
+				};
+				phy2: ethernet-phy@2 {
+					reg = <0x19>;
+				};
+				phy3: ethernet-phy@3 {
+					reg = <0x1b>;
+				};
+			};
+		};
+	};
+
+	pci0: pcie@d0040000 {
+		compatible = "mrvl,pcie";
+		device_type = "pci";
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		reg = <0xd0040000 0x2000>;
+		bus-range = <0 255>;
+		ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000
+			  0x01000000 0x0 0x00000000 0xa0000000 0x0 0x08000000>;
+		clock-frequency = <33333333>;
+		interrupt-parent = <&MPIC>;
+		interrupts = <120>;
+		interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
+		interrupt-map = <
+			0x0800 0x0 0x0 0x1 &MPIC 0x3A
+			0x0800 0x0 0x0 0x2 &MPIC 0x3A
+			0x0800 0x0 0x0 0x3 &MPIC 0x3A
+			0x0800 0x0 0x0 0x4 &MPIC 0x3A
+			>;
+	};
+
+	chosen {
+		stdin = "serial0";
+		stdout = "serial0";
+		stddbg = "serial0";
+	};
+};

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:57:42 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 31BE5106566B;
	Fri, 14 Sep 2012 09:57:42 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C44F8FC17;
	Fri, 14 Sep 2012 09:57:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9vgAK092263;
	Fri, 14 Sep 2012 09:57:42 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9vfjW092260;
	Fri, 14 Sep 2012 09:57:41 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140957.q8E9vfjW092260@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:57:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r240489 - head/sys/arm/mv
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:57:42 -0000

Author: gber
Date: Fri Sep 14 09:57:41 2012
New Revision: 240489
URL: http://svn.freebsd.org/changeset/base/240489

Log:
  pci: Implement new memory and io space allocator for PCI.
  
  Cleanup code and move initializing bridge into separate function.
  Add checking of PCI mode (RC or endpoint).
  
  Obtained from:	Semihalf

Modified:
  head/sys/arm/mv/mv_pci.c
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/mv_pci.c
==============================================================================
--- head/sys/arm/mv/mv_pci.c	Fri Sep 14 09:55:19 2012	(r240488)
+++ head/sys/arm/mv/mv_pci.c	Fri Sep 14 09:57:41 2012	(r240489)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (c) 2008 MARVELL INTERNATIONAL LTD.
  * Copyright (c) 2010 The FreeBSD Foundation
+ * Copyright (c) 2010-2012 Semihalf
  * All rights reserved.
  *
  * Developed by Semihalf.
@@ -89,18 +90,19 @@ __FBSDID("$FreeBSD$");
 #define PCIE_REG_STATUS		0x1A04
 #define PCIE_REG_IRQ_MASK	0x1910
 
-#define STATUS_LINK_DOWN	1
-#define STATUS_BUS_OFFS		8
-#define STATUS_BUS_MASK		(0xFF << STATUS_BUS_OFFS)
-#define STATUS_DEV_OFFS		16
-#define STATUS_DEV_MASK		(0x1F << STATUS_DEV_OFFS)
-
-#define P2P_CONF_BUS_OFFS	16
-#define P2P_CONF_BUS_MASK	(0xFF << P2P_CONF_BUS_OFFS)
-#define P2P_CONF_DEV_OFFS	24
-#define P2P_CONF_DEV_MASK	(0x1F << P2P_CONF_DEV_OFFS)
+#define PCIE_CONTROL_ROOT_CMPLX	(1 << 1)
+#define PCIE_CONTROL_HOT_RESET	(1 << 24)
 
-#define PCI_VENDORID_MRVL	0x11AB
+#define PCIE_LINK_TIMEOUT	1000000
+
+#define PCIE_STATUS_LINK_DOWN	1
+#define PCIE_STATUS_DEV_OFFS	16
+
+/* Minimum PCI Memory and I/O allocations taken from PCI spec (in bytes) */
+#define PCI_MIN_IO_ALLOC	4
+#define PCI_MIN_MEM_ALLOC	16
+
+#define BITS_PER_UINT32		(NBBY * sizeof(uint32_t))
 
 struct mv_pcib_softc {
 	device_t	sc_dev;
@@ -108,15 +110,16 @@ struct mv_pcib_softc {
 	struct rman	sc_mem_rman;
 	bus_addr_t	sc_mem_base;
 	bus_addr_t	sc_mem_size;
-	bus_addr_t	sc_mem_alloc;		/* Next allocation. */
-	int		sc_mem_win_target;
+	uint32_t	sc_mem_map[MV_PCI_MEM_SLICE_SIZE /
+	    (PCI_MIN_MEM_ALLOC * BITS_PER_UINT32)];
+	int		sc_win_target;
 	int		sc_mem_win_attr;
 
 	struct rman	sc_io_rman;
 	bus_addr_t	sc_io_base;
 	bus_addr_t	sc_io_size;
-	bus_addr_t	sc_io_alloc;		/* Next allocation. */
-	int		sc_io_win_target;
+	uint32_t	sc_io_map[MV_PCI_IO_SLICE_SIZE /
+	    (PCI_MIN_IO_ALLOC * BITS_PER_UINT32)];
 	int		sc_io_win_attr;
 
 	struct resource	*sc_res;
@@ -127,6 +130,7 @@ struct mv_pcib_softc {
 	int		sc_busnr;		/* Host bridge bus number */
 	int		sc_devnr;		/* Host bridge device number */
 	int		sc_type;
+	int		sc_mode;		/* Endpoint / Root Complex */
 
 	struct fdt_pci_intr	sc_intr_info;
 };
@@ -143,7 +147,8 @@ static int mv_pcib_init_all_bars(struct 
 static void mv_pcib_init_bridge(struct mv_pcib_softc *, int, int, int);
 static int mv_pcib_intr_info(phandle_t, struct mv_pcib_softc *);
 static inline void pcib_write_irq_mask(struct mv_pcib_softc *, uint32_t);
-
+static void mv_pcib_enable(struct mv_pcib_softc *, uint32_t);
+static int mv_pcib_mem_init(struct mv_pcib_softc *);
 
 /* Forward prototypes */
 static int mv_pcib_probe(device_t);
@@ -185,7 +190,7 @@ static device_method_t mv_pcib_methods[]
 	DEVMETHOD(pcib_read_config,		mv_pcib_read_config),
 	DEVMETHOD(pcib_write_config,		mv_pcib_write_config),
 	DEVMETHOD(pcib_route_interrupt,		mv_pcib_route_interrupt),
-
+	
 	/* OFW bus interface */
 	DEVMETHOD(ofw_bus_get_compat,   ofw_bus_gen_get_compat),
 	DEVMETHOD(ofw_bus_get_model,    ofw_bus_gen_get_model),
@@ -230,40 +235,30 @@ mv_pcib_attach(device_t self)
 {
 	struct mv_pcib_softc *sc;
 	phandle_t node, parnode;
-	uint32_t val;
+	uint32_t val, unit;
 	int err;
 
 	sc = device_get_softc(self);
 	sc->sc_dev = self;
+	unit = fdt_get_unit(self);
+
 
 	node = ofw_bus_get_node(self);
 	parnode = OF_parent(node);
 	if (fdt_is_compatible(node, "mrvl,pcie")) {
 		sc->sc_type = MV_TYPE_PCIE;
-		sc->sc_mem_win_target = MV_WIN_PCIE_TARGET(0);
-		sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(0);
-		sc->sc_io_win_target = MV_WIN_PCIE_TARGET(0);
-		sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(0);
-#ifdef SOC_MV_ORION
+		sc->sc_win_target = MV_WIN_PCIE_TARGET(unit);
+		sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(unit);
+		sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(unit);
 	} else if (fdt_is_compatible(node, "mrvl,pci")) {
 		sc->sc_type = MV_TYPE_PCI;
-		sc->sc_mem_win_target = MV_WIN_PCI_TARGET;
+		sc->sc_win_target = MV_WIN_PCI_TARGET;
 		sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR;
-		sc->sc_io_win_target = MV_WIN_PCI_TARGET;
 		sc->sc_io_win_attr = MV_WIN_PCI_IO_ATTR;
-#endif
 	} else
 		return (ENXIO);
 
 	/*
-	 * Get PCI interrupt info.
-	 */
-	if (mv_pcib_intr_info(node, sc) != 0) {
-		device_printf(self, "could not retrieve interrupt info\n");
-		return (ENXIO);
-	}
-
-	/*
 	 * Retrieve our mem-mapped registers range.
 	 */
 	sc->sc_rid = 0;
@@ -276,6 +271,19 @@ mv_pcib_attach(device_t self)
 	sc->sc_bst = rman_get_bustag(sc->sc_res);
 	sc->sc_bsh = rman_get_bushandle(sc->sc_res);
 
+	val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_CONTROL);
+	sc->sc_mode = (val & PCIE_CONTROL_ROOT_CMPLX ? MV_MODE_ROOT :
+	    MV_MODE_ENDPOINT);
+
+	/*
+	 * Get PCI interrupt info.
+	 */
+	if ((sc->sc_mode == MV_MODE_ROOT) &&
+	    (mv_pcib_intr_info(node, sc) != 0)) {
+		device_printf(self, "could not retrieve interrupt info\n");
+		return (ENXIO);
+	}
+
 	/*
 	 * Configure decode windows for PCI(E) access.
 	 */
@@ -285,18 +293,87 @@ mv_pcib_attach(device_t self)
 	mv_pcib_hw_cfginit();
 
 	/*
-	 * Enable PCI bridge.
+	 * Enable PCIE device.
 	 */
-	val = mv_pcib_hw_cfgread(sc, sc->sc_busnr, sc->sc_devnr, 0,
-	    PCIR_COMMAND, 2);
-	val |= PCIM_CMD_SERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN |
-	    PCIM_CMD_PORTEN;
-	mv_pcib_hw_cfgwrite(sc, sc->sc_busnr, sc->sc_devnr, 0,
-	    PCIR_COMMAND, val, 2);
+	mv_pcib_enable(sc, unit);
 
-	sc->sc_mem_alloc = sc->sc_mem_base;
-	sc->sc_io_alloc = sc->sc_io_base;
+	/*
+	 * Memory management.
+	 */
+	err = mv_pcib_mem_init(sc);
+	if (err)
+		return (err);
 
+	if (sc->sc_mode == MV_MODE_ROOT) {
+		err = mv_pcib_init(sc, sc->sc_busnr,
+		    mv_pcib_maxslots(sc->sc_dev));
+		if (err)
+			goto error;
+
+		device_add_child(self, "pci", -1);
+	} else {
+		sc->sc_devnr = 1;
+		bus_space_write_4(sc->sc_bst, sc->sc_bsh,
+		    PCIE_REG_STATUS, 1 << PCIE_STATUS_DEV_OFFS);
+		device_add_child(self, "pci_ep", -1);
+	}
+
+	return (bus_generic_attach(self));
+
+error:
+	/* XXX SYS_RES_ should be released here */
+	rman_fini(&sc->sc_mem_rman);
+	rman_fini(&sc->sc_io_rman);
+
+	return (err);
+}
+
+static void
+mv_pcib_enable(struct mv_pcib_softc *sc, uint32_t unit)
+{
+	uint32_t val;
+#if !defined(SOC_MV_ARMADAXP)
+	int timeout;
+
+	/*
+	 * Check if PCIE device is enabled.
+	 */
+	if (read_cpu_ctrl(CPU_CONTROL) & CPU_CONTROL_PCIE_DISABLE(unit)) {
+		write_cpu_ctrl(CPU_CONTROL, read_cpu_ctrl(CPU_CONTROL) &
+		    ~(CPU_CONTROL_PCIE_DISABLE(unit)));
+
+		timeout = PCIE_LINK_TIMEOUT;
+		val = bus_space_read_4(sc->sc_bst, sc->sc_bsh,
+		    PCIE_REG_STATUS);
+		while (((val & PCIE_STATUS_LINK_DOWN) == 1) && (timeout > 0)) {
+			DELAY(1000);
+			timeout -= 1000;
+			val = bus_space_read_4(sc->sc_bst, sc->sc_bsh,
+			    PCIE_REG_STATUS);
+		}
+	}
+#endif
+
+
+	if (sc->sc_mode == MV_MODE_ROOT) {
+		/*
+		 * Enable PCI bridge.
+		 */
+		val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIR_COMMAND);
+		val |= PCIM_CMD_SERRESPEN | PCIM_CMD_BUSMASTEREN |
+		    PCIM_CMD_MEMEN | PCIM_CMD_PORTEN;
+		bus_space_write_4(sc->sc_bst, sc->sc_bsh, PCIR_COMMAND, val);
+	}
+}
+
+static int
+mv_pcib_mem_init(struct mv_pcib_softc *sc)
+{
+	int err;
+
+	/*
+	 * Memory management.
+	 */
 	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
 	err = rman_init(&sc->sc_mem_rman);
 	if (err)
@@ -319,29 +396,106 @@ mv_pcib_attach(device_t self)
 	if (err)
 		goto error;
 
-	err = mv_pcib_init(sc, sc->sc_busnr, mv_pcib_maxslots(sc->sc_dev));
-	if (err)
-		goto error;
-
-	device_add_child(self, "pci", -1);
-	return (bus_generic_attach(self));
+	return (0);
 
 error:
-	/* XXX SYS_RES_ should be released here */
 	rman_fini(&sc->sc_mem_rman);
 	rman_fini(&sc->sc_io_rman);
+
 	return (err);
 }
 
+static inline uint32_t
+pcib_bit_get(uint32_t *map, uint32_t bit)
+{
+	uint32_t n = bit / BITS_PER_UINT32;
+
+	bit = bit % BITS_PER_UINT32;
+	return (map[n] & (1 << bit));
+}
+
+static inline void
+pcib_bit_set(uint32_t *map, uint32_t bit)
+{
+	uint32_t n = bit / BITS_PER_UINT32;
+
+	bit = bit % BITS_PER_UINT32;
+	map[n] |= (1 << bit);
+}
+
+static inline uint32_t
+pcib_map_check(uint32_t *map, uint32_t start, uint32_t bits)
+{
+	uint32_t i;
+
+	for (i = start; i < start + bits; i++)
+		if (pcib_bit_get(map, i))
+			return (0);
+
+	return (1);
+}
+
+static inline void
+pcib_map_set(uint32_t *map, uint32_t start, uint32_t bits)
+{
+	uint32_t i;
+
+	for (i = start; i < start + bits; i++)
+		pcib_bit_set(map, i);
+}
+
+/*
+ * The idea of this allocator is taken from ARM No-Cache memory
+ * management code (sys/arm/arm/vm_machdep.c).
+ */
+static bus_addr_t
+pcib_alloc(struct mv_pcib_softc *sc, uint32_t smask)
+{
+	uint32_t bits, bits_limit, i, *map, min_alloc, size;
+	bus_addr_t addr = 0;
+	bus_addr_t base;
+
+	if (smask & 1) {
+		base = sc->sc_io_base;
+		min_alloc = PCI_MIN_IO_ALLOC;
+		bits_limit = sc->sc_io_size / min_alloc;
+		map = sc->sc_io_map;
+		smask &= ~0x3;
+	} else {
+		base = sc->sc_mem_base;
+		min_alloc = PCI_MIN_MEM_ALLOC;
+		bits_limit = sc->sc_mem_size / min_alloc;
+		map = sc->sc_mem_map;
+		smask &= ~0xF;
+	}
+
+	size = ~smask + 1;
+	bits = size / min_alloc;
+
+	for (i = 0; i + bits <= bits_limit; i += bits)
+		if (pcib_map_check(map, i, bits)) {
+			pcib_map_set(map, i, bits);
+			addr = base + (i * min_alloc);
+			return (addr);
+		}
+
+	return (addr);
+}
+
 static int
 mv_pcib_init_bar(struct mv_pcib_softc *sc, int bus, int slot, int func,
     int barno)
 {
-	bus_addr_t *allocp, limit;
-	uint32_t addr, bar, mask, size;
+	uint32_t addr, bar;
 	int reg, width;
 
 	reg = PCIR_BAR(barno);
+
+	/*
+	 * Need to init the BAR register with 0xffffffff before correct
+	 * value can be read.
+	 */
+	mv_pcib_write_config(sc->sc_dev, bus, slot, func, reg, ~0, 4);
 	bar = mv_pcib_read_config(sc->sc_dev, bus, slot, func, reg, 4);
 	if (bar == 0)
 		return (1);
@@ -349,37 +503,13 @@ mv_pcib_init_bar(struct mv_pcib_softc *s
 	/* Calculate BAR size: 64 or 32 bit (in 32-bit units) */
 	width = ((bar & 7) == 4) ? 2 : 1;
 
-	mv_pcib_write_config(sc->sc_dev, bus, slot, func, reg, ~0, 4);
-	size = mv_pcib_read_config(sc->sc_dev, bus, slot, func, reg, 4);
-
-	/* Get BAR type and size */
-	if (bar & 1) {
-		/* I/O port */
-		allocp = &sc->sc_io_alloc;
-		limit = sc->sc_io_base + sc->sc_io_size;
-		size &= ~0x3;
-		if ((size & 0xffff0000) == 0)
-			size |= 0xffff0000;
-	} else {
-		/* Memory */
-		allocp = &sc->sc_mem_alloc;
-		limit = sc->sc_mem_base + sc->sc_mem_size;
-		size &= ~0xF;
-	}
-	mask = ~size;
-	size = mask + 1;
-
-	/* Sanity check (must be a power of 2) */
-	if (size & mask)
-		return (width);
-
-	addr = (*allocp + mask) & ~mask;
-	if ((*allocp = addr + size) > limit)
+	addr = pcib_alloc(sc, bar);
+	if (!addr)
 		return (-1);
 
 	if (bootverbose)
-		printf("PCI %u:%u:%u: reg %x: size=%08x: addr=%08x\n",
-		    bus, slot, func, reg, size, addr);
+		printf("PCI %u:%u:%u: reg %x: smask=%08x: addr=%08x\n",
+		    bus, slot, func, reg, bar, addr);
 
 	mv_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 4);
 	if (width == 2)
@@ -528,10 +658,20 @@ mv_pcib_alloc_resource(device_t dev, dev
 		rm = &sc->sc_mem_rman;
 		break;
 	default:
-		return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child,
+		return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev,
 		    type, rid, start, end, count, flags));
 	};
 
+	if ((start == 0UL) && (end == ~0UL)) {
+		start = sc->sc_mem_base;
+		end = sc->sc_mem_base + sc->sc_mem_size - 1;
+		count = sc->sc_mem_size;
+	}
+
+	if ((start < sc->sc_mem_base) || (start + count - 1 != end) ||
+	    (end > sc->sc_mem_base + sc->sc_mem_size - 1))
+		return (NULL);
+
 	res = rman_reserve_resource(rm, start, end, count, flags, child);
 	if (res == NULL)
 		return (NULL);
@@ -696,8 +836,9 @@ mv_pcib_read_config(device_t dev, u_int 
 {
 	struct mv_pcib_softc *sc = device_get_softc(dev);
 
-	/* Skip self */
-	if (bus == sc->sc_busnr && slot == sc->sc_devnr)
+	/* Return ~0 if link is inactive or trying to read from Root */
+	if ((bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS) &
+	    PCIE_STATUS_LINK_DOWN) || (slot == 0))
 		return (~0U);
 
 	return (mv_pcib_hw_cfgread(sc, bus, slot, func, reg, bytes));
@@ -709,8 +850,9 @@ mv_pcib_write_config(device_t dev, u_int
 {
 	struct mv_pcib_softc *sc = device_get_softc(dev);
 
-	/* Skip self */
-	if (bus == sc->sc_busnr && slot == sc->sc_devnr)
+	/* Return if link is inactive or trying to write to Root */
+	if ((bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS) &
+	    PCIE_STATUS_LINK_DOWN) || (slot == 0))
 		return;
 
 	mv_pcib_hw_cfgwrite(sc, bus, slot, func, reg, val, bytes);
@@ -749,15 +891,16 @@ mv_pcib_decode_win(phandle_t node, struc
 	}
 
 	/* Configure CPU decoding windows */
-	error = decode_win_cpu_set(sc->sc_io_win_target,
-	    sc->sc_io_win_attr, io_space.base_parent, io_space.len, -1);
+	error = decode_win_cpu_set(sc->sc_win_target,
+	    sc->sc_io_win_attr, io_space.base_parent, io_space.len, ~0);
 	if (error < 0) {
 		device_printf(dev, "could not set up CPU decode "
 		    "window for PCI IO\n");
 		return (ENXIO);
 	}
-	error = decode_win_cpu_set(sc->sc_mem_win_target,
-	    sc->sc_mem_win_attr, mem_space.base_parent, mem_space.len, -1);
+	error = decode_win_cpu_set(sc->sc_win_target,
+	    sc->sc_mem_win_attr, mem_space.base_parent, mem_space.len,
+	    mem_space.base_parent);
 	if (error < 0) {
 		device_printf(dev, "could not set up CPU decode "
 		    "windows for PCI MEM\n");
@@ -784,22 +927,3 @@ mv_pcib_intr_info(phandle_t node, struct
 	return (0);
 }
 
-#if 0
-		control = bus_space_read_4(sc->sc_bst, sc->sc_bsh,
-		    PCIE_REG_CONTROL);
-
-		/*
-		 * If this PCI-E port (controller) is configured (by the
-		 * underlying firmware) with lane width other than 1x, there
-		 * are auxiliary resources defined for aggregating more width
-		 * on our lane. Skip all such entries as they are not
-		 * standalone ports and must not have a device object
-		 * instantiated.
-		 */
-		if ((control & PCIE_CTRL_LINK1X) == 0)
-			while (info->op_base &&
-			    info->op_type == MV_TYPE_PCIE_AGGR_LANE)
-				info++;
-
-		mv_pcib_add_child(driver, parent, sc);
-#endif

Modified: head/sys/arm/mv/mvwin.h
==============================================================================
--- head/sys/arm/mv/mvwin.h	Fri Sep 14 09:55:19 2012	(r240488)
+++ head/sys/arm/mv/mvwin.h	Fri Sep 14 09:57:41 2012	(r240489)
@@ -257,15 +257,16 @@
 #define MV_WIN_PCIE_TARGET(n)		4
 #define MV_WIN_PCIE_MEM_ATTR(n)		0x59
 #define MV_WIN_PCIE_IO_ATTR(n)		0x51
-#define MV_WIN_PCI_TARGET		3
-#define MV_WIN_PCI_MEM_ATTR		0x59
-#define MV_WIN_PCI_IO_ATTR		0x51
 #elif defined(SOC_MV_LOKIPLUS)
 #define MV_WIN_PCIE_TARGET(n)		(3 + (n))
 #define MV_WIN_PCIE_MEM_ATTR(n)		0x59
 #define MV_WIN_PCIE_IO_ATTR(n)		0x51
 #endif
 
+#define MV_WIN_PCI_TARGET		3
+#define MV_WIN_PCI_MEM_ATTR		0x59
+#define MV_WIN_PCI_IO_ATTR		0x51
+
 #define MV_WIN_PCIE_CTRL(n)		(0x10 * (((n) < 5) ? (n) : \
 					    (n) + 1) + 0x1820)
 #define MV_WIN_PCIE_BASE(n)		(0x10 * (((n) < 5) ? (n) : \

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 09:59:28 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1D53D106567F;
	Fri, 14 Sep 2012 09:59:28 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 086D88FC15;
	Fri, 14 Sep 2012 09:59:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8E9xRxt092642;
	Fri, 14 Sep 2012 09:59:27 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8E9xRWj092639;
	Fri, 14 Sep 2012 09:59:27 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209140959.q8E9xRWj092639@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 09:59: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: r240490 - in head/sys/arm: conf mv/armadaxp
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 09:59:28 -0000

Author: gber
Date: Fri Sep 14 09:59:27 2012
New Revision: 240490
URL: http://svn.freebsd.org/changeset/base/240490

Log:
  Enable PCI for Armada XP
  
  Obtained from:	Semihalf

Modified:
  head/sys/arm/conf/ARMADAXP
  head/sys/arm/mv/armadaxp/armadaxp.c

Modified: head/sys/arm/conf/ARMADAXP
==============================================================================
--- head/sys/arm/conf/ARMADAXP	Fri Sep 14 09:57:41 2012	(r240489)
+++ head/sys/arm/conf/ARMADAXP	Fri Sep 14 09:59:27 2012	(r240490)
@@ -96,6 +96,9 @@ options		HZ=1000
 options		DEVICE_POLLING
 device		vlan
 
+#PCI/PCIE
+device		pci
+
 #FDT
 options 	FDT
 options 	FDT_DTB_STATIC

Modified: head/sys/arm/mv/armadaxp/armadaxp.c
==============================================================================
--- head/sys/arm/mv/armadaxp/armadaxp.c	Fri Sep 14 09:57:41 2012	(r240489)
+++ head/sys/arm/mv/armadaxp/armadaxp.c	Fri Sep 14 09:59:27 2012	(r240490)
@@ -160,11 +160,3 @@ get_l2clk(void)
 	return (l2clk_freq);
 }
 
-int
-fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va,
-    vm_offset_t mem_va)
-{
-
-	return (0);
-}
-

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 10:01:52 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A48EE106564A;
	Fri, 14 Sep 2012 10:01:52 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8FCB18FC1A;
	Fri, 14 Sep 2012 10:01:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EA1qu5093133;
	Fri, 14 Sep 2012 10:01:52 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EA1q2k093131;
	Fri, 14 Sep 2012 10:01:52 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209141001.q8EA1q2k093131@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 10:01: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: r240491 - head/sys/arm/mv
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 10:01:52 -0000

Author: gber
Date: Fri Sep 14 10:01:52 2012
New Revision: 240491
URL: http://svn.freebsd.org/changeset/base/240491

Log:
  Remove unused structure fields
  
  Obtained from:	Semihalf

Modified:
  head/sys/arm/mv/mpic.c

Modified: head/sys/arm/mv/mpic.c
==============================================================================
--- head/sys/arm/mv/mpic.c	Fri Sep 14 09:59:27 2012	(r240490)
+++ head/sys/arm/mv/mpic.c	Fri Sep 14 10:01:52 2012	(r240491)
@@ -76,8 +76,6 @@ struct mv_mpic_softc {
 	bus_space_handle_t	mpic_bsh;
 	bus_space_tag_t		cpu_bst;
 	bus_space_handle_t	cpu_bsh;
-	int			mpic_high_regs;
-	int			mpic_error_regs;
 };
 
 static struct resource_spec mv_mpic_spec[] = {

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 10:05:02 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53264106566C;
	Fri, 14 Sep 2012 10:05:02 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3C6C58FC14;
	Fri, 14 Sep 2012 10:05:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EA52wQ093694;
	Fri, 14 Sep 2012 10:05:02 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EA52OS093690;
	Fri, 14 Sep 2012 10:05:02 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209141005.q8EA52OS093690@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 10:05: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: r240492 - in head/sys: arm/include arm/mv boot/fdt/dts
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 10:05:02 -0000

Author: gber
Date: Fri Sep 14 10:05:01 2012
New Revision: 240492
URL: http://svn.freebsd.org/changeset/base/240492

Log:
  Add support for MSI in interrupt controlller.
  
  MSI are implemented via software interrupt. PCIe cards will write
  into software interrupt register which will cause inbound shared
  interrupt which will be interpreted as a MSI.
  
  Obtained from:	Marvell, Semihalf

Modified:
  head/sys/arm/include/intr.h
  head/sys/arm/mv/mpic.c
  head/sys/arm/mv/mvvar.h
  head/sys/boot/fdt/dts/db78460.dts

Modified: head/sys/arm/include/intr.h
==============================================================================
--- head/sys/arm/include/intr.h	Fri Sep 14 10:01:52 2012	(r240491)
+++ head/sys/arm/include/intr.h	Fri Sep 14 10:05:01 2012	(r240492)
@@ -55,7 +55,12 @@
 #elif defined(CPU_ARM11)
 #define NIRQ		128
 #elif defined(SOC_MV_ARMADAXP)
-#define NIRQ		148
+#define MAIN_IRQ_NUM		116
+#define ERR_IRQ_NUM		32
+#define ERR_IRQ			(MAIN_IRQ_NUM)
+#define MSI_IRQ_NUM		32
+#define MSI_IRQ			(ERR_IRQ + ERR_IRQ_NUM)
+#define NIRQ			(MAIN_IRQ_NUM + ERR_IRQ_NUM + MSI_IRQ_NUM)
 #else
 #define NIRQ		32
 #endif

Modified: head/sys/arm/mv/mpic.c
==============================================================================
--- head/sys/arm/mv/mpic.c	Fri Sep 14 10:01:52 2012	(r240491)
+++ head/sys/arm/mv/mpic.c	Fri Sep 14 10:05:01 2012	(r240492)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (c) 2006 Benno Rice.
  * Copyright (C) 2007-2011 MARVELL INTERNATIONAL LTD.
+ * Copyright (c) 2012 Semihalf.
  * All rights reserved.
  *
  * Developed by Semihalf.
@@ -46,23 +47,34 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
+#include 
+
+#ifdef DEBUG
+#define debugf(fmt, args...) do { printf("%s(): ", __func__);	\
+    printf(fmt,##args); } while (0)
+#else
+#define debugf(fmt, args...)
+#endif
 
-#define IRQ_ERR			4
-#define MAIN_IRQS		116
+#define MPIC_INT_ERR			4
+#define MPIC_INT_MSI			96
 
 #define IRQ_MASK		0x3ff
 
 #define MPIC_CTRL		0x0
 #define MPIC_SOFT_INT		0x4
+#define MPIC_SOFT_INT_DRBL1	(1 << 5)
 #define MPIC_ERR_CAUSE		0x20
 #define MPIC_ISE		0x30
 #define MPIC_ICE		0x34
 
 
-#define MPIC_IN_DOORBELL	0x78
-#define MPIC_IN_DOORBELL_MASK	0x7c
+#define MPIC_IN_DRBL		0x78
+#define MPIC_IN_DRBL_MASK	0x7c
 #define MPIC_CTP		0xb0
 #define MPIC_CTP		0xb0
 #define MPIC_IIACK		0xb4
@@ -71,16 +83,20 @@ __FBSDID("$FreeBSD$");
 #define MPIC_ERR_MASK		0xec0
 
 struct mv_mpic_softc {
-	struct resource	*	mpic_res[2];
+	device_t		sc_dev;
+	struct resource	*	mpic_res[3];
 	bus_space_tag_t		mpic_bst;
 	bus_space_handle_t	mpic_bsh;
 	bus_space_tag_t		cpu_bst;
 	bus_space_handle_t	cpu_bsh;
+	bus_space_tag_t		drbl_bst;
+	bus_space_handle_t	drbl_bsh;
 };
 
 static struct resource_spec mv_mpic_spec[] = {
 	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
 	{ SYS_RES_MEMORY,	1,	RF_ACTIVE },
+	{ SYS_RES_MEMORY,	2,	RF_ACTIVE },
 	{ -1, 0 }
 };
 
@@ -92,14 +108,21 @@ static int	mv_mpic_probe(device_t);
 static int	mv_mpic_attach(device_t);
 uint32_t	mv_mpic_get_cause(void);
 uint32_t	mv_mpic_get_cause_err(void);
+uint32_t	mv_mpic_get_msi(void);
 static void	arm_mask_irq_err(uintptr_t);
 static void	arm_unmask_irq_err(uintptr_t);
+static void	arm_unmask_msi(void);
 
 #define MPIC_CPU_WRITE(softc, reg, val) \
     bus_space_write_4((softc)->cpu_bst, (softc)->cpu_bsh, (reg), (val))
 #define MPIC_CPU_READ(softc, reg) \
     bus_space_read_4((softc)->cpu_bst, (softc)->cpu_bsh, (reg))
 
+#define MPIC_DRBL_WRITE(softc, reg, val) \
+    bus_space_write_4((softc)->drbl_bst, (softc)->drbl_bsh, (reg), (val))
+#define MPIC_DRBL_READ(softc, reg) \
+    bus_space_read_4((softc)->drbl_bst, (softc)->drbl_bsh, (reg))
+
 static int
 mv_mpic_probe(device_t dev)
 {
@@ -123,6 +146,8 @@ mv_mpic_attach(device_t dev)
 		return (ENXIO);
 	mv_mpic_sc = sc;
 
+	sc->sc_dev = dev;
+
 	error = bus_alloc_resources(dev, mv_mpic_spec, sc->mpic_res);
 	if (error) {
 		device_printf(dev, "could not allocate resources\n");
@@ -135,10 +160,15 @@ mv_mpic_attach(device_t dev)
 	sc->cpu_bst = rman_get_bustag(sc->mpic_res[1]);
 	sc->cpu_bsh = rman_get_bushandle(sc->mpic_res[1]);
 
+	sc->drbl_bst = rman_get_bustag(sc->mpic_res[2]);
+	sc->drbl_bsh = rman_get_bushandle(sc->mpic_res[2]);
+
 	bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
 	    MPIC_CTRL, 1);
 	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_CTP, 0);
 
+	arm_unmask_msi();
+
 	return (0);
 }
 
@@ -167,8 +197,10 @@ arm_get_next_irq(int last)
 	CTR2(KTR_INTR, "%s: irq:%#x", __func__, irq);
 
 	if (irq != IRQ_MASK) {
-		if (irq == IRQ_ERR)
+		if (irq == MPIC_INT_ERR)
 			irq = mv_mpic_get_cause_err();
+		if (irq == MPIC_INT_MSI)
+			irq = mv_mpic_get_msi();
 		next = irq;
 	}
 
@@ -186,11 +218,11 @@ arm_mask_irq(uintptr_t nb)
 
 	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_CTP, 1);
 
-	if (nb < MAIN_IRQS) {
+	if (nb < ERR_IRQ) {
 		bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
 		    MPIC_ICE, nb);
 		MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ISM, nb);
-	} else
+	} else if (nb < MSI_IRQ)
 		arm_mask_irq_err(nb);
 }
 
@@ -201,7 +233,7 @@ arm_mask_irq_err(uintptr_t nb)
 	uint32_t mask;
 	uint8_t bit_off;
 
-	bit_off = nb - MAIN_IRQS;
+	bit_off = nb - ERR_IRQ;
 	mask = MPIC_CPU_READ(mv_mpic_sc, MPIC_ERR_MASK);
 	mask &= ~(1 << bit_off);
 	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ERR_MASK, mask);
@@ -213,15 +245,15 @@ arm_unmask_irq(uintptr_t nb)
 
 	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_CTP, 0);
 
-	if (nb < MAIN_IRQS) {
+	if (nb < ERR_IRQ) {
 		bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
 		    MPIC_ISE, nb);
 		MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, nb);
-	} else
+	} else if (nb < MSI_IRQ)
 		arm_unmask_irq_err(nb);
 
 	if (nb == 0)
-		MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DOORBELL_MASK, 0xffffffff);
+		MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DRBL_MASK, 0xffffffff);
 }
 
 void
@@ -231,15 +263,22 @@ arm_unmask_irq_err(uintptr_t nb)
 	uint8_t bit_off;
 
 	bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
-	    MPIC_ISE, IRQ_ERR);
-	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, IRQ_ERR);
+	    MPIC_ISE, MPIC_INT_ERR);
+	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, MPIC_INT_ERR);
 
-	bit_off = nb - MAIN_IRQS;
+	bit_off = nb - ERR_IRQ;
 	mask = MPIC_CPU_READ(mv_mpic_sc, MPIC_ERR_MASK);
 	mask |= (1 << bit_off);
 	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ERR_MASK, mask);
 }
 
+static void
+arm_unmask_msi(void)
+{
+
+	arm_unmask_irq(MPIC_INT_MSI);
+}
+
 uint32_t
 mv_mpic_get_cause(void)
 {
@@ -260,7 +299,61 @@ mv_mpic_get_cause_err(void)
 		bit_off = ffs(err_cause) - 1;
 	else
 		return (-1);
-	return (MAIN_IRQS + bit_off);
+
+	debugf("%s: irq:%x cause:%x\n", __func__, bit_off, err_cause);
+	return (ERR_IRQ + bit_off);
+}
+
+uint32_t
+mv_mpic_get_msi(void)
+{
+	uint32_t cause;
+	uint8_t bit_off;
+
+	cause = MPIC_DRBL_READ(mv_mpic_sc, 0);
+
+	if (cause)
+		bit_off = ffs(cause) - 1;
+	else
+		return (-1);
+
+	debugf("%s: irq:%x cause:%x\n", __func__, bit_off, cause);
+
+	cause &= ~(1 << bit_off);
+	MPIC_DRBL_WRITE(mv_mpic_sc, 0, cause);
+
+	return (MSI_IRQ + bit_off);
+}
+
+int
+mv_msi_data(int irq, uint64_t *addr, uint32_t *data)
+{
+	u_long phys, base, size;
+	phandle_t node;
+	int error;
+
+	node = ofw_bus_get_node(mv_mpic_sc->sc_dev);
+
+	/* Get physical addres of register space */
+	error = fdt_get_range(OF_parent(node), 0, &phys, &size);
+	if (error) {
+		printf("%s: Cannot get register physical address, err:%d",
+		    __func__, error);
+		return (error);
+	}
+
+	/* Get offset of MPIC register space */
+	error = fdt_regsize(node, &base, &size);
+	if (error) {
+		printf("%s: Cannot get MPIC register offset, err:%d",
+		    __func__, error);
+		return (error);
+	}
+
+	*addr = phys + base + MPIC_SOFT_INT;
+	*data = MPIC_SOFT_INT_DRBL1 | irq;
+
+	return (0);
 }
 
 #if defined(SMP)
@@ -283,7 +376,7 @@ pic_ipi_get(int i __unused)
 {
 	uint32_t val;
 
-	val = MPIC_CPU_READ(mv_mpic_sc, MPIC_IN_DOORBELL);
+	val = MPIC_CPU_READ(mv_mpic_sc, MPIC_IN_DRBL);
 	if (val)
 		return (ffs(val) - 1);
 
@@ -296,7 +389,7 @@ pic_ipi_clear(int ipi)
 	uint32_t val;
 
 	val = ~(1 << ipi);
-	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DOORBELL, val);
+	MPIC_CPU_WRITE(mv_mpic_sc, MPIC_IN_DRBL, val);
 }
 
 #endif

Modified: head/sys/arm/mv/mvvar.h
==============================================================================
--- head/sys/arm/mv/mvvar.h	Fri Sep 14 10:01:52 2012	(r240491)
+++ head/sys/arm/mv/mvvar.h	Fri Sep 14 10:05:01 2012	(r240492)
@@ -134,4 +134,6 @@ uint32_t mv_drbl_get_cause(int dir, int 
 void	mv_drbl_set_msg(uint32_t val, int mnr, int dir, int unit);
 uint32_t mv_drbl_get_msg(int mnr, int dir, int unit);
 
+int	mv_msi_data(int irq, uint64_t *addr, uint32_t *data);
+
 #endif /* _MVVAR_H_ */

Modified: head/sys/boot/fdt/dts/db78460.dts
==============================================================================
--- head/sys/boot/fdt/dts/db78460.dts	Fri Sep 14 10:01:52 2012	(r240491)
+++ head/sys/boot/fdt/dts/db78460.dts	Fri Sep 14 10:05:01 2012	(r240492)
@@ -75,7 +75,7 @@
 			interrupt-controller;
 			#address-cells = <0>;
 			#interrupt-cells = <1>;
-			reg = <0x20a00 0x500 0x21000 0x800>;
+			reg = <0x20a00 0x500 0x21000 0x800 0x20400 0x100>;
 			compatible = "mrvl,mpic";
 		};
 

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 10:06:56 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CFBD0106566B;
	Fri, 14 Sep 2012 10:06:56 +0000 (UTC)
	(envelope-from gber@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B0EAF8FC15;
	Fri, 14 Sep 2012 10:06:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EA6uZc094102;
	Fri, 14 Sep 2012 10:06:56 GMT (envelope-from gber@svn.freebsd.org)
Received: (from gber@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EA6upc094100;
	Fri, 14 Sep 2012 10:06:56 GMT (envelope-from gber@svn.freebsd.org)
Message-Id: <201209141006.q8EA6upc094100@svn.freebsd.org>
From: Grzegorz Bernacki 
Date: Fri, 14 Sep 2012 10:06:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r240493 - head/sys/arm/mv
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 10:06:56 -0000

Author: gber
Date: Fri Sep 14 10:06:56 2012
New Revision: 240493
URL: http://svn.freebsd.org/changeset/base/240493

Log:
  Implement MSI support.
  
  MSI are implemented via Inbound Shared Doorbell 1 interrupts. Interrupts
  are triggered by writing to Software Triggered Interrupt registeri (PCIe
  card using physical address of this register in BAR0 space). There are 32
  interrupts available. It can be increased by using Doorbell 2 and
  Doorbell 3 registers to 96 interrupts.
  
  Obtained from:	Marvell, Semihalf

Modified:
  head/sys/arm/mv/mv_pci.c

Modified: head/sys/arm/mv/mv_pci.c
==============================================================================
--- head/sys/arm/mv/mv_pci.c	Fri Sep 14 10:05:01 2012	(r240492)
+++ head/sys/arm/mv/mv_pci.c	Fri Sep 14 10:06:56 2012	(r240493)
@@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -73,6 +75,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef DEBUG
+#define debugf(fmt, args...) do { printf(fmt,##args); } while (0)
+#else
+#define debugf(fmt, args...)
+#endif
+
 #define PCI_CFG_ENA		(1 << 31)
 #define PCI_CFG_BUS(bus)	(((bus) & 0xff) << 16)
 #define PCI_CFG_DEV(dev)	(((dev) & 0x1f) << 11)
@@ -81,7 +89,6 @@ __FBSDID("$FreeBSD$");
 
 #define PCI_REG_CFG_ADDR	0x0C78
 #define PCI_REG_CFG_DATA	0x0C7C
-#define PCI_REG_P2P_CONF	0x1D14
 
 #define PCIE_REG_CFG_ADDR	0x18F8
 #define PCIE_REG_CFG_DATA	0x18FC
@@ -127,6 +134,9 @@ struct mv_pcib_softc {
 	bus_space_tag_t	sc_bst;
 	int		sc_rid;
 
+	struct mtx	sc_msi_mtx;
+	uint32_t	sc_msi_bitmap;
+
 	int		sc_busnr;		/* Host bridge bus number */
 	int		sc_devnr;		/* Host bridge device number */
 	int		sc_type;
@@ -166,6 +176,11 @@ static uint32_t mv_pcib_read_config(devi
 static void mv_pcib_write_config(device_t, u_int, u_int, u_int, u_int,
     uint32_t, int);
 static int mv_pcib_route_interrupt(device_t, device_t, int);
+#if defined(SOC_MV_ARMADAXP)
+static int mv_pcib_alloc_msi(device_t, device_t, int, int, int *);
+static int mv_pcib_map_msi(device_t, device_t, int, uint64_t *, uint32_t *);
+static int mv_pcib_release_msi(device_t, device_t, int, int *);
+#endif
 
 /*
  * Bus interface definitions.
@@ -190,7 +205,13 @@ static device_method_t mv_pcib_methods[]
 	DEVMETHOD(pcib_read_config,		mv_pcib_read_config),
 	DEVMETHOD(pcib_write_config,		mv_pcib_write_config),
 	DEVMETHOD(pcib_route_interrupt,		mv_pcib_route_interrupt),
-	
+
+#if defined(SOC_MV_ARMADAXP)
+	DEVMETHOD(pcib_alloc_msi,		mv_pcib_alloc_msi),
+	DEVMETHOD(pcib_release_msi,		mv_pcib_release_msi),
+	DEVMETHOD(pcib_map_msi,			mv_pcib_map_msi),
+#endif
+
 	/* OFW bus interface */
 	DEVMETHOD(ofw_bus_get_compat,   ofw_bus_gen_get_compat),
 	DEVMETHOD(ofw_bus_get_model,    ofw_bus_gen_get_model),
@@ -318,6 +339,7 @@ mv_pcib_attach(device_t self)
 		device_add_child(self, "pci_ep", -1);
 	}
 
+	mtx_init(&sc->sc_msi_mtx, "msi_mtx", NULL, MTX_DEF);
 	return (bus_generic_attach(self));
 
 error:
@@ -927,3 +949,80 @@ mv_pcib_intr_info(phandle_t node, struct
 	return (0);
 }
 
+#if defined(SOC_MV_ARMADAXP)
+static int
+mv_pcib_map_msi(device_t dev, device_t child, int irq, uint64_t *addr,
+    uint32_t *data)
+{
+	struct mv_pcib_softc *sc;
+
+	sc = device_get_softc(dev);
+	irq = irq - MSI_IRQ;
+
+	/* validate parameters */
+	if (isclr(&sc->sc_msi_bitmap, irq)) {
+		device_printf(dev, "invalid MSI 0x%x\n", irq);
+		return (EINVAL);
+	}
+
+	mv_msi_data(irq, addr, data);
+
+	debugf("%s: irq: %d addr: %jx data: %x\n",
+	    __func__, irq, *addr, *data);
+
+	return (0);
+}
+
+static int
+mv_pcib_alloc_msi(device_t dev, device_t child, int count,
+    int maxcount __unused, int *irqs)
+{
+	struct mv_pcib_softc *sc;
+	u_int start = 0, i;
+
+	if (powerof2(count) == 0 || count > MSI_IRQ_NUM)
+		return (EINVAL);
+
+	sc = device_get_softc(dev);
+	mtx_lock(&sc->sc_msi_mtx);
+
+	for (start = 0; (start + count) < MSI_IRQ_NUM; start++) {
+		for (i = start; i < start + count; i++) {
+			if (isset(&sc->sc_msi_bitmap, i))
+				break;
+		}
+		if (i == start + count)
+			break;
+	}
+
+	if ((start + count) == MSI_IRQ_NUM) {
+		mtx_unlock(&sc->sc_msi_mtx);
+		return (ENXIO);
+	}
+
+	for (i = start; i < start + count; i++) {
+		setbit(&sc->sc_msi_bitmap, i);
+		irqs[i] = MSI_IRQ + i;
+	}
+	debugf("%s: start: %x count: %x\n", __func__, start, count);
+
+	mtx_unlock(&sc->sc_msi_mtx);
+	return (0);
+}
+
+static int
+mv_pcib_release_msi(device_t dev, device_t child, int count, int *irqs)
+{
+	struct mv_pcib_softc *sc;
+	u_int i;
+
+	sc = device_get_softc(dev);
+	mtx_lock(&sc->sc_msi_mtx);
+
+	for (i = 0; i < count; i++)
+		clrbit(&sc->sc_msi_bitmap, irqs[i] - MSI_IRQ);
+
+	mtx_unlock(&sc->sc_msi_mtx);
+	return (0);
+}
+#endif

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 11:51:52 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 942DC1065673;
	Fri, 14 Sep 2012 11:51:52 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7AC868FC12;
	Fri, 14 Sep 2012 11:51:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EBpqac014863;
	Fri, 14 Sep 2012 11:51:52 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EBppm1014858;
	Fri, 14 Sep 2012 11:51:51 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201209141151.q8EBppm1014858@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Fri, 14 Sep 2012 11:51: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: r240494 - in head: contrib/pf/man contrib/pf/pfctl
	include sbin/pfctl sbin/pfctl/missing share/man/man4
	share/man/man5 sys/conf sys/contrib/pf sys/modules/dummynet
	sys/modules/ipfw sys/...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 11:51:52 -0000

Author: glebius
Date: Fri Sep 14 11:51:49 2012
New Revision: 240494
URL: http://svn.freebsd.org/changeset/base/240494

Log:
  o Create directory sys/netpfil, where all packet filters should
    reside, and move there ipfw(4) and pf(4).
  
  o Move most modified parts of pf out of contrib.
  
  Actual movements:
  
  sys/contrib/pf/net/*.c		-> sys/netpfil/pf/
  sys/contrib/pf/net/*.h		-> sys/net/
  contrib/pf/pfctl/*.c		-> sbin/pfctl
  contrib/pf/pfctl/*.h		-> sbin/pfctl
  contrib/pf/pfctl/pfctl.8	-> sbin/pfctl
  contrib/pf/pfctl/*.4		-> share/man/man4
  contrib/pf/pfctl/*.5		-> share/man/man5
  
  sys/netinet/ipfw		-> sys/netpfil/ipfw
  
  The arguable movement is pf/net/*.h -> sys/net. There are
  future plans to refactor pf includes, so I decided not to
  break things twice.
  
  Not modified bits of pf left in contrib: authpf, ftp-proxy,
  tftp-proxy, pflogd.
  
  The ipfw(4) movement is planned to be merged to stable/9,
  to make head and stable match.
  
  Discussed with:		bz, luigi

Added:
  head/sbin/pfctl/parse.y
     - copied unchanged from r240390, head/contrib/pf/pfctl/parse.y
  head/sbin/pfctl/pf_print_state.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pf_print_state.c
  head/sbin/pfctl/pfctl.8
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl.8
  head/sbin/pfctl/pfctl.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl.c
  head/sbin/pfctl/pfctl.h
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl.h
  head/sbin/pfctl/pfctl_altq.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_altq.c
  head/sbin/pfctl/pfctl_optimize.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_optimize.c
  head/sbin/pfctl/pfctl_osfp.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_osfp.c
  head/sbin/pfctl/pfctl_parser.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_parser.c
  head/sbin/pfctl/pfctl_parser.h
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_parser.h
  head/sbin/pfctl/pfctl_qstats.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_qstats.c
  head/sbin/pfctl/pfctl_radix.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_radix.c
  head/sbin/pfctl/pfctl_table.c
     - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_table.c
  head/share/man/man4/pf.4
     - copied unchanged from r240390, head/contrib/pf/man/pf.4
  head/share/man/man4/pflog.4
     - copied unchanged from r240390, head/contrib/pf/man/pflog.4
  head/share/man/man4/pfsync.4
     - copied unchanged from r240390, head/contrib/pf/man/pfsync.4
  head/share/man/man5/pf.conf.5
     - copied unchanged from r240390, head/contrib/pf/man/pf.conf.5
  head/share/man/man5/pf.os.5
     - copied unchanged from r240390, head/contrib/pf/man/pf.os.5
  head/sys/net/if_pflog.h
     - copied unchanged from r240390, head/sys/contrib/pf/net/if_pflog.h
  head/sys/net/if_pfsync.h
     - copied unchanged from r240390, head/sys/contrib/pf/net/if_pfsync.h
  head/sys/net/pf_mtag.h
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_mtag.h
  head/sys/net/pfvar.h
     - copied unchanged from r240390, head/sys/contrib/pf/net/pfvar.h
  head/sys/netpfil/
  head/sys/netpfil/ipfw/
     - copied from r240390, head/sys/netinet/ipfw/
  head/sys/netpfil/pf/
  head/sys/netpfil/pf/if_pflog.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/if_pflog.c
  head/sys/netpfil/pf/if_pfsync.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/if_pfsync.c
  head/sys/netpfil/pf/in4_cksum.c
     - copied unchanged from r240390, head/sys/contrib/pf/netinet/in4_cksum.c
  head/sys/netpfil/pf/pf.c
     - copied, changed from r240390, head/sys/contrib/pf/net/pf.c
  head/sys/netpfil/pf/pf_if.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_if.c
  head/sys/netpfil/pf/pf_ioctl.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_ioctl.c
  head/sys/netpfil/pf/pf_lb.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_lb.c
  head/sys/netpfil/pf/pf_norm.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_norm.c
  head/sys/netpfil/pf/pf_osfp.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_osfp.c
  head/sys/netpfil/pf/pf_ruleset.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_ruleset.c
  head/sys/netpfil/pf/pf_table.c
     - copied unchanged from r240390, head/sys/contrib/pf/net/pf_table.c
Deleted:
  head/contrib/pf/man/
  head/contrib/pf/pfctl/
  head/sbin/pfctl/missing/
  head/sys/contrib/pf/
  head/sys/netinet/ipfw/
Modified:
  head/include/Makefile
  head/sbin/pfctl/Makefile
  head/share/man/man4/Makefile
  head/share/man/man5/Makefile
  head/sys/conf/files
  head/sys/conf/kern.pre.mk
  head/sys/modules/dummynet/Makefile
  head/sys/modules/ipfw/Makefile
  head/sys/modules/ipfw_nat/Makefile
  head/sys/modules/pf/Makefile
  head/sys/modules/pflog/Makefile
  head/sys/modules/pfsync/Makefile
  head/sys/netgraph/ng_ipfw.c
  head/sys/netpfil/ipfw/dn_heap.c
  head/sys/netpfil/ipfw/dn_sched_fifo.c
  head/sys/netpfil/ipfw/dn_sched_prio.c
  head/sys/netpfil/ipfw/dn_sched_qfq.c
  head/sys/netpfil/ipfw/dn_sched_rr.c
  head/sys/netpfil/ipfw/dn_sched_wf2q.c
  head/sys/netpfil/ipfw/ip_dn_glue.c
  head/sys/netpfil/ipfw/ip_dn_io.c
  head/sys/netpfil/ipfw/ip_dummynet.c
  head/sys/netpfil/ipfw/ip_fw2.c
  head/sys/netpfil/ipfw/ip_fw_dynamic.c
  head/sys/netpfil/ipfw/ip_fw_log.c
  head/sys/netpfil/ipfw/ip_fw_nat.c
  head/sys/netpfil/ipfw/ip_fw_pfil.c
  head/sys/netpfil/ipfw/ip_fw_sockopt.c
  head/sys/netpfil/ipfw/ip_fw_table.c
  head/usr.sbin/authpf/Makefile
  head/usr.sbin/ftp-proxy/ftp-proxy/Makefile

Modified: head/include/Makefile
==============================================================================
--- head/include/Makefile	Fri Sep 14 10:06:56 2012	(r240493)
+++ head/include/Makefile	Fri Sep 14 11:51:49 2012	(r240494)
@@ -186,9 +186,6 @@ copies:
 	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
 	    ${DESTDIR}${INCLUDEDIR}/netinet
 .endif
-	cd ${.CURDIR}/../sys/contrib/pf/net; \
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
-	    ${DESTDIR}${INCLUDEDIR}/net
 	cd ${.CURDIR}/../sys/crypto; \
 	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 rijndael/rijndael.h \
 	    ${DESTDIR}${INCLUDEDIR}/crypto
@@ -272,11 +269,6 @@ symlinks:
 		    ${DESTDIR}${INCLUDEDIR}/netinet; \
 	done
 .endif
-	cd ${.CURDIR}/../sys/contrib/pf/net; \
-	for h in *.h; do \
-		ln -fs ../../../sys/contrib/pf/net/$$h \
-		    ${DESTDIR}${INCLUDEDIR}/net; \
-	done
 	cd ${.CURDIR}/../sys/crypto; \
 	for h in rijndael/rijndael.h; do \
 		ln -fs ../../../sys/crypto/$$h \

Modified: head/sbin/pfctl/Makefile
==============================================================================
--- head/sbin/pfctl/Makefile	Fri Sep 14 10:06:56 2012	(r240493)
+++ head/sbin/pfctl/Makefile	Fri Sep 14 11:51:49 2012	(r240494)
@@ -1,11 +1,10 @@
 # $FreeBSD$
 
-.PATH:	${.CURDIR}/../../contrib/pf/pfctl
-.PATH:	${.CURDIR}/../../sys/contrib/pf/net
-.PATH:	${.CURDIR}/../../contrib/pf/man
+# pf_ruleset.c is shared between kernel and pfctl
+.PATH: ${.CURDIR}/../../sys/netpfil/pf
 
 PROG=	pfctl
-MAN=	pfctl.8 pf.4 pflog.4 pfsync.4 pf.conf.5 pf.os.5
+MAN=	pfctl.8
 
 SRCS = pfctl.c parse.y pfctl_parser.c pf_print_state.c pfctl_altq.c
 SRCS+= pfctl_osfp.c pfctl_radix.c pfctl_table.c pfctl_qstats.c
@@ -14,11 +13,8 @@ SRCS+= pf_ruleset.c
 
 WARNS?=	2
 CFLAGS+= -Wall -Wmissing-prototypes -Wno-uninitialized
-CFLAGS+= -Wstrict-prototypes -I${.CURDIR}/../../contrib/pf/pfctl
-
-# XXX ALTQ
-CFLAGS+= -DENABLE_ALTQ
-#CFLAGS+= -I${.CURDIR}/missing
+CFLAGS+= -Wstrict-prototypes
+CFLAGS+= -DENABLE_ALTQ -I${.CURDIR}
 
 YFLAGS=
 

Copied: head/sbin/pfctl/parse.y (from r240390, head/contrib/pf/pfctl/parse.y)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sbin/pfctl/parse.y	Fri Sep 14 11:51:49 2012	(r240494, copy of r240390, head/contrib/pf/pfctl/parse.y)
@@ -0,0 +1,6038 @@
+/*	$OpenBSD: parse.y,v 1.554 2008/10/17 12:59:53 henning Exp $	*/
+
+/*
+ * Copyright (c) 2001 Markus Friedl.  All rights reserved.
+ * Copyright (c) 2001 Daniel Hartmeier.  All rights reserved.
+ * Copyright (c) 2001 Theo de Raadt.  All rights reserved.
+ * Copyright (c) 2002,2003 Henning Brauer. 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 ``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 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 
+#ifdef __FreeBSD__
+#include 
+#endif
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "pfctl_parser.h"
+#include "pfctl.h"
+
+static struct pfctl	*pf = NULL;
+static int		 debug = 0;
+static int		 rulestate = 0;
+static u_int16_t	 returnicmpdefault =
+			    (ICMP_UNREACH << 8) | ICMP_UNREACH_PORT;
+static u_int16_t	 returnicmp6default =
+			    (ICMP6_DST_UNREACH << 8) | ICMP6_DST_UNREACH_NOPORT;
+static int		 blockpolicy = PFRULE_DROP;
+static int		 require_order = 1;
+static int		 default_statelock;
+
+TAILQ_HEAD(files, file)		 files = TAILQ_HEAD_INITIALIZER(files);
+static struct file {
+	TAILQ_ENTRY(file)	 entry;
+	FILE			*stream;
+	char			*name;
+	int			 lineno;
+	int			 errors;
+} *file;
+struct file	*pushfile(const char *, int);
+int		 popfile(void);
+int		 check_file_secrecy(int, const char *);
+int		 yyparse(void);
+int		 yylex(void);
+int		 yyerror(const char *, ...);
+int		 kw_cmp(const void *, const void *);
+int		 lookup(char *);
+int		 lgetc(int);
+int		 lungetc(int);
+int		 findeol(void);
+
+TAILQ_HEAD(symhead, sym)	 symhead = TAILQ_HEAD_INITIALIZER(symhead);
+struct sym {
+	TAILQ_ENTRY(sym)	 entry;
+	int			 used;
+	int			 persist;
+	char			*nam;
+	char			*val;
+};
+int		 symset(const char *, const char *, int);
+char		*symget(const char *);
+
+int		 atoul(char *, u_long *);
+
+enum {
+	PFCTL_STATE_NONE,
+	PFCTL_STATE_OPTION,
+	PFCTL_STATE_SCRUB,
+	PFCTL_STATE_QUEUE,
+	PFCTL_STATE_NAT,
+	PFCTL_STATE_FILTER
+};
+
+struct node_proto {
+	u_int8_t		 proto;
+	struct node_proto	*next;
+	struct node_proto	*tail;
+};
+
+struct node_port {
+	u_int16_t		 port[2];
+	u_int8_t		 op;
+	struct node_port	*next;
+	struct node_port	*tail;
+};
+
+struct node_uid {
+	uid_t			 uid[2];
+	u_int8_t		 op;
+	struct node_uid		*next;
+	struct node_uid		*tail;
+};
+
+struct node_gid {
+	gid_t			 gid[2];
+	u_int8_t		 op;
+	struct node_gid		*next;
+	struct node_gid		*tail;
+};
+
+struct node_icmp {
+	u_int8_t		 code;
+	u_int8_t		 type;
+	u_int8_t		 proto;
+	struct node_icmp	*next;
+	struct node_icmp	*tail;
+};
+
+enum	{ PF_STATE_OPT_MAX, PF_STATE_OPT_NOSYNC, PF_STATE_OPT_SRCTRACK,
+	    PF_STATE_OPT_MAX_SRC_STATES, PF_STATE_OPT_MAX_SRC_CONN,
+	    PF_STATE_OPT_MAX_SRC_CONN_RATE, PF_STATE_OPT_MAX_SRC_NODES,
+	    PF_STATE_OPT_OVERLOAD, PF_STATE_OPT_STATELOCK,
+	    PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY, };
+
+enum	{ PF_SRCTRACK_NONE, PF_SRCTRACK, PF_SRCTRACK_GLOBAL, PF_SRCTRACK_RULE };
+
+struct node_state_opt {
+	int			 type;
+	union {
+		u_int32_t	 max_states;
+		u_int32_t	 max_src_states;
+		u_int32_t	 max_src_conn;
+		struct {
+			u_int32_t	limit;
+			u_int32_t	seconds;
+		}		 max_src_conn_rate;
+		struct {
+			u_int8_t	flush;
+			char		tblname[PF_TABLE_NAME_SIZE];
+		}		 overload;
+		u_int32_t	 max_src_nodes;
+		u_int8_t	 src_track;
+		u_int32_t	 statelock;
+		struct {
+			int		number;
+			u_int32_t	seconds;
+		}		 timeout;
+	}			 data;
+	struct node_state_opt	*next;
+	struct node_state_opt	*tail;
+};
+
+struct peer {
+	struct node_host	*host;
+	struct node_port	*port;
+};
+
+struct node_queue {
+	char			 queue[PF_QNAME_SIZE];
+	char			 parent[PF_QNAME_SIZE];
+	char			 ifname[IFNAMSIZ];
+	int			 scheduler;
+	struct node_queue	*next;
+	struct node_queue	*tail;
+}	*queues = NULL;
+
+struct node_qassign {
+	char		*qname;
+	char		*pqname;
+};
+
+struct filter_opts {
+	int			 marker;
+#define FOM_FLAGS	0x01
+#define FOM_ICMP	0x02
+#define FOM_TOS		0x04
+#define FOM_KEEP	0x08
+#define FOM_SRCTRACK	0x10
+	struct node_uid		*uid;
+	struct node_gid		*gid;
+	struct {
+		u_int8_t	 b1;
+		u_int8_t	 b2;
+		u_int16_t	 w;
+		u_int16_t	 w2;
+	} flags;
+	struct node_icmp	*icmpspec;
+	u_int32_t		 tos;
+	u_int32_t		 prob;
+	struct {
+		int			 action;
+		struct node_state_opt	*options;
+	} keep;
+	int			 fragment;
+	int			 allowopts;
+	char			*label;
+	struct node_qassign	 queues;
+	char			*tag;
+	char			*match_tag;
+	u_int8_t		 match_tag_not;
+	u_int			 rtableid;
+	struct {
+		struct node_host	*addr;
+		u_int16_t		port;
+	}			 divert;
+} filter_opts;
+
+struct antispoof_opts {
+	char			*label;
+	u_int			 rtableid;
+} antispoof_opts;
+
+struct scrub_opts {
+	int			 marker;
+#define SOM_MINTTL	0x01
+#define SOM_MAXMSS	0x02
+#define SOM_FRAGCACHE	0x04
+#define SOM_SETTOS	0x08
+	int			 nodf;
+	int			 minttl;
+	int			 maxmss;
+	int			 settos;
+	int			 fragcache;
+	int			 randomid;
+	int			 reassemble_tcp;
+	char			*match_tag;
+	u_int8_t		 match_tag_not;
+	u_int			 rtableid;
+} scrub_opts;
+
+struct queue_opts {
+	int			marker;
+#define QOM_BWSPEC	0x01
+#define QOM_SCHEDULER	0x02
+#define QOM_PRIORITY	0x04
+#define QOM_TBRSIZE	0x08
+#define QOM_QLIMIT	0x10
+	struct node_queue_bw	queue_bwspec;
+	struct node_queue_opt	scheduler;
+	int			priority;
+	int			tbrsize;
+	int			qlimit;
+} queue_opts;
+
+struct table_opts {
+	int			flags;
+	int			init_addr;
+	struct node_tinithead	init_nodes;
+} table_opts;
+
+struct pool_opts {
+	int			 marker;
+#define POM_TYPE		0x01
+#define POM_STICKYADDRESS	0x02
+	u_int8_t		 opts;
+	int			 type;
+	int			 staticport;
+	struct pf_poolhashkey	*key;
+
+} pool_opts;
+
+
+struct node_hfsc_opts	 hfsc_opts;
+struct node_state_opt	*keep_state_defaults = NULL;
+
+int		 disallow_table(struct node_host *, const char *);
+int		 disallow_urpf_failed(struct node_host *, const char *);
+int		 disallow_alias(struct node_host *, const char *);
+int		 rule_consistent(struct pf_rule *, int);
+int		 filter_consistent(struct pf_rule *, int);
+int		 nat_consistent(struct pf_rule *);
+int		 rdr_consistent(struct pf_rule *);
+int		 process_tabledef(char *, struct table_opts *);
+void		 expand_label_str(char *, size_t, const char *, const char *);
+void		 expand_label_if(const char *, char *, size_t, const char *);
+void		 expand_label_addr(const char *, char *, size_t, u_int8_t,
+		    struct node_host *);
+void		 expand_label_port(const char *, char *, size_t,
+		    struct node_port *);
+void		 expand_label_proto(const char *, char *, size_t, u_int8_t);
+void		 expand_label_nr(const char *, char *, size_t);
+void		 expand_label(char *, size_t, const char *, u_int8_t,
+		    struct node_host *, struct node_port *, struct node_host *,
+		    struct node_port *, u_int8_t);
+void		 expand_rule(struct pf_rule *, struct node_if *,
+		    struct node_host *, struct node_proto *, struct node_os *,
+		    struct node_host *, struct node_port *, struct node_host *,
+		    struct node_port *, struct node_uid *, struct node_gid *,
+		    struct node_icmp *, const char *);
+int		 expand_altq(struct pf_altq *, struct node_if *,
+		    struct node_queue *, struct node_queue_bw bwspec,
+		    struct node_queue_opt *);
+int		 expand_queue(struct pf_altq *, struct node_if *,
+		    struct node_queue *, struct node_queue_bw,
+		    struct node_queue_opt *);
+int		 expand_skip_interface(struct node_if *);
+
+int	 check_rulestate(int);
+int	 getservice(char *);
+int	 rule_label(struct pf_rule *, char *);
+int	 rt_tableid_max(void);
+
+void	 mv_rules(struct pf_ruleset *, struct pf_ruleset *);
+void	 decide_address_family(struct node_host *, sa_family_t *);
+void	 remove_invalid_hosts(struct node_host **, sa_family_t *);
+int	 invalid_redirect(struct node_host *, sa_family_t);
+u_int16_t parseicmpspec(char *, sa_family_t);
+
+TAILQ_HEAD(loadanchorshead, loadanchors)
+    loadanchorshead = TAILQ_HEAD_INITIALIZER(loadanchorshead);
+
+struct loadanchors {
+	TAILQ_ENTRY(loadanchors)	 entries;
+	char				*anchorname;
+	char				*filename;
+};
+
+typedef struct {
+	union {
+		int64_t			 number;
+		double			 probability;
+		int			 i;
+		char			*string;
+		u_int			 rtableid;
+		struct {
+			u_int8_t	 b1;
+			u_int8_t	 b2;
+			u_int16_t	 w;
+			u_int16_t	 w2;
+		}			 b;
+		struct range {
+			int		 a;
+			int		 b;
+			int		 t;
+		}			 range;
+		struct node_if		*interface;
+		struct node_proto	*proto;
+		struct node_icmp	*icmp;
+		struct node_host	*host;
+		struct node_os		*os;
+		struct node_port	*port;
+		struct node_uid		*uid;
+		struct node_gid		*gid;
+		struct node_state_opt	*state_opt;
+		struct peer		 peer;
+		struct {
+			struct peer	 src, dst;
+			struct node_os	*src_os;
+		}			 fromto;
+		struct {
+			struct node_host	*host;
+			u_int8_t		 rt;
+			u_int8_t		 pool_opts;
+			sa_family_t		 af;
+			struct pf_poolhashkey	*key;
+		}			 route;
+		struct redirection {
+			struct node_host	*host;
+			struct range		 rport;
+		}			*redirection;
+		struct {
+			int			 action;
+			struct node_state_opt	*options;
+		}			 keep_state;
+		struct {
+			u_int8_t	 log;
+			u_int8_t	 logif;
+			u_int8_t	 quick;
+		}			 logquick;
+		struct {
+			int		 neg;
+			char		*name;
+		}			 tagged;
+		struct pf_poolhashkey	*hashkey;
+		struct node_queue	*queue;
+		struct node_queue_opt	 queue_options;
+		struct node_queue_bw	 queue_bwspec;
+		struct node_qassign	 qassign;
+		struct filter_opts	 filter_opts;
+		struct antispoof_opts	 antispoof_opts;
+		struct queue_opts	 queue_opts;
+		struct scrub_opts	 scrub_opts;
+		struct table_opts	 table_opts;
+		struct pool_opts	 pool_opts;
+		struct node_hfsc_opts	 hfsc_opts;
+	} v;
+	int lineno;
+} YYSTYPE;
+
+#define PPORT_RANGE	1
+#define PPORT_STAR	2
+int	parseport(char *, struct range *r, int);
+
+#define DYNIF_MULTIADDR(addr) ((addr).type == PF_ADDR_DYNIFTL && \
+	(!((addr).iflags & PFI_AFLAG_NOALIAS) ||		 \
+	!isdigit((addr).v.ifname[strlen((addr).v.ifname)-1])))
+
+%}
+
+%token	PASS BLOCK SCRUB RETURN IN OS OUT LOG QUICK ON FROM TO FLAGS
+%token	RETURNRST RETURNICMP RETURNICMP6 PROTO INET INET6 ALL ANY ICMPTYPE
+%token	ICMP6TYPE CODE KEEP MODULATE STATE PORT RDR NAT BINAT ARROW NODF
+%token	MINTTL ERROR ALLOWOPTS FASTROUTE FILENAME ROUTETO DUPTO REPLYTO NO LABEL
+%token	NOROUTE URPFFAILED FRAGMENT USER GROUP MAXMSS MAXIMUM TTL TOS DROP TABLE
+%token	REASSEMBLE FRAGDROP FRAGCROP ANCHOR NATANCHOR RDRANCHOR BINATANCHOR
+%token	SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY RANDOMID
+%token	REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID
+%token	ANTISPOOF FOR INCLUDE
+%token	BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY
+%token	ALTQ CBQ PRIQ HFSC BANDWIDTH TBRSIZE LINKSHARE REALTIME UPPERLIMIT
+%token	QUEUE PRIORITY QLIMIT RTABLE
+%token	LOAD RULESET_OPTIMIZATION
+%token	STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE
+%token	MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY
+%token	TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS
+%token	DIVERTTO DIVERTREPLY
+%token			STRING
+%token			NUMBER
+%token				PORTBINARY
+%type			interface if_list if_item_not if_item
+%type			number icmptype icmp6type uid gid
+%type			tos not yesno
+%type			probability
+%type				no dir af fragcache optimizer
+%type				sourcetrack flush unaryop statelock
+%type				action nataction natpasslog scrubaction
+%type				flags flag blockspec
+%type			portplain portstar portrange
+%type			hashkey
+%type			proto proto_list proto_item
+%type			protoval
+%type			icmpspec
+%type			icmp_list icmp_item
+%type			icmp6_list icmp6_item
+%type			reticmpspec reticmp6spec
+%type			fromto
+%type			ipportspec from to
+%type			ipspec toipspec xhost host dynaddr host_list
+%type			redir_host_list redirspec
+%type			route_host route_host_list routespec
+%type				os xos os_list
+%type			portspec port_list port_item
+%type				uids uid_list uid_item
+%type				gids gid_list gid_item
+%type			route
+%type			redirection redirpool
+%type			label stringall tag anchorname
+%type			string varstring numberstring
+%type			keep
+%type			state_opt_spec state_opt_list state_opt_item
+%type			logquick quick log logopts logopt
+%type			antispoof_ifspc antispoof_iflst antispoof_if
+%type			qname
+%type			qassign qassign_list qassign_item
+%type		scheduler
+%type			cbqflags_list cbqflags_item
+%type			priqflags_list priqflags_item
+%type			hfscopts_list hfscopts_item hfsc_opts
+%type		bandwidth
+%type			filter_opts filter_opt filter_opts_l
+%type		antispoof_opts antispoof_opt antispoof_opts_l
+%type			queue_opts queue_opt queue_opts_l
+%type			scrub_opts scrub_opt scrub_opts_l
+%type			table_opts table_opt table_opts_l
+%type			pool_opts pool_opt pool_opts_l
+%type			tagged
+%type			rtable
+%%
+
+ruleset		: /* empty */
+		| ruleset include '\n'
+		| ruleset '\n'
+		| ruleset option '\n'
+		| ruleset scrubrule '\n'
+		| ruleset natrule '\n'
+		| ruleset binatrule '\n'
+		| ruleset pfrule '\n'
+		| ruleset anchorrule '\n'
+		| ruleset loadrule '\n'
+		| ruleset altqif '\n'
+		| ruleset queuespec '\n'
+		| ruleset varset '\n'
+		| ruleset antispoof '\n'
+		| ruleset tabledef '\n'
+		| '{' fakeanchor '}' '\n';
+		| ruleset error '\n'		{ file->errors++; }
+		;
+
+include		: INCLUDE STRING		{
+			struct file	*nfile;
+
+			if ((nfile = pushfile($2, 0)) == NULL) {
+				yyerror("failed to include file %s", $2);
+				free($2);
+				YYERROR;
+			}
+			free($2);
+
+			file = nfile;
+			lungetc('\n');
+		}
+		;
+
+/*
+ * apply to previouslys specified rule: must be careful to note
+ * what that is: pf or nat or binat or rdr
+ */
+fakeanchor	: fakeanchor '\n'
+		| fakeanchor anchorrule '\n'
+		| fakeanchor binatrule '\n'
+		| fakeanchor natrule '\n'
+		| fakeanchor pfrule '\n'
+		| fakeanchor error '\n'
+		;
+
+optimizer	: string	{
+			if (!strcmp($1, "none"))
+				$$ = 0;
+			else if (!strcmp($1, "basic"))
+				$$ = PF_OPTIMIZE_BASIC;
+			else if (!strcmp($1, "profile"))
+				$$ = PF_OPTIMIZE_BASIC | PF_OPTIMIZE_PROFILE;
+			else {
+				yyerror("unknown ruleset-optimization %s", $1);
+				YYERROR;
+			}
+		}
+		;
+
+option		: SET OPTIMIZATION STRING		{
+			if (check_rulestate(PFCTL_STATE_OPTION)) {
+				free($3);
+				YYERROR;
+			}
+			if (pfctl_set_optimization(pf, $3) != 0) {
+				yyerror("unknown optimization %s", $3);
+				free($3);
+				YYERROR;
+			}
+			free($3);
+		}
+		| SET RULESET_OPTIMIZATION optimizer {
+			if (!(pf->opts & PF_OPT_OPTIMIZE)) {
+				pf->opts |= PF_OPT_OPTIMIZE;
+				pf->optimize = $3;
+			}
+		}
+		| SET TIMEOUT timeout_spec
+		| SET TIMEOUT '{' optnl timeout_list '}'
+		| SET LIMIT limit_spec
+		| SET LIMIT '{' optnl limit_list '}'
+		| SET LOGINTERFACE stringall		{
+			if (check_rulestate(PFCTL_STATE_OPTION)) {
+				free($3);
+				YYERROR;
+			}
+			if (pfctl_set_logif(pf, $3) != 0) {
+				yyerror("error setting loginterface %s", $3);
+				free($3);
+				YYERROR;
+			}
+			free($3);
+		}
+		| SET HOSTID number {
+			if ($3 == 0 || $3 > UINT_MAX) {
+				yyerror("hostid must be non-zero");
+				YYERROR;
+			}
+			if (pfctl_set_hostid(pf, $3) != 0) {
+				yyerror("error setting hostid %08x", $3);
+				YYERROR;
+			}
+		}
+		| SET BLOCKPOLICY DROP	{
+			if (pf->opts & PF_OPT_VERBOSE)
+				printf("set block-policy drop\n");
+			if (check_rulestate(PFCTL_STATE_OPTION))
+				YYERROR;
+			blockpolicy = PFRULE_DROP;
+		}
+		| SET BLOCKPOLICY RETURN {
+			if (pf->opts & PF_OPT_VERBOSE)
+				printf("set block-policy return\n");
+			if (check_rulestate(PFCTL_STATE_OPTION))
+				YYERROR;
+			blockpolicy = PFRULE_RETURN;
+		}
+		| SET REQUIREORDER yesno {
+			if (pf->opts & PF_OPT_VERBOSE)
+				printf("set require-order %s\n",
+				    $3 == 1 ? "yes" : "no");
+			require_order = $3;
+		}
+		| SET FINGERPRINTS STRING {
+			if (pf->opts & PF_OPT_VERBOSE)
+				printf("set fingerprints \"%s\"\n", $3);
+			if (check_rulestate(PFCTL_STATE_OPTION)) {
+				free($3);
+				YYERROR;
+			}
+			if (!pf->anchor->name[0]) {
+				if (pfctl_file_fingerprints(pf->dev,
+				    pf->opts, $3)) {
+					yyerror("error loading "
+					    "fingerprints %s", $3);
+					free($3);
+					YYERROR;
+				}
+			}
+			free($3);
+		}
+		| SET STATEPOLICY statelock {
+			if (pf->opts & PF_OPT_VERBOSE)
+				switch ($3) {
+				case 0:
+					printf("set state-policy floating\n");
+					break;
+				case PFRULE_IFBOUND:
+					printf("set state-policy if-bound\n");
+					break;
+				}
+			default_statelock = $3;
+		}
+		| SET DEBUG STRING {
+			if (check_rulestate(PFCTL_STATE_OPTION)) {
+				free($3);
+				YYERROR;
+			}
+			if (pfctl_set_debug(pf, $3) != 0) {
+				yyerror("error setting debuglevel %s", $3);
+				free($3);
+				YYERROR;
+			}
+			free($3);
+		}
+		| SET SKIP interface {
+			if (expand_skip_interface($3) != 0) {
+				yyerror("error setting skip interface(s)");
+				YYERROR;
+			}
+		}
+		| SET STATEDEFAULTS state_opt_list {
+			if (keep_state_defaults != NULL) {
+				yyerror("cannot redefine state-defaults");
+				YYERROR;
+			}
+			keep_state_defaults = $3;
+		}
+		;
+
+stringall	: STRING	{ $$ = $1; }
+		| ALL		{
+			if (($$ = strdup("all")) == NULL) {
+				err(1, "stringall: strdup");
+			}
+		}
+		;
+
+string		: STRING string				{
+			if (asprintf(&$$, "%s %s", $1, $2) == -1)
+				err(1, "string: asprintf");
+			free($1);
+			free($2);
+		}
+		| STRING
+		;
+
+varstring	: numberstring varstring 		{
+			if (asprintf(&$$, "%s %s", $1, $2) == -1)
+				err(1, "string: asprintf");
+			free($1);
+			free($2);
+		}
+		| numberstring
+		;
+
+numberstring	: NUMBER				{
+			char	*s;
+			if (asprintf(&s, "%lld", (long long)$1) == -1) {
+				yyerror("string: asprintf");
+				YYERROR;
+			}
+			$$ = s;
+		}
+		| STRING
+		;
+
+varset		: STRING '=' varstring	{
+			if (pf->opts & PF_OPT_VERBOSE)
+				printf("%s = \"%s\"\n", $1, $3);
+			if (symset($1, $3, 0) == -1)
+				err(1, "cannot store variable %s", $1);
+			free($1);
+			free($3);
+		}
+		;
+
+anchorname	: STRING			{ $$ = $1; }
+		| /* empty */			{ $$ = NULL; }
+		;
+
+pfa_anchorlist	: /* empty */
+		| pfa_anchorlist '\n'
+		| pfa_anchorlist pfrule '\n'
+		| pfa_anchorlist anchorrule '\n'
+		;
+
+pfa_anchor	: '{'
+		{
+			char ta[PF_ANCHOR_NAME_SIZE];
+			struct pf_ruleset *rs;
+
+			/* steping into a brace anchor */
+			pf->asd++;
+			pf->bn++;
+			pf->brace = 1;
+
+			/* create a holding ruleset in the root */
+			snprintf(ta, PF_ANCHOR_NAME_SIZE, "_%d", pf->bn);
+			rs = pf_find_or_create_ruleset(ta);
+			if (rs == NULL)
+				err(1, "pfa_anchor: pf_find_or_create_ruleset");
+			pf->astack[pf->asd] = rs->anchor;
+			pf->anchor = rs->anchor;
+		} '\n' pfa_anchorlist '}'
+		{
+			pf->alast = pf->anchor;
+			pf->asd--;
+			pf->anchor = pf->astack[pf->asd];
+		}
+		| /* empty */
+		;
+
+anchorrule	: ANCHOR anchorname dir quick interface af proto fromto
+		    filter_opts pfa_anchor
+		{
+			struct pf_rule	r;
+			struct node_proto	*proto;
+
+			if (check_rulestate(PFCTL_STATE_FILTER)) {
+				if ($2)
+					free($2);
+				YYERROR;
+			}
+
+			if ($2 && ($2[0] == '_' || strstr($2, "/_") != NULL)) {
+				free($2);
+				yyerror("anchor names beginning with '_' "
+				    "are reserved for internal use");
+				YYERROR;
+			}
+
+			memset(&r, 0, sizeof(r));
+			if (pf->astack[pf->asd + 1]) {
+				/* move inline rules into relative location */
+				pf_anchor_setup(&r,
+				    &pf->astack[pf->asd]->ruleset,
+				    $2 ? $2 : pf->alast->name);
+		
+				if (r.anchor == NULL)
+					err(1, "anchorrule: unable to "
+					    "create ruleset");
+
+				if (pf->alast != r.anchor) {
+					if (r.anchor->match) {
+						yyerror("inline anchor '%s' "
+						    "already exists",
+						    r.anchor->name);
+						YYERROR;
+					}
+					mv_rules(&pf->alast->ruleset,
+					    &r.anchor->ruleset);
+				}
+				pf_remove_if_empty_ruleset(&pf->alast->ruleset);
+				pf->alast = r.anchor;
+			} else {
+				if (!$2) {
+					yyerror("anchors without explicit "
+					    "rules must specify a name");
+					YYERROR;
+				}
+			}
+			r.direction = $3;
+			r.quick = $4.quick;
+			r.af = $6;
+			r.prob = $9.prob;
+			r.rtableid = $9.rtableid;
+
+			if ($9.tag)
+				if (strlcpy(r.tagname, $9.tag,
+				    PF_TAG_NAME_SIZE) >= PF_TAG_NAME_SIZE) {
+					yyerror("tag too long, max %u chars",
+					    PF_TAG_NAME_SIZE - 1);
+					YYERROR;
+				}
+			if ($9.match_tag)
+				if (strlcpy(r.match_tagname, $9.match_tag,
+				    PF_TAG_NAME_SIZE) >= PF_TAG_NAME_SIZE) {
+					yyerror("tag too long, max %u chars",
+					    PF_TAG_NAME_SIZE - 1);
+					YYERROR;
+				}
+			r.match_tag_not = $9.match_tag_not;
+			if (rule_label(&r, $9.label))
+				YYERROR;
+			free($9.label);
+			r.flags = $9.flags.b1;
+			r.flagset = $9.flags.b2;
+			if (($9.flags.b1 & $9.flags.b2) != $9.flags.b1) {
+				yyerror("flags always false");
+				YYERROR;
+			}
+			if ($9.flags.b1 || $9.flags.b2 || $8.src_os) {
+				for (proto = $7; proto != NULL &&
+				    proto->proto != IPPROTO_TCP;
+				    proto = proto->next)
+					;	/* nothing */
+				if (proto == NULL && $7 != NULL) {
+					if ($9.flags.b1 || $9.flags.b2)
+						yyerror(
+						    "flags only apply to tcp");
+					if ($8.src_os)
+						yyerror(
+						    "OS fingerprinting only "
+						    "applies to tcp");
+					YYERROR;
+				}
+			}
+
+			r.tos = $9.tos;
+
+			if ($9.keep.action) {
+				yyerror("cannot specify state handling "
+				    "on anchors");
+				YYERROR;
+			}
+
+			if ($9.match_tag)
+				if (strlcpy(r.match_tagname, $9.match_tag,
+				    PF_TAG_NAME_SIZE) >= PF_TAG_NAME_SIZE) {
+					yyerror("tag too long, max %u chars",
+					    PF_TAG_NAME_SIZE - 1);
+					YYERROR;
+				}
+			r.match_tag_not = $9.match_tag_not;
+
+			decide_address_family($8.src.host, &r.af);
+			decide_address_family($8.dst.host, &r.af);
+
+			expand_rule(&r, $5, NULL, $7, $8.src_os,
+			    $8.src.host, $8.src.port, $8.dst.host, $8.dst.port,
+			    $9.uid, $9.gid, $9.icmpspec,
+			    pf->astack[pf->asd + 1] ? pf->alast->name : $2);
+			free($2);
+			pf->astack[pf->asd + 1] = NULL;
+		}
+		| NATANCHOR string interface af proto fromto rtable {
+			struct pf_rule	r;
+
+			if (check_rulestate(PFCTL_STATE_NAT)) {
+				free($2);
+				YYERROR;
+			}
+
+			memset(&r, 0, sizeof(r));
+			r.action = PF_NAT;
+			r.af = $4;
+			r.rtableid = $7;
+
+			decide_address_family($6.src.host, &r.af);
+			decide_address_family($6.dst.host, &r.af);
+
+			expand_rule(&r, $3, NULL, $5, $6.src_os,
+			    $6.src.host, $6.src.port, $6.dst.host, $6.dst.port,
+			    0, 0, 0, $2);
+			free($2);
+		}
+		| RDRANCHOR string interface af proto fromto rtable {
+			struct pf_rule	r;
+
+			if (check_rulestate(PFCTL_STATE_NAT)) {
+				free($2);
+				YYERROR;
+			}
+
+			memset(&r, 0, sizeof(r));
+			r.action = PF_RDR;
+			r.af = $4;
+			r.rtableid = $7;
+
+			decide_address_family($6.src.host, &r.af);
+			decide_address_family($6.dst.host, &r.af);
+
+			if ($6.src.port != NULL) {
+				yyerror("source port parameter not supported"
+				    " in rdr-anchor");
+				YYERROR;
+			}
+			if ($6.dst.port != NULL) {
+				if ($6.dst.port->next != NULL) {
+					yyerror("destination port list "
+					    "expansion not supported in "
+					    "rdr-anchor");

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

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 12:03:16 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4CF34106568E;
	Fri, 14 Sep 2012 12:03:16 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com
	[209.85.217.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 50BE18FC15;
	Fri, 14 Sep 2012 12:03:14 +0000 (UTC)
Received: by lbbgg13 with SMTP id gg13so3273705lbb.13
	for ; Fri, 14 Sep 2012 05:03:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	bh=iRR8Wez2N7axnVjIimmZKzWygRTtvok6lFI8MPjbpfs=;
	b=BmQvWTeE/Iyko9Ygz1V9amX48riIJ5klhZFFbPR06DYt9x4mC86xNVq4aDR6KYIztH
	pZI9EiIdGvzmDGAaMLo2JYEK0lxH4a55snn1VTlgjgzsQrSpvABPKZMJrQR5WlI68+yR
	EZQpafGZ2CNIg+0qvld9Zcw9SOZmYtGTioXJgJ6eNn2x+Ve459Q7tvVMuiLmP2yC4Jzu
	wbaYDb1BrhkWGy2AmQ43lGI5BoOpDQWy2QmAbSL1skBo9wN/38tyy3lOI8qHp5IBIs/P
	OpoJwLkhj6iG6nQoRjGk7QLGGh6GZna0gofU/NNwI0uDaB6qQq/2LVK2oakpVxDXhhHa
	Xg7g==
MIME-Version: 1.0
Received: by 10.152.131.37 with SMTP id oj5mr2230047lab.14.1347624193612; Fri,
	14 Sep 2012 05:03:13 -0700 (PDT)
Sender: asmrookie@gmail.com
Received: by 10.112.102.39 with HTTP; Fri, 14 Sep 2012 05:03:13 -0700 (PDT)
In-Reply-To: <20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
References: <201209132226.q8DMQMFC088169@svn.freebsd.org>
	<20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
Date: Fri, 14 Sep 2012 13:03:13 +0100
X-Google-Sender-Auth: 5r9lM6r6fwgTrBt4OZLVNorsUJI
Message-ID: 
From: Attilio Rao 
To: Konstantin Belousov 
Content-Type: text/plain; charset=UTF-8
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r240475 - in head/sys: dev/hwpmc kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: attilio@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 12:03:16 -0000

On 9/14/12, Konstantin Belousov  wrote:
> On Thu, Sep 13, 2012 at 10:26:22PM +0000, Attilio Rao wrote:
>> Author: attilio
>> Date: Thu Sep 13 22:26:22 2012
>> New Revision: 240475
>> URL: http://svn.freebsd.org/changeset/base/240475
>>
>> Log:
>>   Remove all the checks on curthread != NULL with the exception of some
>> MD
>>   trap checks (eg. printtrap()).
>>
>>   Generally this check is not needed anymore, as there is not a
>> legitimate
>>   case where curthread != NULL, after pcpu 0 area has been properly
>>   initialized.
> I do not disagree with the patch, but I do with this statement.
> During the AP startup, there is indeed a window while curthread is NULL.
> Unfortunately, trying to panic there is worse then not panic.

Yes and why do you disagree then? That is what I wanted to say --
before pcpu->curthread is initialized you can get curthread == NULL.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 12:15:14 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6476E106566B;
	Fri, 14 Sep 2012 12:15:14 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4FB6E8FC0C;
	Fri, 14 Sep 2012 12:15:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ECFD76018828;
	Fri, 14 Sep 2012 12:15:13 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ECFDBv018826;
	Fri, 14 Sep 2012 12:15:13 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201209141215.q8ECFDBv018826@svn.freebsd.org>
From: Eitan Adler 
Date: Fri, 14 Sep 2012 12:15: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: r240495 - head/lib/libfetch
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 12:15:14 -0000

Author: eadler
Date: Fri Sep 14 12:15:13 2012
New Revision: 240495
URL: http://svn.freebsd.org/changeset/base/240495

Log:
  Adding missing return statements during error conditions.
  
  PR:		kern/171187
  Submitted by:	Mark Johnston 
  Reviewed by:	des
  Approved by:	cperciva
  MFC after:	2 weeks

Modified:
  head/lib/libfetch/file.c

Modified: head/lib/libfetch/file.c
==============================================================================
--- head/lib/libfetch/file.c	Fri Sep 14 11:51:49 2012	(r240494)
+++ head/lib/libfetch/file.c	Fri Sep 14 12:15:13 2012	(r240495)
@@ -50,12 +50,15 @@ fetchXGetFile(struct url *u, struct url_
 
 	f = fopen(u->doc, "r");
 
-	if (f == NULL)
+	if (f == NULL) {
 		fetch_syserr();
+		return (NULL);
+	}
 
 	if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) {
 		fclose(f);
 		fetch_syserr();
+		return (NULL);
 	}
 
 	fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
@@ -78,12 +81,15 @@ fetchPutFile(struct url *u, const char *
 	else
 		f = fopen(u->doc, "w+");
 
-	if (f == NULL)
+	if (f == NULL) {
 		fetch_syserr();
+		return (NULL);
+	}
 
 	if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) {
 		fclose(f);
 		fetch_syserr();
+		return (NULL);
 	}
 
 	fcntl(fileno(f), F_SETFD, FD_CLOEXEC);

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 12:24:49 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 185FE106566C;
	Fri, 14 Sep 2012 12:24:49 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id DE78E8FC0A;
	Fri, 14 Sep 2012 12:24:48 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3F3CDB968;
	Fri, 14 Sep 2012 08:24:48 -0400 (EDT)
From: John Baldwin 
To: Konstantin Belousov 
Date: Fri, 14 Sep 2012 08:17:54 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; )
References: <201209131456.03422.jhb@freebsd.org>
	<2045684227.3044.1347601672495.JavaMail.root@daemoninthecloset.org>
	<20120914075520.GA37286@deviant.kiev.zoral.com.ua>
In-Reply-To: <20120914075520.GA37286@deviant.kiev.zoral.com.ua>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Message-Id: <201209140817.54376.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
	(bigwig.baldwin.cx); Fri, 14 Sep 2012 08:24:48 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org,
	Bryan Venteicher ,
	Peter Grehan 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 12:24:49 -0000

On Friday, September 14, 2012 3:55:20 am Konstantin Belousov wrote:
> On Fri, Sep 14, 2012 at 12:47:52AM -0500, Bryan Venteicher wrote:
> > > > I also found myself wanting an atomic_load_rel_*() type function.
> > > 
> > > That would be odd I think.  _rel barriers only affect stores, so
> > > there would be no defined ordering between the load and the
> > > subsequent stores.  (With our current definitions of _acq and
> > > _rel.)  If you need a full fence for some reason, than a plain
> > > mb() may be the best thing in that case.
> > > 
> > 
> > I'm able to batch add descriptors (via vq_ring_update_avail()),
> > but when checking if I must notify the host, I need to make sure
> > the latest avail->idx is visible before checking the flag from
> > the host on whether notifications are disabled. Gratuitous
> > notifications are fine, but skipping one is not.
> > 
> > In the patch, I kludge this with:
> >     atomic_add_rel_16(&flags, 0);
> >     foo = flags;
> Don't you need
> 	atomic_store_rel_16(&foo, flags);
> instead ?
> 
> You might do a cas_rel over the containing 32bit word as well.

Yes, the right barrier here would be to use the barrier on the assignment
to foo.  That ensures all other writes post before the write to 'foo'.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 12:24:50 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 231B4106564A;
	Fri, 14 Sep 2012 12:24:50 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id EAE5B8FC0C;
	Fri, 14 Sep 2012 12:24:49 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4C700B983;
	Fri, 14 Sep 2012 08:24:49 -0400 (EDT)
From: John Baldwin 
To: Konstantin Belousov 
Date: Fri, 14 Sep 2012 08:19:05 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; )
References: <201209132226.q8DMQMFC088169@svn.freebsd.org>
	<20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
In-Reply-To: <20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Message-Id: <201209140819.06026.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
	(bigwig.baldwin.cx); Fri, 14 Sep 2012 08:24:49 -0400 (EDT)
Cc: Attilio Rao , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r240475 - in head/sys: dev/hwpmc kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 12:24:50 -0000

On Friday, September 14, 2012 12:20:31 am Konstantin Belousov wrote:
> On Thu, Sep 13, 2012 at 10:26:22PM +0000, Attilio Rao wrote:
> > Author: attilio
> > Date: Thu Sep 13 22:26:22 2012
> > New Revision: 240475
> > URL: http://svn.freebsd.org/changeset/base/240475
> > 
> > Log:
> >   Remove all the checks on curthread != NULL with the exception of some MD
> >   trap checks (eg. printtrap()).
> >   
> >   Generally this check is not needed anymore, as there is not a legitimate
> >   case where curthread != NULL, after pcpu 0 area has been properly
> >   initialized.
> I do not disagree with the patch, but I do with this statement.
> During the AP startup, there is indeed a window while curthread is NULL.
> Unfortunately, trying to panic there is worse then not panic.

Also during early BSP startup.  On x86 very early faults actually result in a 
BTX fault rather than a panic since we run with BTX's IDT for a bit in locore, 
etc.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 13:00:43 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id AD8BC106566B;
	Fri, 14 Sep 2012 13:00:43 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 98B428FC14;
	Fri, 14 Sep 2012 13:00:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ED0h4W026214;
	Fri, 14 Sep 2012 13:00:43 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ED0hI1026210;
	Fri, 14 Sep 2012 13:00:43 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201209141300.q8ED0hI1026210@svn.freebsd.org>
From: Dag-Erling Smørgrav 
Date: Fri, 14 Sep 2012 13:00: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: r240496 - in head: lib/libfetch usr.bin/fetch
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 13:00:43 -0000

Author: des
Date: Fri Sep 14 13:00:43 2012
New Revision: 240496
URL: http://svn.freebsd.org/changeset/base/240496

Log:
  Use libmd if and only if OpenSSL is not available.
  
  PR:		bin/171402
  MFC after:	3 days

Modified:
  head/lib/libfetch/Makefile
  head/lib/libfetch/http.c
  head/usr.bin/fetch/Makefile

Modified: head/lib/libfetch/Makefile
==============================================================================
--- head/lib/libfetch/Makefile	Fri Sep 14 12:15:13 2012	(r240495)
+++ head/lib/libfetch/Makefile	Fri Sep 14 13:00:43 2012	(r240496)
@@ -16,8 +16,8 @@ CFLAGS+=	-DINET6
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+=	-DWITH_SSL
-DPADD=		${LIBSSL} ${LIBCRYPTO} ${LIBMD}
-LDADD=		-lssl -lcrypto -lmd
+DPADD=		${LIBSSL} ${LIBCRYPTO}
+LDADD=		-lssl -lcrypto
 .else
 DPADD=		${LIBMD}
 LDADD=		-lmd

Modified: head/lib/libfetch/http.c
==============================================================================
--- head/lib/libfetch/http.c	Fri Sep 14 12:15:13 2012	(r240495)
+++ head/lib/libfetch/http.c	Fri Sep 14 13:00:43 2012	(r240496)
@@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+
+#ifdef WITH_SSL
+#include 
+#define MD5Init(c) MD5_Init(c)
+#define MD5Update(c, data, len) MD5_Update(c, data, len)
+#define MD5Final(md, c) MD5_Final(md, c)
+#else
 #include 
+#endif
 
 #include 
 #include 

Modified: head/usr.bin/fetch/Makefile
==============================================================================
--- head/usr.bin/fetch/Makefile	Fri Sep 14 12:15:13 2012	(r240495)
+++ head/usr.bin/fetch/Makefile	Fri Sep 14 13:00:43 2012	(r240496)
@@ -4,11 +4,12 @@
 
 PROG=		fetch
 CSTD?=		c99
+.if ${MK_OPENSSL} != "no"
+DPADD=		${LIBFETCH} ${LIBSSL} ${LIBCRYPTO}
+LDADD=		-lfetch -lssl -lcrypto
+.else
 DPADD=		${LIBFETCH} ${LIBMD}
 LDADD=		-lfetch -lmd
-.if ${MK_OPENSSL} != "no"
-DPADD+=		${LIBSSL} ${LIBCRYPTO}
-LDADD+=		-lssl -lcrypto
 .endif
 
 .include 

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 13:14:48 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D32931065670;
	Fri, 14 Sep 2012 13:14:48 +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 A65BF8FC0C;
	Fri, 14 Sep 2012 13:14:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EDEmNJ028351;
	Fri, 14 Sep 2012 13:14:48 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EDEmsw028349;
	Fri, 14 Sep 2012 13:14:48 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201209141314.q8EDEmsw028349@svn.freebsd.org>
From: Joel Dahl 
Date: Fri, 14 Sep 2012 13:14: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: r240497 - head/sbin/pfctl
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 13:14:48 -0000

Author: joel (doc committer)
Date: Fri Sep 14 13:14:48 2012
New Revision: 240497
URL: http://svn.freebsd.org/changeset/base/240497

Log:
  Minor mdoc fix.

Modified:
  head/sbin/pfctl/pfctl.8

Modified: head/sbin/pfctl/pfctl.8
==============================================================================
--- head/sbin/pfctl/pfctl.8	Fri Sep 14 13:00:43 2012	(r240496)
+++ head/sbin/pfctl/pfctl.8	Fri Sep 14 13:14:48 2012	(r240497)
@@ -53,8 +53,8 @@
 .Xo
 .Oo Fl t Ar table
 .Fl T Ar command
-.Op Ar address ... Oc
-.Xc
+.Op Ar address ...
+.Oc Xc
 .Op Fl x Ar level
 .Ek
 .Sh DESCRIPTION

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 13:38:47 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 07C66106564A;
	Fri, 14 Sep 2012 13:38:47 +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 6FD068FC1A;
	Fri, 14 Sep 2012 13:38:45 +0000 (UTC)
Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8EDcjBa025153;
	Fri, 14 Sep 2012 16:38:45 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id
	q8EDcXYX002313; Fri, 14 Sep 2012 16:38:33 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8EDcX93002310; 
	Fri, 14 Sep 2012 16:38:33 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Fri, 14 Sep 2012 16:38:33 +0300
From: Konstantin Belousov 
To: Attilio Rao 
Message-ID: <20120914133833.GC37286@deviant.kiev.zoral.com.ua>
References: <201209132226.q8DMQMFC088169@svn.freebsd.org>
	<20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
	
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="TMTfqzsZeEKgETVO"
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r240475 - in head/sys: dev/hwpmc kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 13:38:47 -0000


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

On Fri, Sep 14, 2012 at 01:03:13PM +0100, Attilio Rao wrote:
> On 9/14/12, Konstantin Belousov  wrote:
> > On Thu, Sep 13, 2012 at 10:26:22PM +0000, Attilio Rao wrote:
> >> Author: attilio
> >> Date: Thu Sep 13 22:26:22 2012
> >> New Revision: 240475
> >> URL: http://svn.freebsd.org/changeset/base/240475
> >>
> >> Log:
> >>   Remove all the checks on curthread !=3D NULL with the exception of s=
ome
> >> MD
> >>   trap checks (eg. printtrap()).
> >>
> >>   Generally this check is not needed anymore, as there is not a
> >> legitimate
> >>   case where curthread !=3D NULL, after pcpu 0 area has been properly
> >>   initialized.
> > I do not disagree with the patch, but I do with this statement.
> > During the AP startup, there is indeed a window while curthread is NULL.
> > Unfortunately, trying to panic there is worse then not panic.
>=20
> Yes and why do you disagree then? That is what I wanted to say --
> before pcpu->curthread is initialized you can get curthread =3D=3D NULL.

I disagree with the statement that curthread is always non-NULL after pcpu 0
area has been initialized.

--TMTfqzsZeEKgETVO
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlBTM1gACgkQC3+MBN1Mb4jF1wCdFDrXzcny07Lv2ljv8wu0/LK7
lC8AoPHuRtgUxQl4FzsXApM1SArPI40e
=wrcl
-----END PGP SIGNATURE-----

--TMTfqzsZeEKgETVO--

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 13:42:50 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D59D41065670;
	Fri, 14 Sep 2012 13:42:50 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com
	[209.85.215.54])
	by mx1.freebsd.org (Postfix) with ESMTP id E0D128FC08;
	Fri, 14 Sep 2012 13:42:49 +0000 (UTC)
Received: by lage12 with SMTP id e12so3306943lag.13
	for ; Fri, 14 Sep 2012 06:42:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:reply-to:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	bh=E65mau9OGVdX2zPQH8+VHWBiE2ePuf2KmiWB+cP6CDc=;
	b=IAr4o7EVC8paxlKmQxZLgb0O9CwS9by5SSzAVxLkxmgA+JmaxSgrAmrrvSzfOZe7nu
	trlR9B4CSmBblSJlskFFoLM33f6SIDBSkogUDS7cVscpJK1fAVcwTYxhlB05XjEB8KoY
	mTCnL9LzNppUdvTiXAnbVBG7ITPdMOQsNK+9mlS+ugNrMyaQVNQP+6FA3qDsp/CbC3y2
	H659+VJ6j+yrGMHy3u4YqgPYjB7O2UbNjAohS4bYbRP61vFiHeGvn+LM7/3YYkn7SF7F
	T+RrqtKUzfGI7908Xxn1ReppvMXWmvCRZueA8TQDXg53tA3vxJ2lGeFJvUddU6/A1eOK
	R7tA==
MIME-Version: 1.0
Received: by 10.152.112.233 with SMTP id it9mr2406492lab.40.1347630168378;
	Fri, 14 Sep 2012 06:42:48 -0700 (PDT)
Sender: asmrookie@gmail.com
Received: by 10.112.102.39 with HTTP; Fri, 14 Sep 2012 06:42:48 -0700 (PDT)
In-Reply-To: <20120914133833.GC37286@deviant.kiev.zoral.com.ua>
References: <201209132226.q8DMQMFC088169@svn.freebsd.org>
	<20120914042031.GZ37286@deviant.kiev.zoral.com.ua>
	
	<20120914133833.GC37286@deviant.kiev.zoral.com.ua>
Date: Fri, 14 Sep 2012 14:42:48 +0100
X-Google-Sender-Auth: UT8j6TfKkpqsXVY9HQuIPEo8GDU
Message-ID: 
From: Attilio Rao 
To: Konstantin Belousov 
Content-Type: text/plain; charset=UTF-8
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r240475 - in head/sys: dev/hwpmc kern
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: attilio@FreeBSD.org
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 13:42:51 -0000

On Fri, Sep 14, 2012 at 2:38 PM, Konstantin Belousov
 wrote:
> On Fri, Sep 14, 2012 at 01:03:13PM +0100, Attilio Rao wrote:
>> On 9/14/12, Konstantin Belousov  wrote:
>> > On Thu, Sep 13, 2012 at 10:26:22PM +0000, Attilio Rao wrote:
>> >> Author: attilio
>> >> Date: Thu Sep 13 22:26:22 2012
>> >> New Revision: 240475
>> >> URL: http://svn.freebsd.org/changeset/base/240475
>> >>
>> >> Log:
>> >>   Remove all the checks on curthread != NULL with the exception of some
>> >> MD
>> >>   trap checks (eg. printtrap()).
>> >>
>> >>   Generally this check is not needed anymore, as there is not a
>> >> legitimate
>> >>   case where curthread != NULL, after pcpu 0 area has been properly
>> >>   initialized.
>> > I do not disagree with the patch, but I do with this statement.
>> > During the AP startup, there is indeed a window while curthread is NULL.
>> > Unfortunately, trying to panic there is worse then not panic.
>>
>> Yes and why do you disagree then? That is what I wanted to say --
>> before pcpu->curthread is initialized you can get curthread == NULL.
>
> I disagree with the statement that curthread is always non-NULL after pcpu 0
> area has been initialized.

Ah, I understand what you mean, the "0" part is wrong really, it is
any pcpu area infact.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 14:17:07 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id DC0D2106564A;
	Fri, 14 Sep 2012 14:17:07 +0000 (UTC) (envelope-from ray@freebsd.org)
Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146])
	by mx1.freebsd.org (Postfix) with ESMTP id 92C7F8FC0A;
	Fri, 14 Sep 2012 14:17:07 +0000 (UTC)
Received: from rnote.ddteam.net (49-221-133-95.pool.ukrtel.net [95.133.221.49])
	(Authenticated sender: ray)
	by smtp.dlink.ua (Postfix) with ESMTPSA id C2D29C4945;
	Fri, 14 Sep 2012 17:16:59 +0300 (EEST)
Date: Fri, 14 Sep 2012 17:16:52 +0300
From: Aleksandr Rybalko 
To: Grzegorz Bernacki 
Message-Id: <20120914171652.780e25c6.ray@freebsd.org>
In-Reply-To: <201209140933.q8E9XZnd088621@svn.freebsd.org>
References: <201209140933.q8E9XZnd088621@svn.freebsd.org>
Organization: FreeBSD.ORG
X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0)
X-Operating-System: FreeBSD
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
Subject: Re: svn commit: r240484 - head/sys/dev/fdt
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 14:17:08 -0000

On Fri, 14 Sep 2012 09:33:35 +0000 (UTC)
Grzegorz Bernacki  wrote:

> Author: gber
> Date: Fri Sep 14 09:33:35 2012
> New Revision: 240484
> URL: http://svn.freebsd.org/changeset/base/240484
> 
> Log:
>   Set busaddr and bussize to 0 when fdt_get_range() fails.

Why bussize is 0?

>   
>   Obtained from:	Semihalf
> 
> Modified:
>   head/sys/dev/fdt/fdt_common.c
> 
> Modified: head/sys/dev/fdt/fdt_common.c
> ==============================================================================
> --- head/sys/dev/fdt/fdt_common.c	Fri Sep 14 08:11:59
> 2012	(r240483) +++ head/sys/dev/fdt/fdt_common.c	Fri
> Sep 14 09:33:35 2012	(r240484) @@ -431,7 +431,10 @@
> fdt_reg_to_rl(phandle_t node, struct res 
>  	if (fdt_addrsize_cells(OF_parent(node), &addr_cells,
> &size_cells) != 0) return (ENXIO);
> -	fdt_get_range(OF_parent(node), 0, &busaddr, &bussize);
> +	if (fdt_get_range(OF_parent(node), 0, &busaddr, &bussize)) {
> +		busaddr = 0;
> +		bussize = 0;
> +	}
>  
>  	tuple_size = sizeof(pcell_t) * (addr_cells + size_cells);
>  	tuples = OF_getprop_alloc(node, "reg", tuple_size, (void
> **)®);


-- 
Aleksandr Rybalko 

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 14:27:11 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AFF5A106564A;
	Fri, 14 Sep 2012 14:27:11 +0000 (UTC)
	(envelope-from bryanv@daemoninthecloset.org)
Received: from torment.daemoninthecloset.org (torment.daemoninthecloset.org
	[94.242.209.234])
	by mx1.freebsd.org (Postfix) with ESMTP id 37E4F8FC15;
	Fri, 14 Sep 2012 14:27:10 +0000 (UTC)
X-Virus-Scanned: amavisd-new at daemoninthecloset.org
Received: from sage.daemoninthecloset.org (sage.daemoninthecloset.org
	[127.0.1.1])
	by sage.daemoninthecloset.org (Postfix) with ESMTP id 886EA6754F;
	Fri, 14 Sep 2012 09:26:52 -0500 (CDT)
Date: Fri, 14 Sep 2012 09:26:52 -0500 (CDT)
From: Bryan Venteicher 
To: John Baldwin 
Message-ID: <2051018874.3102.1347632812362.JavaMail.root@daemoninthecloset.org>
In-Reply-To: <201209140817.54376.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.10.20]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - GC20
	([unknown])/7.2.0_GA_2669)
Cc: svn-src-head@freebsd.org, Konstantin Belousov ,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	Peter Grehan 
Subject: Re: svn commit: r240427 - head/sys/dev/virtio
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 14:27:11 -0000

Hi,


----- Original Message -----
> From: "John Baldwin" 
> To: "Konstantin Belousov" 
> Cc: "Bryan Venteicher" , svn-src-head@freebsd.org, svn-src-all@freebsd.org,
> src-committers@freebsd.org, "Peter Grehan" 
> Sent: Friday, September 14, 2012 7:17:54 AM
> Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> 
> On Friday, September 14, 2012 3:55:20 am Konstantin Belousov wrote:
> > On Fri, Sep 14, 2012 at 12:47:52AM -0500, Bryan Venteicher wrote:
> > > > > I also found myself wanting an atomic_load_rel_*() type
> > > > > function.
> > > > 
> > > > That would be odd I think.  _rel barriers only affect stores,
> > > > so
> > > > there would be no defined ordering between the load and the
> > > > subsequent stores.  (With our current definitions of _acq and
> > > > _rel.)  If you need a full fence for some reason, than a plain
> > > > mb() may be the best thing in that case.
> > > > 
> > > 
> > > I'm able to batch add descriptors (via vq_ring_update_avail()),
> > > but when checking if I must notify the host, I need to make sure
> > > the latest avail->idx is visible before checking the flag from
> > > the host on whether notifications are disabled. Gratuitous
> > > notifications are fine, but skipping one is not.
> > > 
> > > In the patch, I kludge this with:
> > >     atomic_add_rel_16(&flags, 0);
> > >     foo = flags;
> > Don't you need
> > 	atomic_store_rel_16(&foo, flags);
> > instead ?
> > 
> > You might do a cas_rel over the containing 32bit word as well.
> 
> Yes, the right barrier here would be to use the barrier on the
> assignment
> to foo.  That ensures all other writes post before the write to
> 'foo'.

>From reading between the lines of atomic(9), I wasn't totally sure
where the load of flags is guaranteed to occur with respect to the
previous loads/stores.

Bryan

> 
> --
> John Baldwin
> 

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 14:43:14 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CD73106566C;
	Fri, 14 Sep 2012 14:43:14 +0000 (UTC)
	(envelope-from gber@freebsd.org)
Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109])
	by mx1.freebsd.org (Postfix) with ESMTP id 0DB998FC14;
	Fri, 14 Sep 2012 14:43:13 +0000 (UTC)
Received: from localhost (unknown [213.17.239.109])
	by smtp.semihalf.com (Postfix) with ESMTP id CD764119C09;
	Fri, 14 Sep 2012 16:43:06 +0200 (CEST)
X-Virus-Scanned: by amavisd-new at semihalf.com
Received: from smtp.semihalf.com ([213.17.239.109])
	by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new,
	port 10024)
	with ESMTP id aK8Cj+YKCE+Y; Fri, 14 Sep 2012 16:43:06 +0200 (CEST)
Received: from [10.0.0.93] (cardhu.semihalf.com [213.17.239.108])
	by smtp.semihalf.com (Postfix) with ESMTPSA id 3C58D119C00;
	Fri, 14 Sep 2012 16:43:06 +0200 (CEST)
Message-ID: <50535E29.2030102@freebsd.org>
Date: Fri, 14 Sep 2012 18:41:13 +0200
From: Grzegorz Bernacki 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.2.24) Gecko/20120127 Thunderbird/3.1.16
MIME-Version: 1.0
To: Aleksandr Rybalko 
References: <201209140933.q8E9XZnd088621@svn.freebsd.org>
	<20120914171652.780e25c6.ray@freebsd.org>
In-Reply-To: <20120914171652.780e25c6.ray@freebsd.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
Subject: Re: svn commit: r240484 - head/sys/dev/fdt
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 14:43:14 -0000

On 09/14/12 16:16, Aleksandr Rybalko wrote:
> On Fri, 14 Sep 2012 09:33:35 +0000 (UTC)
> Grzegorz Bernacki  wrote:
>
>> Author: gber
>> Date: Fri Sep 14 09:33:35 2012
>> New Revision: 240484
>> URL: http://svn.freebsd.org/changeset/base/240484
>>
>> Log:
>>    Set busaddr and bussize to 0 when fdt_get_range() fails.
>
> Why bussize is 0?

I though that setting it to 0 makes sense, since we do not use
this variable in this function and setting it to some value could be 
confused. I could skip setting it, but I also thought it could cause 
confusion :). If you think that setting it to other value or remove it 
will be better please let me know and I will change it.

thanks
grzesiek

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 15:08:44 2012
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B79EA1065670;
	Fri, 14 Sep 2012 15:08:44 +0000 (UTC)
	(envelope-from bapt@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 99FB18FC15;
	Fri, 14 Sep 2012 15:08:44 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8EF8iew091493;
	Fri, 14 Sep 2012 15:08:44 GMT (envelope-from bapt@FreeBSD.org)
Received: (from bapt@localhost)
	by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8EF8ihV091450;
	Fri, 14 Sep 2012 15:08:44 GMT (envelope-from bapt@FreeBSD.org)
X-Authentication-Warning: freefall.freebsd.org: bapt set sender to
	bapt@FreeBSD.org using -f
Date: Fri, 14 Sep 2012 17:08:41 +0200
From: Baptiste Daroussin 
To: Dag-Erling =?utf-8?Q?Sm=EF=BF=BDrgrav?= 
Message-ID: <20120914150841.GG68582@ithaqua.etoilebsd.net>
References: <201209141300.q8ED0hI1026210@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="df+09Je9rNq3P+GE"
Content-Disposition: inline
In-Reply-To: <201209141300.q8ED0hI1026210@svn.freebsd.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r240496 - in head: lib/libfetch usr.bin/fetch
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 15:08:44 -0000


--df+09Je9rNq3P+GE
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 14, 2012 at 01:00:43PM +0000, Dag-Erling Sm=EF=BF=BDrgrav wrote:
> Author: des
> Date: Fri Sep 14 13:00:43 2012
> New Revision: 240496
> URL: http://svn.freebsd.org/changeset/base/240496
>=20
> Log:
>   Use libmd if and only if OpenSSL is not available.
>  =20
>   PR:		bin/171402
>   MFC after:	3 days
>=20
> Modified:
>   head/lib/libfetch/Makefile
>   head/lib/libfetch/http.c
>   head/usr.bin/fetch/Makefile
>=20
> Modified: head/lib/libfetch/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/lib/libfetch/Makefile	Fri Sep 14 12:15:13 2012	(r240495)
> +++ head/lib/libfetch/Makefile	Fri Sep 14 13:00:43 2012	(r240496)
> @@ -16,8 +16,8 @@ CFLAGS+=3D	-DINET6
> =20
>  .if ${MK_OPENSSL} !=3D "no"
>  CFLAGS+=3D	-DWITH_SSL
> -DPADD=3D		${LIBSSL} ${LIBCRYPTO} ${LIBMD}
> -LDADD=3D		-lssl -lcrypto -lmd
> +DPADD=3D		${LIBSSL} ${LIBCRYPTO}
> +LDADD=3D		-lssl -lcrypto
>  .else
>  DPADD=3D		${LIBMD}
>  LDADD=3D		-lmd
>=20
> Modified: head/lib/libfetch/http.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/lib/libfetch/http.c	Fri Sep 14 12:15:13 2012	(r240495)
> +++ head/lib/libfetch/http.c	Fri Sep 14 13:00:43 2012	(r240496)
> @@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +
> +#ifdef WITH_SSL
> +#include 
> +#define MD5Init(c) MD5_Init(c)
> +#define MD5Update(c, data, len) MD5_Update(c, data, len)
> +#define MD5Final(md, c) MD5_Final(md, c)
> +#else
>  #include 
> +#endif
> =20
>  #include 
>  #include 
>=20
> Modified: head/usr.bin/fetch/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/usr.bin/fetch/Makefile	Fri Sep 14 12:15:13 2012	(r240495)
> +++ head/usr.bin/fetch/Makefile	Fri Sep 14 13:00:43 2012	(r240496)
> @@ -4,11 +4,12 @@
> =20
>  PROG=3D		fetch
>  CSTD?=3D		c99
> +.if ${MK_OPENSSL} !=3D "no"
> +DPADD=3D		${LIBFETCH} ${LIBSSL} ${LIBCRYPTO}
> +LDADD=3D		-lfetch -lssl -lcrypto
> +.else
>  DPADD=3D		${LIBFETCH} ${LIBMD}
>  LDADD=3D		-lfetch -lmd
> -.if ${MK_OPENSSL} !=3D "no"
> -DPADD+=3D		${LIBSSL} ${LIBCRYPTO}
> -LDADD+=3D		-lssl -lcrypto
>  .endif
> =20
>  .include 

Do you plan to push it to 9.1, that will help having pkgng linked against l=
ibmd.

regards,
Bapt

--df+09Je9rNq3P+GE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlBTSHkACgkQ8kTtMUmk6EzL7wCgnTzVFoDAMCqSOwhlP7QFBT5l
nsIAn3+Vz55QDzWqcRTDLecStxNRm0Bo
=zWCz
-----END PGP SIGNATURE-----

--df+09Je9rNq3P+GE--

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 15:22:16 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 81AFC1065686;
	Fri, 14 Sep 2012 15:22:16 +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 6CED08FC12;
	Fri, 14 Sep 2012 15:22:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EFMGFn050015;
	Fri, 14 Sep 2012 15:22:16 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EFMG6E050012;
	Fri, 14 Sep 2012 15:22:16 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201209141522.q8EFMG6E050012@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Fri, 14 Sep 2012 15:22: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: r240505 - head/bin/sh
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 15:22:16 -0000

Author: jilles
Date: Fri Sep 14 15:22:15 2012
New Revision: 240505
URL: http://svn.freebsd.org/changeset/base/240505

Log:
  sh: Reduce code duplication: use setinputfile instead of open/setinputfd
  combination.
  
  MFC after:	2 weeks

Modified:
  head/bin/sh/main.c

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Fri Sep 14 15:09:59 2012	(r240504)
+++ head/bin/sh/main.c	Fri Sep 14 15:22:15 2012	(r240505)
@@ -266,14 +266,7 @@ read_profile(char *name)
 void
 readcmdfile(const char *name)
 {
-	int fd;
-
-	INTOFF;
-	if ((fd = open(name, O_RDONLY)) >= 0)
-		setinputfd(fd, 1);
-	else
-		error("cannot open %s: %s", name, strerror(errno));
-	INTON;
+	setinputfile(name, 1);
 	cmdloop(0);
 	popfile();
 }

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 17:50:44 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E653110656AD;
	Fri, 14 Sep 2012 17:50:43 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C65A58FC0A;
	Fri, 14 Sep 2012 17:50:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EHohvm074463;
	Fri, 14 Sep 2012 17:50:43 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EHohST074449;
	Fri, 14 Sep 2012 17:50:43 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201209141750.q8EHohST074449@svn.freebsd.org>
From: Eitan Adler 
Date: Fri, 14 Sep 2012 17:50: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: r240506 - in head: lib/libpam/modules/pam_lastlog
	libexec/comsat libexec/ftpd share/man/man3 share/man/man7
	usr.bin/finger usr.bin/last usr.bin/ncplist usr.bin/talk
	usr.bin/users usr.bi...
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 17:50:44 -0000

Author: eadler
Date: Fri Sep 14 17:50:42 2012
New Revision: 240506
URL: http://svn.freebsd.org/changeset/base/240506

Log:
  Bump date missed in r202756
  
  PR:		docs/171624
  Submitted by:	bdrewery
  Approved by:	gabor
  MFC after:	3 days

Modified:
  head/lib/libpam/modules/pam_lastlog/pam_lastlog.8
  head/libexec/comsat/comsat.8
  head/libexec/ftpd/ftpd.8
  head/share/man/man3/sysexits.3
  head/share/man/man7/hier.7
  head/usr.bin/finger/finger.1
  head/usr.bin/last/last.1
  head/usr.bin/ncplist/ncplist.1
  head/usr.bin/talk/talk.1
  head/usr.bin/users/users.1
  head/usr.bin/w/w.1
  head/usr.sbin/ac/ac.8
  head/usr.sbin/rwhod/rwhod.8

Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.8
==============================================================================
--- head/lib/libpam/modules/pam_lastlog/pam_lastlog.8	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.8	Fri Sep 14 17:50:42 2012	(r240506)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 24, 2002
+.Dd January 21, 2010
 .Dt PAM_LASTLOG 8
 .Os
 .Sh NAME

Modified: head/libexec/comsat/comsat.8
==============================================================================
--- head/libexec/comsat/comsat.8	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/libexec/comsat/comsat.8	Fri Sep 14 17:50:42 2012	(r240506)
@@ -32,7 +32,7 @@
 .\"     @(#)comsat.8	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 9, 2002
+.Dd January 21, 2010
 .Dt COMSAT 8
 .Os
 .Sh NAME

Modified: head/libexec/ftpd/ftpd.8
==============================================================================
--- head/libexec/ftpd/ftpd.8	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/libexec/ftpd/ftpd.8	Fri Sep 14 17:50:42 2012	(r240506)
@@ -32,7 +32,7 @@
 .\"     @(#)ftpd.8	8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd April 20, 2007
+.Dd January 21, 2010
 .Dt FTPD 8
 .Os
 .Sh NAME

Modified: head/share/man/man3/sysexits.3
==============================================================================
--- head/share/man/man3/sysexits.3	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/share/man/man3/sysexits.3	Fri Sep 14 17:50:42 2012	(r240506)
@@ -26,7 +26,7 @@
 .\" $FreeBSD$
 .\"
 .\" "
-.Dd March 31, 1996
+.Dd January 21, 2010
 .Dt SYSEXITS 3
 .Os
 .Sh NAME

Modified: head/share/man/man7/hier.7
==============================================================================
--- head/share/man/man7/hier.7	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/share/man/man7/hier.7	Fri Sep 14 17:50:42 2012	(r240506)
@@ -32,7 +32,7 @@
 .\"	@(#)hier.7	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd May 25, 2008
+.Dd January 21, 2010
 .Dt HIER 7
 .Os
 .Sh NAME

Modified: head/usr.bin/finger/finger.1
==============================================================================
--- head/usr.bin/finger/finger.1	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.bin/finger/finger.1	Fri Sep 14 17:50:42 2012	(r240506)
@@ -28,7 +28,7 @@
 .\"	@(#)finger.1	8.3 (Berkeley) 5/5/94
 .\" $FreeBSD$
 .\"
-.Dd April 11, 2007
+.Dd January 21, 2010
 .Dt FINGER 1
 .Os
 .Sh NAME

Modified: head/usr.bin/last/last.1
==============================================================================
--- head/usr.bin/last/last.1	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.bin/last/last.1	Fri Sep 14 17:50:42 2012	(r240506)
@@ -28,7 +28,7 @@
 .\"     @(#)last.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd July 27, 2003
+.Dd January 21, 2010
 .Dt LAST 1
 .Os
 .Sh NAME

Modified: head/usr.bin/ncplist/ncplist.1
==============================================================================
--- head/usr.bin/ncplist/ncplist.1	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.bin/ncplist/ncplist.1	Fri Sep 14 17:50:42 2012	(r240506)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.Dd June 24, 1999
+.Dd January 21, 2010
 .Dt NCPLIST 1
 .Os
 .Sh NAME

Modified: head/usr.bin/talk/talk.1
==============================================================================
--- head/usr.bin/talk/talk.1	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.bin/talk/talk.1	Fri Sep 14 17:50:42 2012	(r240506)
@@ -28,7 +28,7 @@
 .\"     @(#)talk.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd July 3, 2004
+.Dd January 21, 2010
 .Dt TALK 1
 .Os
 .Sh NAME

Modified: head/usr.bin/users/users.1
==============================================================================
--- head/usr.bin/users/users.1	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.bin/users/users.1	Fri Sep 14 17:50:42 2012	(r240506)
@@ -28,7 +28,7 @@
 .\"     @(#)users.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 6, 1993
+.Dd January 21, 2010
 .Dt USERS 1
 .Os
 .Sh NAME

Modified: head/usr.bin/w/w.1
==============================================================================
--- head/usr.bin/w/w.1	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.bin/w/w.1	Fri Sep 14 17:50:42 2012	(r240506)
@@ -28,7 +28,7 @@
 .\"     @(#)w.1	8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 6, 1993
+.Dd January 21, 2010
 .Dt W 1
 .Os
 .Sh NAME

Modified: head/usr.sbin/ac/ac.8
==============================================================================
--- head/usr.sbin/ac/ac.8	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.sbin/ac/ac.8	Fri Sep 14 17:50:42 2012	(r240506)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 15, 1994
+.Dd January 21, 2010
 .Dt AC 8
 .Os
 .Sh NAME

Modified: head/usr.sbin/rwhod/rwhod.8
==============================================================================
--- head/usr.sbin/rwhod/rwhod.8	Fri Sep 14 15:22:15 2012	(r240505)
+++ head/usr.sbin/rwhod/rwhod.8	Fri Sep 14 17:50:42 2012	(r240506)
@@ -28,7 +28,7 @@
 .\"     @(#)rwhod.8	8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd December 11, 1993
+.Dd January 21, 2010
 .Dt RWHOD 8
 .Os
 .Sh NAME

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 18:32:21 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 677D1106564A;
	Fri, 14 Sep 2012 18:32:21 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 522078FC08;
	Fri, 14 Sep 2012 18:32:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EIWLw3082155;
	Fri, 14 Sep 2012 18:32:21 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EIWLZN082152;
	Fri, 14 Sep 2012 18:32:21 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201209141832.q8EIWLZN082152@svn.freebsd.org>
From: Michael Tuexen 
Date: Fri, 14 Sep 2012 18:32: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: r240507 - head/sys/netinet
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 18:32:21 -0000

Author: tuexen
Date: Fri Sep 14 18:32:20 2012
New Revision: 240507
URL: http://svn.freebsd.org/changeset/base/240507

Log:
  Small cleanups. No functional change.
  
  MFC after:	10 days

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Fri Sep 14 17:50:42 2012	(r240506)
+++ head/sys/netinet/sctputil.c	Fri Sep 14 18:32:20 2012	(r240507)
@@ -58,8 +58,7 @@ extern struct sctp_cc_functions sctp_cc_
 extern struct sctp_ss_functions sctp_ss_functions[];
 
 void
-sctp_sblog(struct sockbuf *sb,
-    struct sctp_tcb *stcb, int from, int incr)
+sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr)
 {
 	struct sctp_cwnd_log sctp_clog;
 
@@ -103,7 +102,6 @@ sctp_log_closing(struct sctp_inpcb *inp,
 	    sctp_clog.x.misc.log4);
 }
 
-
 void
 rto_logging(struct sctp_nets *net, int from)
 {
@@ -198,8 +196,7 @@ sctp_log_map(uint32_t map, uint32_t cum,
 }
 
 void
-sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn,
-    int from)
+sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int from)
 {
 	struct sctp_cwnd_log sctp_clog;
 
@@ -242,8 +239,7 @@ sctp_log_mb(struct mbuf *m, int from)
 }
 
 void
-sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk,
-    int from)
+sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from)
 {
 	struct sctp_cwnd_log sctp_clog;
 
@@ -4215,7 +4211,6 @@ sctp_print_address(struct sockaddr *sa)
 #ifdef INET6
 	char ip6buf[INET6_ADDRSTRLEN];
 
-	ip6buf[0] = 0;
 #endif
 
 	switch (sa->sa_family) {

From owner-svn-src-head@FreeBSD.ORG  Fri Sep 14 18:33:13 2012
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 40304106564A;
	Fri, 14 Sep 2012 18:33:13 +0000 (UTC)
	(envelope-from gabor@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2115E8FC17;
	Fri, 14 Sep 2012 18:33:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EIXCmr082360;
	Fri, 14 Sep 2012 18:33:12 GMT (envelope-from gabor@svn.freebsd.org)
Received: (from gabor@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EIXC4g082355;
	Fri, 14 Sep 2012 18:33:12 GMT (envelope-from gabor@svn.freebsd.org)
Message-Id: <201209141833.q8EIXC4g082355@svn.freebsd.org>
From: Gabor Kovesdan 
Date: Fri, 14 Sep 2012 18:33: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: r240508 - in head/release/doc/en_US.ISO8859-1: errata
	hardware readme relnotes
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 14 Sep 2012 18:33:13 -0000

Author: gabor
Date: Fri Sep 14 18:33:12 2012
New Revision: 240508
URL: http://svn.freebsd.org/changeset/base/240508

Log:
  - Make the release notes build with the XMLified doc tree

Modified:
  head/release/doc/en_US.ISO8859-1/errata/article.sgml
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml
  head/release/doc/en_US.ISO8859-1/readme/article.sgml
  head/release/doc/en_US.ISO8859-1/relnotes/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/errata/article.sgml
==============================================================================
--- head/release/doc/en_US.ISO8859-1/errata/article.sgml	Fri Sep 14 18:32:20 2012	(r240507)
+++ head/release/doc/en_US.ISO8859-1/errata/article.sgml	Fri Sep 14 18:33:12 2012	(r240508)
@@ -1,3 +1,22 @@
+
+
+%entities;
+
+
+%release;
+
+
+]]>
+
+]]>
+
+]]>
+]>
+
 
 
-
-%articles.ent;
-
-
-%release;
-]>
-
 
- &os; -<![ %release.type.current [ - &release.current; -]]> -<![ %release.type.snapshot [ - &release.prev; -]]> -<![ %release.type.release [ - &release.current; -]]> - Errata + &os; &release; Errata The &os; Project Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Sep 14 18:32:20 2012 (r240507) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Sep 14 18:33:12 2012 (r240508) @@ -1,14 +1,12 @@ - -%articles.ent; + + +%entities; %release; %devauto; - - - ]>
Modified: head/release/doc/en_US.ISO8859-1/readme/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/readme/article.sgml Fri Sep 14 18:32:20 2012 (r240507) +++ head/release/doc/en_US.ISO8859-1/readme/article.sgml Fri Sep 14 18:33:12 2012 (r240508) @@ -1,6 +1,7 @@ - -%articles.ent; + + +%entities; %release; @@ -192,7 +193,7 @@ freebsd-admin@FreeBSD.org for more details on becoming an official mirror site. You can also find useful information for mirror sites at the Mirroring + url="&url.articles.hubs;/">Mirroring &os; article. Mirrors generally contain the ISO images generally used to Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Sep 14 18:32:20 2012 (r240507) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Sep 14 18:33:12 2012 (r240508) @@ -1,6 +1,7 @@ - -%articles.ent; + + +%entities; %release; From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 19:38:25 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 140E61065678; Fri, 14 Sep 2012 19:38:25 +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 B56AF8FC16; Fri, 14 Sep 2012 19:38:24 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 266A4619F; Fri, 14 Sep 2012 21:38:24 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id EF6568ECB; Fri, 14 Sep 2012 21:38:23 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin References: <201209141300.q8ED0hI1026210@svn.freebsd.org> <20120914150841.GG68582@ithaqua.etoilebsd.net> Date: Fri, 14 Sep 2012 21:38:23 +0200 In-Reply-To: <20120914150841.GG68582@ithaqua.etoilebsd.net> (Baptiste Daroussin's message of "Fri, 14 Sep 2012 17:08:41 +0200") Message-ID: <86r4q4e6og.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (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: r240496 - in head: lib/libfetch usr.bin/fetch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 19:38:25 -0000 Baptiste Daroussin writes: > Do you plan to push it to 9.1, that will help having pkgng linked > against libmd. That's not really up to me. I'll ask re@. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 19:52:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5400106566C; Fri, 14 Sep 2012 19:52:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0E6C8FC1F; Fri, 14 Sep 2012 19:52:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EJqX9A096341; Fri, 14 Sep 2012 19:52:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EJqX8X096339; Fri, 14 Sep 2012 19:52:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209141952.q8EJqX8X096339@svn.freebsd.org> From: Glen Barber Date: Fri, 14 Sep 2012 19:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240512 - head/release/doc/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 19:52:34 -0000 Author: gjb (doc,ports committer) Date: Fri Sep 14 19:52:33 2012 New Revision: 240512 URL: http://svn.freebsd.org/changeset/base/240512 Log: Fix man2hwnotes.pl script, which should fix the RELNOTES build. Modified: head/release/doc/share/misc/man2hwnotes.pl Modified: head/release/doc/share/misc/man2hwnotes.pl ============================================================================== --- head/release/doc/share/misc/man2hwnotes.pl Fri Sep 14 18:57:07 2012 (r240511) +++ head/release/doc/share/misc/man2hwnotes.pl Fri Sep 14 19:52:33 2012 (r240512) @@ -102,8 +102,8 @@ EOT if ($only_list_out) { # Print the default device preamble entities - print "\n"; - print "\n"; + print "The\n"; + print "driver supports:\n"; } foreach my $page (@ARGV) { From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 19:55:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D238106566C; Fri, 14 Sep 2012 19:55:29 +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 88E6D8FC08; Fri, 14 Sep 2012 19:55:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EJtTKL096843; Fri, 14 Sep 2012 19:55:29 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EJtTgU096841; Fri, 14 Sep 2012 19:55:29 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209141955.q8EJtTgU096841@svn.freebsd.org> From: Andriy Gapon Date: Fri, 14 Sep 2012 19:55: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: r240513 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 19:55:29 -0000 Author: avg Date: Fri Sep 14 19:55:28 2012 New Revision: 240513 URL: http://svn.freebsd.org/changeset/base/240513 Log: sched_ule: fix inverted condition in reporting of priority lending via ktr Reviewed by: kan MFC after: 1 week Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Fri Sep 14 19:52:33 2012 (r240512) +++ head/sys/kern/sched_ule.c Fri Sep 14 19:55:28 2012 (r240513) @@ -1639,7 +1639,7 @@ sched_thread_priority(struct thread *td, "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); - if (td != curthread && prio > td->td_priority) { + if (td != curthread && prio < td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 20:05:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6046106564A; Fri, 14 Sep 2012 20:05:38 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90C5D8FC16; Fri, 14 Sep 2012 20:05:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EK5cX5098444; Fri, 14 Sep 2012 20:05:38 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EK5crG098441; Fri, 14 Sep 2012 20:05:38 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209142005.q8EK5crG098441@svn.freebsd.org> From: Jim Harris Date: Fri, 14 Sep 2012 20:05: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: r240514 - head/sys/dev/isci/scil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 20:05:38 -0000 Author: jimharris Date: Fri Sep 14 20:05:38 2012 New Revision: 240514 URL: http://svn.freebsd.org/changeset/base/240514 Log: isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7 (download microcode with offsets, save, and activate). SATI translation layer was incorrectly using allocation length instead of blocks, and was constructing the ATA command incorrectly. Also change #define to specify that the 512 block size here is specific for DOWNLOAD_MICROCODE, and does not relate to the device's logical block size. Submitted by: scottl (with small modifications) MFC after: 3 days Modified: head/sys/dev/isci/scil/sati_util.c head/sys/dev/isci/scil/sati_write_buffer.c Modified: head/sys/dev/isci/scil/sati_util.c ============================================================================== --- head/sys/dev/isci/scil/sati_util.c Fri Sep 14 19:55:28 2012 (r240513) +++ head/sys/dev/isci/scil/sati_util.c Fri Sep 14 20:05:38 2012 (r240514) @@ -1976,6 +1976,8 @@ void sati_ata_download_microcode_constru ) { U8 * register_fis = sati_cb_get_h2d_register_fis_address(ata_io); + U32 allocation_blocks = allocation_length >> 9; + U32 buffer_blkoffset = buffer_offset >> 9; sati_set_ata_command(register_fis, ATA_DOWNLOAD_MICROCODE); sati_set_ata_features(register_fis, mode); @@ -1987,9 +1989,10 @@ void sati_ata_download_microcode_constru } else //mode == 0x03 { - sati_set_ata_sector_count(register_fis, (U8) (allocation_length >> 9)); - sati_set_ata_lba_low(register_fis, (U8) (allocation_length >> 17)); - sati_set_ata_lba_high(register_fis, (U8) (buffer_offset >> 9)); + sati_set_ata_sector_count(register_fis, (U8) (allocation_blocks & 0xff)); + sati_set_ata_lba_low(register_fis, (U8) ((allocation_blocks >> 8) & 0xff)); + sati_set_ata_lba_mid(register_fis, (U8) (buffer_blkoffset & 0xff)); + sati_set_ata_lba_high(register_fis, (U8) ((buffer_blkoffset >> 8) & 0xff)); } if((allocation_length == 0) && (buffer_offset == 0)) Modified: head/sys/dev/isci/scil/sati_write_buffer.c ============================================================================== --- head/sys/dev/isci/scil/sati_write_buffer.c Fri Sep 14 19:55:28 2012 (r240513) +++ head/sys/dev/isci/scil/sati_write_buffer.c Fri Sep 14 20:05:38 2012 (r240514) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #define WRITE_BUFFER_WRITE_DATA 0x02 #define WRITE_BUFFER_DOWNLOAD_SAVE 0x05 #define WRITE_BUFFER_OFFSET_DOWNLOAD_SAVE 0x07 -#define BLOCK_SIZE 512 +#define DOWNLOAD_MICROCODE_BLOCK_SIZE 512 /** * @brief This method will translate the SCSI Write Buffer command @@ -89,6 +89,7 @@ SATI_STATUS sati_write_buffer_translate_ U8 * cdb = sati_cb_get_cdb_address(scsi_io); SATI_STATUS status = SATI_FAILURE; U32 allocation_length; + U32 allocation_blocks; U32 buffer_offset; allocation_length = ((sati_get_cdb_byte(cdb, 6) << 16) | @@ -100,11 +101,13 @@ SATI_STATUS sati_write_buffer_translate_ (sati_get_cdb_byte(cdb, 5))); sequence->allocation_length = allocation_length; + allocation_blocks = allocation_length / DOWNLOAD_MICROCODE_BLOCK_SIZE; switch(sati_get_cdb_byte(cdb, 1)) { case WRITE_BUFFER_WRITE_DATA: - if((allocation_length == BLOCK_SIZE) && (buffer_offset == 0) && + if((allocation_length == DOWNLOAD_MICROCODE_BLOCK_SIZE) && + (buffer_offset == 0) && (sati_get_cdb_byte(cdb, 2) == 0)) { sati_ata_write_buffer_construct(ata_io, sequence); @@ -146,8 +149,9 @@ SATI_STATUS sati_write_buffer_translate_ case WRITE_BUFFER_OFFSET_DOWNLOAD_SAVE: if(((allocation_length & 0x000001FF) == 0) && //Bits 08:00 need to be zero per SAT2v7 ((buffer_offset & 0x000001FF) == 0) && - (allocation_length <= sequence->device->max_blocks_per_microcode_command) && - (allocation_length >= sequence->device->min_blocks_per_microcode_command)) + (allocation_blocks <= sequence->device->max_blocks_per_microcode_command) && + ((allocation_blocks >= sequence->device->min_blocks_per_microcode_command) || + (allocation_length == 0))) { sati_ata_download_microcode_construct( ata_io, From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 20:51:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0139D106564A; Fri, 14 Sep 2012 20:51:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E17738FC08; Fri, 14 Sep 2012 20:51:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EKpZJg005987; Fri, 14 Sep 2012 20:51:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EKpZHm005983; Fri, 14 Sep 2012 20:51:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209142051.q8EKpZHm005983@svn.freebsd.org> From: Glen Barber Date: Fri, 14 Sep 2012 20:51: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: r240515 - head/release/doc/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 20:51:36 -0000 Author: gjb (doc,ports committer) Date: Fri Sep 14 20:51:35 2012 New Revision: 240515 URL: http://svn.freebsd.org/changeset/base/240515 Log: Revert previous commit... Pointyhat to: gjb (myself) Modified: head/release/doc/share/misc/man2hwnotes.pl Modified: head/release/doc/share/misc/man2hwnotes.pl ============================================================================== --- head/release/doc/share/misc/man2hwnotes.pl Fri Sep 14 20:05:38 2012 (r240514) +++ head/release/doc/share/misc/man2hwnotes.pl Fri Sep 14 20:51:35 2012 (r240515) @@ -102,8 +102,8 @@ EOT if ($only_list_out) { # Print the default device preamble entities - print "The\n"; - print "driver supports:\n"; + print "\n"; + print "\n"; } foreach my $page (@ARGV) { From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 21:12:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B6301065674; Fri, 14 Sep 2012 21:12:42 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12BEF8FC16; Fri, 14 Sep 2012 21:12:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ELCgaM009659; Fri, 14 Sep 2012 21:12:42 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ELCfxZ009637; Fri, 14 Sep 2012 21:12:41 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201209142112.q8ELCfxZ009637@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 14 Sep 2012 21:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240516 - in head/release/doc/de_DE.ISO8859-1: early-adopter errata hardware/alpha hardware/i386 hardware/ia64 hardware/pc98 hardware/sparc64 installation/alpha installation/common inst... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 21:12:42 -0000 Author: gabor Date: Fri Sep 14 21:12:41 2012 New Revision: 240516 URL: http://svn.freebsd.org/changeset/base/240516 Log: - Fix build of the German release notes with the XMLified doc tree Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml head/release/doc/de_DE.ISO8859-1/errata/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/readme/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,3 +1,14 @@ + + +%entities; + +%release; + +X"> +X"> +]> + - -%man; - - -%freebsd; - - -%authors; - - -%teams; - - -%mailing-lists; - - -%release; - -X"> -X"> - -]> -
Hinweise für die ersten Anwender von &os; Modified: head/release/doc/de_DE.ISO8859-1/errata/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/errata/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/errata/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,3 +1,11 @@ +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; +<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> +%release; +]> + <!-- FreeBSD errata document. Unlike some of the other RELNOTESng files, this file should remain as a single SGML file, so that @@ -12,19 +20,6 @@ basiert auf: 1.38 --> -<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//DE"> -%translators; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; -<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> -%release; -]> - <article lang="de"> <articleinfo> Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,29 +1,23 @@ -<!-- - $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/alpha/article.sgml,v 1.5 2002/10/12 18:02:21 ue Exp $ - basiert auf: 1.4 ---> - -<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//DE"> -%translators; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> %release; -<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections; +<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections <!-- Architecture-specific customization --> <!ENTITY arch "alpha"> <!ENTITY arch.print "Alpha/AXP"> - ]> +<!-- + $FreeBSD$ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/alpha/article.sgml,v 1.5 2002/10/12 18:02:21 ue Exp $ + basiert auf: 1.4 +--> + <article lang="de"> &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,27 +1,23 @@ -<!-- - $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/i386/article.sgml,v 1.5 2002/12/07 21:09:09 ue Exp $ - basiert auf: 1.4 ---> - -<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> %release; -<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections; +<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections <!-- Architecture-specific customization --> <!ENTITY arch "i386"> <!ENTITY arch.print "i386"> - ]> +<!-- + $FreeBSD$ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/i386/article.sgml,v 1.5 2002/12/07 21:09:09 ue Exp $ + basiert auf: 1.4 +--> + <article lang="de"> &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,27 +1,23 @@ -<!-- - $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/ia64/article.sgml,v 1.6 2003/05/24 21:52:46 ue Exp $ - basiert auf: 1.3 ---> - -<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> %release; -<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections; +<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections <!-- Architecture-specific customization --> <!ENTITY arch "ia64"> <!ENTITY arch.print "IA-64"> - ]> +<!-- + $FreeBSD$ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/ia64/article.sgml,v 1.6 2003/05/24 21:52:46 ue Exp $ + basiert auf: 1.3 +--> + <article lang="de"> &artheader; Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,27 +1,23 @@ -<!-- - $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/pc98/article.sgml,v 1.2 2002/10/12 18:02:22 ue Exp $ - basiert auf: 1.1 ---> - -<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> %release; -<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections; +<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections <!-- Architecture-specific customization --> <!ENTITY arch "pc98"> <!ENTITY arch.print "NEC PC-98x1"> - ]> +<!-- + $FreeBSD$ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/pc98/article.sgml,v 1.2 2002/10/12 18:02:22 ue Exp $ + basiert auf: 1.1 +--> + <article lang="de"> &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,19 +1,10 @@ -<!-- - $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/sparc64/article.sgml,v 1.7 2003/01/09 12:46:28 ue Exp $ - basiert auf: 1.3 ---> - -<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> %release; -<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections; +<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections <!-- Architecture-specific customization --> @@ -21,6 +12,12 @@ <!ENTITY arch.print "UltraSPARC"> ]> +<!-- + $FreeBSD$ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/sparc64/article.sgml,v 1.7 2003/01/09 12:46:28 ue Exp $ + basiert auf: 1.3 +--> + <article lang="de"> &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ -<!-- - $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/installation/alpha/article.sgml,v 1.4 2002/10/12 18:02:23 ue Exp $ - basiert auf: 1.3 ---> - -<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ -<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> -%man; -<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN"> -%authors; -<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE"> -%mlists; +<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> +<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN" [ +<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//DE"> +%entities; <!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"> %release; <!ENTITY % sections SYSTEM "../common/install.ent"> %sections; @@ -21,6 +12,12 @@ <!ENTITY arch.print "Alpha/AXP"> ]> +<!-- + $FreeBSD$ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/installation/alpha/article.sgml,v 1.4 2002/10/12 18:02:23 ue Exp $ + basiert auf: 1.3 +--> + <article lang="de"> &artheader; &abstract; Modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -26,7 +26,7 @@ from {alpha,i386}/INSTALL.TXT. ausführlichen, bebilderten Installationsleitung.</para> <para>Wenn Sie eine ältere Version von &os; aktualisieren - wollen, sollten Sie <xref linkend="upgrading">, Aktualisierung von + wollen, sollten Sie <xref linkend="upgrading"/>, Aktualisierung von FreeBSD, lesen.</para> <sect2 id="getting-started"> @@ -60,7 +60,7 @@ from {alpha,i386}/INSTALL.TXT. <para>Irgend etwas kann immer schiefgehen und wenn Ihnen das passiert, sollten Sie einen Blick in <xref - linkend="trouble"> werfen, wo Sie hilfreiche Informationen + linkend="trouble"/> werfen, wo Sie hilfreiche Informationen finden können. Sie sollten ebenfalls einen Blick auf die aktuelle Version von <filename>ERRATA.TXT</filename> werfen, bevor Sie mit der Installation beginnen, da Sie dort @@ -76,6 +76,7 @@ from {alpha,i386}/INSTALL.TXT. Backup haben, bevor Sie die Installation durchführen.</para> </important> + </sect2> <sect2> <title>Hardware-Anforderungen @@ -286,7 +287,7 @@ from {alpha,i386}/INSTALL.TXT. benutzen, können Sie das Script makeflp.bat verwenden. Weitere Informationen zu diesem Thema finden Sie im Kapitel . Danach müssen Sie nur noch von + linkend="floppies"/>. Danach müssen Sie nur noch von der ersten Diskette booten, um die &os;-Installation zu starten. @@ -306,7 +307,7 @@ from {alpha,i386}/INSTALL.TXT. benutzen, können Sie das Script makeflp.bat verwenden. Weitere Informationen zu diesem Thema finden Sie im Kapitel . Danach müssen Sie nur noch von + linkend="floppies"/>. Danach müssen Sie nur noch von der ersten Diskette booten, um die &os;-Installation zu starten. @@ -320,12 +321,12 @@ from {alpha,i386}/INSTALL.TXT. müssen Sie ebenfalls die beiden &os; Bootdisketten aus den Dateien floppies/kern.flp und floppies/mfsroot.flp erzeugen, wie in - beschrieben. Booten Sie Ihren + beschrieben. Booten Sie Ihren Rechner von der Diskette mit kern.flp; und legen Sie die Diskette mit mfsroot.flp ein, sobald Sie dazu aufgefordert werden. Weitere Informationen zu dieser Art der Installation finden Sie in . + linkend="ftpnfs"/>. Wenn Ihr Rechner kein CDROM Laufwerk hat, können Sie &os; auch direkt über das Internet @@ -334,12 +335,12 @@ from {alpha,i386}/INSTALL.TXT. Bootdisketten aus den Dateien floppies/kern.flp und floppies/mfsroot.flp erzeugen, wie in beschrieben. Booten Sie Ihren Rechner von + linkend="floppies"/> beschrieben. Booten Sie Ihren Rechner von der Diskette mit kern.flp; und legen Sie die Diskette mit mfsroot.flp ein, sobald Sie dazu aufgefordert werden. Weitere Informationen zu dieser Art der Installation finden Sie in . + linkend="ftpnfs"/>. @@ -358,7 +359,7 @@ from {alpha,i386}/INSTALL.TXT. Bootdisketten aus den Dateien floppies/kern.flp und floppies/mfsroot.flp erzeugen, wie in - beschrieben. Legen Sie die + beschrieben. Legen Sie die Diskette mit dem Inhalt von kern.flp ein und geben Sie an der Eingabeaufforderung des SRM (>>>) den folgenden Befehl ein, um @@ -400,8 +401,8 @@ Ethernet address 0:3:ba:b:92:d4, Host ID - - + + ok @@ -506,7 +507,7 @@ pqb0.0.1.4.0 PQB0 Wenn Sie von einem lokalen CDROM installieren wollen, sollten Sie nicht dieses Kapitel lesen, sondern - . Wenn in Ihrem System + . Wenn in Ihrem System kein CDROM vorhanden ist und Sie eine &os; CD benutzen wollen, die in einem CDROM Laufwerk eines anderen Systems liegt und Sie dieses System über ein Netzwerk erreichen @@ -580,10 +581,10 @@ pqb0.0.1.4.0 PQB0 Installation vorbereiten. Der erste Schritt ist die Erstellung der Bootdisketten, - wie in beschrieben. + wie in beschrieben. Der zweite Schritt ist, einen Blick in zu werfen. Das Kapitel Distribution + linkend="layout"/> zu werfen. Das Kapitel Distribution Format ist besonders wichtig, da Sie hier erfahren, welche Dateien Sie auf Diskette übertragen müssen und welche Sie ignorieren können. @@ -733,14 +734,14 @@ pqb0.0.1.4.0 PQB0 Der letzte Schritt ist die Erzeugung der Bootdisketten, - siehe . + siehe . Netzwerk-Installation mit FTP oder NFS Wenn Sie die Bootdisketten erzeugt haben, wie in beschrieben, können Sie die restliche + linkend="floppies"/> beschrieben, können Sie die restliche Installation über eine Netzwerk-Verbindung durchführen, wobei drei Arten von Netzwerkverbindungen unterstützt werden: seriell, parallel, oder @@ -981,7 +982,7 @@ pqb0.0.1.4.0 PQB0 Wenn Sie keine Meldungen auf Ihrer seriellen Konsole sehen, müssen Sie die Tastatur wieder einstecken und auf ein Tonsignal warten. Wenn Sie von CD booten, machen - Sie bei weiter, wenn Sie das + Sie bei weiter, wenn Sie das Tonsignal hören.. Modified: head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -23,7 +23,7 @@ README.HTM cdrom.inf crypto Wenn Sie dieses Verzeichnis für eine CD-, FTP- oder NFS-Installation nutzen wollen, brauchen Sie nur die beiden 1.44 MByte großen Bootdisketten zu erstellen (wie das geht, ist - in beschrieben), von diesen zu booten, + in beschrieben), von diesen zu booten, und dann den Anweisungen zu folgen. Alle anderen Dateien, die für die Installation notwendig sind, werden auf der Grundlage Ihrer Angaben automatisch geholt. Wenn Sie &os; noch nie @@ -86,7 +86,7 @@ README.HTM cdrom.inf crypto Das Verzeichnis floppies/ enthält die Images der Bootdisketten. Informationen, wie man diese Images benutzt, finden Sie in . + linkend="floppies"/>. Modified: head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -19,9 +10,14 @@ - ]> + +
&artheader; &abstract; Modified: head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,17 +1,7 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -20,9 +10,14 @@ - ]> + +
&artheader; &abstract; Modified: head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -19,9 +10,14 @@ - ]> + +
&artheader; &abstract; Modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,19 +1,8 @@ - - - + +%entities; - - -%man; - -%authors; - -%mlists; %release; %sections; @@ -24,6 +13,12 @@ ]> + +
&artheader; &abstract; Modified: head/release/doc/de_DE.ISO8859-1/readme/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/readme/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/readme/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,3 +1,11 @@ + + +%entities; + +%release; +]> + - -%man; - -%authors; - -%mlists; - -%release; - -%misc; -]> -
&os; &release.current; README @@ -229,7 +224,7 @@ wenn Sie an weiteren Informationen zu diesem Thema interessiert sind. Zusätzliche Informationen zu diesem Thema finden Sie im Artikel Mirroring + url="http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/hubs/">Mirroring FreeBSD. Sie finden die für den Start der Installation Modified: head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -19,9 +10,14 @@ - ]> + +
&art;
Modified: head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -19,9 +10,15 @@ - ]> + + +
&art;
Modified: head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -19,8 +10,12 @@ - ]> +
&art; Modified: head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,16 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -19,9 +10,15 @@ - ]> + + +
&art;
Modified: head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml Fri Sep 14 20:51:35 2012 (r240515) +++ head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml Fri Sep 14 21:12:41 2012 (r240516) @@ -1,19 +1,7 @@ - - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -22,9 +10,14 @@ - ]> + +
&art;
From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 21:17:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9C48106566C; Fri, 14 Sep 2012 21:17:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1E588FC0C; Fri, 14 Sep 2012 21:17:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ELHrJL010594; Fri, 14 Sep 2012 21:17:53 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ELHrfm010579; Fri, 14 Sep 2012 21:17:53 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201209142117.q8ELHrfm010579@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 14 Sep 2012 21:17: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: r240517 - in head/contrib/byacc: . package package/debian X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 21:17:54 -0000 Author: bapt Date: Fri Sep 14 21:17:53 2012 New Revision: 240517 URL: http://svn.freebsd.org/changeset/base/240517 Log: update to version 20120526 Modified: head/contrib/byacc/CHANGES head/contrib/byacc/VERSION head/contrib/byacc/defs.h head/contrib/byacc/lr0.c head/contrib/byacc/main.c head/contrib/byacc/mkpar.c head/contrib/byacc/output.c head/contrib/byacc/package/byacc.spec head/contrib/byacc/package/debian/changelog head/contrib/byacc/reader.c head/contrib/byacc/symtab.c head/contrib/byacc/verbose.c Directory Properties: head/contrib/byacc/ (props changed) Modified: head/contrib/byacc/CHANGES ============================================================================== --- head/contrib/byacc/CHANGES Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/CHANGES Fri Sep 14 21:17:53 2012 (r240517) @@ -1,3 +1,37 @@ +2012-05-26 Thomas E. Dickey + + * package/debian/changelog, package/byacc.spec, VERSION: bump + + * reader.c: + some versions of gcc may warn that bp is not set in mark_symbol, e.g., + if GCC_NORETURN is not handled; appease the compiler. + + * reader.c: + use the declared types Assoc_t and Value_t in some places where compiler only + cared about char versus short. + + * reader.c: + use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation + (no object change) + + * defs.h: + add fallbacks for GCC_NORETURN and GCC_UNUSED to make it simpler for *BSD + packagers to build without configure script. Also remove duplicate declaration + of pure_parser variable (prompted by patch by Baptiste Daroussin). + + Also define new TMALLOC and TREALLOC macros to simplify/replace MALLOC and + REALLOC macros. + + * symtab.c: + use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation + (no object change) + +2012-05-25 Thomas E. Dickey + + * output.c, main.c, verbose.c, mkpar.c, lr0.c: + use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation + (no object change) + 2012-01-15 Thomas E. Dickey * package/debian/copyright: bump Modified: head/contrib/byacc/VERSION ============================================================================== --- head/contrib/byacc/VERSION Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/VERSION Fri Sep 14 21:17:53 2012 (r240517) @@ -1 +1 @@ -20120115 +20120526 Modified: head/contrib/byacc/defs.h ============================================================================== --- head/contrib/byacc/defs.h Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/defs.h Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: defs.h,v 1.36 2011/12/20 01:31:16 tom Exp $ */ +/* $Id: defs.h,v 1.37 2012/05/26 15:23:00 tom Exp $ */ #ifdef HAVE_CONFIG_H #include @@ -11,6 +11,10 @@ #include #include +#if defined(__cplusplus) /* __cplusplus, etc. */ +#define class myClass +#endif + #define YYMAJOR 1 #define YYMINOR 9 @@ -132,9 +136,11 @@ #define CALLOC(k,n) (calloc((size_t)(k),(size_t)(n))) #define FREE(x) (free((char*)(x))) #define MALLOC(n) (malloc((size_t)(n))) +#define TMALLOC(t,n) ((t*) malloc((size_t)(n) * sizeof(t))) #define NEW(t) ((t*)allocate(sizeof(t))) #define NEW2(n,t) ((t*)allocate(((size_t)(n)*sizeof(t)))) #define REALLOC(p,n) (realloc((char*)(p),(size_t)(n))) +#define TREALLOC(t,p,n) ((t*)realloc((char*)(p), (size_t)(n) * sizeof(t))) #define DO_FREE(x) if (x) { FREE(x); x = 0; } @@ -241,6 +247,7 @@ extern char *line; extern int lineno; extern int outline; extern int exit_code; +extern int pure_parser; extern const char *const banner[]; extern const char *const xdecls[]; @@ -301,7 +308,6 @@ extern char *nullable; extern bucket *first_symbol; extern bucket *last_symbol; -extern int pure_parser; extern int nstates; extern core *first_state; extern shifts *first_shift; @@ -342,12 +348,22 @@ extern bucket *lookup(const char *); extern bucket *make_bucket(const char *); #ifndef GCC_NORETURN +#if defined(__dead2) +#define GCC_NORETURN __dead2 +#elif defined(__dead) +#define GCC_NORETURN __dead +#else #define GCC_NORETURN /* nothing */ #endif +#endif #ifndef GCC_UNUSED +#if defined(__unused) +#define GCC_UNUSED __unused +#else #define GCC_UNUSED /* nothing */ #endif +#endif /* closure.c */ extern void closure(Value_t * nucleus, int n); @@ -421,7 +437,7 @@ extern void output(void); extern void reader(void); /* skeleton.c */ -extern void write_section(FILE *fp, const char *const section[]); +extern void write_section(FILE * fp, const char *const section[]); /* verbose.c */ extern void verbose(void); Modified: head/contrib/byacc/lr0.c ============================================================================== --- head/contrib/byacc/lr0.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/lr0.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: lr0.c,v 1.12 2010/06/09 08:53:17 tom Exp $ */ +/* $Id: lr0.c,v 1.13 2012/05/26 00:40:47 tom Exp $ */ #include "defs.h" @@ -538,7 +538,7 @@ set_nullable(void) int empty; int done_flag; - nullable = MALLOC(nsyms); + nullable = TMALLOC(char, nsyms); NO_SPACE(nullable); for (i = 0; i < nsyms; ++i) Modified: head/contrib/byacc/main.c ============================================================================== --- head/contrib/byacc/main.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/main.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.38 2012/01/14 01:01:15 tom Exp $ */ +/* $Id: main.c,v 1.39 2012/05/26 00:50:20 tom Exp $ */ #include #include /* for _exit() */ @@ -163,7 +163,7 @@ done(int k) } static void -onintr(__unused int sig) +onintr(int sig GCC_UNUSED) { got_intr = 1; done(EXIT_FAILURE); @@ -367,7 +367,7 @@ allocate(size_t n) } #define CREATE_FILE_NAME(dest, suffix) \ - dest = MALLOC(len + strlen(suffix) + 1); \ + dest = TMALLOC(char, len + strlen(suffix) + 1); \ NO_SPACE(dest); \ strcpy(dest, file_prefix); \ strcpy(dest + len, suffix) @@ -398,7 +398,7 @@ create_file_names(void) if (prefix != NULL) { len = (size_t) (prefix - output_file_name); - file_prefix = (char *)MALLOC(len + 1); + file_prefix = TMALLOC(char, len + 1); NO_SPACE(file_prefix); strncpy(file_prefix, output_file_name, len)[len] = 0; } Modified: head/contrib/byacc/mkpar.c ============================================================================== --- head/contrib/byacc/mkpar.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/mkpar.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: mkpar.c,v 1.11 2010/06/09 08:53:17 tom Exp $ */ +/* $Id: mkpar.c,v 1.12 2012/05/26 00:42:18 tom Exp $ */ #include "defs.h" @@ -180,7 +180,7 @@ unused_rules(void) int i; action *p; - rules_used = (Value_t *) MALLOC((unsigned)nrules * sizeof(Value_t)); + rules_used = TMALLOC(Value_t, nrules); NO_SPACE(rules_used); for (i = 0; i < nrules; ++i) Modified: head/contrib/byacc/output.c ============================================================================== --- head/contrib/byacc/output.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/output.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: output.c,v 1.43 2012/01/14 17:03:52 tom Exp $ */ +/* $Id: output.c,v 1.44 2012/05/26 01:13:02 tom Exp $ */ #include "defs.h" @@ -557,10 +557,10 @@ pack_vector(int vector) } while (newmax <= loc); - table = (Value_t *) REALLOC(table, (unsigned)newmax * sizeof(Value_t)); + table = TREALLOC(Value_t, table, newmax); NO_SPACE(table); - check = (Value_t *) REALLOC(check, (unsigned)newmax * sizeof(Value_t)); + check = TREALLOC(Value_t, check, newmax); NO_SPACE(check); for (l = maxtable; l < newmax; ++l) @@ -919,7 +919,7 @@ output_debug(void) ++outline; fprintf(code_file, "#define YYMAXTOKEN %d\n", max); - symnam = (const char **)MALLOC((unsigned)(max + 1) * sizeof(char *)); + symnam = TMALLOC(const char *, max + 1); NO_SPACE(symnam); /* Note that it is not necessary to initialize the element */ Modified: head/contrib/byacc/package/byacc.spec ============================================================================== --- head/contrib/byacc/package/byacc.spec Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/package/byacc.spec Fri Sep 14 21:17:53 2012 (r240517) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20120115 +%define AppVersion 20120526 %define UseProgram yacc -# $XTermId: byacc.spec,v 1.13 2012/01/15 19:30:29 tom Exp $ +# $XTermId: byacc.spec,v 1.14 2012/05/26 16:13:45 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: head/contrib/byacc/package/debian/changelog ============================================================================== --- head/contrib/byacc/package/debian/changelog Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/package/debian/changelog Fri Sep 14 21:17:53 2012 (r240517) @@ -1,3 +1,9 @@ +byacc (20120526) unstable; urgency=low + + * minor code-cleanup. + + -- Thomas E. Dickey Sat, 26 May 2012 12:14:17 -0400 + byacc (20120115) unstable; urgency=low * add testcases, improve documentation for "-s" option. Modified: head/contrib/byacc/reader.c ============================================================================== --- head/contrib/byacc/reader.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/reader.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: reader.c,v 1.33 2011/09/06 22:56:53 tom Exp $ */ +/* $Id: reader.c,v 1.36 2012/05/26 16:05:41 tom Exp $ */ #include "defs.h" @@ -52,7 +52,7 @@ cachec(int c) if (cinc >= cache_size) { cache_size += 256; - cache = REALLOC(cache, cache_size); + cache = TREALLOC(char, cache, cache_size); NO_SPACE(cache); } cache[cinc] = (char)c; @@ -83,7 +83,7 @@ get_line(void) if (line) FREE(line); linesize = LINESIZE + 1; - line = MALLOC(linesize); + line = TMALLOC(char, linesize); NO_SPACE(line); } @@ -100,7 +100,7 @@ get_line(void) if (++i >= linesize) { linesize += LINESIZE; - line = REALLOC(line, linesize); + line = TREALLOC(char, line, linesize); NO_SPACE(line); } c = getc(f); @@ -124,7 +124,7 @@ dup_line(void) s = line; while (*s != '\n') ++s; - p = MALLOC(s - line + 1); + p = TMALLOC(char, s - line + 1); NO_SPACE(p); s = line; @@ -685,7 +685,7 @@ copy_param(int k) if (c == '}') goto out; - buf = MALLOC(linesize); + buf = TMALLOC(char, linesize); NO_SPACE(buf); for (i = 0; (c = *cptr++) != '}'; i++) @@ -733,7 +733,7 @@ copy_param(int k) name = i + 1; - p = MALLOC(sizeof(*p)); + p = TMALLOC(param, 1); NO_SPACE(p); p->type2 = strdup(buf + type2); @@ -890,7 +890,7 @@ get_literal(void) FREE(s_line); n = cinc; - s = MALLOC(n); + s = TMALLOC(char, n); NO_SPACE(s); for (i = 0; i < n; ++i) @@ -1058,14 +1058,14 @@ get_tag(void) if (ntags >= tagmax) { tagmax += 16; - tag_table = (char **) + tag_table = (tag_table - ? REALLOC(tag_table, (unsigned)tagmax * sizeof(char *)) - : MALLOC((unsigned)tagmax * sizeof(char *))); + ? TREALLOC(char *, tag_table, tagmax) + : TMALLOC(char *, tagmax)); NO_SPACE(tag_table); } - s = MALLOC(cinc); + s = TMALLOC(char, cinc); NO_SPACE(s); strcpy(s, cache); @@ -1246,7 +1246,7 @@ read_declarations(void) int c, k; cache_size = 256; - cache = MALLOC(cache_size); + cache = TMALLOC(char, cache_size); NO_SPACE(cache); for (;;) @@ -1316,7 +1316,7 @@ initialize_grammar(void) nitems = 4; maxitems = 300; - pitem = (bucket **)MALLOC((unsigned)maxitems * sizeof(bucket *)); + pitem = TMALLOC(bucket *, maxitems); NO_SPACE(pitem); pitem[0] = 0; @@ -1327,21 +1327,21 @@ initialize_grammar(void) nrules = 3; maxrules = 100; - plhs = (bucket **)MALLOC((unsigned)maxrules * sizeof(bucket *)); + plhs = TMALLOC(bucket *, maxrules); NO_SPACE(plhs); plhs[0] = 0; plhs[1] = 0; plhs[2] = 0; - rprec = (short *)MALLOC((unsigned)maxrules * sizeof(short)); + rprec = TMALLOC(Value_t, maxrules); NO_SPACE(rprec); rprec[0] = 0; rprec[1] = 0; rprec[2] = 0; - rassoc = (char *)MALLOC((unsigned)maxrules * sizeof(char)); + rassoc = TMALLOC(Assoc_t, maxrules); NO_SPACE(rassoc); rassoc[0] = TOKEN; @@ -1353,7 +1353,7 @@ static void expand_items(void) { maxitems += 300; - pitem = (bucket **)REALLOC(pitem, (unsigned)maxitems * sizeof(bucket *)); + pitem = TREALLOC(bucket *, pitem, maxitems); NO_SPACE(pitem); } @@ -1362,13 +1362,13 @@ expand_rules(void) { maxrules += 100; - plhs = (bucket **)REALLOC(plhs, (unsigned)maxrules * sizeof(bucket *)); + plhs = TREALLOC(bucket *, plhs, maxrules); NO_SPACE(plhs); - rprec = (short *)REALLOC(rprec, (unsigned)maxrules * sizeof(short)); + rprec = TREALLOC(Value_t, rprec, maxrules); NO_SPACE(rprec); - rassoc = (char *)REALLOC(rassoc, (unsigned)maxrules * sizeof(char)); + rassoc = TREALLOC(Assoc_t, rassoc, maxrules); NO_SPACE(rassoc); } @@ -1780,9 +1780,7 @@ static int mark_symbol(void) { int c; - bucket *bp; - - bp = NULL; + bucket *bp = NULL; c = cptr[1]; if (c == '%' || c == '\\') @@ -1886,7 +1884,7 @@ pack_names(void) for (bp = first_symbol; bp; bp = bp->next) name_pool_size += strlen(bp->name) + 1; - name_pool = MALLOC(name_pool_size); + name_pool = TMALLOC(char, name_pool_size); NO_SPACE(name_pool); strcpy(name_pool, "$accept"); @@ -1941,7 +1939,7 @@ protect_string(char *src, char **des) len++; } - *des = d = (char *)MALLOC(len); + *des = d = TMALLOC(char, len); NO_SPACE(d); s = src; @@ -1973,19 +1971,19 @@ pack_symbols(void) start_symbol = (Value_t) ntokens; nvars = nsyms - ntokens; - symbol_name = (char **)MALLOC((unsigned)nsyms * sizeof(char *)); + symbol_name = TMALLOC(char *, nsyms); NO_SPACE(symbol_name); - symbol_value = (short *)MALLOC((unsigned)nsyms * sizeof(short)); + symbol_value = TMALLOC(Value_t, nsyms); NO_SPACE(symbol_value); - symbol_prec = (short *)MALLOC((unsigned)nsyms * sizeof(short)); + symbol_prec = TMALLOC(short, nsyms); NO_SPACE(symbol_prec); - symbol_assoc = MALLOC(nsyms); + symbol_assoc = TMALLOC(char, nsyms); NO_SPACE(symbol_assoc); - v = (bucket **)MALLOC((unsigned)nsyms * sizeof(bucket *)); + v = TMALLOC(bucket *, nsyms); NO_SPACE(v); v[0] = 0; @@ -2085,7 +2083,7 @@ pack_symbols(void) if (gflag) { - symbol_pname = (char **)MALLOC((unsigned)nsyms * sizeof(char *)); + symbol_pname = TMALLOC(char *, nsyms); NO_SPACE(symbol_pname); for (i = 0; i < nsyms; ++i) @@ -2103,19 +2101,19 @@ pack_grammar(void) Assoc_t assoc; Value_t prec2; - ritem = (short *)MALLOC((unsigned)nitems * sizeof(short)); + ritem = TMALLOC(Value_t, nitems); NO_SPACE(ritem); - rlhs = (short *)MALLOC((unsigned)nrules * sizeof(short)); + rlhs = TMALLOC(Value_t, nrules); NO_SPACE(rlhs); - rrhs = (short *)MALLOC((unsigned)(nrules + 1) * sizeof(short)); + rrhs = TMALLOC(Value_t, nrules + 1); NO_SPACE(rrhs); - rprec = (short *)REALLOC(rprec, (unsigned)nrules * sizeof(short)); + rprec = TREALLOC(Value_t, rprec, nrules); NO_SPACE(rprec); - rassoc = REALLOC(rassoc, nrules); + rassoc = TREALLOC(Assoc_t, rassoc, nrules); NO_SPACE(rassoc); ritem[0] = -1; Modified: head/contrib/byacc/symtab.c ============================================================================== --- head/contrib/byacc/symtab.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/symtab.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: symtab.c,v 1.9 2010/11/24 15:12:29 tom Exp $ */ +/* $Id: symtab.c,v 1.10 2012/05/26 15:16:12 tom Exp $ */ #include "defs.h" @@ -33,13 +33,13 @@ make_bucket(const char *name) assert(name != 0); - bp = (bucket *)MALLOC(sizeof(bucket)); + bp = TMALLOC(bucket, 1); NO_SPACE(bp); bp->link = 0; bp->next = 0; - bp->name = MALLOC(strlen(name) + 1); + bp->name = TMALLOC(char, strlen(name) + 1); NO_SPACE(bp->name); bp->tag = 0; @@ -82,7 +82,7 @@ create_symbol_table(void) int i; bucket *bp; - symbol_table = (bucket **)MALLOC(TABLE_SIZE * sizeof(bucket *)); + symbol_table = TMALLOC(bucket *, TABLE_SIZE); NO_SPACE(symbol_table); for (i = 0; i < TABLE_SIZE; i++) Modified: head/contrib/byacc/verbose.c ============================================================================== --- head/contrib/byacc/verbose.c Fri Sep 14 21:12:41 2012 (r240516) +++ head/contrib/byacc/verbose.c Fri Sep 14 21:17:53 2012 (r240517) @@ -1,4 +1,4 @@ -/* $Id: verbose.c,v 1.9 2010/06/09 08:58:29 tom Exp $ */ +/* $Id: verbose.c,v 1.10 2012/05/26 00:45:17 tom Exp $ */ #include "defs.h" @@ -23,7 +23,7 @@ verbose(void) if (!vflag) return; - null_rules = (short *)MALLOC((unsigned)nrules * sizeof(short)); + null_rules = TMALLOC(short, nrules); NO_SPACE(null_rules); fprintf(verbose_file, "\f\n"); From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 21:28:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65288106564A; Fri, 14 Sep 2012 21:28:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B9078FC0A; Fri, 14 Sep 2012 21:28:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ELSvYA012423; Fri, 14 Sep 2012 21:28:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ELSuZD012394; Fri, 14 Sep 2012 21:28:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209142128.q8ELSuZD012394@svn.freebsd.org> From: Eitan Adler Date: Fri, 14 Sep 2012 21:28: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: r240518 - in head: lib/libc/stdio share/examples/diskless sys/arm/ti sys/dev/altera/jtag_uart sys/dev/buslogic sys/dev/e1000 sys/dev/isci/scil sys/dev/isp sys/dev/mps sys/kern sys/sparc... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 21:28:57 -0000 Author: eadler Date: Fri Sep 14 21:28:56 2012 New Revision: 240518 URL: http://svn.freebsd.org/changeset/base/240518 Log: Correct double "the the" Approved by: cperciva MFC after: 3 days Modified: head/lib/libc/stdio/scanf_l.3 head/share/examples/diskless/README.BOOTP head/sys/arm/ti/ti_scm.c head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c head/sys/dev/buslogic/bt.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/isci/scil/sati.c head/sys/dev/isci/scil/sati_callbacks.h head/sys/dev/isci/scil/sci_base_controller.h head/sys/dev/isci/scil/sci_base_domain.h head/sys/dev/isci/scil/sci_base_phy.h head/sys/dev/isci/scil/sci_base_remote_device.h head/sys/dev/isci/scil/scic_io_request.h head/sys/dev/isci/scil/scic_sds_phy.c head/sys/dev/isci/scil/scic_sds_port.h head/sys/dev/isci/scil/scic_sds_remote_node_context.h head/sys/dev/isci/scil/scic_sds_request.c head/sys/dev/isci/scil/scu_bios_definitions.h head/sys/dev/isp/isp_freebsd.c head/sys/dev/mps/mps_sas.c head/sys/kern/subr_unit.c head/sys/sparc64/sparc64/ata_machdep.c head/sys/vm/vm_pageout.c head/tools/kerneldoc/subsys/common-Doxyfile head/usr.bin/lex/NEWS head/usr.sbin/bsdconfig/networking/include/media.subr head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Modified: head/lib/libc/stdio/scanf_l.3 ============================================================================== --- head/lib/libc/stdio/scanf_l.3 Fri Sep 14 21:17:53 2012 (r240517) +++ head/lib/libc/stdio/scanf_l.3 Fri Sep 14 21:28:56 2012 (r240518) @@ -57,7 +57,7 @@ The above functions scan input according in the locale .Fa loc . They behave in the same way as the versions without the _l suffix, but use -the specific locale rather than the the global or per-thread locale. +the specific locale rather than the global or per-thread locale. See the specific manual pages for more information. .Sh SEE ALSO .Xr scanf 3 , Modified: head/share/examples/diskless/README.BOOTP ============================================================================== --- head/share/examples/diskless/README.BOOTP Fri Sep 14 21:17:53 2012 (r240517) +++ head/share/examples/diskless/README.BOOTP Fri Sep 14 21:28:56 2012 (r240518) @@ -85,7 +85,7 @@ options NULLFS # nullfs to map /var/t BOOTP SERVER SETUP - The BOOTP server must be running on the same logical LAN as the the + The BOOTP server must be running on the same logical LAN as the BOOTP client(s). You need to setup two things: (1) You need to NFS-export /, /usr, and /var. Modified: head/sys/arm/ti/ti_scm.c ============================================================================== --- head/sys/arm/ti/ti_scm.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/arm/ti/ti_scm.c Fri Sep 14 21:28:56 2012 (r240518) @@ -202,7 +202,7 @@ ti_scm_padconf_set(const char *padname, * ti_scm_padconf_get - gets the muxmode and state for a pad/pin * @padname: the name of the pad, i.e. "c12" * @muxmode: upon return will contain the name of the muxmode of the pin - * @state: upon return will contain the state of the the pad/pin + * @state: upon return will contain the state of the pad/pin * * * LOCKING: Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c ============================================================================== --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c Fri Sep 14 21:28:56 2012 (r240518) @@ -82,7 +82,7 @@ static cn_ungrab_t aju_cnungrab; /* * I/O routines lifted from Deimos. This is not only MIPS-specific, but also - * BERI-specific, as we're hard coding the the address at which we expect to + * BERI-specific, as we're hard coding the address at which we expect to * find the Altera JTAG UART and using it unconditionally. We use these * low-level routines so that we can perform console I/O long before newbus * has initialised and devices have attached. The TTY layer of the driver Modified: head/sys/dev/buslogic/bt.c ============================================================================== --- head/sys/dev/buslogic/bt.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/buslogic/bt.c Fri Sep 14 21:28:56 2012 (r240518) @@ -1945,7 +1945,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opco bt_outb(bt, COMMAND_REG, opcode); /* - * Wait for up to 1sec for each byte of the the + * Wait for up to 1sec for each byte of the * parameter list sent to be sent. */ timeout = 10000; Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/e1000/e1000_82575.c Fri Sep 14 21:28:56 2012 (r240518) @@ -2280,7 +2280,7 @@ out: * e1000_reset_mdicnfg_82580 - Reset MDICNFG destination and com_mdio bits * @hw: pointer to the HW structure * - * This resets the the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on + * This resets the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on * the values found in the EEPROM. This addresses an issue in which these * bits are not restored from EEPROM after reset. **/ Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/e1000/e1000_ich8lan.c Fri Sep 14 21:28:56 2012 (r240518) @@ -3228,7 +3228,7 @@ out: * @hw: pointer to the HW structure * * ICH8 use the PCI Express bus, but does not contain a PCI Express Capability - * register, so the the bus width is hard coded. + * register, so the bus width is hard coded. **/ static s32 e1000_get_bus_info_ich8lan(struct e1000_hw *hw) { Modified: head/sys/dev/isci/scil/sati.c ============================================================================== --- head/sys/dev/isci/scil/sati.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/sati.c Fri Sep 14 21:28:56 2012 (r240518) @@ -1236,7 +1236,7 @@ void sati_sequence_terminate( ) { // Decode the sequence type to determine how to handle the termination - // of the the translation method. + // of the translation method. switch (sequence->type) { case SATI_SEQUENCE_UNMAP: Modified: head/sys/dev/isci/scil/sati_callbacks.h ============================================================================== --- head/sys/dev/isci/scil/sati_callbacks.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/sati_callbacks.h Fri Sep 14 21:28:56 2012 (r240518) @@ -153,7 +153,7 @@ void sati_cb_get_data_byte( ); /** - * @brief This callback method gets the the task type for the SCSI task + * @brief This callback method gets the task type for the SCSI task * request. * * @param[in] scsi_task This parameter specifies the user's SCSI Task request. Modified: head/sys/dev/isci/scil/sci_base_controller.h ============================================================================== --- head/sys/dev/isci/scil/sci_base_controller.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/sci_base_controller.h Fri Sep 14 21:28:56 2012 (r240518) @@ -113,7 +113,7 @@ typedef enum _SCI_BASE_CONTROLLER_STATES SCI_BASE_CONTROLLER_STATE_INITIALIZED, /** - * This state indicates the the controller is in the process of becoming + * This state indicates the controller is in the process of becoming * ready (i.e. starting). In this state no new IO operations are permitted. * This state is entered from the INITIALIZED state. */ Modified: head/sys/dev/isci/scil/sci_base_domain.h ============================================================================== --- head/sys/dev/isci/scil/sci_base_domain.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/sci_base_domain.h Fri Sep 14 21:28:56 2012 (r240518) @@ -92,7 +92,7 @@ typedef enum _SCI_BASE_DOMAIN_STATES SCI_BASE_DOMAIN_STATE_STARTING, /** - * This state indicates the the domain is now ready. Thus, the user + * This state indicates the domain is now ready. Thus, the user * is able to perform IO operations to remote devices in this domain. * This state is entered from the STOPPED state. * This state is entered from the STOPPING state. Modified: head/sys/dev/isci/scil/sci_base_phy.h ============================================================================== --- head/sys/dev/isci/scil/sci_base_phy.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/sci_base_phy.h Fri Sep 14 21:28:56 2012 (r240518) @@ -102,7 +102,7 @@ typedef enum _SCI_BASE_PHY_STATES SCI_BASE_PHY_STATE_STARTING, /** - * This state indicates the the phy is now ready. Thus, the user + * This state indicates the phy is now ready. Thus, the user * is able to perform IO operations utilizing this phy as long as it * is currently part of a valid port. * This state is entered from the STARTING state. Modified: head/sys/dev/isci/scil/sci_base_remote_device.h ============================================================================== --- head/sys/dev/isci/scil/sci_base_remote_device.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/sci_base_remote_device.h Fri Sep 14 21:28:56 2012 (r240518) @@ -93,7 +93,7 @@ typedef enum _SCI_BASE_REMOTE_DEVICE_STA SCI_BASE_REMOTE_DEVICE_STATE_STOPPED, /** - * This state indicates the the remote device is in the process of + * This state indicates the remote device is in the process of * becoming ready (i.e. starting). In this state no new IO operations * are permitted. * This state is entered from the STOPPED state. Modified: head/sys/dev/isci/scil/scic_io_request.h ============================================================================== --- head/sys/dev/isci/scil/scic_io_request.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/scic_io_request.h Fri Sep 14 21:28:56 2012 (r240518) @@ -260,12 +260,12 @@ typedef struct SCIC_SMP_PASSTHRU_REQUEST */ U8 (* scic_cb_smp_passthru_get_frame_type) ( void *); /** - * Function pointer to get the function in the the smp request + * Function pointer to get the function in the smp request */ U8 (* scic_cb_smp_passthru_get_function) ( void * ); /** - * Function pointer to get the "allocated response length" in the the smp request + * Function pointer to get the "allocated response length" in the smp request */ U8 (* scic_cb_smp_passthru_get_allocated_response_length) ( void * ); Modified: head/sys/dev/isci/scil/scic_sds_phy.c ============================================================================== --- head/sys/dev/isci/scil/scic_sds_phy.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/scic_sds_phy.c Fri Sep 14 21:28:56 2012 (r240518) @@ -658,7 +658,7 @@ void scic_sds_phy_construct( // Clear out the error counter data memset(this_phy->error_counter, 0, sizeof(this_phy->error_counter)); - // Initialize the the substate machines + // Initialize the substate machines sci_base_state_machine_construct( &this_phy->starting_substate_machine, &this_phy->parent.parent, Modified: head/sys/dev/isci/scil/scic_sds_port.h ============================================================================== --- head/sys/dev/isci/scil/scic_sds_port.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/scic_sds_port.h Fri Sep 14 21:28:56 2012 (r240518) @@ -109,7 +109,7 @@ struct SCIC_SDS_REQUEST; /** * @struct SCIC_SDS_PORT * - * The core port object provides the the abstraction for an SCU port. + * The core port object provides the abstraction for an SCU port. */ typedef struct SCIC_SDS_PORT { Modified: head/sys/dev/isci/scil/scic_sds_remote_node_context.h ============================================================================== --- head/sys/dev/isci/scil/scic_sds_remote_node_context.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/scic_sds_remote_node_context.h Fri Sep 14 21:28:56 2012 (r240518) @@ -237,7 +237,7 @@ enum SCIC_SDS_REMOTE_NODE_CONTEXT_DESTIN * * @brief This structure contains the data associated with the remote * node context object. The remote node context (RNC) object models - * the the remote device information necessary to manage the + * the remote device information necessary to manage the * silicon RNC. */ typedef struct SCIC_SDS_REMOTE_NODE_CONTEXT Modified: head/sys/dev/isci/scil/scic_sds_request.c ============================================================================== --- head/sys/dev/isci/scil/scic_sds_request.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/scic_sds_request.c Fri Sep 14 21:28:56 2012 (r240518) @@ -2679,7 +2679,7 @@ void scic_sds_request_initial_state_ente /** * This method implements the actions taken when entering the * SCI_BASE_REQUEST_STATE_CONSTRUCTED state. - * The method sets the state handlers for the the constructed state. + * The method sets the state handlers for the constructed state. * * @param[in] object The io request object that is to enter the constructed * state. Modified: head/sys/dev/isci/scil/scu_bios_definitions.h ============================================================================== --- head/sys/dev/isci/scil/scu_bios_definitions.h Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isci/scil/scu_bios_definitions.h Fri Sep 14 21:28:56 2012 (r240518) @@ -299,7 +299,7 @@ typedef struct SCI_BIOS_OEM_PARAM_ELEMEN } sas_address; /** - * These are the per PHY equalization settings associated with the the + * These are the per PHY equalization settings associated with the * AFE XCVR Tx Amplitude and Equalization Control Register Set * (0 thru 3). * @@ -496,7 +496,7 @@ typedef struct SCI_BIOS_OEM_PARAM_ELEMEN } sas_address; /** - * These are the per PHY equalization settings associated with the the + * These are the per PHY equalization settings associated with the * AFE XCVR Tx Amplitude and Equalization Control Register Set * (0 thru 3). * @@ -706,7 +706,7 @@ typedef struct SCI_BIOS_OEM_PARAM_ELEMEN } sas_address; /** - * These are the per PHY equalization settings associated with the the + * These are the per PHY equalization settings associated with the * AFE XCVR Tx Amplitude and Equalization Control Register Set * (0 thru 3). * @@ -927,7 +927,7 @@ typedef struct SCI_BIOS_OEM_PARAM_ELEMEN } sas_address; /** - * These are the per PHY equalization settings associated with the the + * These are the per PHY equalization settings associated with the * AFE XCVR Tx Amplitude and Equalization Control Register Set * (0 thru 3). * Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/isp/isp_freebsd.c Fri Sep 14 21:28:56 2012 (r240518) @@ -1889,7 +1889,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u * Mode 1, status, no data. Only possible when we are sending status, have * no data to transfer, and the sense length can fit in the ct7_entry. * - * Mode 2, status, no data. We have to use this in the case the the response + * Mode 2, status, no data. We have to use this in the case the response * length won't fit into a ct2_entry_t. * * We'll fill out this structure with information as if this were a Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/dev/mps/mps_sas.c Fri Sep 14 21:28:56 2012 (r240518) @@ -360,7 +360,7 @@ mpssas_remove_volume(struct mps_softc *s mps_printf(sc, "Reset aborted %u commands\n", reply->TerminationCount); mps_free_reply(sc, tm->cm_reply_data); - tm->cm_reply = NULL; /* Ensures the the reply won't get re-freed */ + tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */ mps_printf(sc, "clearing target %u handle 0x%04x\n", targ->tid, handle); @@ -550,7 +550,7 @@ mpssas_remove_device(struct mps_softc *s mps_dprint(sc, MPS_INFO, "Reset aborted %u commands\n", le32toh(reply->TerminationCount)); mps_free_reply(sc, tm->cm_reply_data); - tm->cm_reply = NULL; /* Ensures the the reply won't get re-freed */ + tm->cm_reply = NULL; /* Ensures the reply won't get re-freed */ /* Reuse the existing command */ req = (MPI2_SAS_IOUNIT_CONTROL_REQUEST *)tm->cm_req; Modified: head/sys/kern/subr_unit.c ============================================================================== --- head/sys/kern/subr_unit.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/kern/subr_unit.c Fri Sep 14 21:28:56 2012 (r240518) @@ -63,7 +63,7 @@ * in the usermode test program included, the worst case usage * was 798 bytes on i386 for 5000 allocated and 5000 free units. * * The worst case is where every other unit number is allocated and - * the the rest are free. In that case 44 + N/4 bytes are used where + * the rest are free. In that case 44 + N/4 bytes are used where * N is the number of the highest unit allocated. */ Modified: head/sys/sparc64/sparc64/ata_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/ata_machdep.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/sparc64/sparc64/ata_machdep.c Fri Sep 14 21:28:56 2012 (r240518) @@ -40,7 +40,7 @@ sparc64_ata_disk_firmware_geom_adjust(st * and sectors so the geometry of large disks has to be adjusted. * If the disk is > 32GB at 16 heads and 63 sectors, adjust to 255 * sectors (this matches what the OpenSolaris dad(7D) driver does). - * If the the disk is even > 128GB, additionally adjust the heads to + * If the disk is even > 128GB, additionally adjust the heads to * 255. This allows disks up to the 2TB limit of the extended VTOC8. * XXX the OpenSolaris dad(7D) driver limits the mediasize to 128GB. */ Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Sep 14 21:17:53 2012 (r240517) +++ head/sys/vm/vm_pageout.c Fri Sep 14 21:28:56 2012 (r240518) @@ -881,7 +881,7 @@ vm_pageout_scan(int pass) uma_reclaim(); /* - * The addl_page_shortage is the the number of temporarily + * The addl_page_shortage is the number of temporarily * stuck pages in the inactive queue. In other words, the * number of pages from cnt.v_inactive_count that should be * discounted in setting the target for the active queue scan. Modified: head/tools/kerneldoc/subsys/common-Doxyfile ============================================================================== --- head/tools/kerneldoc/subsys/common-Doxyfile Fri Sep 14 21:17:53 2012 (r240517) +++ head/tools/kerneldoc/subsys/common-Doxyfile Fri Sep 14 21:28:56 2012 (r240518) @@ -230,7 +230,7 @@ SEARCH_INCLUDES = YES INCLUDE_PATH = $(DOXYGEN_SRC_INCLUDE_PATH) \ . INCLUDE_FILE_PATTERNS = *.h -# __FreeBSD__ is normally defined to the the major version number of +# __FreeBSD__ is normally defined to the major version number of # FreeBSD. In the kernel source it is just checked if it is defined, and # __FreeBSD_version is used for version dependend code. # To make live simple on major version bumps, just define __FreeBSD__ to 1. Modified: head/usr.bin/lex/NEWS ============================================================================== --- head/usr.bin/lex/NEWS Fri Sep 14 21:17:53 2012 (r240517) +++ head/usr.bin/lex/NEWS Fri Sep 14 21:28:56 2012 (r240518) @@ -615,7 +615,7 @@ Changes between release 2.4.3 (03Dec93) sources. One side-effect of this change is that -+ and -CF are now incompatible. - - libfl.a now supplies private versions of the the / + - libfl.a now supplies private versions of the / string routines needed by flex and the scanners it generates, to enhance portability to some BSD systems. Modified: head/usr.sbin/bsdconfig/networking/include/media.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/include/media.subr Fri Sep 14 21:17:53 2012 (r240517) +++ head/usr.sbin/bsdconfig/networking/include/media.subr Fri Sep 14 21:28:56 2012 (r240518) @@ -56,7 +56,7 @@ f_ifconfig_options() set -- $( f_sysrc_get ifconfig_$interface ) # - # Return if the the interface is configured for DHCP + # Return if the interface is configured for DHCP # glob="[Dd][Hh][Cc][Pp]" case "$*" in Modified: head/usr.sbin/tcpdump/tcpdump/tcpdump.1 ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Fri Sep 14 21:17:53 2012 (r240517) +++ head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Fri Sep 14 21:28:56 2012 (r240518) @@ -1436,11 +1436,11 @@ not be useful to people who are not fami AFS and RX. .LP If the -v (verbose) flag is given twice, acknowledgement packets and -additional header information is printed, such as the the RX call ID, +additional header information is printed, such as the RX call ID, call number, sequence number, serial number, and the RX packet flags. .LP If the -v flag is given twice, additional information is printed, -such as the the RX call ID, serial number, and the RX packet flags. +such as the RX call ID, serial number, and the RX packet flags. The MTU negotiation information is also printed from RX ack packets. .LP If the -v flag is given three times, the security index and service id From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 21:36:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EA70106566B; Fri, 14 Sep 2012 21:36:02 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB11A8FC12; Fri, 14 Sep 2012 21:36:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ELa1T4013616; Fri, 14 Sep 2012 21:36:01 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ELa1uU013594; Fri, 14 Sep 2012 21:36:01 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201209142136.q8ELa1uU013594@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 14 Sep 2012 21:36: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: r240519 - in head/release/doc/fr_FR.ISO8859-1: early-adopter errata hardware/alpha hardware/common hardware/i386 hardware/ia64 hardware/pc98 hardware/sparc64 installation/alpha installa... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 21:36:02 -0000 Author: gabor Date: Fri Sep 14 21:36:01 2012 New Revision: 240519 URL: http://svn.freebsd.org/changeset/base/240519 Log: - Fix build of French release notes with the XMLified doc tree Modified: head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml head/release/doc/fr_FR.ISO8859-1/errata/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml Modified: head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,3 +1,14 @@ + + +%entities; + +%release; + +X"> +X"> +]> + - -%man; - - -%freebsd; - - -%authors; - - -%teams; - - -%mailing-lists; - - -%release; -X"> -X"> - -]>
Modified: head/release/doc/fr_FR.ISO8859-1/errata/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/errata/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/errata/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,3 +1,11 @@ + + +%entities; + +%release; +]> + - -%man; - -%authors; - -%mlists; - -%release; -]> -
Modified: head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,31 +1,26 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + +
&artheader; §.intro; Modified: head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -833,7 +833,7 @@ Carte RAID ATA Promise SuperTrak SX6000 - + Cartes LSI Logic Fusion/MP architecture Fiber Channel (gestionnaire mpt) @@ -857,6 +857,7 @@ Tekram DC315U + Sur toutes les cartes SCSI supportées, le support total @@ -1375,7 +1376,7 @@ NetGear FA310-TX Rev. D1 - Cartes Macronix 98713, 98713A, 98715, @@ -1747,7 +1748,7 @@ ELECOM LD-PCI2T, LD-PCITS (PCI) - Corega FastEther PCI-TX (PCI) + Corega FastEther PCI-TX (PCI) Modified: head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,31 +1,26 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + +
&artheader; §.intro; Modified: head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,30 +1,26 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + +
&artheader; Modified: head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,30 +1,26 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + +
&artheader; §.intro; Modified: head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,22 +1,10 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections @@ -27,6 +15,15 @@ ]> + +
&artheader; §.intro; Modified: head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,20 +1,7 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -23,9 +10,17 @@ - ]> + +
&artheader; &abstract; Modified: head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -31,7 +31,7 @@ from {alpha,i386}/INSTALL.TXT. Si vous effectuez une mise à jour depuis une version précedente de &os;, référez vous aux, , instructions sur la mise à jour. + linkend="upgrading"/>, instructions sur la mise à jour. Pour commencer @@ -61,7 +61,7 @@ from {alpha,i386}/INSTALL.TXT. l'installation. Si vous avez des problèmes, voyez la , qui contient certaines informations + linkend="trouble"/>, qui contient certaines informations interessantes. Vous pouvez aussi lire une copie à jour du fichier ERRATA.TXT avant l'installation, qui vous alertera sur les problèmes rencontrés depuis la mise @@ -76,6 +76,7 @@ from {alpha,i386}/INSTALL.TXT. que vous n'avez pas effectué une sauvegarde de vos données importantes. + Matériel Nécessaire @@ -216,7 +217,7 @@ from {alpha,i386}/INSTALL.TXT. depuis le répertoire floppies/. En utilisant le script makeflp.bat depuis DOS ou en lisant la - pour plus d'informations sur la + pour plus d'informations sur la création de disquettes de démarrage sous différents systèmes. Vous démarrerez depuis la première disquette et vous vous trouverez rapidement @@ -233,11 +234,11 @@ from {alpha,i386}/INSTALL.TXT. depuis les fichiers floppies/kern.flp et floppies/mfsroot.flp en suivant les instructions que vous trouverez à la - . Redémarrez votre ordinateur en utilisant + . Redémarrez votre ordinateur en utilisant la disquette kern.flp et lorsqu'on vous le demande, inserez alors la disquette mfsroot.flp. Allez à la pour plus d'information sur l'installation + linkend="ftpnfs"/> pour plus d'information sur l'installation via FTP ou NFS. La façon la plus simple d'effectuer @@ -256,7 +257,7 @@ from {alpha,i386}/INSTALL.TXT. de &os; depuis les fichiers floppies/kern.flp et floppies/mfsroot.flp en suivant les instructions que vous trouverez à la . Depuis l'invite de console SRM + linkend="floppies"/>. Depuis l'invite de console SRM (>>>), inserez la disquette kern.flp et tapez la commande suivante pour démarrer l'installation: @@ -346,7 +347,7 @@ pqb0.0.1.4.0 PQB0 Installation depuis un CDROM réseau Si vous désirez installer depuis un lecteur de CDROM - local voyez la . Si vous ne + local voyez la . Si vous ne disposez pas d'un lecteur de CDROM sur votre système et que vous désirez utiliser une distribution CD de &os; dans le lecteur CDROM d'une autre machine que vous pouvez accéder via @@ -411,9 +412,9 @@ pqb0.0.1.4.0 PQB0 quelques disquettes pour l'installation. Premièrement, créez vos disquettes de démarrage - comme indiqué à la . + comme indiqué à la . - Deuxièemement, lisez la et + Deuxièemement, lisez la et faites attention à la section Format de la distribution qui décrit quels fichiers vous devez copier sur disquette et ceux que vous pouvez ne pas copier. @@ -514,7 +515,7 @@ pqb0.0.1.4.0 PQB0 tout simplement en format tar sur la bande, donc après avoir récupérer l'ensemble des fichiers des distributions nécessaires, utilisez simplement la commande &man.tar.1; pour - les mettre sur la bande, comme cela :/ + les mettre sur la bande, comme cela : &prompt.root; cd /where/you/have/your/dists &prompt.root; tar cvf /dev/rsa0 dist1 .. dist2 @@ -537,7 +538,7 @@ pqb0.0.1.4.0 PQB0 Ensuite créez une disquette de démarrage comme - indiqué à la et procédez + indiqué à la et procédez à l'installation. @@ -739,6 +740,7 @@ pqb0.0.1.4.0 PQB0 correspond au numéro du port du serveur FTP proxy. + @@ -766,7 +768,7 @@ pqb0.0.1.4.0 PQB0 Si vous n'obtenez aucun caractère sur votre console série, branchez le clavier et attendez des sonneries. Si vous démarrez depuis le CDROM, allez à aussi vite que possible. + linkend="hitspace"/> aussi vite que possible. Pour une installation via des disquettes, la première Modified: head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -27,7 +27,7 @@ README.HTM cdrom.inf crypto FTP ou NFS, depuis ce répertoire, la seule chose nécesaire est de créer les disquettes 1.44Mb bootables depuis les fichiers se trouvant dans le répertoire floppies - (voir pour les instructions sur la façon + (voir pour les instructions sur la façon de procéder), de démarrer grace à elles et de suivre les instructions. Le reste des données nécessaires a l'installation serontchargées @@ -58,7 +58,7 @@ README.HTM cdrom.inf crypto docbook.css est un fichier de style(CSS) utilisé par certains browsers WWW pour formatter - la documentation HTML. + la documentation HTML. Les répertoire bin, @@ -94,7 +94,7 @@ README.HTM cdrom.inf crypto Le sous-répertoire floppies/ contient les images de la disquette d'installation. Plus d'informations sur son utilisation dans . + linkend="floppies"/>. Modified: head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -349,7 +349,7 @@ boot: the machine (turn off and on). At the Boot: prompt specify the . This will invoke UserConfig (see - above). + above). Use the disable command to disable the device probes for all devices at address 0x300 except the ep0 driver. On exit, your machine Modified: head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -210,6 +210,6 @@ /usr/src/UPDATING contains important information on updating a &os; system from source code. It lists various issues resulting from changes in &os; that may affect an - upgrade. + upgrade. Modified: head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,20 +1,7 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -23,9 +10,17 @@ - ]> + +
&artheader; &abstract; Modified: head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,19 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -22,9 +10,17 @@ - ]> + +
&artheader; &abstract; Modified: head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,22 +1,7 @@ - - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -28,6 +13,15 @@ ]> + +
&artheader; Modified: head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -90,8 +90,8 @@ Ethernet address 0:3:ba:b:92:d4, Host ID - - + + ok @@ -126,8 +126,8 @@ Ethernet address 0:3:ba:b:92:d4, Host ID cdrom. The system should boot into single-user mode now, and you can create the disk label and install the base system archive as described in and . + linkend="creating-disk-label"/> and . @@ -302,7 +302,7 @@ Ethernet address 0:3:ba:b:92:d4, Host ID With the daemons on the netboot server configured, the next step is to copy the kernel (obtained during the steps of - ) to an appropriate directory. + ) to an appropriate directory. There are two ways of retrieving a kernel over the network: TFTP and NFS. (You specified one of these two alternatives by picking a loader.) @@ -362,7 +362,7 @@ Ethernet address 0:3:ba:b:92:d4, Host ID If all goes well, you can now boot the &os; on your &arch; machine by dropping into the PROM prompt as described in . Now, just type + linkend="getting-to-prom-prompt"/>. Now, just type boot net and the system should boot. Specifically, the loader is retrieved via TFTP, it then does a BOOTP request and will proceed to load the kernel (either @@ -519,7 +519,7 @@ drivedata: 0 To create filesystems and to install the base system, boot from CDROM or via NFS and create a disk label as described in - . + . When booting the first time and you have not entered your root partition into /etc/fstab yet, you may Modified: head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,20 +1,7 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -23,9 +10,17 @@ - ]> + +
&art;
Modified: head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1784,7 +1784,7 @@ sont présentes sur liste les modifications + liste les modifications dans les programmes utilisateurs de la couche KAME IPv6 . &merged;
@@ -1813,7 +1813,7 @@ sont présentes sur @@ -2475,7 +2475,7 @@ sont présentes sur - La taille des blocs et des fragments + La taille des blocs et des fragments lors de la création de systèmes de fichiers par &man.newfs.8; sont respectivement de 16384 bytes et 2048 bytes (les anciennes valeurs étaient de 8192 bytes et 1024 bytes). Ce changement augmente la performance @@ -3252,7 +3252,7 @@ sont présentes sur liste les modifications + liste les modifications dans le noyau de la couche KAME IPv6 . &merged; &man.faithd.8; dispose d'un fichier de configuration de liste de Modified: head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml ============================================================================== --- head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml Fri Sep 14 21:28:56 2012 (r240518) +++ head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml Fri Sep 14 21:36:01 2012 (r240519) @@ -1,19 +1,7 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; %sections; @@ -22,9 +10,17 @@ - ]> + +
&art;
From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 21:59:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AE45106566B; Fri, 14 Sep 2012 21:59:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5098FC12; Fri, 14 Sep 2012 21:59:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ELxuki017402; Fri, 14 Sep 2012 21:59:56 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ELxuO4017397; Fri, 14 Sep 2012 21:59:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209142159.q8ELxuO4017397@svn.freebsd.org> From: Eitan Adler Date: Fri, 14 Sep 2012 21:59: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: r240520 - in head/sys: dev/isci/scil dev/vxge/include i386/include/xen netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 21:59:56 -0000 Author: eadler Date: Fri Sep 14 21:59:55 2012 New Revision: 240520 URL: http://svn.freebsd.org/changeset/base/240520 Log: s/teh/the/g Approved by: cperciva MFC after: 3 days Modified: head/sys/dev/isci/scil/scic_io_request.h head/sys/dev/vxge/include/vxgehal-ll.h head/sys/i386/include/xen/xen-os.h head/sys/netinet/sctp_input.c Modified: head/sys/dev/isci/scil/scic_io_request.h ============================================================================== --- head/sys/dev/isci/scil/scic_io_request.h Fri Sep 14 21:36:01 2012 (r240519) +++ head/sys/dev/isci/scil/scic_io_request.h Fri Sep 14 21:59:55 2012 (r240520) @@ -706,7 +706,7 @@ void * scic_stp_io_request_get_h2d_reg_a * @brief This method will return the address of the device to host register * fis region for the io request object. * - * @param[in] scic_io_request This parameter specifies teh handle to the io + * @param[in] scic_io_request This parameter specifies the handle to the io * request object from which to get the device to host register fis * buffer. * Modified: head/sys/dev/vxge/include/vxgehal-ll.h ============================================================================== --- head/sys/dev/vxge/include/vxgehal-ll.h Fri Sep 14 21:36:01 2012 (r240519) +++ head/sys/dev/vxge/include/vxgehal-ll.h Fri Sep 14 21:59:55 2012 (r240520) @@ -3095,7 +3095,7 @@ typedef struct vxge_hal_device_pmd_info_ * @mac_addr_masks: Mac address masks for each vpath * * Returns the vpath mask that has the bits set for each vpath allocated - * for the driver and teh first mac addresse for each vpath + * for the driver and the first mac addresse for each vpath */ typedef struct vxge_hal_device_hw_info_t { u32 host_type; Modified: head/sys/i386/include/xen/xen-os.h ============================================================================== --- head/sys/i386/include/xen/xen-os.h Fri Sep 14 21:36:01 2012 (r240519) +++ head/sys/i386/include/xen/xen-os.h Fri Sep 14 21:59:55 2012 (r240520) @@ -99,7 +99,7 @@ void trap_init(void); /* * STI/CLI equivalents. These basically set and clear the virtual - * event_enable flag in teh shared_info structure. Note that when + * event_enable flag in the shared_info structure. Note that when * the enable bit is set, there may be pending events to be handled. * We may therefore call into do_hypervisor_callback() directly. */ Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Sep 14 21:36:01 2012 (r240519) +++ head/sys/netinet/sctp_input.c Fri Sep 14 21:59:55 2012 (r240520) @@ -3122,7 +3122,7 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun { /* * Here we get a CWR from the peer. We must look in the outqueue and - * make sure that we have a covered ECNE in teh control chunk part. + * make sure that we have a covered ECNE in the control chunk part. * If so remove it. */ struct sctp_tmit_chunk *chk; From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 22:00:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6BFE1065764; Fri, 14 Sep 2012 22:00:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD8F8FC12; Fri, 14 Sep 2012 22:00:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EM03aJ017476; Fri, 14 Sep 2012 22:00:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EM03Yk017472; Fri, 14 Sep 2012 22:00:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209142200.q8EM03Yk017472@svn.freebsd.org> From: Eitan Adler Date: Fri, 14 Sep 2012 22:00: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: r240521 - in head/sys: cam/scsi dev/isci/scil dev/xen/netback libkern net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 22:00:05 -0000 Author: eadler Date: Fri Sep 14 22:00:03 2012 New Revision: 240521 URL: http://svn.freebsd.org/changeset/base/240521 Log: s/ is is / is /g s/ a a / a /g Approved by: cperciva MFC after: 3 days Modified: head/sys/cam/scsi/scsi_enc.c head/sys/dev/isci/scil/scic_sds_remote_device.h head/sys/dev/xen/netback/netback_unit_tests.c head/sys/libkern/jenkins_hash.c head/sys/net80211/ieee80211_mesh.c Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Fri Sep 14 21:59:55 2012 (r240520) +++ head/sys/cam/scsi/scsi_enc.c Fri Sep 14 22:00:03 2012 (r240521) @@ -627,7 +627,7 @@ enc_log(struct enc_softc *enc, const cha /* * Is this a device that supports enclosure services? * - * It's a a pretty simple ruleset- if it is device type + * It's a pretty simple ruleset- if it is device type * 0x0D (13), it's an ENCLOSURE device. */ Modified: head/sys/dev/isci/scil/scic_sds_remote_device.h ============================================================================== --- head/sys/dev/isci/scil/scic_sds_remote_device.h Fri Sep 14 21:59:55 2012 (r240520) +++ head/sys/dev/isci/scil/scic_sds_remote_device.h Fri Sep 14 22:00:03 2012 (r240521) @@ -121,7 +121,7 @@ enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SU { /** * This is the idle substate for the stp remote device. When there are no - * active IO for the device it is is in this state. + * active IO for the device it is in this state. */ SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE, Modified: head/sys/dev/xen/netback/netback_unit_tests.c ============================================================================== --- head/sys/dev/xen/netback/netback_unit_tests.c Fri Sep 14 21:59:55 2012 (r240520) +++ head/sys/dev/xen/netback/netback_unit_tests.c Fri Sep 14 22:00:03 2012 (r240521) @@ -1478,7 +1478,7 @@ xnb_mbufc2pkt_1cluster(char *buffer, siz safe_m_freem(&mbuf); } -/** xnb_mbufc2pkt on a a two-mbuf chain with short data regions */ +/** xnb_mbufc2pkt on a two-mbuf chain with short data regions */ static void xnb_mbufc2pkt_2short(char *buffer, size_t buflen) { struct xnb_pkt pkt; @@ -1521,7 +1521,7 @@ xnb_mbufc2pkt_2short(char *buffer, size_ safe_m_freem(&mbufc2); } -/** xnb_mbufc2pkt on a a mbuf chain with >1 mbuf cluster */ +/** xnb_mbufc2pkt on a mbuf chain with >1 mbuf cluster */ static void xnb_mbufc2pkt_long(char *buffer, size_t buflen) { struct xnb_pkt pkt; @@ -1560,7 +1560,7 @@ xnb_mbufc2pkt_long(char *buffer, size_t safe_m_freem(&mbufc); } -/** xnb_mbufc2pkt on a a mbuf chain with >1 mbuf cluster and extra info */ +/** xnb_mbufc2pkt on a mbuf chain with >1 mbuf cluster and extra info */ static void xnb_mbufc2pkt_extra(char *buffer, size_t buflen) { struct xnb_pkt pkt; Modified: head/sys/libkern/jenkins_hash.c ============================================================================== --- head/sys/libkern/jenkins_hash.c Fri Sep 14 21:59:55 2012 (r240520) +++ head/sys/libkern/jenkins_hash.c Fri Sep 14 22:00:03 2012 (r240521) @@ -17,7 +17,7 @@ if SELF_TEST is defined. You can use th the public domain. It has no warranty. You probably want to use hashlittle(). hashlittle() and hashbig() -hash byte arrays. hashlittle() is is faster than hashbig() on +hash byte arrays. hashlittle() is faster than hashbig() on little-endian machines. Intel and AMD are little-endian machines. On second thought, you probably want hashlittle2(), which is identical to hashlittle() except it returns two 32-bit hashes for the price of one. Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Fri Sep 14 21:59:55 2012 (r240520) +++ head/sys/net80211/ieee80211_mesh.c Fri Sep 14 22:00:03 2012 (r240521) @@ -1178,7 +1178,7 @@ mesh_recv_indiv_data_to_fwrd(struct ieee /* * Verifies transmitter, updates lifetime, precursor list and process data - * locally, if data is is proxy with AE = 10 it could mean data should go + * locally, if data is proxy with AE = 10 it could mean data should go * on another mesh path or data should be forwarded to the DS. * * > 0 means we have forwarded data and no need to process locally From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 22:05:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D22106566B; Fri, 14 Sep 2012 22:05:10 +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 E88F98FC16; Fri, 14 Sep 2012 22:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EM59GC018305; Fri, 14 Sep 2012 22:05:09 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EM59RI018303; Fri, 14 Sep 2012 22:05:09 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209142205.q8EM59RI018303@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 14 Sep 2012 22:05: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: r240522 - head/share/man/man3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 22:05:10 -0000 Author: jilles Date: Fri Sep 14 22:05:09 2012 New Revision: 240522 URL: http://svn.freebsd.org/changeset/base/240522 Log: siginfo(3): Document SI_USER and SI_KERNEL signal codes. MFC after: 1 week Modified: head/share/man/man3/siginfo.3 Modified: head/share/man/man3/siginfo.3 ============================================================================== --- head/share/man/man3/siginfo.3 Fri Sep 14 22:00:03 2012 (r240521) +++ head/share/man/man3/siginfo.3 Fri Sep 14 22:05:09 2012 (r240522) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2005 +.Dd September 14, 2012 .Dt SIGINFO 3 .Os .Sh NAME @@ -195,6 +195,8 @@ signal generated by expiration of a time signal generated by completion of an asynchronous I/O request .It Ta Dv SI_MESGQ Ta signal generated by arrival of a message on an empty message queue +.It Ta Dv SI_KERNEL Ta +signal generated by miscellaneous parts of the kernel .El .Pp In addition, the following signal-specific information is available: @@ -235,6 +237,10 @@ or Finally, the following code-specific information is available: .Bl -column ".Dv SI_QUEUE" ".Va si_overrun" .It Sy "Code Member Value" +.It Dv SI_USER Ta Va si_pid Ta +the process ID that sent the signal +.It Ta Va si_uid Ta +real user ID of the process that sent the signal .It Dv SI_QUEUE Ta Va si_value Ta the value passed to .Xr sigqueue 2 @@ -277,6 +283,14 @@ signal is queued when a process changed .Tn POSIX Realtime Extensions like aio, timer, and message queue also queue signals. +Signals with code +.Dv SI_USER +or +.Dv SI_KERNEL +are only queued if there are sufficient resources; +otherwise, +.Dv SI_NOINFO +results. For some hardware architectures, the exact value of .Va si_addr might not be available. @@ -289,7 +303,8 @@ might not be available. .Xr sigwaitinfo 2 , .Xr timer_create 2 , .Xr timer_settime 2 , -.Xr waitpid 2 +.Xr waitpid 2 , +.Xr pthread_kill 3 .Sh STANDARDS The .Vt siginfo_t @@ -300,6 +315,12 @@ Full support for .Tn POSIX signal information first appeared in .Fx 7.0 . +The codes +.Dv SI_USER +and +.Dv SI_KERNEL +can be generated as of +.Fx 8.1 . .Sh AUTHORS This manual page was written by .An "David Xu" Aq davidxu@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 22:10:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EBA2106566B; Fri, 14 Sep 2012 22:10:02 +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 553F98FC0C; Fri, 14 Sep 2012 22:10:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EMA2X8019131; Fri, 14 Sep 2012 22:10:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EMA2Oc019130; Fri, 14 Sep 2012 22:10:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209142210.q8EMA2Oc019130@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 14 Sep 2012 22:10: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: r240523 - head/share/man/man3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 22:10:02 -0000 Author: jilles Date: Fri Sep 14 22:10:01 2012 New Revision: 240523 URL: http://svn.freebsd.org/changeset/base/240523 Log: siginfo(3): Document SI_LWP signal code. Describe SI_LWP as being generated by pthread_kill() because thr_kill() is a private undocumented function. MFC after: 1 week Modified: head/share/man/man3/siginfo.3 Modified: head/share/man/man3/siginfo.3 ============================================================================== --- head/share/man/man3/siginfo.3 Fri Sep 14 22:05:09 2012 (r240522) +++ head/share/man/man3/siginfo.3 Fri Sep 14 22:10:01 2012 (r240523) @@ -197,6 +197,9 @@ signal generated by completion of an asy signal generated by arrival of a message on an empty message queue .It Ta Dv SI_KERNEL Ta signal generated by miscellaneous parts of the kernel +.It Ta Dv SI_LWP Ta +signal sent by +.Xr pthread_kill 3 .El .Pp In addition, the following signal-specific information is available: @@ -273,6 +276,10 @@ the value passed to system call .It Ta Va si_mqd Ta the ID of the message queue which generated the signal +.It Dv SI_LWP Ta Va si_pid Ta +the process ID that sent the signal +.It Ta Va si_uid Ta +real user ID of the process that sent the signal .El .Sh NOTES Currently, the kernel never generates the @@ -284,9 +291,10 @@ signal is queued when a process changed Realtime Extensions like aio, timer, and message queue also queue signals. Signals with code -.Dv SI_USER -or +.Dv SI_USER , .Dv SI_KERNEL +or +.Dv SI_LWP are only queued if there are sufficient resources; otherwise, .Dv SI_NOINFO @@ -321,6 +329,10 @@ and .Dv SI_KERNEL can be generated as of .Fx 8.1 . +The code +.Dv SI_LWP +can be generated as of +.Fx 9.0 . .Sh AUTHORS This manual page was written by .An "David Xu" Aq davidxu@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 22:12:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08A1F106564A; Fri, 14 Sep 2012 22:12:05 +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 E88DE8FC19; Fri, 14 Sep 2012 22:12:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8EMC4YD019458; Fri, 14 Sep 2012 22:12:04 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8EMC4CU019456; Fri, 14 Sep 2012 22:12:04 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209142212.q8EMC4CU019456@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 14 Sep 2012 22:12: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: r240524 - head/share/man/man3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 22:12:05 -0000 Author: jilles Date: Fri Sep 14 22:12:04 2012 New Revision: 240524 URL: http://svn.freebsd.org/changeset/base/240524 Log: siginfo(3): Document TRAP_DTRACE signal code. MFC after: 1 week Modified: head/share/man/man3/siginfo.3 Modified: head/share/man/man3/siginfo.3 ============================================================================== --- head/share/man/man3/siginfo.3 Fri Sep 14 22:10:01 2012 (r240523) +++ head/share/man/man3/siginfo.3 Fri Sep 14 22:12:04 2012 (r240524) @@ -154,6 +154,8 @@ object-specific hardware error process breakpoint .It Ta Dv TRAP_TRACE Ta process trace trap +.It Ta Dv TRAP_DTRACE Ta +DTrace induced trap .It Dv SIGCHLD Ta Dv CLD_EXITED Ta child has exited .It Ta Dv CLD_KILLED Ta From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 22:36:36 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FA7A1065672; Fri, 14 Sep 2012 22:36:36 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id 976968FC12; Fri, 14 Sep 2012 22:36:35 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id F33FF12013D; Sat, 15 Sep 2012 00:36:31 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id DB7E22847B; Sat, 15 Sep 2012 00:36:31 +0200 (CEST) Date: Sat, 15 Sep 2012 00:36:31 +0200 From: Jilles Tjoelker To: "Simon J. Gerraty" Message-ID: <20120914223631.GD13027@stack.nl> References: <201207180557.q6I5vheM034018@svn.freebsd.org> <20120726084903.GA48240@lo0.su> <20120821053519.BD5A158085@chaos.jnpr.net> <20120821222943.GA27203@stack.nl> <20120821232553.35D4F58085@chaos.jnpr.net> <20120822223002.GA41104@stack.nl> <20120823003603.9B58458088@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120823003603.9B58458088@chaos.jnpr.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov , "David E. O'Brien" Subject: Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 22:36:36 -0000 On Wed, Aug 22, 2012 at 05:36:03PM -0700, Simon J. Gerraty wrote: > > On Thu, 23 Aug 2012 00:30:02 +0200, Jilles Tjoelker writes: > >I think the most important reason is to reduce special cases. The POSIX > >developers did not want to create a second subset of utilities that are > >not available via execve() (the first subset is the special builtins). > >The burden on implementations is very low (see src/usr.bin/alias), and > >there are some possible use cases: > The burden may be low, but so is the functionality ;-) > 'cd' makes little sense in a child process. > >'cd' will fail if the directory does not exist. > so will 'test -d', and without giving the false impression that > something useful will result if the directory does exist. > >If it avoids the need to add semicolons for mysterious reasons, that may > >be enough reason. > I think everyone agrees that re-writing the target to remove the > spurious 'cd' would have been better. > That aside, I would disagree, at least for the case of 'cd'. > It is only the fact that there is probably no way to construct a harmful > example that did not involve a shell meta char (hence rendering the > existance of /usr/bin/cd irrelevant). 'cd /tmp/dir && rm -rf *' > would be rather dangerous if the && (or ;) didn't trigger use of a > shell, and since as previously noted just 'cd /tmp/dir' is pretty > pointless, the functionality is very low. > In over 25 years of writing makefiles, I don't recall seeing this before. OK, but then you should document the conditions when shell builtins are or are not allowed. POSIX make command lines are executed as if by the shell, and if the make implementation wants to optimize by not executing sh for every command line, the burden is on it to make it behave the same. The bmake (NetBSD make) man page gives the same impression. It does not mention the optimization of bypassing the shell at all. The FreeBSD make man page mentions the optimization implicitly when it describes the meta and builtins keys of the .SHELL special target but still gives the impression that these are correct (which they mostly are, but not entirely). -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 23:47:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59C391065677; Fri, 14 Sep 2012 23:47:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 017A98FC21; Fri, 14 Sep 2012 23:47:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8ENlNci034953; Fri, 14 Sep 2012 23:47:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8ENlN7N034951; Fri, 14 Sep 2012 23:47:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209142347.q8ENlN7N034951@svn.freebsd.org> From: Eitan Adler Date: Fri, 14 Sep 2012 23:47: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: r240527 - head/bin/df X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 23:47:24 -0000 Author: eadler Date: Fri Sep 14 23:47:23 2012 New Revision: 240527 URL: http://svn.freebsd.org/changeset/base/240527 Log: Free memory before exiting in order to help tools understand that we're not leaking it. PR: bin/171634 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/bin/df/df.c Modified: head/bin/df/df.c ============================================================================== --- head/bin/df/df.c Fri Sep 14 22:53:47 2012 (r240526) +++ head/bin/df/df.c Fri Sep 14 23:47:23 2012 (r240527) @@ -290,6 +290,7 @@ main(int argc, char *argv[]) prtstat(&mntbuf[i], &maxwidths); if (cflag) prtstat(&totalbuf, &maxwidths); + free(mntbuf); return (rv); } From owner-svn-src-head@FreeBSD.ORG Fri Sep 14 23:49:20 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3673D106566B; Fri, 14 Sep 2012 23:49:20 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og101.obsmtp.com (exprod7og101.obsmtp.com [64.18.2.155]) by mx1.freebsd.org (Postfix) with ESMTP id 716488FC0A; Fri, 14 Sep 2012 23:49:17 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob101.postini.com ([64.18.6.12]) with SMTP ID DSNKUFPCfNvUWwOCqJj13rm7vZ6dOtyCoMAC@postini.com; Fri, 14 Sep 2012 16:49:19 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Fri, 14 Sep 2012 16:36:52 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q8ENaqh40265; Fri, 14 Sep 2012 16:36:52 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 10A8058091; Fri, 14 Sep 2012 16:36:52 -0700 (PDT) To: Jilles Tjoelker In-Reply-To: <20120914223631.GD13027@stack.nl> References: <201207180557.q6I5vheM034018@svn.freebsd.org> <20120726084903.GA48240@lo0.su> <20120821053519.BD5A158085@chaos.jnpr.net> <20120821222943.GA27203@stack.nl> <20120821232553.35D4F58085@chaos.jnpr.net> <20120822223002.GA41104@stack.nl> <20120823003603.9B58458088@chaos.jnpr.net> <20120914223631.GD13027@stack.nl> Comments: In-reply-to: Jilles Tjoelker message dated "Sat, 15 Sep 2012 00:36:31 +0200." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Fri, 14 Sep 2012 16:36:52 -0700 Message-ID: <20120914233652.10A8058091@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov , "David E. O'Brien" Subject: Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2012 23:49:20 -0000 On Sat, 15 Sep 2012 00:36:31 +0200, Jilles Tjoelker writes: >POSIX make command lines are executed as if by the shell, and if the >make implementation wants to optimize by not executing sh for every >command line, the burden is on it to make it behave the same. IIRC the man page mentions the exception, putting something similar in NetBSDs man page would seem a good idea. Will do so. From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 16:24:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950A7106567A; Sat, 15 Sep 2012 16:24:04 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80A5B8FC0C; Sat, 15 Sep 2012 16:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8FGO4gY085376; Sat, 15 Sep 2012 16:24:04 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8FGO4BC085374; Sat, 15 Sep 2012 16:24:04 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201209151624.q8FGO4BC085374@svn.freebsd.org> From: Isabell Long Date: Sat, 15 Sep 2012 16:24: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: r240530 - head/usr.sbin/adduser X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 16:24:04 -0000 Author: issyl0 (doc committer) Date: Sat Sep 15 16:24:03 2012 New Revision: 240530 URL: http://svn.freebsd.org/changeset/base/240530 Log: Remove a reference to CVS and to freefall from a user-facing man page. PR: docs/171658 Reported by: Chris Petrik (c dot petrik dot sosa at gmail dot com) Approved by: gabor (mentor) MFC after: 5 days Modified: head/usr.sbin/adduser/adduser.8 Modified: head/usr.sbin/adduser/adduser.8 ============================================================================== --- head/usr.sbin/adduser/adduser.8 Sat Sep 15 02:58:02 2012 (r240529) +++ head/usr.sbin/adduser/adduser.8 Sat Sep 15 16:24:03 2012 (r240530) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2008 +.Dd September 15, 2012 .Dt ADDUSER 8 .Os .Sh NAME @@ -129,9 +129,8 @@ they can safely run with a umask of 002 and create files in their home directory without worrying about others being able to change them. .Pp -For a shared area you create a separate UID/GID (like cvs or ncvs on freefall), -you place each person that should be able to access this area into that new -group. +For a shared area you create a separate UID/GID, you place each person +that should be able to access this area into that new group. .Pp This model of UID/GID administration allows far greater flexibility than lumping users into groups and having to muck with the umask when working in a shared From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 17:02:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86992106564A; Sat, 15 Sep 2012 17:02:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 716B88FC0A; Sat, 15 Sep 2012 17:02:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8FH26JO091459; Sat, 15 Sep 2012 17:02:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8FH26Aw091457; Sat, 15 Sep 2012 17:02:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209151702.q8FH26Aw091457@svn.freebsd.org> From: Dimitry Andric Date: Sat, 15 Sep 2012 17:02: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: r240531 - head/contrib/llvm/lib/Target/X86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 17:02:06 -0000 Author: dim Date: Sat Sep 15 17:02:05 2012 New Revision: 240531 URL: http://svn.freebsd.org/changeset/base/240531 Log: Pull in r163967 from upstream llvm trunk: X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe fp math. This should make clang emit calls to libm for sinf/cosf by default. MFC after: 1 week Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sat Sep 15 16:24:03 2012 (r240530) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sat Sep 15 17:02:05 2012 (r240531) @@ -643,7 +643,9 @@ X86TargetLowering::X86TargetLowering(X86 setOperationAction(ISD::FCOPYSIGN, MVT::f32, Expand); if (!TM.Options.UnsafeFPMath) { + setOperationAction(ISD::FSIN , MVT::f32 , Expand); setOperationAction(ISD::FSIN , MVT::f64 , Expand); + setOperationAction(ISD::FCOS , MVT::f32 , Expand); setOperationAction(ISD::FCOS , MVT::f64 , Expand); } addLegalFPImmediate(APFloat(+0.0)); // FLD0 From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 17:32:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CC41106564A; Sat, 15 Sep 2012 17:32:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87EFD8FC14; Sat, 15 Sep 2012 17:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8FHWKkd096365; Sat, 15 Sep 2012 17:32:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8FHWKVr096363; Sat, 15 Sep 2012 17:32:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209151732.q8FHWKVr096363@svn.freebsd.org> From: Alan Cox Date: Sat, 15 Sep 2012 17:32: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: r240532 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 17:32:20 -0000 Author: alc Date: Sat Sep 15 17:32:19 2012 New Revision: 240532 URL: http://svn.freebsd.org/changeset/base/240532 Log: Eliminate an unused malloc type. Modified: head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sat Sep 15 17:02:05 2012 (r240531) +++ head/sys/arm/arm/vm_machdep.c Sat Sep 15 17:32:19 2012 (r240532) @@ -537,8 +537,6 @@ extern uma_zone_t l2zone; struct mtx smallalloc_mtx; -static MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); - vm_offset_t alloc_firstaddr; #ifdef ARM_HAVE_SUPERSECTIONS From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 19:28:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C4741065672; Sat, 15 Sep 2012 19:28:55 +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 3D6708FC0C; Sat, 15 Sep 2012 19:28:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8FJSt1O016323; Sat, 15 Sep 2012 19:28:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8FJSs1p016318; Sat, 15 Sep 2012 19:28:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201209151928.q8FJSs1p016318@svn.freebsd.org> From: Ed Schouten Date: Sat, 15 Sep 2012 19:28: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: r240539 - in head/sys: dev/drm2 dev/drm2/i915 fs/devfs mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 19:28:55 -0000 Author: ed Date: Sat Sep 15 19:28:54 2012 New Revision: 240539 URL: http://svn.freebsd.org/changeset/base/240539 Log: Prefer __containerof() above member2struct(). The first does proper checking of the argument types, while the latter does not. Modified: head/sys/dev/drm2/drm_gem.c head/sys/dev/drm2/i915/i915_drv.h head/sys/fs/devfs/devfs_int.h head/sys/mips/mips/pmap.c Modified: head/sys/dev/drm2/drm_gem.c ============================================================================== --- head/sys/dev/drm2/drm_gem.c Sat Sep 15 19:17:19 2012 (r240538) +++ head/sys/dev/drm2/drm_gem.c Sat Sep 15 19:28:54 2012 (r240539) @@ -396,7 +396,7 @@ drm_gem_object_from_offset(struct drm_de (uintmax_t)offset); return (NULL); } - obj = member2struct(drm_gem_object, map_list, map_list); + obj = __containerof(map_list, struct drm_gem_object, map_list); return (obj); } Modified: head/sys/dev/drm2/i915/i915_drv.h ============================================================================== --- head/sys/dev/drm2/i915/i915_drv.h Sat Sep 15 19:17:19 2012 (r240538) +++ head/sys/dev/drm2/i915/i915_drv.h Sat Sep 15 19:28:54 2012 (r240539) @@ -889,7 +889,7 @@ struct drm_i915_gem_object { int pending_flip; }; -#define to_intel_bo(x) member2struct(drm_i915_gem_object, base, (x)) +#define to_intel_bo(x) __containerof(x, struct drm_i915_gem_object, base) /** * Request queue structure. Modified: head/sys/fs/devfs/devfs_int.h ============================================================================== --- head/sys/fs/devfs/devfs_int.h Sat Sep 15 19:17:19 2012 (r240538) +++ head/sys/fs/devfs/devfs_int.h Sat Sep 15 19:28:54 2012 (r240539) @@ -69,7 +69,7 @@ struct cdev_priv { LIST_HEAD(, cdev_privdata) cdp_fdpriv; }; -#define cdev2priv(c) member2struct(cdev_priv, cdp_c, c) +#define cdev2priv(c) __containerof(c, struct cdev_priv, cdp_c) struct cdev *devfs_alloc(int); int devfs_dev_exists(const char *); Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Sep 15 19:17:19 2012 (r240538) +++ head/sys/mips/mips/pmap.c Sat Sep 15 19:28:54 2012 (r240539) @@ -1629,7 +1629,7 @@ pmap_pvh_free(struct md_page *pvh, pmap_ pv = pmap_pvh_remove(pvh, pmap, va); KASSERT(pv != NULL, ("pmap_pvh_free: pv not found, pa %lx va %lx", - (u_long)VM_PAGE_TO_PHYS(member2struct(vm_page, md, pvh)), + (u_long)VM_PAGE_TO_PHYS(__containerof(pvh, struct vm_page, md)), (u_long)va)); free_pv_entry(pmap, pv); } From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 20:09:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 127E9106564A; Sat, 15 Sep 2012 20:09:09 +0000 (UTC) (envelope-from ebrandi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1F568FC0C; Sat, 15 Sep 2012 20:09:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8FK983J022929; Sat, 15 Sep 2012 20:09:08 GMT (envelope-from ebrandi@svn.freebsd.org) Received: (from ebrandi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8FK98TK022927; Sat, 15 Sep 2012 20:09:08 GMT (envelope-from ebrandi@svn.freebsd.org) Message-Id: <201209152009.q8FK98TK022927@svn.freebsd.org> From: Edson Brandi Date: Sat, 15 Sep 2012 20:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240540 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 20:09:09 -0000 Author: ebrandi (doc committer) Date: Sat Sep 15 20:09:08 2012 New Revision: 240540 URL: http://svn.freebsd.org/changeset/base/240540 Log: Add myself, and show gabor@ as my mentor. Approved by: gabor (mentor) Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Sat Sep 15 19:28:54 2012 (r240539) +++ head/share/misc/committers-doc.dot Sat Sep 15 20:09:08 2012 (r240540) @@ -58,6 +58,7 @@ brueffer [label="Christian Brueffer\nbru chinsan [label="Chinsan Huang\nchinsan@FreeBSD.org\n2006/09/20"] danger [label="Daniel Gerzo\ndanger@FreeBSD.org\n2006/08/20"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2004/09/14"] +ebrandi [label="Edson Brandi\nebrandi@FreeBSD.org\n2012/09/13"] gabor [label="Gabor Kovesdan\ngabor@FreeBSD.org\n2007/02/02"] ganbold [label="Ganbold Tsagaankhuu\nganbold@FreeBSD.org\n2008/02/26"] gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2011/07/18"] @@ -110,6 +111,7 @@ gabor -> pgj gabor -> manolis gabor -> taras gabor -> issyl0 +gabor -> ebrandi gjb -> wblock From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 20:59:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3D84106566B; Sat, 15 Sep 2012 20:59:05 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by mx1.freebsd.org (Postfix) with ESMTP id E883A8FC1B; Sat, 15 Sep 2012 20:59:04 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmcFAJ/qVFBbsSJD/2dsb2JhbABFhUBHtgaBCIIgAQEFIzMiARALDgYECRYLAgIJAwIBAgEnHgYNAQUCAQGIAAeoC5IeiyGFVoESA45pgSCCKJNSgmg Received: from 67.34-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.34.67]) by relay.skynet.be with ESMTP; 15 Sep 2012 22:57:55 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q8FKvrWO030961; Sat, 15 Sep 2012 22:57:54 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <5054EBCB.6070105@coosemans.org> Date: Sat, 15 Sep 2012 22:57:47 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Eitan Adler References: <201209142347.q8ENlN7N034951@svn.freebsd.org> In-Reply-To: <201209142347.q8ENlN7N034951@svn.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig2E590DA5D730AC1A0BBA97B2" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r240527 - head/bin/df X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 20:59:06 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2E590DA5D730AC1A0BBA97B2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 15-09-2012 01:47, Eitan Adler wrote: > Author: eadler > Date: Fri Sep 14 23:47:23 2012 > New Revision: 240527 > URL: http://svn.freebsd.org/changeset/base/240527 >=20 > Log: > Free memory before exiting in order to > help tools understand that we're not leaking it. > =20 > PR: bin/171634 > Submitted by: Erik Cederstrand > Approved by: cperciva > MFC after: 3 days >=20 > Modified: > head/bin/df/df.c >=20 > Modified: head/bin/df/df.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/bin/df/df.c Fri Sep 14 22:53:47 2012 (r240526) > +++ head/bin/df/df.c Fri Sep 14 23:47:23 2012 (r240527) > @@ -290,6 +290,7 @@ main(int argc, char *argv[]) > prtstat(&mntbuf[i], &maxwidths); > if (cflag) > prtstat(&totalbuf, &maxwidths); > + free(mntbuf); > return (rv); > } Freeing memory right before exiting is a waste of time. The tool shouldn't complain about it. --------------enig2E590DA5D730AC1A0BBA97B2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBU69EACgkQfoCS2CCgtiuZlgD+IR7A62UL9tvnk1PuFF/Bx2L3 JNyU0AcPrbTnGhTSUjEA/R7sStG8AdMo4UKVZsYoqirwKMr7SgHSPgXif6qxG8zR =bQX8 -----END PGP SIGNATURE----- --------------enig2E590DA5D730AC1A0BBA97B2-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 21:20:25 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8565B1065670; Sat, 15 Sep 2012 21:20:25 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 135DC8FC08; Sat, 15 Sep 2012 21:20:25 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id D037FE6557; Sat, 15 Sep 2012 22:23:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=mail; bh=CfeuXZ/bZNRp F7Gevyyp4EpUwTs=; b=D+Q2sYs/XGBubXskB7HI59fCb1BfP7eOWQs11EU+DNPQ TBwWeL+HHAmRE51Di4jc6IZtrNeafvvnmazeHK9eZp/Y8NC2fO5c2ggsXcDBmo18 4RrlLhFnXsRUxeY8b6ZV96jp+diOmjW/j5DL+3fkvoIKX3rCHfXhe0zg7eBh9LM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=mail; b=zY88AU 7+eWFzLmkmCWxNpg7DR0nGoE1LjdkAOGA4KPIaQm5x1/AniSbHQHDMRJVpBMwIoS H99TLCpORr7iXLeULOO6vqtZojCR3c6aiophi4iPYHUXYX5He/yQ7hYUwm332yPr AI0IWocrz90b33/+/EYBe7D4SoW3PvvMBN1ag= Received: from [192.168.2.11] (unknown [93.89.81.205]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 9DFE6E64F6; Sat, 15 Sep 2012 22:23:18 +0100 (BST) Message-ID: <5054F116.8090503@cran.org.uk> Date: Sat, 15 Sep 2012 22:20:22 +0100 From: Bruce Cran User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Tijl Coosemans References: <201209142347.q8ENlN7N034951@svn.freebsd.org> <5054EBCB.6070105@coosemans.org> In-Reply-To: <5054EBCB.6070105@coosemans.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, Eitan Adler Subject: Re: svn commit: r240527 - head/bin/df X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 21:20:25 -0000 On 15/09/2012 21:57, Tijl Coosemans wrote: > Freeing memory right before exiting is a waste of time. The tool > shouldn't complain about it. "/Stop wasting time and just exit already/." - http://blogs.msdn.com/b/oldnewthing/archive/2012/01/05/10253268.aspx -- Bruce Cran From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 21:56:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0081106566C; Sat, 15 Sep 2012 21:56:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB7418FC14; Sat, 15 Sep 2012 21:56:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8FLuUvm039232; Sat, 15 Sep 2012 21:56:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8FLuUsX039224; Sat, 15 Sep 2012 21:56:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209152156.q8FLuUsX039224@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 15 Sep 2012 21: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: r240541 - in head: bin/sh usr.bin/printf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 21:56:31 -0000 Author: jilles Date: Sat Sep 15 21:56:30 2012 New Revision: 240541 URL: http://svn.freebsd.org/changeset/base/240541 Log: sh: Prefer internal nextopt() to libc getopt(). This reduces code duplication and code size. /usr/bin/printf is not affected. Side effect: different error messages when certain builtins are passed invalid options. Modified: head/bin/sh/cd.c head/bin/sh/eval.c head/bin/sh/histedit.c head/bin/sh/jobs.c head/bin/sh/var.c head/usr.bin/printf/printf.c Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Sat Sep 15 20:09:08 2012 (r240540) +++ head/bin/sh/cd.c Sat Sep 15 21:56:30 2012 (r240541) @@ -79,7 +79,7 @@ static char *prevdir; /* previous worki static char *cdcomppath; int -cdcmd(int argc, char **argv) +cdcmd(int argc __unused, char **argv __unused) { const char *dest; const char *path; @@ -89,9 +89,8 @@ cdcmd(int argc, char **argv) int rc; int errno1 = ENOENT; - optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ phys = Pflag; - while ((ch = getopt(argc, argv, "eLP")) != -1) { + while ((ch = nextopt("eLP")) != '\0') { switch (ch) { case 'e': getcwderr = 1; @@ -102,18 +101,13 @@ cdcmd(int argc, char **argv) case 'P': phys = 1; break; - default: - error("unknown option: -%c", optopt); - break; } } - argc -= optind; - argv += optind; - if (argc > 1) + if (*argptr != NULL && argptr[1] != NULL) error("too many arguments"); - if ((dest = *argv) == NULL && (dest = bltinlookup("HOME", 1)) == NULL) + if ((dest = *argptr) == NULL && (dest = bltinlookup("HOME", 1)) == NULL) error("HOME not set"); if (*dest == '\0') dest = "."; @@ -330,14 +324,13 @@ updatepwd(char *dir) } int -pwdcmd(int argc, char **argv) +pwdcmd(int argc __unused, char **argv __unused) { char *p; int ch, phys; - optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ phys = Pflag; - while ((ch = getopt(argc, argv, "LP")) != -1) { + while ((ch = nextopt("LP")) != '\0') { switch (ch) { case 'L': phys = 0; @@ -345,15 +338,10 @@ pwdcmd(int argc, char **argv) case 'P': phys = 1; break; - default: - error("unknown option: -%c", optopt); - break; } } - argc -= optind; - argv += optind; - if (argc != 0) + if (*argptr != NULL) error("too many arguments"); if (!phys && getpwd()) { Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Sep 15 20:09:08 2012 (r240540) +++ head/bin/sh/eval.c Sat Sep 15 21:56:30 2012 (r240541) @@ -1223,7 +1223,7 @@ breakcmd(int argc, char **argv) * The `command' command. */ int -commandcmd(int argc, char **argv) +commandcmd(int argc __unused, char **argv __unused) { const char *path; int ch; @@ -1231,9 +1231,7 @@ commandcmd(int argc, char **argv) path = bltinlookup("PATH", 1); - optind = optreset = 1; - opterr = 0; - while ((ch = getopt(argc, argv, "pvV")) != -1) { + while ((ch = nextopt("pvV")) != '\0') { switch (ch) { case 'p': path = _PATH_STDPATH; @@ -1244,20 +1242,15 @@ commandcmd(int argc, char **argv) case 'V': cmd = TYPECMD_BIGV; break; - case '?': - default: - error("unknown option: -%c", optopt); } } - argc -= optind; - argv += optind; if (cmd != -1) { - if (argc != 1) + if (*argptr == NULL || argptr[1] != NULL) error("wrong number of arguments"); - return typecmd_impl(2, argv - 1, cmd, path); + return typecmd_impl(2, argptr - 1, cmd, path); } - if (argc != 0) + if (*argptr != NULL) error("commandcmd bad call"); /* Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Sat Sep 15 20:09:08 2012 (r240540) +++ head/bin/sh/histedit.c Sat Sep 15 21:56:30 2012 (r240541) @@ -182,7 +182,7 @@ setterm(const char *term) } int -histcmd(int argc, char **argv) +histcmd(int argc, char **argv __unused) { int ch; const char *editor = NULL; @@ -206,13 +206,10 @@ histcmd(int argc, char **argv) if (argc == 1) error("missing history argument"); - optreset = 1; optind = 1; /* initialize getopt */ - opterr = 0; - while (not_fcnumber(argv[optind]) && - (ch = getopt(argc, argv, ":e:lnrs")) != -1) + while (not_fcnumber(*argptr) && (ch = nextopt("e:lnrs")) != '\0') switch ((char)ch) { case 'e': - editor = optarg; + editor = shoptarg; break; case 'l': lflg = 1; @@ -226,13 +223,7 @@ histcmd(int argc, char **argv) case 's': sflg = 1; break; - case ':': - error("option -%c expects argument", optopt); - case '?': - default: - error("unknown option: -%c", optopt); } - argc -= optind, argv += optind; savehandler = handler; /* @@ -276,31 +267,26 @@ histcmd(int argc, char **argv) /* * If executing, parse [old=new] now */ - if (lflg == 0 && argc > 0 && - ((repl = strchr(argv[0], '=')) != NULL)) { - pat = argv[0]; + if (lflg == 0 && *argptr != NULL && + ((repl = strchr(*argptr, '=')) != NULL)) { + pat = *argptr; *repl++ = '\0'; - argc--, argv++; + argptr++; } /* * determine [first] and [last] */ - switch (argc) { - case 0: + if (*argptr == NULL) { firststr = lflg ? "-16" : "-1"; laststr = "-1"; - break; - case 1: - firststr = argv[0]; - laststr = lflg ? "-1" : argv[0]; - break; - case 2: - firststr = argv[0]; - laststr = argv[1]; - break; - default: + } else if (argptr[1] == NULL) { + firststr = argptr[0]; + laststr = lflg ? "-1" : argptr[0]; + } else if (argptr[2] == NULL) { + firststr = argptr[0]; + laststr = argptr[1]; + } else error("too many arguments"); - } /* * Turn into event numbers. */ Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Sat Sep 15 20:09:08 2012 (r240540) +++ head/bin/sh/jobs.c Sat Sep 15 21:56:30 2012 (r240541) @@ -250,15 +250,13 @@ restartjob(struct job *jp) int -jobscmd(int argc, char *argv[]) +jobscmd(int argc __unused, char *argv[] __unused) { char *id; int ch, mode; - optind = optreset = 1; - opterr = 0; mode = SHOWJOBS_DEFAULT; - while ((ch = getopt(argc, argv, "lps")) != -1) { + while ((ch = nextopt("lps")) != '\0') { switch (ch) { case 'l': mode = SHOWJOBS_VERBOSE; @@ -269,18 +267,13 @@ jobscmd(int argc, char *argv[]) case 's': mode = SHOWJOBS_PIDS; break; - case '?': - default: - error("unknown option: -%c", optopt); } } - argc -= optind; - argv += optind; - if (argc == 0) + if (*argptr == NULL) showjobs(0, mode); else - while ((id = *argv++) != NULL) + while ((id = *argptr++) != NULL) showjob(getjob(id), mode); return (0); Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sat Sep 15 20:09:08 2012 (r240540) +++ head/bin/sh/var.c Sat Sep 15 21:56:30 2012 (r240541) @@ -640,10 +640,11 @@ showvarscmd(int argc __unused, char **ar */ int -exportcmd(int argc, char **argv) +exportcmd(int argc __unused, char **argv) { struct var **vpp; struct var *vp; + char **ap; char *name; char *p; char *cmdname; @@ -651,26 +652,19 @@ exportcmd(int argc, char **argv) int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT; cmdname = argv[0]; - optreset = optind = 1; - opterr = 0; values = 0; - while ((ch = getopt(argc, argv, "p")) != -1) { + while ((ch = nextopt("p")) != '\0') { switch (ch) { case 'p': values = 1; break; - case '?': - default: - error("unknown option: -%c", optopt); } } - argc -= optind; - argv += optind; - if (values && argc != 0) + if (values && *argptr != NULL) error("-p requires no arguments"); - if (argc != 0) { - while ((name = *argv++) != NULL) { + if (*argptr != NULL) { + for (ap = argptr; (name = *ap) != NULL; ap++) { if ((p = strchr(name, '=')) != NULL) { p++; } else { Modified: head/usr.bin/printf/printf.c ============================================================================== --- head/usr.bin/printf/printf.c Sat Sep 15 20:09:08 2012 (r240540) +++ head/usr.bin/printf/printf.c Sat Sep 15 21:56:30 2012 (r240541) @@ -64,6 +64,7 @@ static const char rcsid[] = #define main printfcmd #include "bltin/bltin.h" #include "error.h" +#include "options.h" #endif #define PF(f, func) do { \ @@ -101,15 +102,19 @@ int main(int argc, char *argv[]) { size_t len; - int ch, chopped, end, rval; + int chopped, end, rval; char *format, *fmt, *start; - #ifndef SHELL + int ch; + (void) setlocale(LC_ALL, ""); #endif + #ifdef SHELL - optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ -#endif + nextopt(""); + argc -= argptr - argv; + argv = argptr; +#else while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': @@ -119,6 +124,7 @@ main(int argc, char *argv[]) } argc -= optind; argv += optind; +#endif if (argc < 1) { usage(); From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 23:27:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45C2D106566C; Sat, 15 Sep 2012 23:27:17 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id EB43C8FC12; Sat, 15 Sep 2012 23:27:16 +0000 (UTC) Received: from rnote.ddteam.net (94-98-133-95.pool.ukrtel.net [95.133.98.94]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id F387EC493A; Sun, 16 Sep 2012 02:27:09 +0300 (EEST) Date: Sun, 16 Sep 2012 02:27:02 +0300 From: Aleksandr Rybalko To: Grzegorz Bernacki Message-Id: <20120916022702.055cb08b.ray@freebsd.org> In-Reply-To: <50535E29.2030102@freebsd.org> References: <201209140933.q8E9XZnd088621@svn.freebsd.org> <20120914171652.780e25c6.ray@freebsd.org> <50535E29.2030102@freebsd.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD 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 Subject: Re: svn commit: r240484 - head/sys/dev/fdt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 23:27:17 -0000 On Fri, 14 Sep 2012 18:41:13 +0200 Grzegorz Bernacki wrote: > On 09/14/12 16:16, Aleksandr Rybalko wrote: > > On Fri, 14 Sep 2012 09:33:35 +0000 (UTC) > > Grzegorz Bernacki wrote: > > > >> Author: gber > >> Date: Fri Sep 14 09:33:35 2012 > >> New Revision: 240484 > >> URL: http://svn.freebsd.org/changeset/base/240484 > >> > >> Log: > >> Set busaddr and bussize to 0 when fdt_get_range() fails. > > > > Why bussize is 0? > > I though that setting it to 0 makes sense, since we do not use > this variable in this function and setting it to some value could be > confused. I could skip setting it, but I also thought it could cause > confusion :). If you think that setting it to other value or remove > it will be better please let me know and I will change it. > > thanks > grzesiek Yeah, indeed, false alarm. Sorry for noise. But it will be very nice to hear developers opinion about ePAPR1.1 row (about "range" property): "If the property is not present in a bus node, it is assumed that no mapping exists between children of the node and the parent address space." Assuming since in most cases root node have no "ranges" property, but his child "SOC" have that property with defaults (0x0 x 0xffffffff). So nodes which have property "ranges" or not, must be processed same way. Right? WBW -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Sat Sep 15 23:27:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6709E1065781 for ; Sat, 15 Sep 2012 23:27:41 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 22B7D8FC12 for ; Sat, 15 Sep 2012 23:27:39 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so7938533pbb.13 for ; Sat, 15 Sep 2012 16:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=uqqLoxYckazSWgGmS1pP1QCjBXQj5vxtw7TtNkTabtg=; b=ShJzNyH+lDV9AlP4DMLWtW7qTWiVvcIwQMxNOq79kVqVxXvCExBCuV/TehaophM5/f K4+U8nmwwDcmlOJVSNfRa3VpfiZoQEZpmLNGGDxG25QcfNJmJ1h5kkr/B6R3KpvzGsYb HTyYriPzYS3bfHP61p56aL7bR/6tQ//D8jXP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=uqqLoxYckazSWgGmS1pP1QCjBXQj5vxtw7TtNkTabtg=; b=BSYysyaPcwBY81AVnjGcS/vP2Q9/Vlz+CpV+701fP1SGJQKdkI2fc4/ussQRHxKI78 sWR6mgGUWzuhi/Zy40FT0lVS2RDIztMApExB6gOowg7Qj0w1Ywoiya0bBLM67ITvDol0 YkpUa6JbMXo2LdQgn8EJ2ttc2NIdYWU0wMd0FlK5E/al0RbA4hetkmMqjdd0Tg9oBfE6 pSHSf8mnKVQfg+vzkYl8nYXCeX6PoBOxfFHjsbQ7rDHWKlXAKc3N/Iow60L8ONp00LFc u2nE0Hs6AilDTWGRrgtQgo02P5TIaNTDqFyTNoxJsDOmdaHDew0W9nwEV52rGzMncQro Dupg== Received: by 10.68.138.133 with SMTP id qq5mr12477262pbb.86.1347751659546; Sat, 15 Sep 2012 16:27:39 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.87.41 with HTTP; Sat, 15 Sep 2012 16:27:08 -0700 (PDT) In-Reply-To: <5054F116.8090503@cran.org.uk> References: <201209142347.q8ENlN7N034951@svn.freebsd.org> <5054EBCB.6070105@coosemans.org> <5054F116.8090503@cran.org.uk> From: Eitan Adler Date: Sat, 15 Sep 2012 19:27:08 -0400 X-Google-Sender-Auth: 0dQgsxIA8W6Vnf3KCkqNaGs5JqI Message-ID: To: Bruce Cran Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm8CLBoRHY/IQbVw2TmFsHFx6IZ4ipBXSIi/hfvBWSlEPA8Xh5gXHdI3RNgQerndSP3kAr5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Tijl Coosemans , src-committers@freebsd.org Subject: Re: svn commit: r240527 - head/bin/df X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2012 23:27:41 -0000 On 15 September 2012 17:20, Bruce Cran wrote: > On 15/09/2012 21:57, Tijl Coosemans wrote: >> >> Freeing memory right before exiting is a waste of time. The tool shouldn't >> complain about it. Perhaps, but tools do. This has already been brought up on cfe-dev. > "/Stop wasting time and just exit already/." - > http://blogs.msdn.com/b/oldnewthing/archive/2012/01/05/10253268.aspx I read this blog post when it came out. :) -- Eitan Adler Source & Ports committer X11, Bugbusting teams