From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 00:36:53 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B83E5106564A; Sun, 20 Mar 2011 00:36:53 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [64.81.247.49]) by mx1.freebsd.org (Postfix) with ESMTP id 8FDC38FC16; Sun, 20 Mar 2011 00:36:53 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id p2K00pue003373; Sat, 19 Mar 2011 17:00:52 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201103200000.p2K00pue003373@chez.mckusick.com> To: Nathan Whitehorn In-Reply-To: Your message of "Fri, 18 Mar 2011 20:50:08 CDT." <4D840BD0.4030306@freebsd.org> Date: Sat, 19 Mar 2011 17:00:51 -0700 From: Kirk McKusick X-Spam-Status: No, score=0.0 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on chez.mckusick.com Cc: svn-src-head@FreeBSD.org, Jeff Roberson , Gavin Atkinson , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 00:36:53 -0000 > Date: Fri, 18 Mar 2011 20:50:08 -0500 > From: Nathan Whitehorn > Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit > To: Gavin Atkinson > Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, > svn-src-head@FreeBSD.org > > On 03/15/11 12:50, Gavin Atkinson wrote: > > On Tue, 2011-03-15 at 12:26 -0500, Nathan Whitehorn wrote: > > Hrm, I hadn't realised this was the case. If this change is intentional > > and planned to remain, I guess the various bits of documentation that > > say "several partitions good, one bad" should be updated... > > It is intended. I think it makes things somewhat easier for the > virtualization case, and I know a lot of people have been running their > systems with "one-big-/" for years. If it is harmful for some reason, > however, it's easy to change. > > >>> I wonder if it is time to start enabling SU+J on non-root filesystems > >>> now? > >> That's certainly something to think about, although I'll defer whether > >> that is wise to others. It's a little bit of a pain on the > >> implementation side, since you can't turn it on from newfs, but that > >> isn't a serious obstacle. > > As of r218726, you can now set this from newfs. (-j) > > Ah, wonderful. The decision of whether that is a good idea still rests > with others, however :) > -nathan I believe that we should enable SU+J by default. We should do it now so that we can get wider experience with it before 9.0 is released (thus letting us revert to SU if uncorrectable problems arise). The requirement that the root run without SU derived from the fact that you could get out of space errors if you tried to replace files too quickly (e.g., during installworld). That problem was fixed about 2004. So there is no reason that root cannot have SU enabled. In particular, if you are going to default to a single filesystem, then root should definitely have SU (or SU+J per above) enabled. Kirk McKusick From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 00:43:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAB29106564A; Sun, 20 Mar 2011 00:43:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD9058FC08; Sun, 20 Mar 2011 00:43:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2K0hgmY039401; Sun, 20 Mar 2011 00:43:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2K0hgb9039399; Sun, 20 Mar 2011 00:43:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103200043.p2K0hgb9039399@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 20 Mar 2011 00:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219789 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 00:43:43 -0000 Author: kib Date: Sun Mar 20 00:43:42 2011 New Revision: 219789 URL: http://svn.freebsd.org/changeset/base/219789 Log: MFC r219712: Remove the #if defined(FFS) || defined(IFS) braces around the calls to ffs_snapgone(). ufs.ko module is not build with FFS define. Modified: stable/8/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_lookup.c Sat Mar 19 23:06:17 2011 (r219788) +++ stable/8/sys/ufs/ufs/ufs_lookup.c Sun Mar 20 00:43:42 2011 (r219789) @@ -1238,10 +1238,8 @@ out: * drop its snapshot reference so that it will be reclaimed * when last open reference goes away. */ -#if defined(FFS) || defined(IFS) if (ip != 0 && (ip->i_flags & SF_SNAPSHOT) != 0 && ip->i_effnlink == 0) ffs_snapgone(ip); -#endif return (error); } @@ -1290,10 +1288,8 @@ ufs_dirrewrite(dp, oip, newinum, newtype * drop its snapshot reference so that it will be reclaimed * when last open reference goes away. */ -#if defined(FFS) || defined(IFS) if ((oip->i_flags & SF_SNAPSHOT) != 0 && oip->i_effnlink == 0) ffs_snapgone(oip); -#endif return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 08:27:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 629DF1065670; Sun, 20 Mar 2011 08:27:06 +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 53ECD8FC0C; Sun, 20 Mar 2011 08:27:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2K8R6Ok049445; Sun, 20 Mar 2011 08:27:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2K8R6KP049443; Sun, 20 Mar 2011 08:27:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103200827.p2K8R6KP049443@svn.freebsd.org> From: Adrian Chadd Date: Sun, 20 Mar 2011 08:27: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: r219790 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 08:27:06 -0000 Author: adrian Date: Sun Mar 20 08:27:06 2011 New Revision: 219790 URL: http://svn.freebsd.org/changeset/base/219790 Log: Add a PSPOLL queue type, in preparation for (eventually) porting over the TX queue setup code from ath9k for the AR5416 and later chips. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sun Mar 20 00:43:42 2011 (r219789) +++ head/sys/dev/ath/ath_hal/ah.h Sun Mar 20 08:27:06 2011 (r219790) @@ -141,6 +141,7 @@ typedef enum { HAL_TX_QUEUE_BEACON = 2, /* beacon xmit q */ HAL_TX_QUEUE_CAB = 3, /* "crap after beacon" xmit q */ HAL_TX_QUEUE_UAPSD = 4, /* u-apsd power save xmit q */ + HAL_TX_QUEUE_PSPOLL = 5, /* power save poll xmit q */ } HAL_TX_QUEUE; #define HAL_NUM_TX_QUEUES 10 /* max possible # of queues */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 08:35:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B657106566B; Sun, 20 Mar 2011 08:35:00 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CA2A8FC08; Sun, 20 Mar 2011 08:35:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2K8Z0PS049649; Sun, 20 Mar 2011 08:35:00 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2K8Z05Z049647; Sun, 20 Mar 2011 08:35:00 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201103200835.p2K8Z05Z049647@svn.freebsd.org> From: Dmitry Chagin Date: Sun, 20 Mar 2011 08:35: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: r219791 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 08:35:00 -0000 Author: dchagin Date: Sun Mar 20 08:35:00 2011 New Revision: 219791 URL: http://svn.freebsd.org/changeset/base/219791 Log: Remove dead code. MFC after: 1 Week Modified: head/sys/net/route.h Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Sun Mar 20 08:27:06 2011 (r219790) +++ head/sys/net/route.h Sun Mar 20 08:35:00 2011 (r219791) @@ -325,7 +325,6 @@ struct rt_addrinfo { #define RT_LOCK_INIT(_rt) \ mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK) #define RT_LOCK(_rt) mtx_lock(&(_rt)->rt_mtx) -#define RT_TRYLOCK(_rt) mtx_trylock(&(_rt)->rt_mtx) #define RT_UNLOCK(_rt) mtx_unlock(&(_rt)->rt_mtx) #define RT_LOCK_DESTROY(_rt) mtx_destroy(&(_rt)->rt_mtx) #define RT_LOCK_ASSERT(_rt) mtx_assert(&(_rt)->rt_mtx, MA_OWNED) @@ -360,22 +359,6 @@ struct rt_addrinfo { RTFREE_LOCKED(_rt); \ } while (0) -#define RT_TEMP_UNLOCK(_rt) do { \ - RT_ADDREF(_rt); \ - RT_UNLOCK(_rt); \ -} while (0) - -#define RT_RELOCK(_rt) do { \ - RT_LOCK(_rt); \ - if ((_rt)->rt_refcnt <= 1) { \ - rtfree(_rt); \ - _rt = 0; /* signal that it went away */ \ - } else { \ - RT_REMREF(_rt); \ - /* note that _rt is still valid */ \ - } \ -} while (0) - struct radix_node_head *rt_tables_get_rnh(int, int); struct ifmultiaddr; From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 08:42:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2458E106564A; Sun, 20 Mar 2011 08:42:57 +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 142D58FC13; Sun, 20 Mar 2011 08:42:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2K8gvSL049846; Sun, 20 Mar 2011 08:42:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2K8gvKc049842; Sun, 20 Mar 2011 08:42:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103200842.p2K8gvKc049842@svn.freebsd.org> From: Adrian Chadd Date: Sun, 20 Mar 2011 08:42: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: r219792 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 08:42:57 -0000 Author: adrian Date: Sun Mar 20 08:42:56 2011 New Revision: 219792 URL: http://svn.freebsd.org/changeset/base/219792 Log: Bring over a copy of the AR5212 TX queue reset and setup routines, in preparation for fixing them based on the ath9k related TXQ fixes. I've done this so people can go over the history of the diffs to the original AR5212 routines (which AR5416 and later chips use) to see what's changed. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Mar 20 08:35:00 2011 (r219791) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Mar 20 08:42:56 2011 (r219792) @@ -275,6 +275,10 @@ extern HAL_STATUS ar5416ProcTxDesc(struc extern HAL_BOOL ar5416GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *ds0, int *rates, int *tries); +extern HAL_BOOL ar5416ResetTxQueue(struct ath_hal *ah, u_int q); +extern int ar5416SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, + const HAL_TXQ_INFO *qInfo); + extern HAL_BOOL ar5416ChainTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int keyIx, HAL_CIPHER cipher, uint8_t delims, u_int segLen, HAL_BOOL firstSeg, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Mar 20 08:35:00 2011 (r219791) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Mar 20 08:42:56 2011 (r219792) @@ -112,6 +112,8 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_fillTxDesc = ar5416FillTxDesc; ah->ah_procTxDesc = ar5416ProcTxDesc; ah->ah_getTxCompletionRates = ar5416GetTxCompletionRates; + ah->ah_setupTxQueue = ar5416SetupTxQueue; + ah->ah_resetTxQueue = ar5416ResetTxQueue; /* Receive Functions */ ah->ah_startPcuReceive = ar5416StartPcuReceive; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sun Mar 20 08:35:00 2011 (r219791) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sun Mar 20 08:42:56 2011 (r219792) @@ -740,3 +740,341 @@ ar5416GetTxCompletionRates(struct ath_ha return AH_TRUE; } + +/* + * TX queue management routines - AR5416 and later chipsets + */ + +/* + * Allocate and initialize a tx DCU/QCU combination. + */ +int +ar5416SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, + const HAL_TXQ_INFO *qInfo) +{ + struct ath_hal_5212 *ahp = AH5212(ah); + HAL_TX_QUEUE_INFO *qi; + HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; + int q, defqflags; + + /* by default enable OK+ERR+DESC+URN interrupts */ + defqflags = HAL_TXQ_TXOKINT_ENABLE + | HAL_TXQ_TXERRINT_ENABLE + | HAL_TXQ_TXDESCINT_ENABLE + | HAL_TXQ_TXURNINT_ENABLE; + /* XXX move queue assignment to driver */ + switch (type) { + case HAL_TX_QUEUE_BEACON: + q = pCap->halTotalQueues-1; /* highest priority */ + defqflags |= HAL_TXQ_DBA_GATED + | HAL_TXQ_CBR_DIS_QEMPTY + | HAL_TXQ_ARB_LOCKOUT_GLOBAL + | HAL_TXQ_BACKOFF_DISABLE; + break; + case HAL_TX_QUEUE_CAB: + q = pCap->halTotalQueues-2; /* next highest priority */ + defqflags |= HAL_TXQ_DBA_GATED + | HAL_TXQ_CBR_DIS_QEMPTY + | HAL_TXQ_CBR_DIS_BEMPTY + | HAL_TXQ_ARB_LOCKOUT_GLOBAL + | HAL_TXQ_BACKOFF_DISABLE; + break; + case HAL_TX_QUEUE_UAPSD: + q = pCap->halTotalQueues-3; /* nextest highest priority */ + if (ahp->ah_txq[q].tqi_type != HAL_TX_QUEUE_INACTIVE) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: no available UAPSD tx queue\n", __func__); + return -1; + } + break; + case HAL_TX_QUEUE_DATA: + for (q = 0; q < pCap->halTotalQueues; q++) + if (ahp->ah_txq[q].tqi_type == HAL_TX_QUEUE_INACTIVE) + break; + if (q == pCap->halTotalQueues) { + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: no available tx queue\n", __func__); + return -1; + } + break; + default: + HALDEBUG(ah, HAL_DEBUG_ANY, + "%s: bad tx queue type %u\n", __func__, type); + return -1; + } + + HALDEBUG(ah, HAL_DEBUG_TXQUEUE, "%s: queue %u\n", __func__, q); + + qi = &ahp->ah_txq[q]; + if (qi->tqi_type != HAL_TX_QUEUE_INACTIVE) { + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: tx queue %u already active\n", + __func__, q); + return -1; + } + OS_MEMZERO(qi, sizeof(HAL_TX_QUEUE_INFO)); + qi->tqi_type = type; + if (qInfo == AH_NULL) { + qi->tqi_qflags = defqflags; + qi->tqi_aifs = INIT_AIFS; + qi->tqi_cwmin = HAL_TXQ_USEDEFAULT; /* NB: do at reset */ + qi->tqi_cwmax = INIT_CWMAX; + qi->tqi_shretry = INIT_SH_RETRY; + qi->tqi_lgretry = INIT_LG_RETRY; + qi->tqi_physCompBuf = 0; + } else { + qi->tqi_physCompBuf = qInfo->tqi_compBuf; + (void) ar5212SetTxQueueProps(ah, q, qInfo); + } + /* NB: must be followed by ar5212ResetTxQueue */ + return q; +} + +/* + * Update the h/w interrupt registers to reflect a tx q's configuration. + */ +static void +setTxQInterrupts(struct ath_hal *ah, HAL_TX_QUEUE_INFO *qi) +{ + struct ath_hal_5212 *ahp = AH5212(ah); + + HALDEBUG(ah, HAL_DEBUG_TXQUEUE, + "%s: tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", __func__, + ahp->ah_txOkInterruptMask, ahp->ah_txErrInterruptMask, + ahp->ah_txDescInterruptMask, ahp->ah_txEolInterruptMask, + ahp->ah_txUrnInterruptMask); + + OS_REG_WRITE(ah, AR_IMR_S0, + SM(ahp->ah_txOkInterruptMask, AR_IMR_S0_QCU_TXOK) + | SM(ahp->ah_txDescInterruptMask, AR_IMR_S0_QCU_TXDESC) + ); + OS_REG_WRITE(ah, AR_IMR_S1, + SM(ahp->ah_txErrInterruptMask, AR_IMR_S1_QCU_TXERR) + | SM(ahp->ah_txEolInterruptMask, AR_IMR_S1_QCU_TXEOL) + ); + OS_REG_RMW_FIELD(ah, AR_IMR_S2, + AR_IMR_S2_QCU_TXURN, ahp->ah_txUrnInterruptMask); +} + +/* + * Set the retry, aifs, cwmin/max, readyTime regs for specified queue + * Assumes: + * phwChannel has been set to point to the current channel + */ +HAL_BOOL +ar5416ResetTxQueue(struct ath_hal *ah, u_int q) +{ + struct ath_hal_5212 *ahp = AH5212(ah); + HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; + const struct ieee80211_channel *chan = AH_PRIVATE(ah)->ah_curchan; + HAL_TX_QUEUE_INFO *qi; + uint32_t cwMin, chanCwMin, value, qmisc, dmisc; + + if (q >= pCap->halTotalQueues) { + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: invalid queue num %u\n", + __func__, q); + return AH_FALSE; + } + qi = &ahp->ah_txq[q]; + if (qi->tqi_type == HAL_TX_QUEUE_INACTIVE) { + HALDEBUG(ah, HAL_DEBUG_TXQUEUE, "%s: inactive queue %u\n", + __func__, q); + return AH_TRUE; /* XXX??? */ + } + + HALDEBUG(ah, HAL_DEBUG_TXQUEUE, "%s: reset queue %u\n", __func__, q); + + if (qi->tqi_cwmin == HAL_TXQ_USEDEFAULT) { + /* + * Select cwmin according to channel type. + * NB: chan can be NULL during attach + */ + if (chan && IEEE80211_IS_CHAN_B(chan)) + chanCwMin = INIT_CWMIN_11B; + else + chanCwMin = INIT_CWMIN; + /* make sure that the CWmin is of the form (2^n - 1) */ + for (cwMin = 1; cwMin < chanCwMin; cwMin = (cwMin << 1) | 1) + ; + } else + cwMin = qi->tqi_cwmin; + + /* set cwMin/Max and AIFS values */ + OS_REG_WRITE(ah, AR_DLCL_IFS(q), + SM(cwMin, AR_D_LCL_IFS_CWMIN) + | SM(qi->tqi_cwmax, AR_D_LCL_IFS_CWMAX) + | SM(qi->tqi_aifs, AR_D_LCL_IFS_AIFS)); + + /* Set retry limit values */ + OS_REG_WRITE(ah, AR_DRETRY_LIMIT(q), + SM(INIT_SSH_RETRY, AR_D_RETRY_LIMIT_STA_SH) + | SM(INIT_SLG_RETRY, AR_D_RETRY_LIMIT_STA_LG) + | SM(qi->tqi_lgretry, AR_D_RETRY_LIMIT_FR_LG) + | SM(qi->tqi_shretry, AR_D_RETRY_LIMIT_FR_SH) + ); + + /* NB: always enable early termination on the QCU */ + qmisc = AR_Q_MISC_DCU_EARLY_TERM_REQ + | SM(AR_Q_MISC_FSP_ASAP, AR_Q_MISC_FSP); + + /* NB: always enable DCU to wait for next fragment from QCU */ + dmisc = AR_D_MISC_FRAG_WAIT_EN; + +#ifdef AH_SUPPORT_5311 + if (AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_OAHU) { + /* Configure DCU to use the global sequence count */ + dmisc |= AR5311_D_MISC_SEQ_NUM_CONTROL; + } +#endif + /* multiqueue support */ + if (qi->tqi_cbrPeriod) { + OS_REG_WRITE(ah, AR_QCBRCFG(q), + SM(qi->tqi_cbrPeriod,AR_Q_CBRCFG_CBR_INTERVAL) + | SM(qi->tqi_cbrOverflowLimit, AR_Q_CBRCFG_CBR_OVF_THRESH)); + qmisc = (qmisc &~ AR_Q_MISC_FSP) | AR_Q_MISC_FSP_CBR; + if (qi->tqi_cbrOverflowLimit) + qmisc |= AR_Q_MISC_CBR_EXP_CNTR_LIMIT; + } + if (qi->tqi_readyTime) { + OS_REG_WRITE(ah, AR_QRDYTIMECFG(q), + SM(qi->tqi_readyTime, AR_Q_RDYTIMECFG_INT) + | AR_Q_RDYTIMECFG_ENA); + } + + OS_REG_WRITE(ah, AR_DCHNTIME(q), + SM(qi->tqi_burstTime, AR_D_CHNTIME_DUR) + | (qi->tqi_burstTime ? AR_D_CHNTIME_EN : 0)); + + if (qi->tqi_readyTime && + (qi->tqi_qflags & HAL_TXQ_RDYTIME_EXP_POLICY_ENABLE)) + qmisc |= AR_Q_MISC_RDYTIME_EXP_POLICY; + if (qi->tqi_qflags & HAL_TXQ_DBA_GATED) + qmisc = (qmisc &~ AR_Q_MISC_FSP) | AR_Q_MISC_FSP_DBA_GATED; + if (MS(qmisc, AR_Q_MISC_FSP) != AR_Q_MISC_FSP_ASAP) { + /* + * These are meangingful only when not scheduled asap. + */ + if (qi->tqi_qflags & HAL_TXQ_CBR_DIS_BEMPTY) + qmisc |= AR_Q_MISC_CBR_INCR_DIS0; + else + qmisc &= ~AR_Q_MISC_CBR_INCR_DIS0; + if (qi->tqi_qflags & HAL_TXQ_CBR_DIS_QEMPTY) + qmisc |= AR_Q_MISC_CBR_INCR_DIS1; + else + qmisc &= ~AR_Q_MISC_CBR_INCR_DIS1; + } + + if (qi->tqi_qflags & HAL_TXQ_BACKOFF_DISABLE) + dmisc |= AR_D_MISC_POST_FR_BKOFF_DIS; + if (qi->tqi_qflags & HAL_TXQ_FRAG_BURST_BACKOFF_ENABLE) + dmisc |= AR_D_MISC_FRAG_BKOFF_EN; + if (qi->tqi_qflags & HAL_TXQ_ARB_LOCKOUT_GLOBAL) + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL, + AR_D_MISC_ARB_LOCKOUT_CNTRL); + else if (qi->tqi_qflags & HAL_TXQ_ARB_LOCKOUT_INTRA) + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_INTRA_FR, + AR_D_MISC_ARB_LOCKOUT_CNTRL); + if (qi->tqi_qflags & HAL_TXQ_IGNORE_VIRTCOL) + dmisc |= SM(AR_D_MISC_VIR_COL_HANDLING_IGNORE, + AR_D_MISC_VIR_COL_HANDLING); + if (qi->tqi_qflags & HAL_TXQ_SEQNUM_INC_DIS) + dmisc |= AR_D_MISC_SEQ_NUM_INCR_DIS; + + /* + * Fillin type-dependent bits. Most of this can be + * removed by specifying the queue parameters in the + * driver; it's here for backwards compatibility. + */ + switch (qi->tqi_type) { + case HAL_TX_QUEUE_BEACON: /* beacon frames */ + qmisc |= AR_Q_MISC_FSP_DBA_GATED + | AR_Q_MISC_BEACON_USE + | AR_Q_MISC_CBR_INCR_DIS1; + + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL, + AR_D_MISC_ARB_LOCKOUT_CNTRL) + | AR_D_MISC_BEACON_USE + | AR_D_MISC_POST_FR_BKOFF_DIS; + break; + case HAL_TX_QUEUE_CAB: /* CAB frames */ + /* + * No longer Enable AR_Q_MISC_RDYTIME_EXP_POLICY, + * There is an issue with the CAB Queue + * not properly refreshing the Tx descriptor if + * the TXE clear setting is used. + */ + qmisc |= AR_Q_MISC_FSP_DBA_GATED + | AR_Q_MISC_CBR_INCR_DIS1 + | AR_Q_MISC_CBR_INCR_DIS0; + + if (!qi->tqi_readyTime) { + /* + * NB: don't set default ready time if driver + * has explicitly specified something. This is + * here solely for backwards compatibility. + */ + value = (ahp->ah_beaconInterval + - (ath_hal_sw_beacon_response_time - + ath_hal_dma_beacon_response_time) + - ath_hal_additional_swba_backoff) * 1024; + OS_REG_WRITE(ah, AR_QRDYTIMECFG(q), value | AR_Q_RDYTIMECFG_ENA); + } + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL, + AR_D_MISC_ARB_LOCKOUT_CNTRL); + break; + default: /* NB: silence compiler */ + break; + } + + OS_REG_WRITE(ah, AR_QMISC(q), qmisc); + OS_REG_WRITE(ah, AR_DMISC(q), dmisc); + + /* Setup compression scratchpad buffer */ + /* + * XXX: calling this asynchronously to queue operation can + * cause unexpected behavior!!! + */ + if (qi->tqi_physCompBuf) { + HALASSERT(qi->tqi_type == HAL_TX_QUEUE_DATA || + qi->tqi_type == HAL_TX_QUEUE_UAPSD); + OS_REG_WRITE(ah, AR_Q_CBBS, (80 + 2*q)); + OS_REG_WRITE(ah, AR_Q_CBBA, qi->tqi_physCompBuf); + OS_REG_WRITE(ah, AR_Q_CBC, HAL_COMP_BUF_MAX_SIZE/1024); + OS_REG_WRITE(ah, AR_Q0_MISC + 4*q, + OS_REG_READ(ah, AR_Q0_MISC + 4*q) + | AR_Q_MISC_QCU_COMP_EN); + } + + /* + * Always update the secondary interrupt mask registers - this + * could be a new queue getting enabled in a running system or + * hw getting re-initialized during a reset! + * + * Since we don't differentiate between tx interrupts corresponding + * to individual queues - secondary tx mask regs are always unmasked; + * tx interrupts are enabled/disabled for all queues collectively + * using the primary mask reg + */ + if (qi->tqi_qflags & HAL_TXQ_TXOKINT_ENABLE) + ahp->ah_txOkInterruptMask |= 1 << q; + else + ahp->ah_txOkInterruptMask &= ~(1 << q); + if (qi->tqi_qflags & HAL_TXQ_TXERRINT_ENABLE) + ahp->ah_txErrInterruptMask |= 1 << q; + else + ahp->ah_txErrInterruptMask &= ~(1 << q); + if (qi->tqi_qflags & HAL_TXQ_TXDESCINT_ENABLE) + ahp->ah_txDescInterruptMask |= 1 << q; + else + ahp->ah_txDescInterruptMask &= ~(1 << q); + if (qi->tqi_qflags & HAL_TXQ_TXEOLINT_ENABLE) + ahp->ah_txEolInterruptMask |= 1 << q; + else + ahp->ah_txEolInterruptMask &= ~(1 << q); + if (qi->tqi_qflags & HAL_TXQ_TXURNINT_ENABLE) + ahp->ah_txUrnInterruptMask |= 1 << q; + else + ahp->ah_txUrnInterruptMask &= ~(1 << q); + setTxQInterrupts(ah, qi); + + return AH_TRUE; +} From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 08:47:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA293106566B; Sun, 20 Mar 2011 08:47: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 AB4718FC12; Sun, 20 Mar 2011 08:47:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2K8lxvI049991; Sun, 20 Mar 2011 08:47:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2K8lxWX049989; Sun, 20 Mar 2011 08:47:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103200847.p2K8lxWX049989@svn.freebsd.org> From: Adrian Chadd Date: Sun, 20 Mar 2011 08:47: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: r219793 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 08:47:59 -0000 Author: adrian Date: Sun Mar 20 08:47:59 2011 New Revision: 219793 URL: http://svn.freebsd.org/changeset/base/219793 Log: * Remove a not-needed check in the AR5416+ case * Restore the chip default of the DCU backoff threshold to 0x2, mirroring what ath9k does. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sun Mar 20 08:42:56 2011 (r219792) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sun Mar 20 08:47:59 2011 (r219793) @@ -919,12 +919,12 @@ ar5416ResetTxQueue(struct ath_hal *ah, u /* NB: always enable DCU to wait for next fragment from QCU */ dmisc = AR_D_MISC_FRAG_WAIT_EN; -#ifdef AH_SUPPORT_5311 - if (AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_OAHU) { - /* Configure DCU to use the global sequence count */ - dmisc |= AR5311_D_MISC_SEQ_NUM_CONTROL; - } -#endif + /* + * The chip reset default is to use a DCU backoff threshold of 0x2. + * Restore this when programming the DCU MISC register. + */ + dmisc |= 0x2; + /* multiqueue support */ if (qi->tqi_cbrPeriod) { OS_REG_WRITE(ah, AR_QCBRCFG(q), From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 09:08:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BA071065673; Sun, 20 Mar 2011 09:08:46 +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 32C388FC0C; Sun, 20 Mar 2011 09:08:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2K98k87050505; Sun, 20 Mar 2011 09:08:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2K98kxv050503; Sun, 20 Mar 2011 09:08:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103200908.p2K98kxv050503@svn.freebsd.org> From: Adrian Chadd Date: Sun, 20 Mar 2011 09:08: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: r219794 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 09:08:46 -0000 Author: adrian Date: Sun Mar 20 09:08:45 2011 New Revision: 219794 URL: http://svn.freebsd.org/changeset/base/219794 Log: Cave in and disable the ADC DC gain/offset calibrations if they're not needed. These calibrations are only applicable if the chip operating mode engages both interleaved RX ADCs (ie, it's compensating for the differences in DC gain and DC offset -between- the two ADCs.) Otherwise the chip reads values of 0x0 for the secondary ADC (as I guess it's not enabled here) and thus writes potentially bogus info into the chip. I've tested this on the AR9160 and AR9280; both behave themselves in 11g mode with these calibrations disabled. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Mar 20 08:47:59 2011 (r219793) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Mar 20 09:08:45 2011 (r219794) @@ -72,9 +72,12 @@ ar5416IsCalSupp(struct ath_hal *ah, cons return !IEEE80211_IS_CHAN_B(chan); case ADC_GAIN_CAL: case ADC_DC_CAL: - /* Run ADC Gain Cal for non-CCK & non 2GHz-HT20 only */ - return !IEEE80211_IS_CHAN_B(chan) && - !(IEEE80211_IS_CHAN_2GHZ(chan) && IEEE80211_IS_CHAN_HT20(chan)); + /* Run ADC Gain Cal for either 5ghz any or 2ghz HT40 */ + if (IEEE80211_IS_CHAN_2GHZ(chan)) + return AH_FALSE; + if (IEEE80211_IS_CHAN_HT20(chan)) + return AH_FALSE; + return AH_TRUE; } return AH_FALSE; } From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 09:08:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D2DB1065782; Sun, 20 Mar 2011 09:08:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id D92B38FC1A; Sun, 20 Mar 2011 09:08:58 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A5CAF25D3868; Sun, 20 Mar 2011 09:08:27 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BAFE9159B273; Sun, 20 Mar 2011 09:08:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id d9e2suqGBdci; Sun, 20 Mar 2011 09:08:25 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 6E0FA159B275; Sun, 20 Mar 2011 09:08:25 +0000 (UTC) Date: Sun, 20 Mar 2011 09:08:24 +0000 (UTC) From: "Bjoern A. Zeeb" To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201103191908.p2JJ8sk2032274@svn.freebsd.org> Message-ID: References: <201103191908.p2JJ8sk2032274@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r219779 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 09:08:59 -0000 On Sat, 19 Mar 2011, Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Mar 19 19:08:54 2011 > New Revision: 219779 > URL: http://svn.freebsd.org/changeset/base/219779 > > Log: > Properly check for an IPv4 socket after r219579. > > In some cases as udp6_connect() without an earlier bind(2) to an > address, v4-mapped scokets allowed and a non mapped destination > address, we can end up here with both v4 and v6 indicated: > inp_vflag = (INP_IPV4|INP_IPV6|INP_IPV6PROTO) > > In that case however laddrp is NULL as the IPv6 path does not > pass in a copy currently. For your information and future reference: UDP and TCP come in with flags set differently for the 6 cases. The only conistent one is IPv4 only. v4-mapped v6 is the trouble maker. So while this one fixed the panic with plain IPv6 and v4-mapped enabled, it actually broke udp on v4-mapped as further investigation has shown. I am working on regression tests as well as harmonizing the initial calls setting the flags and documenting things (and obviously fixing that one case as well;) /bz > Reported by: Pawel Worach (pawel.worach gmail.com) > Tested by: Pawel Worach (pawel.worach gmail.com) > MFC after: 6 days > X-MFC with: r219579 > > Modified: > head/sys/netinet/in_pcb.c > > Modified: head/sys/netinet/in_pcb.c > ============================================================================== > --- head/sys/netinet/in_pcb.c Sat Mar 19 18:26:54 2011 (r219778) > +++ head/sys/netinet/in_pcb.c Sat Mar 19 19:08:54 2011 (r219779) > @@ -387,7 +387,7 @@ in_pcb_lport(struct inpcb *inp, struct i > #ifdef INET > /* Make the compiler happy. */ > laddr.s_addr = 0; > - if ((inp->inp_vflag & INP_IPV4) != 0) { > + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { > KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p", > __func__, inp)); > laddr = *laddrp; > @@ -423,7 +423,7 @@ in_pcb_lport(struct inpcb *inp, struct i > } while (tmpinp != NULL); > > #ifdef INET > - if ((inp->inp_vflag & INP_IPV4) != 0) > + if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) > laddrp->s_addr = laddr.s_addr; > #endif > *lportp = lport; > -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 09:41:33 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67901106564A; Sun, 20 Mar 2011 09:41:33 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id 18DB08FC0A; Sun, 20 Mar 2011 09:41:31 +0000 (UTC) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 20 Mar 2011 09:41:30 +0000 (GMT) Date: Sun, 20 Mar 2011 09:41:29 +0000 From: David Malone To: Bruce Evans Message-ID: <20110320094129.GA79235@walton.maths.tcd.ie> References: <201103151947.p2FJlK3L057573@svn.freebsd.org> <201103151701.11708.jhb@freebsd.org> <201103151714.15829.jkim@FreeBSD.org> <20110316155820.D4010@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110316155820.D4010@besplex.bde.org> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Jung-uk Kim Subject: Re: svn commit: r219676 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 09:41:33 -0000 On Wed, Mar 16, 2011 at 04:34:10PM +1100, Bruce Evans wrote: > Please revert. I use this for setting timecounters from userland. The > sysctl is not a hack, but the primary user interface for managing the > TSC frequency. The kern.timecounter.tc.TSC.frequency sysctl is > secondary, and is readonly anyway, so it cannot be used to manage the > TSC frequency or even the timecounter frequency. Some people have asked me if I can make kern.timecounter.tc.*.frequency writeable. I have it on my list of jobs to look at, but haven't had a chance yet. Are there any obvious problems with this? David. From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 11:58:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08E571065670; Sun, 20 Mar 2011 11:58:43 +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 EC7758FC13; Sun, 20 Mar 2011 11:58:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KBwgWw077973; Sun, 20 Mar 2011 11:58:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KBwgvL077971; Sun, 20 Mar 2011 11:58:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103201158.p2KBwgvL077971@svn.freebsd.org> From: Andriy Gapon Date: Sun, 20 Mar 2011 11:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219795 - stable/8/sys/amd64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 11:58:43 -0000 Author: avg Date: Sun Mar 20 11:58:42 2011 New Revision: 219795 URL: http://svn.freebsd.org/changeset/base/219795 Log: MFC r219525: amd64/NOTES: use a greater number in KSTACK_PAGES example Modified: stable/8/sys/amd64/conf/NOTES Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Sun Mar 20 09:08:45 2011 (r219794) +++ stable/8/sys/amd64/conf/NOTES Sun Mar 20 11:58:42 2011 (r219795) @@ -550,7 +550,7 @@ options LINSYSFS # KSTACK_PAGES is the number of memory pages to assign to the kernel # stack of each thread. -options KSTACK_PAGES=3 +options KSTACK_PAGES=5 ##################################################################### From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 12:05:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 768D0106566B; Sun, 20 Mar 2011 12:05:57 +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 660B58FC12; Sun, 20 Mar 2011 12:05:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KC5vuA078180; Sun, 20 Mar 2011 12:05:57 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KC5vSA078178; Sun, 20 Mar 2011 12:05:57 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103201205.p2KC5vSA078178@svn.freebsd.org> From: Andriy Gapon Date: Sun, 20 Mar 2011 12:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219796 - stable/7/sys/amd64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 12:05:57 -0000 Author: avg Date: Sun Mar 20 12:05:57 2011 New Revision: 219796 URL: http://svn.freebsd.org/changeset/base/219796 Log: MFC r219525: amd64/NOTES: use a greater number in KSTACK_PAGES example Modified: stable/7/sys/amd64/conf/NOTES Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/conf/NOTES ============================================================================== --- stable/7/sys/amd64/conf/NOTES Sun Mar 20 11:58:42 2011 (r219795) +++ stable/7/sys/amd64/conf/NOTES Sun Mar 20 12:05:57 2011 (r219796) @@ -658,7 +658,7 @@ options LINSYSFS # KSTACK_PAGES is the number of memory pages to assign to the kernel # stack of each thread. -options KSTACK_PAGES=3 +options KSTACK_PAGES=5 ##################################################################### From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 12:40:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 018D5106566C; Sun, 20 Mar 2011 12:40:18 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB3EF8FC08; Sun, 20 Mar 2011 12:40:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KCeHh5079048; Sun, 20 Mar 2011 12:40:17 GMT (envelope-from mr@svn.freebsd.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KCeHmD079045; Sun, 20 Mar 2011 12:40:17 GMT (envelope-from mr@svn.freebsd.org) Message-Id: <201103201240.p2KCeHmD079045@svn.freebsd.org> From: Michael Reifenberger Date: Sun, 20 Mar 2011 12: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: r219798 - in head/tools/tools/nanobsd/rescue: . Files/root X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 12:40:18 -0000 Author: mr Date: Sun Mar 20 12:40:17 2011 New Revision: 219798 URL: http://svn.freebsd.org/changeset/base/219798 Log: - Add script for preparing disks in GPT/ZFS boot environment - Add merge script for integrating amd64 slice into i386 disk image Added: head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh (contents, props changed) head/tools/tools/nanobsd/rescue/merge.sh (contents, props changed) Added: head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh Sun Mar 20 12:40:17 2011 (r219798) @@ -0,0 +1,53 @@ +#!/bin/sh +# $FreeBSD$ + +# some default sizes +align=2048 +swapsize=$(expr 1 \* 1024 \* 2048 + 1024) +zfssize=0 + +# define our bail out shortcut +exerr () { echo -e "$*" >&2 ; exit 1; } + +usage="Usage: $0 [ -s ] [ -z ]\n\ + \tswap size: if no -s size in blocks is given, default is $swapsize blocks\n\ + \tzfs size: if no -z size in blocks is given, default is the rest of the disk" + +dsk=$1 +if [ -z "$dsk" -o \! -c "/dev/$dsk" ]; then + exerr ${usage}; + exit; +fi + +shift; while getopts :s:z: arg; do case ${arg} in + s) swapsize=${OPTARG};; + z) zfssize=${OPTARG};; + #?) exerr ${usage};; +esac; done; shift $(( ${OPTIND} - 1 )) + +gpart delete -i 3 $dsk +gpart delete -i 2 $dsk +gpart delete -i 1 $dsk +gpart destroy $dsk +gpart create -s gpt $dsk + +# Boot +siz=$(expr 1024 \- 34) +gpart add -i 1 -b 34 -s $siz -t freebsd-boot $dsk +gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 $dsk + +# Swap +off=$align +siz=$swapsize +gpart add -i 2 -b $off -s $siz -t freebsd-swap $dsk + +# ZFS +off=$(expr $align + $swapsize) +if [ "$zfssize" -gt 0 ]; then + siz="-s $zfssize" +else + siz="" +fi +gpart add -i 3 -b $off $siz -t freebsd-zfs $dsk + +gpart show $dsk Added: head/tools/tools/nanobsd/rescue/merge.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/rescue/merge.sh Sun Mar 20 12:40:17 2011 (r219798) @@ -0,0 +1,11 @@ +#!/bin/sh +# $FreeBSD$ + +D1="/usr/obj/nanobsd.rescue_i386" +D2="/usr/obj/nanobsd.rescue_amd64" + +MD=`mdconfig -a -t vnode -f ${D1}/_.disk.full` + +dd if=${D2}/_.disk.image of=/dev/${MD}s2 bs=128k + +mdconfig -d -u ${MD} From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 13:01:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B21F106564A; Sun, 20 Mar 2011 13:01:57 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3058FC08; Sun, 20 Mar 2011 13:01:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KD1vOm079544; Sun, 20 Mar 2011 13:01:57 GMT (envelope-from mr@svn.freebsd.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KD1vah079543; Sun, 20 Mar 2011 13:01:57 GMT (envelope-from mr@svn.freebsd.org) Message-Id: <201103201301.p2KD1vah079543@svn.freebsd.org> From: Michael Reifenberger Date: Sun, 20 Mar 2011 13:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219799 - head/tools/tools/nanobsd/rescue/Files/root X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 13:01:57 -0000 Author: mr Date: Sun Mar 20 13:01:57 2011 New Revision: 219799 URL: http://svn.freebsd.org/changeset/base/219799 Log: Add a file with some remarks for setting up a zfs boot environment Added: head/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt (contents, props changed) Added: head/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt Sun Mar 20 13:01:57 2011 (r219799) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +Some remarks for setting up a zfs boot environment + +ZFS Boot sctructure: +boot ++-ROOT + +-root +[+-root2] +[+-root3] + +zpool create -o mountpoint=none boot ... +zpool set listsnapshots=on boot + +zfs create -o mountpoint=/mnt boot/ROOT +zfs create boot/ROOT/root + +Fill -> /mnt/root + +cp /boot/zfs/zpool.cache /mnt/root/boot/zfs/zpool.cache +zpool set bootfs=boot/ROOT/root boot + +set in /mnt/root/boot/loader.conf +#ZFS mandatory +zfs_load="YES" +vfs.root.mountfrom="zfs:boot/ROOT/root" +#ZFS optional +vm.kmem_size="8G" +vfs.zfs.arc_min="1G" +vfs.zfs.arc_max="2G" +vfs.zfs.prefetch_disable="1" +vfs.zfs.zil_disable=1 +vfs.zfs.zio.use_uma=0 +#Power savings +hw.pci.do_power_nodriver=3 From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 14:15:17 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FA26106564A; Sun, 20 Mar 2011 14:15:17 +0000 (UTC) (envelope-from bob@immure.com) Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net [66.136.206.1]) by mx1.freebsd.org (Postfix) with ESMTP id C26768FC08; Sun, 20 Mar 2011 14:15:16 +0000 (UTC) Received: from rancor.immure.com (rancor.immure.com [10.1.132.9]) by maul.immure.com (8.14.4/8.14.4) with ESMTP id p2KEF1Ht001864; Sun, 20 Mar 2011 09:15:01 -0500 (CDT) (envelope-from bob@immure.com) Received: (from bob@localhost) by rancor.immure.com (8.14.4/8.14.4/Submit) id p2KEF1GF032566; Sun, 20 Mar 2011 09:15:01 -0500 (CDT) (envelope-from bob) Date: Sun, 20 Mar 2011 09:15:01 -0500 From: Bob Willcox To: Alexander Motin Message-ID: <20110320141501.GB19338@rancor.immure.com> References: <201102052134.p15LYRmw041695@svn.freebsd.org> <20110316135122.GB7185@rancor.immure.com> <4D814AAA.3070801@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D814AAA.3070801@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-immure-MailScanner-Information: Please contact the ISP for more information X-immure-MailScanner-ID: p2KEF1Ht001864 X-immure-MailScanner: Found to be clean X-immure-MailScanner-From: bob@immure.com X-Spam-Status: No Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bob Willcox List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 14:15:17 -0000 On Thu, Mar 17, 2011 at 01:41:30AM +0200, Alexander Motin wrote: > On 16.03.2011 15:51, Bob Willcox wrote: > > This change has broken SATA disk support on my Intel Atom D525 ITX system. By > > reverting this change 8.2-STABLE works again on this system. > > > > My 'uname -a' output is: > > > > FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011 bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL amd64 > > > > When booting the system I get tons of these messages: > > > > Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset > > Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored > > As I can see, it means that channel has some active request, but it is > in IDLE state. It is strange, but I won't be surprised much if it is the > result of some locking problem in ata(4) in non-CAM mode. > > > repeated over and over, and then lots of these: > > > > Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479 > > Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device > > Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed > > > > for different LBA values. > > > > As one might expect, I then start seeing I/O errors on the disk and programs > > failing > > > > I've attached the 'pciconf -lv' output. > > Send me please full verbose log, if you can save it. I am especially > interested in place around first errors. > > You may try to build kernel with `options ATA_CAM` to see if it helps. > I've mostly tested this patch in that mode. I tried setting `options ATA_CAM` but that didn't fix the problem. I still got continuous ATA error messages spewed out while probing the ATA devices. I'm not able to capture the verbose output as the system never successfully boots and I don't have a serial console attached to the system. For now, I plan to stay with the previous version of ata-intel.c since this is my gateway system and I need for it to 'just work'. :( Bob > > > On Sat, Feb 05, 2011 at 09:34:27PM +0000, Alexander Motin wrote: > >> Author: mav > >> Date: Sat Feb 5 21:34:26 2011 > >> New Revision: 218347 > >> URL: http://svn.freebsd.org/changeset/base/218347 > >> > >> Log: > >> MFC r217774: > >> ICH7 SATA controller in legacy mode can provide access to SATA registers > >> via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to > >> allocate memory for that BAR. This allows hot-plug support and connection > >> speed reporting. > > -- > Alexander Motin -- Bob Willcox Trying to explain things to people who already know bob@immure.com everything is like trying to teach a bear to dance; Austin, TX it's useless, and it annoys the bear. From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 14:19:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A156B106564A; Sun, 20 Mar 2011 14:19:47 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A0B5F8FC0C; Sun, 20 Mar 2011 14:19:46 +0000 (UTC) Received: by bwz12 with SMTP id 12so5020549bwz.13 for ; Sun, 20 Mar 2011 07:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=oCsp4KL+NK38BrE1m4PHGulEWMQJNm0aYwlMgphhIo4=; b=kTrkh3hwILrCkDgQxQjR9zmfz9ZPDRTwnPcSzzQHpIgyLzTR1xxR01Q+A6FgXwhkWE U7yMcWGaMPgSL0arVlcWLJVNb4uGuc2+MKtj/XzlUBcBZwzSgOgvBAfuXm4WxdmRYNct /QCZlNiKuZ7skRYic7nDwzKwPMTbPHh9NHOp0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=ozx54Y+lrTIRQVHFwTppkGQkFxOIPQbWv8TX6Q107dHM07OGSeEAuQiMxuhDGC5NSk ExC8GgbgYexhVVG6+XeDqZczgpJutoTiBB0gAbHNGj7aCRSwZSIslZEbHIHhizKLTlB/ mCmmCt/pWLTriuBgew4u3caEOLwJvoi8K/rsQ= Received: by 10.204.151.205 with SMTP id d13mr2745597bkw.117.1300630785499; Sun, 20 Mar 2011 07:19:45 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id v21sm3605483bkt.23.2011.03.20.07.19.43 (version=SSLv3 cipher=OTHER); Sun, 20 Mar 2011 07:19:44 -0700 (PDT) Sender: Alexander Motin Message-ID: <4D860C9A.7020600@FreeBSD.org> Date: Sun, 20 Mar 2011 16:18:02 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Bob Willcox References: <201102052134.p15LYRmw041695@svn.freebsd.org> <20110316135122.GB7185@rancor.immure.com> <4D814AAA.3070801@FreeBSD.org> <20110320141501.GB19338@rancor.immure.com> In-Reply-To: <20110320141501.GB19338@rancor.immure.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 14:19:47 -0000 Bob Willcox wrote: > On Thu, Mar 17, 2011 at 01:41:30AM +0200, Alexander Motin wrote: >> On 16.03.2011 15:51, Bob Willcox wrote: >>> This change has broken SATA disk support on my Intel Atom D525 ITX system. By >>> reverting this change 8.2-STABLE works again on this system. >>> >>> My 'uname -a' output is: >>> >>> FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011 bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL amd64 >>> >>> When booting the system I get tons of these messages: >>> >>> Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset >>> Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored >> As I can see, it means that channel has some active request, but it is >> in IDLE state. It is strange, but I won't be surprised much if it is the >> result of some locking problem in ata(4) in non-CAM mode. >> >>> repeated over and over, and then lots of these: >>> >>> Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479 >>> Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device >>> Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed >>> >>> for different LBA values. >>> >>> As one might expect, I then start seeing I/O errors on the disk and programs >>> failing >>> >>> I've attached the 'pciconf -lv' output. >> Send me please full verbose log, if you can save it. I am especially >> interested in place around first errors. >> >> You may try to build kernel with `options ATA_CAM` to see if it helps. >> I've mostly tested this patch in that mode. > > I tried setting `options ATA_CAM` but that didn't fix the problem. I still got > continuous ATA error messages spewed out while probing the ATA devices. I'm > not able to capture the verbose output as the system never successfully boots > and I don't have a serial console attached to the system. It's strange. Can you at least show errors you received in that case? I suppose they should be different from the original. > For now, I plan to stay with the previous version of ata-intel.c since this is > my gateway system and I need for it to 'just work'. :( -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 15:04:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C03F106566C; Sun, 20 Mar 2011 15:04:43 +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 8ECB78FC08; Sun, 20 Mar 2011 15:04:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KF4hMK082177; Sun, 20 Mar 2011 15:04:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KF4hKO082175; Sun, 20 Mar 2011 15:04:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201103201504.p2KF4hKO082175@svn.freebsd.org> From: Alan Cox Date: Sun, 20 Mar 2011 15:04: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: r219801 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 15:04:43 -0000 Author: alc Date: Sun Mar 20 15:04:43 2011 New Revision: 219801 URL: http://svn.freebsd.org/changeset/base/219801 Log: Update a comment. The sending process has not mapped the buffer pages since before r127501. Strictly speaking, the buffer pages are not "wired". They remain in the paging queues. However, they are pinned in memory using vm_page_hold(). Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sun Mar 20 14:12:50 2011 (r219800) +++ head/sys/kern/sys_pipe.c Sun Mar 20 15:04:43 2011 (r219801) @@ -29,9 +29,9 @@ * write mode. The small write mode acts like conventional pipes with * a kernel buffer. If the buffer is less than PIPE_MINDIRECT, then the * "normal" pipe buffering is done. If the buffer is between PIPE_MINDIRECT - * and PIPE_SIZE in size, it is fully mapped and wired into the kernel, and - * the receiving process can copy it directly from the pages in the sending - * process. + * and PIPE_SIZE in size, the sending process pins the underlying pages in + * memory, and the receiving process copies directly from these pinned pages + * in the sending process. * * If the sending process receives a signal, it is possible that it will * go away, and certainly its address space can change, because control From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 15:46:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9739F106566B; Sun, 20 Mar 2011 15:46:05 +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 632C28FC0C; Sun, 20 Mar 2011 15:46:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KFk57K082975; Sun, 20 Mar 2011 15:46:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KFk5qd082973; Sun, 20 Mar 2011 15:46:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103201546.p2KFk5qd082973@svn.freebsd.org> From: Adrian Chadd Date: Sun, 20 Mar 2011 15:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219802 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 15:46:05 -0000 Author: adrian Date: Sun Mar 20 15:46:05 2011 New Revision: 219802 URL: http://svn.freebsd.org/changeset/base/219802 Log: Disable a check I added a while ago to ensure the initial NF cal completed. Give it a good go (32 attempts) and then print out a warning that's going to occur whether HAL debugging is enabled or not. Then don't abort the radio setup; just continue merrily along. This should fix the issue that users were having where scanning would occasionally fail on the active channel, causing traffic to cease until the radio scanned again. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Mar 20 15:04:43 2011 (r219801) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Mar 20 15:46:05 2011 (r219802) @@ -235,11 +235,13 @@ ar5416InitCalHardware(struct ath_hal *ah /* * Initialize Calibration infrastructure. */ +#define MAX_CAL_CHECK 32 HAL_BOOL ar5416InitCal(struct ath_hal *ah, const struct ieee80211_channel *chan) { struct ar5416PerCal *cal = &AH5416(ah)->ah_cal; HAL_CHANNEL_INTERNAL *ichan; + int i; ichan = ath_hal_checkchannel(ah, chan); HALASSERT(ichan != AH_NULL); @@ -264,13 +266,29 @@ ar5416InitCal(struct ath_hal *ah, const /* XXX this actually kicks off a NF calibration -adrian */ OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); /* - * Try to make sure the above NF cal completes, just so - * it doesn't clash with subsequent percals -adrian + * This sometimes takes a -lot- longer than it should. + * Just give it a bit more time. */ - if (! ar5212WaitNFCalComplete(ah, 10000)) { + for (i = 0; i < MAX_CAL_CHECK; i++) { + if (ar5212WaitNFCalComplete(ah, 10000)) + break; + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: initial NF calibration did " - "not complete in time; noisy environment?\n", __func__); - return AH_FALSE; + "not complete in time; noisy environment (pass %d)?\n", __func__, i); + } + + /* + * Although periodic and NF calibrations shouldn't run concurrently, + * this was causing the radio to not be usable on the active + * channel if the channel was busy. + * + * Instead, now simply print a warning and continue. That way if users + * report "weird crap", they should get this warning. + */ + if (i >= MAX_CAL_CHECK) { + ath_hal_printf(ah, "[ath] Warning - initial NF calibration did " + "not complete in time, noisy environment?\n"); + /* return AH_FALSE; */ } /* Initialize list pointers */ @@ -325,6 +343,7 @@ ar5416InitCal(struct ath_hal *ah, const ichan->calValid = 0; return AH_TRUE; +#undef MAX_CAL_CHECK } /* From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 16:30:35 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82D43106566C; Sun, 20 Mar 2011 16:30:35 +0000 (UTC) (envelope-from bob@immure.com) Received: from maul.immure.com (adsl-66-136-206-1.dsl.austtx.swbell.net [66.136.206.1]) by mx1.freebsd.org (Postfix) with ESMTP id 115038FC17; Sun, 20 Mar 2011 16:30:35 +0000 (UTC) Received: from rancor.immure.com (rancor.immure.com [10.1.132.9]) by maul.immure.com (8.14.4/8.14.4) with ESMTP id p2KGUK8T003968; Sun, 20 Mar 2011 11:30:20 -0500 (CDT) (envelope-from bob@immure.com) Received: (from bob@localhost) by rancor.immure.com (8.14.4/8.14.4/Submit) id p2KGUK4V032957; Sun, 20 Mar 2011 11:30:20 -0500 (CDT) (envelope-from bob) Date: Sun, 20 Mar 2011 11:30:20 -0500 From: Bob Willcox To: Alexander Motin Message-ID: <20110320163019.GA32910@rancor.immure.com> References: <201102052134.p15LYRmw041695@svn.freebsd.org> <20110316135122.GB7185@rancor.immure.com> <4D814AAA.3070801@FreeBSD.org> <20110320141501.GB19338@rancor.immure.com> <4D860C9A.7020600@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D860C9A.7020600@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-immure-MailScanner-Information: Please contact the ISP for more information X-immure-MailScanner-ID: p2KGUK8T003968 X-immure-MailScanner: Found to be clean X-immure-MailScanner-From: bob@immure.com X-Spam-Status: No Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bob Willcox List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 16:30:35 -0000 On Sun, Mar 20, 2011 at 04:18:02PM +0200, Alexander Motin wrote: > Bob Willcox wrote: > > On Thu, Mar 17, 2011 at 01:41:30AM +0200, Alexander Motin wrote: > >> On 16.03.2011 15:51, Bob Willcox wrote: > >>> This change has broken SATA disk support on my Intel Atom D525 ITX system. By > >>> reverting this change 8.2-STABLE works again on this system. > >>> > >>> My 'uname -a' output is: > >>> > >>> FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011 bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL amd64 > >>> > >>> When booting the system I get tons of these messages: > >>> > >>> Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset > >>> Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored > >> As I can see, it means that channel has some active request, but it is > >> in IDLE state. It is strange, but I won't be surprised much if it is the > >> result of some locking problem in ata(4) in non-CAM mode. > >> > >>> repeated over and over, and then lots of these: > >>> > >>> Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479 > >>> Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device > >>> Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed > >>> > >>> for different LBA values. > >>> > >>> As one might expect, I then start seeing I/O errors on the disk and programs > >>> failing > >>> > >>> I've attached the 'pciconf -lv' output. > >> Send me please full verbose log, if you can save it. I am especially > >> interested in place around first errors. > >> > >> You may try to build kernel with `options ATA_CAM` to see if it helps. > >> I've mostly tested this patch in that mode. > > > > I tried setting `options ATA_CAM` but that didn't fix the problem. I still got > > continuous ATA error messages spewed out while probing the ATA devices. I'm > > not able to capture the verbose output as the system never successfully boots > > and I don't have a serial console attached to the system. > > It's strange. Can you at least show errors you received in that case? I > suppose they should be different from the original. They were similar, though this time there was mention of CAM in them (which I assumed was the result of using the CAM interface). The trouble is they roll by quite fast and I'm unable to stop them from scrolling. If this wasn't my most critical system I'd try debugging it more, but I really can't afford for this machine to be out of service. I was hoping that someone with one of these same motherboards: http://www.intel.com/Products/Desktop/Motherboards/db-d525mw/D525MW-overview.htm in a less critical situation might have also seen the problem and been able to do more debugging of it than I am inclined to. Bob > > > For now, I plan to stay with the previous version of ata-intel.c since this is > > my gateway system and I need for it to 'just work'. :( > > -- > Alexander Motin -- Bob Willcox Trying to explain things to people who already know bob@immure.com everything is like trying to teach a bear to dance; Austin, TX it's useless, and it annoys the bear. From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 16:48:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F002A1065670; Sun, 20 Mar 2011 16:48:59 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6DBD88FC1E; Sun, 20 Mar 2011 16:48:59 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p2KGMDiX015370; Sun, 20 Mar 2011 17:22:14 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p2KGMCls015369; Sun, 20 Mar 2011 17:22:12 +0100 (CET) (envelope-from marius) Date: Sun, 20 Mar 2011 17:22:12 +0100 From: Marius Strobl To: Kirk McKusick Message-ID: <20110320162212.GI1606@alchemy.franken.de> References: <4D840BD0.4030306@freebsd.org> <201103200000.p2K00pue003373@chez.mckusick.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201103200000.p2K00pue003373@chez.mckusick.com> User-Agent: Mutt/1.4.2.3i Cc: src-committers@freebsd.org, kvedulv@kvedulv.de, svn-src-all@freebsd.org, Gavin Atkinson , Nathan Whitehorn , svn-src-head@freebsd.org, Jeff Roberson Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 16:49:00 -0000 On Sat, Mar 19, 2011 at 05:00:51PM -0700, Kirk McKusick wrote: > > Date: Fri, 18 Mar 2011 20:50:08 -0500 > > From: Nathan Whitehorn > > Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit > > To: Gavin Atkinson > > Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, > > svn-src-head@FreeBSD.org > > > > On 03/15/11 12:50, Gavin Atkinson wrote: > > > On Tue, 2011-03-15 at 12:26 -0500, Nathan Whitehorn wrote: > > > Hrm, I hadn't realised this was the case. If this change is intentional > > > and planned to remain, I guess the various bits of documentation that > > > say "several partitions good, one bad" should be updated... > > > > It is intended. I think it makes things somewhat easier for the > > virtualization case, and I know a lot of people have been running their > > systems with "one-big-/" for years. If it is harmful for some reason, > > however, it's easy to change. > > > > >>> I wonder if it is time to start enabling SU+J on non-root filesystems > > >>> now? > > >> That's certainly something to think about, although I'll defer whether > > >> that is wise to others. It's a little bit of a pain on the > > >> implementation side, since you can't turn it on from newfs, but that > > >> isn't a serious obstacle. > > > As of r218726, you can now set this from newfs. (-j) > > > > Ah, wonderful. The decision of whether that is a good idea still rests > > with others, however :) > > -nathan > > I believe that we should enable SU+J by default. We should do it now > so that we can get wider experience with it before 9.0 is released > (thus letting us revert to SU if uncorrectable problems arise). I fear it's still a bit premature for enable SU+J by default. Rather recently I was told about a SU+J filesystems lost after a panic that happend after snapshotting it (report CC'ed, maybe he can provide some more details) and I'm pretty sure I've seen the problem described in PR 149022 also after the potential fix mentioned in its feedback. Marius From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 17:19:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 659AB1065670 for ; Sun, 20 Mar 2011 17:19:49 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id 10A848FC1D for ; Sun, 20 Mar 2011 17:19:27 +0000 (UTC) Received: from omta19.westchester.pa.mail.comcast.net ([76.96.62.98]) by qmta09.westchester.pa.mail.comcast.net with comcast id MTgp1g00227AodY59V6C3K; Sun, 20 Mar 2011 17:06:12 +0000 Received: from comcast.net ([98.203.142.76]) by omta19.westchester.pa.mail.comcast.net with comcast id MV691g00d1f6R9u3fV6AdV; Sun, 20 Mar 2011 17:06:12 +0000 Received: by comcast.net (sSMTP sendmail emulation); Sun, 20 Mar 2011 10:06:08 -0700 Date: Sun, 20 Mar 2011 10:06:08 -0700 From: Charlie Kester To: Bob Willcox Message-ID: <20110320170608.GE1019@comcast.net> References: <201102052134.p15LYRmw041695@svn.freebsd.org> <20110316135122.GB7185@rancor.immure.com> <4D814AAA.3070801@FreeBSD.org> <20110320141501.GB19338@rancor.immure.com> <4D860C9A.7020600@FreeBSD.org> <20110320163019.GA32910@rancor.immure.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20110320163019.GA32910@rancor.immure.com> User-Agent: Mutt/1.4.2.3i X-Mailer: Mutt 1.4.2.3i X-Composer: Vim 7.3 Cc: svn-src-stable@FreeBSD.org, Alexander Motin , src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r218347 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 17:19:49 -0000 On Sun 20 Mar 2011 at 09:30:20 PDT Bob Willcox wrote: >On Sun, Mar 20, 2011 at 04:18:02PM +0200, Alexander Motin wrote: >> Bob Willcox wrote: >> > On Thu, Mar 17, 2011 at 01:41:30AM +0200, Alexander Motin wrote: >> >> On 16.03.2011 15:51, Bob Willcox wrote: >> >>> This change has broken SATA disk support on my Intel Atom D525 ITX system. By >> >>> reverting this change 8.2-STABLE works again on this system. >> >>> >> >>> My 'uname -a' output is: >> >>> >> >>> FreeBSD maul.immure.com 8.2-STABLE FreeBSD 8.2-STABLE #6: Wed Mar 16 08:15:43 CDT 2011 bob@maul.immure.com:/usr/obj/usr/src/sys/MAUL amd64 >> >>> >> >>> When booting the system I get tons of these messages: >> >>> >> >>> Mar 16 07:38:19 maul kernel: ad4: WARNING - SETFEATURES ENABLE RCACHE requeued due to channel reset >> >>> Mar 16 07:38:19 maul kernel: ad4: interrupt on idle channel ignored >> >> As I can see, it means that channel has some active request, but it is >> >> in IDLE state. It is strange, but I won't be surprised much if it is the >> >> result of some locking problem in ata(4) in non-CAM mode. >> >> >> >>> repeated over and over, and then lots of these: >> >>> >> >>> Mar 16 07:38:21 maul kernel: ad4: WARNING - READ_DMA48 requeued due to channel reset LBA=617964479 >> >>> Mar 16 07:38:21 maul kernel: ata2: FAILURE - already active DMA on this device >> >>> Mar 16 07:38:21 maul kernel: ata2: setting up DMA failed >> >>> >> >>> for different LBA values. >> >>> >> >>> As one might expect, I then start seeing I/O errors on the disk and programs >> >>> failing >> >>> >> >>> I've attached the 'pciconf -lv' output. >> >> Send me please full verbose log, if you can save it. I am especially >> >> interested in place around first errors. >> >> >> >> You may try to build kernel with `options ATA_CAM` to see if it helps. >> >> I've mostly tested this patch in that mode. >> > >> > I tried setting `options ATA_CAM` but that didn't fix the problem. I still got >> > continuous ATA error messages spewed out while probing the ATA devices. I'm >> > not able to capture the verbose output as the system never successfully boots >> > and I don't have a serial console attached to the system. >> >> It's strange. Can you at least show errors you received in that case? I >> suppose they should be different from the original. > >They were similar, though this time there was mention of CAM in them (which I >assumed was the result of using the CAM interface). The trouble is they roll >by quite fast and I'm unable to stop them from scrolling. > >If this wasn't my most critical system I'd try debugging it more, but I really >can't afford for this machine to be out of service. I was hoping that someone >with one of these same motherboards: > >http://www.intel.com/Products/Desktop/Motherboards/db-d525mw/D525MW-overview.htm > >in a less critical situation might have also seen the problem and been able to >do more debugging of it than I am inclined to. > >Bob FWIW, this problem isn't confined to the D525's. I saw the same problem on my D510MO sometime between 8.2-RC3 and -RELEASE. My mobo has the NM10 chipset, which is also used on the D525. I've since reverted to RC3 and have been postponing an upgrade to -STABLE until this issue is resolved. Like Bob, I can't afford to have this machine disabled. Nor am I able to gather any logs, etc., because I don't have a serial terminal and the problem makes any disk io unreliable. From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 20:25:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 8BFC0106564A; Sun, 20 Mar 2011 20:25:24 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from foreign.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 1497014E135; Sun, 20 Mar 2011 20:25:20 +0000 (UTC) Message-ID: <4D8662B0.8000705@FreeBSD.org> Date: Sun, 20 Mar 2011 13:25:20 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110319 Thunderbird/3.1.9 MIME-Version: 1.0 To: Marius Strobl References: <4D840BD0.4030306@freebsd.org> <201103200000.p2K00pue003373@chez.mckusick.com> <20110320162212.GI1606@alchemy.franken.de> In-Reply-To: <20110320162212.GI1606@alchemy.franken.de> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, kvedulv@kvedulv.de, Jeff Roberson , Kirk McKusick , Gavin Atkinson , Nathan Whitehorn , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 20:25:24 -0000 On 03/20/2011 09:22, Marius Strobl wrote: > I fear it's still a bit premature for enable SU+J by default. Rather > recently I was told about a SU+J filesystems lost after a panic > that happend after snapshotting it (report CC'ed, maybe he can > provide some more details) and I'm pretty sure I've seen the problem > described in PR 149022 also after the potential fix mentioned in its > feedback. +1 I tried enabling SU+J on my /var (after backing up of course) and after a panic random files were missing entirely. Not the last updates to those files, the whole file, and many of them had not been written to in days/weeks/months. With all due respect to the hard work that went into the code, I would be very uncomfortable with enabling it by default at this point. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 20:53:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C41106566B; Sun, 20 Mar 2011 20:53:55 +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 560DD8FC13; Sun, 20 Mar 2011 20:53:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KKrtKh089144; Sun, 20 Mar 2011 20:53:55 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KKrtbn089142; Sun, 20 Mar 2011 20:53:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201103202053.p2KKrtbn089142@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 20 Mar 2011 20:53: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: r219803 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 20:53:55 -0000 Author: jilles Date: Sun Mar 20 20:53:55 2011 New Revision: 219803 URL: http://svn.freebsd.org/changeset/base/219803 Log: index(3): Mention that index/rindex are deprecated and not specified by POSIX.1-2008. MFC after: 1 week Modified: head/lib/libc/string/index.3 Modified: head/lib/libc/string/index.3 ============================================================================== --- head/lib/libc/string/index.3 Sun Mar 20 15:46:05 2011 (r219802) +++ head/lib/libc/string/index.3 Sun Mar 20 20:53:55 2011 (r219803) @@ -30,7 +30,7 @@ .\" @(#)index.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd March 20, 2011 .Dt INDEX 3 .Os .Sh NAME @@ -45,6 +45,17 @@ .Ft "char *" .Fn rindex "const char *s" "int c" .Sh DESCRIPTION +.Bf -symbolic +The +.Fn index +and +.Fn rindex +functions have been deprecated in favor of +.Xr strchr 3 +and +.Xr strrchr 3 . +.Ef +.Pp The .Fn index function @@ -100,3 +111,5 @@ before they were moved to for .St -p1003.1-2001 compliance. +The functions are not specified by +.St -p1003.1-2008 . From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 21:05:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED1C106566B; Sun, 20 Mar 2011 21:05:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A04918FC14; Sun, 20 Mar 2011 21:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KL591L089529; Sun, 20 Mar 2011 21:05:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KL59uw089523; Sun, 20 Mar 2011 21:05:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103202105.p2KL59uw089523@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 20 Mar 2011 21: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: r219804 - in head/sys: conf modules/ufs ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 21:05:09 -0000 Author: kib Date: Sun Mar 20 21:05:09 2011 New Revision: 219804 URL: http://svn.freebsd.org/changeset/base/219804 Log: Retire opt_ffs_broken_fixme.h. Instead of directly calling ffs_snapgone(), use UFS_SNAPGONE() with usual layering. Requested by: bde MFC after: 1 week Modified: head/sys/conf/options head/sys/modules/ufs/Makefile head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/conf/options Sun Mar 20 21:05:09 2011 (r219804) @@ -200,6 +200,7 @@ CD9660 opt_dontuse.h CODA opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h +FFS opt_dontuse.h HPFS opt_dontuse.h MSDOSFS opt_dontuse.h NTFS opt_dontuse.h @@ -217,9 +218,6 @@ UNIONFS opt_dontuse.h # Pseudofs debugging PSEUDOFS_TRACE opt_pseudofs.h -# Broken - ffs_snapshot() dependency from ufs_lookup() :-( -FFS opt_ffs_broken_fixme.h - # In-kernel GSS-API KGSSAPI opt_kgssapi.h KGSSAPI_DEBUG opt_kgssapi.h Modified: head/sys/modules/ufs/Makefile ============================================================================== --- head/sys/modules/ufs/Makefile Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/modules/ufs/Makefile Sun Mar 20 21:05:09 2011 (r219804) @@ -3,8 +3,7 @@ .PATH: ${.CURDIR}/../../ufs/ufs ${.CURDIR}/../../ufs/ffs KMOD= ufs -SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_ffs_broken_fixme.h \ - opt_quota.h opt_suiddir.h opt_ufs.h \ +SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_quota.h opt_suiddir.h opt_ufs.h \ vnode_if.h ufs_acl.c ufs_bmap.c ufs_dirhash.c ufs_extattr.c \ ufs_gjournal.c ufs_inode.c ufs_lookup.c ufs_quota.c ufs_vfsops.c \ ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_snapshot.c \ Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Mar 20 21:05:09 2011 (r219804) @@ -797,6 +797,7 @@ ffs_mountfs(devvp, mp, td) ump->um_vfree = ffs_vfree; ump->um_ifree = ffs_ifree; ump->um_rdonly = ffs_rdonly; + ump->um_snapgone = ffs_snapgone; mtx_init(UFS_MTX(ump), "FFS", "FFS Lock", MTX_DEF); bcopy(bp->b_data, ump->um_fs, (u_int)fs->fs_sbsize); if (fs->fs_sbsize < SBLOCKSIZE) Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/ufs/ufs/ufs_lookup.c Sun Mar 20 21:05:09 2011 (r219804) @@ -37,7 +37,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ffs_broken_fixme.h" #include "opt_ufs.h" #include "opt_quota.h" @@ -1253,7 +1252,7 @@ out: * when last open reference goes away. */ if (ip != 0 && (ip->i_flags & SF_SNAPSHOT) != 0 && ip->i_effnlink == 0) - ffs_snapgone(ip); + UFS_SNAPGONE(ip); return (error); } @@ -1316,7 +1315,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype * when last open reference goes away. */ if ((oip->i_flags & SF_SNAPSHOT) != 0 && oip->i_effnlink == 0) - ffs_snapgone(oip); + UFS_SNAPGONE(oip); return (error); } Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/ufs/ufs/ufsmount.h Sun Mar 20 21:05:09 2011 (r219804) @@ -104,6 +104,7 @@ struct ufsmount { int (*um_vfree)(struct vnode *, ino_t, int); void (*um_ifree)(struct ufsmount *, struct inode *); int (*um_rdonly)(struct inode *); + void (*um_snapgone)(struct inode *); }; #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff) @@ -114,6 +115,7 @@ struct ufsmount { #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) #define UFS_IFREE(aa, bb) ((aa)->um_ifree(aa, bb)) #define UFS_RDONLY(aa) ((aa)->i_ump->um_rdonly(aa)) +#define UFS_SNAPGONE(aa) ((aa)->i_ump->um_snapgone(aa)) #define UFS_LOCK(aa) mtx_lock(&(aa)->um_lock) #define UFS_UNLOCK(aa) mtx_unlock(&(aa)->um_lock) From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 22:47:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C21231065670; Sun, 20 Mar 2011 22:47:41 +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 B440A8FC08; Sun, 20 Mar 2011 22:47:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KMlfue091580; Sun, 20 Mar 2011 22:47:41 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KMlfjk091578; Sun, 20 Mar 2011 22:47:41 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103202247.p2KMlfjk091578@svn.freebsd.org> From: Glen Barber Date: Sun, 20 Mar 2011 22:47: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: r219805 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 22:47:41 -0000 Author: gjb (doc committer) Date: Sun Mar 20 22:47:41 2011 New Revision: 219805 URL: http://svn.freebsd.org/changeset/base/219805 Log: Use 'list scan' in favor of 'scan', as 'scan' has a different purpose. Pointed out by: bschmidt MFC after: 1 day Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Sun Mar 20 21:05:09 2011 (r219804) +++ head/sbin/ifconfig/ifconfig.8 Sun Mar 20 22:47:41 2011 (r219805) @@ -2539,7 +2539,7 @@ Destroy the software network interface .Pp Scan for wireless networks using .Li wlan0 : -.Dl # ifconfig wlan0 scan +.Dl # ifconfig wlan0 list scan .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 23:52:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 614BD1065670; Sun, 20 Mar 2011 23:52:45 +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 49FC48FC0C; Sun, 20 Mar 2011 23:52:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KNqj58092896; Sun, 20 Mar 2011 23:52:45 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KNqj9J092894; Sun, 20 Mar 2011 23:52:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201103202352.p2KNqj9J092894@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 20 Mar 2011 23:52: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: r219806 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 23:52:45 -0000 Author: jilles Date: Sun Mar 20 23:52:45 2011 New Revision: 219806 URL: http://svn.freebsd.org/changeset/base/219806 Log: sh(1): Describe subshell environment, command substitution more correctly. POSIX does not require the shell to fork for a subshell environment, and we use that possibility in various ways (command substitutions with a single command and most subshells that are the final command of a shell process). Therefore do not tie subshells to forking in the man page. Command substitutions with expansions are a bit strange, causing a fork for $(...$(($x))...) because $x might expand to y=2; they will probably be changed later but this is how they work now. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun Mar 20 22:47:41 2011 (r219805) +++ head/bin/sh/sh.1 Sun Mar 20 23:52:45 2011 (r219806) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd February 8, 2011 +.Dd March 20, 2011 .Dt SH 1 .Os .Sh NAME @@ -934,9 +934,9 @@ or .Pp .D1 Li { Ar list Ns Li \&; } .Pp -The first form executes the commands in a subshell. +The first form executes the commands in a subshell environment. Note that built-in commands thus executed do not affect the current shell. -The second form does not fork another shell, +The second form never forks another shell, so it is slightly more efficient. Grouping commands together this way allows the user to redirect their output as though they were one program: @@ -1450,8 +1450,8 @@ or the backquoted version: .Pp .D1 Li ` Ns Ar command Ns Li ` .Pp -The shell expands the command substitution by executing command in a -subshell environment and replacing the command substitution +The shell expands the command substitution by executing command +and replacing the command substitution with the standard output of the command, removing sequences of one or more newlines at the end of the substitution. Embedded newlines before the end of the output are not removed; @@ -1459,6 +1459,18 @@ however, during field splitting, they ma depending on the value of .Va IFS and the quoting that is in effect. +The command is executed in a subshell environment, +except that the built-in commands +.Ic jobid , +.Ic jobs , +.Ic times +and +.Ic trap +return information about the main shell environment +if they are the only command in a command substitution +and the substitutions in the command cannot cause side effects +(such as from assigning values to variables or referencing +.Li $! ). .Ss Arithmetic Expansion Arithmetic expansion provides a mechanism for evaluating an arithmetic expression and substituting its value. @@ -2265,8 +2277,8 @@ Omitting the .Ar action is another way to request the default action, for compatibility reasons this usage is not recommended though. -When the shell forks off a subshell, -it resets trapped (but not ignored) signals to the default action. +In a subshell environment, +the shell resets trapped (but not ignored) signals to the default action. The .Ic trap command has no effect on signals that were ignored on entry to the shell. From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 01:09:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 744E9106566B; Mon, 21 Mar 2011 01:09:50 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65E178FC18; Mon, 21 Mar 2011 01:09:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L19oHd094686; Mon, 21 Mar 2011 01:09:50 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L19oa8094680; Mon, 21 Mar 2011 01:09:50 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201103210109.p2L19oa8094680@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 21 Mar 2011 01:09: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: r219808 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 01:09:50 -0000 Author: marcel Date: Mon Mar 21 01:09:50 2011 New Revision: 219808 URL: http://svn.freebsd.org/changeset/base/219808 Log: Change region 4 to be part of the kernel. This serves 2 purposes: 1. The PBVM is in region 4, so if we want to make use of it, we need region 4 freed up. 2. Region 4 and above cannot be represented by an off_t by virtue of that type being signed. This is problematic for truss(1), ktrace(1) and other such programs. Modified: head/sys/ia64/ia64/db_machdep.c head/sys/ia64/ia64/gdb_machdep.c head/sys/ia64/ia64/pmap.c head/sys/ia64/include/pmap.h head/sys/ia64/include/vmparam.h Modified: head/sys/ia64/ia64/db_machdep.c ============================================================================== --- head/sys/ia64/ia64/db_machdep.c Mon Mar 21 01:05:20 2011 (r219807) +++ head/sys/ia64/ia64/db_machdep.c Mon Mar 21 01:09:50 2011 (r219808) @@ -260,7 +260,7 @@ db_backtrace(struct thread *td, struct p sym = db_search_symbol(ip, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); db_printf("%s(", name); - if (bsp >= IA64_RR_BASE(5)) { + if (bsp >= VM_MAXUSER_ADDRESS) { for (i = 0; i < args; i++) { if ((bsp & 0x1ff) == 0x1f8) bsp += 8; @@ -279,12 +279,12 @@ db_backtrace(struct thread *td, struct p if (error != ERESTART) continue; - if (sp < IA64_RR_BASE(5)) + if (sp < VM_MAXUSER_ADDRESS) break; tf = (struct trapframe *)(sp + 16); if ((tf->tf_flags & FRAME_SYSCALL) != 0 || - tf->tf_special.iip < IA64_RR_BASE(5)) + tf->tf_special.iip < VM_MAXUSER_ADDRESS) break; /* XXX ask if we should unwind across the trapframe. */ Modified: head/sys/ia64/ia64/gdb_machdep.c ============================================================================== --- head/sys/ia64/ia64/gdb_machdep.c Mon Mar 21 01:05:20 2011 (r219807) +++ head/sys/ia64/ia64/gdb_machdep.c Mon Mar 21 01:09:50 2011 (r219808) @@ -177,7 +177,7 @@ gdb_cpu_query(void) * kernel stack address. See also ptrace_machdep(). */ bspstore = kdb_frame->tf_special.bspstore; - kstack = (bspstore >= IA64_RR_BASE(5)) ? (uint64_t*)bspstore : + kstack = (bspstore >= VM_MAXUSER_ADDRESS) ? (uint64_t*)bspstore : (uint64_t*)(kdb_thread->td_kstack + (bspstore & 0x1ffUL)); gdb_tx_begin('\0'); gdb_tx_mem((void*)(kstack + slot), 8); Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Mon Mar 21 01:05:20 2011 (r219807) +++ head/sys/ia64/ia64/pmap.c Mon Mar 21 01:09:50 2011 (r219808) @@ -102,17 +102,11 @@ __FBSDID("$FreeBSD$"); * We reserve region ID 0 for the kernel and allocate the remaining * IDs for user pmaps. * - * Region 0..4 - * User virtually mapped - * - * Region 5 - * Kernel virtually mapped - * - * Region 6 - * Kernel physically mapped uncacheable - * - * Region 7 - * Kernel physically mapped cacheable + * Region 0-3: User virtually mapped + * Region 4: PBVM and special mappings + * Region 5: Kernel virtual memory + * Region 6: Direct-mapped uncacheable + * Region 7: Direct-mapped cacheable */ /* XXX move to a header. */ @@ -346,9 +340,9 @@ pmap_bootstrap() * Setup RIDs. RIDs 0..7 are reserved for the kernel. * * We currently need at least 19 bits in the RID because PID_MAX - * can only be encoded in 17 bits and we need RIDs for 5 regions + * can only be encoded in 17 bits and we need RIDs for 4 regions * per process. With PID_MAX equalling 99999 this means that we - * need to be able to encode 499995 (=5*PID_MAX). + * need to be able to encode 399996 (=4*PID_MAX). * The Itanium processor only has 18 bits and the architected * minimum is exactly that. So, we cannot use a PID based scheme * in those cases. Enter pmap_ridmap... @@ -390,7 +384,7 @@ pmap_bootstrap() */ ia64_kptdir = (void *)pmap_steal_memory(PAGE_SIZE); nkpt = 0; - kernel_vm_end = VM_MIN_KERNEL_ADDRESS - VM_GATEWAY_SIZE; + kernel_vm_end = VM_MIN_KERNEL_ADDRESS; for (i = 0; phys_avail[i+2]; i+= 2) ; @@ -451,16 +445,13 @@ pmap_bootstrap() * Initialize the kernel pmap (which is statically allocated). */ PMAP_LOCK_INIT(kernel_pmap); - for (i = 0; i < 5; i++) + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) kernel_pmap->pm_rid[i] = 0; TAILQ_INIT(&kernel_pmap->pm_pvlist); PCPU_SET(md.current_pmap, kernel_pmap); - /* - * Region 5 is mapped via the vhpt. - */ - ia64_set_rr(IA64_RR_BASE(5), - (5 << 8) | (PAGE_SHIFT << 2) | 1); + /* Region 5 is mapped via the VHPT. */ + ia64_set_rr(IA64_RR_BASE(5), (5 << 8) | (PAGE_SHIFT << 2) | 1); /* * Region 6 is direct mapped UC and region 7 is direct mapped @@ -678,7 +669,7 @@ pmap_pinit(struct pmap *pmap) int i; PMAP_LOCK_INIT(pmap); - for (i = 0; i < 5; i++) + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) pmap->pm_rid[i] = pmap_allocate_rid(); TAILQ_INIT(&pmap->pm_pvlist); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -699,7 +690,7 @@ pmap_release(pmap_t pmap) { int i; - for (i = 0; i < 5; i++) + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) if (pmap->pm_rid[i]) pmap_free_rid(pmap->pm_rid[i]); PMAP_LOCK_DESTROY(pmap); @@ -1221,7 +1212,7 @@ pmap_kextract(vm_offset_t va) struct ia64_lpte *pte; vm_offset_t gwpage; - KASSERT(va >= IA64_RR_BASE(5), ("Must be kernel VA")); + KASSERT(va >= VM_MAXUSER_ADDRESS, ("Must be kernel VA")); /* Regions 6 and 7 are direct mapped. */ if (va >= IA64_RR_BASE(6)) @@ -1229,7 +1220,7 @@ pmap_kextract(vm_offset_t va) /* EPC gateway page? */ gwpage = (vm_offset_t)ia64_get_k5(); - if (va >= gwpage && va < gwpage + VM_GATEWAY_SIZE) + if (va >= gwpage && va < gwpage + PAGE_SIZE) return (IA64_RR_MASK((vm_offset_t)ia64_gateway_page)); /* Bail out if the virtual address is beyond our limits. */ @@ -2285,12 +2276,12 @@ pmap_switch(pmap_t pm) if (prevpm == pm) goto out; if (pm == NULL) { - for (i = 0; i < 5; i++) { + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) { ia64_set_rr(IA64_RR_BASE(i), (i << 8)|(PAGE_SHIFT << 2)|1); } } else { - for (i = 0; i < 5; i++) { + for (i = 0; i < IA64_VM_MINKERN_REGION; i++) { ia64_set_rr(IA64_RR_BASE(i), (pm->pm_rid[i] << 8)|(PAGE_SHIFT << 2)|1); } Modified: head/sys/ia64/include/pmap.h ============================================================================== --- head/sys/ia64/include/pmap.h Mon Mar 21 01:05:20 2011 (r219807) +++ head/sys/ia64/include/pmap.h Mon Mar 21 01:09:50 2011 (r219808) @@ -50,6 +50,7 @@ #include #include #include +#include #ifdef _KERNEL @@ -75,7 +76,7 @@ struct md_page { struct pmap { struct mtx pm_mtx; TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ - uint32_t pm_rid[5]; /* base RID for pmap */ + uint32_t pm_rid[IA64_VM_MINKERN_REGION]; struct pmap_statistics pm_stats; /* pmap statistics */ }; Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Mon Mar 21 01:05:20 2011 (r219807) +++ head/sys/ia64/include/vmparam.h Mon Mar 21 01:09:50 2011 (r219808) @@ -42,12 +42,6 @@ #define _MACHINE_VMPARAM_H_ /* - * USRSTACK is the top (end) of the user stack. Immediately above the user - * stack resides the syscall gateway page. - */ -#define USRSTACK VM_MAXUSER_ADDRESS - -/* * Virtual memory related constants, all in bytes */ #ifndef MAXTSIZ @@ -122,6 +116,8 @@ #define VM_NRESERVLEVEL 0 #endif +#define IA64_VM_MINKERN_REGION 4 + /* * Manipulating region bits of an address. */ @@ -138,7 +134,8 @@ * to 0x1ffbffffffffffff. We define the top half of a region in terms of * this worst-case gap. */ -#define IA64_REGION_TOP_HALF 0x1ffc000000000000 +#define IA64_REGION_GAP_START 0x0004000000000000 +#define IA64_REGION_GAP_EXTEND 0x1ffc000000000000 /* * Page size of the identity mappings in region 7. @@ -151,7 +148,6 @@ #define IA64_ID_PAGE_SIZE (1<<(LOG2_ID_PAGE_SIZE)) #define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1) -#define IA64_BACKINGSTORE IA64_RR_BASE(4) /* * Parameters for Pre-Boot Virtual Memory (PBVM). @@ -177,9 +173,9 @@ * and wired into the CPU, but does not assume that the mapping covers the * whole of PBVM. */ -#define IA64_PBVM_RR 4 +#define IA64_PBVM_RR IA64_VM_MINKERN_REGION #define IA64_PBVM_BASE \ - (IA64_RR_BASE(IA64_PBVM_RR) + IA64_REGION_TOP_HALF) + (IA64_RR_BASE(IA64_PBVM_RR) + IA64_REGION_GAP_EXTEND) #define IA64_PBVM_PGTBL_MAXSZ 1048576 #define IA64_PBVM_PGTBL \ @@ -194,15 +190,21 @@ */ /* user/kernel map constants */ -#define VM_MIN_ADDRESS 0 -#define VM_MAXUSER_ADDRESS IA64_RR_BASE(5) -#define VM_GATEWAY_SIZE PAGE_SIZE -#define VM_MIN_KERNEL_ADDRESS (VM_MAXUSER_ADDRESS + VM_GATEWAY_SIZE) -#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1) +#define VM_MIN_ADDRESS 0 +#define VM_MAXUSER_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION) +#define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1) +#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1) #define VM_MAX_ADDRESS ~0UL #define KERNBASE VM_MAXUSER_ADDRESS +/* + * USRSTACK is the top (end) of the user stack. Immediately above the user + * stack resides the syscall gateway page. + */ +#define USRSTACK VM_MAXUSER_ADDRESS +#define IA64_BACKINGSTORE (USRSTACK - (2 * MAXSSIZ) - PAGE_SIZE) + /* virtual sizes (bytes) for various kernel submaps */ #ifndef VM_KMEM_SIZE #define VM_KMEM_SIZE (12 * 1024 * 1024) From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 03:45:07 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1B84106566B; Mon, 21 Mar 2011 03:45:07 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [64.81.247.49]) by mx1.freebsd.org (Postfix) with ESMTP id A636A8FC0C; Mon, 21 Mar 2011 03:45:07 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id p2L3gWM9057768; Sun, 20 Mar 2011 20:42:32 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201103210342.p2L3gWM9057768@chez.mckusick.com> To: Doug Barton In-reply-to: <4D8662B0.8000705@FreeBSD.org> Date: Sun, 20 Mar 2011 20:42:32 -0700 From: Kirk McKusick X-Spam-Status: No, score=0.0 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on chez.mckusick.com Cc: src-committers@FreeBSD.org, kvedulv@kvedulv.de, svn-src-all@FreeBSD.org, Gavin Atkinson , Nathan Whitehorn , Marius Strobl , svn-src-head@FreeBSD.org, Jeff Roberson Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 03:45:07 -0000 > Date: Sun, 20 Mar 2011 13:25:20 -0700 > From: Doug Barton > To: Marius Strobl > CC: Kirk McKusick , > Nathan Whitehorn , svn-src-head@FreeBSD.org, > Jeff Roberson , Gavin Atkinson , > svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, > kvedulv@kvedulv.de > Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit > > On 03/20/2011 09:22, Marius Strobl wrote: > > > I fear it's still a bit premature for enable SU+J by default. Rather > > recently I was told about a SU+J filesystems lost after a panic > > that happend after snapshotting it (report CC'ed, maybe he can > > provide some more details) and I'm pretty sure I've seen the problem > > described in PR 149022 also after the potential fix mentioned in its > > feedback. > > +1 > > I tried enabling SU+J on my /var (after backing up of course) and after > a panic random files were missing entirely. Not the last updates to > those files, the whole file, and many of them had not been written to in > days/weeks/months. > > With all due respect to the hard work that went into the code, I would > be very uncomfortable with enabling it by default at this point. > > > Doug With all due respect, how can we fix things that nobody reports? If you have a problem, let us know about it. And of course, we need something more specific than the above. Kirk McKusick From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 04:03:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F7D5106564A; Mon, 21 Mar 2011 04:03:56 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 402558FC08; Mon, 21 Mar 2011 04:03:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L43uZt098722; Mon, 21 Mar 2011 04:03:56 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L43uuu098712; Mon, 21 Mar 2011 04:03:56 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201103210403.p2L43uuu098712@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 21 Mar 2011 04:03: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: r219811 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 04:03:56 -0000 Author: marcel Date: Mon Mar 21 04:03:55 2011 New Revision: 219811 URL: http://svn.freebsd.org/changeset/base/219811 Log: Fix typo: s/LIBSERACHPATH/LIBSEARCHPATH/g Modified: head/gnu/usr.bin/binutils/ld/Makefile head/gnu/usr.bin/binutils/ld/Makefile.amd64 head/gnu/usr.bin/binutils/ld/Makefile.arm head/gnu/usr.bin/binutils/ld/Makefile.i386 head/gnu/usr.bin/binutils/ld/Makefile.ia64 head/gnu/usr.bin/binutils/ld/Makefile.mips head/gnu/usr.bin/binutils/ld/Makefile.powerpc head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 head/gnu/usr.bin/binutils/ld/Makefile.sparc64 Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile Mon Mar 21 04:03:55 2011 (r219811) @@ -42,7 +42,7 @@ CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed HOST= ${TARGET_TUPLE} -LIBSERACHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" +LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.amd64 Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.amd64 Mon Mar 21 04:03:55 2011 (r219811) @@ -6,7 +6,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} Modified: head/gnu/usr.bin/binutils/ld/Makefile.arm ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.arm Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.arm Mon Mar 21 04:03:55 2011 (r219811) @@ -10,7 +10,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ Modified: head/gnu/usr.bin/binutils/ld/Makefile.i386 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.i386 Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.i386 Mon Mar 21 04:03:55 2011 (r219811) @@ -6,7 +6,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} Modified: head/gnu/usr.bin/binutils/ld/Makefile.ia64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.ia64 Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.ia64 Mon Mar 21 04:03:55 2011 (r219811) @@ -6,7 +6,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} @@ -17,7 +17,7 @@ SRCS+= eelf64_ia64.c CLEANFILES+= eelf64_ia64.c eelf64_ia64.c: emulparams/elf64_ia64.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ elf64_ia64 "" no elf64_ia64 ${TARGET_TUPLE} Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.mips Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Mon Mar 21 04:03:55 2011 (r219811) @@ -28,7 +28,7 @@ CLEANFILES+= e${abi}.c # nb: elf32 handles both elf32 and elf64 targets e${abi}.c: ${.CURDIR}/${abi}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${abi} "" no ${abi} ${TARGET_TUPLE} \ Modified: head/gnu/usr.bin/binutils/ld/Makefile.powerpc ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.powerpc Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.powerpc Mon Mar 21 04:03:55 2011 (r219811) @@ -6,7 +6,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed ldemul-list.h - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} Modified: head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Mon Mar 21 04:03:55 2011 (r219811) @@ -6,7 +6,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed ldemul-list.h - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} Modified: head/gnu/usr.bin/binutils/ld/Makefile.sparc64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.sparc64 Mon Mar 21 02:15:12 2011 (r219810) +++ head/gnu/usr.bin/binutils/ld/Makefile.sparc64 Mon Mar 21 04:03:55 2011 (r219811) @@ -6,7 +6,7 @@ SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} @@ -23,7 +23,7 @@ SRCS+= eelf${BITS}_sparc.c CLEANFILES+= eelf${BITS}_sparc.c eelf${BITS}_sparc.c: emulparams/elf${BITS}_sparc.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed - sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ elf${BITS}_sparc "" no elf${BITS}_sparc ${TARGET_TUPLE} From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 06:18:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 040A9106578B; Mon, 21 Mar 2011 06:18:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA24C8FC15; Mon, 21 Mar 2011 06:18:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L6IQlP001820; Mon, 21 Mar 2011 06:18:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L6IQLp001819; Mon, 21 Mar 2011 06:18:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201103210618.p2L6IQLp001819@svn.freebsd.org> From: Xin LI Date: Mon, 21 Mar 2011 06:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219812 - in stable: 7/tools/tools/nanobsd 7/tools/tools/nanobsd/Files/root 8/tools/tools/nanobsd/Files/root X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 06:18:27 -0000 Author: delphij Date: Mon Mar 21 06:18:26 2011 New Revision: 219812 URL: http://svn.freebsd.org/changeset/base/219812 Log: MFC r218816: Add a helper script that detects which partition we are on and update the other. Obtained from: FreeNAS Sponsored by: iXsystems, Inc. Added: stable/8/tools/tools/nanobsd/Files/root/update - copied unchanged from r218816, head/tools/tools/nanobsd/Files/root/update Modified: Directory Properties: stable/8/tools/tools/nanobsd/ (props changed) Changes in other areas also in this revision: Added: stable/7/tools/tools/nanobsd/Files/root/update - copied unchanged from r218816, head/tools/tools/nanobsd/Files/root/update Modified: Directory Properties: stable/7/tools/tools/nanobsd/ (props changed) stable/7/tools/tools/nanobsd/FlashDevice.sub (props changed) stable/7/tools/tools/nanobsd/nanobsd.sh (props changed) Copied: stable/8/tools/tools/nanobsd/Files/root/update (from r218816, head/tools/tools/nanobsd/Files/root/update) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/tools/nanobsd/Files/root/update Mon Mar 21 06:18:26 2011 (r219812, copy of r218816, head/tools/tools/nanobsd/Files/root/update) @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Copyright (c) 2011 iXsystems, 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. +# +# $FreeBSD$ +# +# Script to update a NanoBSD system. +# +# usage: +# ssh somewhere cat image.s1 | sh update +# + +set -e + +. /etc/nanobsd.conf + +if mount | grep ${NANO_DRIVE}s1 > /dev/null ; then + exec sh /root/updatep2 +else + exec sh /root/updatep1 +fi + From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 06:18:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 308E81065675; Mon, 21 Mar 2011 06:18:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 029BD8FC16; Mon, 21 Mar 2011 06:18:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L6IQTT001826; Mon, 21 Mar 2011 06:18:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L6IQuE001825; Mon, 21 Mar 2011 06:18:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201103210618.p2L6IQuE001825@svn.freebsd.org> From: Xin LI Date: Mon, 21 Mar 2011 06:18:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219812 - in stable: 7/tools/tools/nanobsd 7/tools/tools/nanobsd/Files/root 8/tools/tools/nanobsd/Files/root X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 06:18:27 -0000 Author: delphij Date: Mon Mar 21 06:18:26 2011 New Revision: 219812 URL: http://svn.freebsd.org/changeset/base/219812 Log: MFC r218816: Add a helper script that detects which partition we are on and update the other. Obtained from: FreeNAS Sponsored by: iXsystems, Inc. Added: stable/7/tools/tools/nanobsd/Files/root/update - copied unchanged from r218816, head/tools/tools/nanobsd/Files/root/update Modified: Directory Properties: stable/7/tools/tools/nanobsd/ (props changed) stable/7/tools/tools/nanobsd/FlashDevice.sub (props changed) stable/7/tools/tools/nanobsd/nanobsd.sh (props changed) Changes in other areas also in this revision: Added: stable/8/tools/tools/nanobsd/Files/root/update - copied unchanged from r218816, head/tools/tools/nanobsd/Files/root/update Modified: Directory Properties: stable/8/tools/tools/nanobsd/ (props changed) Copied: stable/7/tools/tools/nanobsd/Files/root/update (from r218816, head/tools/tools/nanobsd/Files/root/update) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/tools/nanobsd/Files/root/update Mon Mar 21 06:18:26 2011 (r219812, copy of r218816, head/tools/tools/nanobsd/Files/root/update) @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Copyright (c) 2011 iXsystems, 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. +# +# $FreeBSD$ +# +# Script to update a NanoBSD system. +# +# usage: +# ssh somewhere cat image.s1 | sh update +# + +set -e + +. /etc/nanobsd.conf + +if mount | grep ${NANO_DRIVE}s1 > /dev/null ; then + exec sh /root/updatep2 +else + exec sh /root/updatep1 +fi + From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:31:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98BE3106566B; Mon, 21 Mar 2011 08:31:35 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8756A8FC0C; Mon, 21 Mar 2011 08:31:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L8VZ5B004703; Mon, 21 Mar 2011 08:31:35 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L8VZ6P004701; Mon, 21 Mar 2011 08:31:35 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103210831.p2L8VZ6P004701@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:31: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: r219813 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:31:35 -0000 Author: pjd Date: Mon Mar 21 08:31:35 2011 New Revision: 219813 URL: http://svn.freebsd.org/changeset/base/219813 Log: If there is any traffic on one of out descriptors, we were not checking for long running hooks. Fix it by not using select(2) timeout to decide if we want to check hooks or not. MFC after: 1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Mar 21 06:18:26 2011 (r219812) +++ head/sbin/hastd/hastd.c Mon Mar 21 08:31:35 2011 (r219813) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -877,9 +878,11 @@ main_loop(void) struct timeval seltimeout; struct timespec sigtimeout; int fd, maxfd, ret, signo; + time_t lastcheck, now; sigset_t mask; fd_set rfds; + lastcheck = time(NULL); seltimeout.tv_sec = REPORT_INTERVAL; seltimeout.tv_usec = 0; sigtimeout.tv_sec = 0; @@ -943,9 +946,18 @@ main_loop(void) PJDLOG_ASSERT(maxfd + 1 <= (int)FD_SETSIZE); ret = select(maxfd + 1, &rfds, NULL, NULL, &seltimeout); - if (ret == 0) + now = time(NULL); + if (lastcheck + REPORT_INTERVAL <= now) { hook_check(); - else if (ret == -1) { + lastcheck = now; + } + if (ret == 0) { + /* + * select(2) timed out, so there should be no + * descriptors to check. + */ + continue; + } else if (ret == -1) { if (errno == EINTR) continue; KEEP_ERRNO((void)pidfile_remove(pfh)); From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:33:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9120106564A; Mon, 21 Mar 2011 08:33:58 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97CCB8FC0C; Mon, 21 Mar 2011 08:33:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L8XwLq004804; Mon, 21 Mar 2011 08:33:58 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L8Xw6w004802; Mon, 21 Mar 2011 08:33:58 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103210833.p2L8Xw6w004802@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:33: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: r219814 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:33:58 -0000 Author: pjd Date: Mon Mar 21 08:33:58 2011 New Revision: 219814 URL: http://svn.freebsd.org/changeset/base/219814 Log: When creating connection on behalf of primary worker, set pjdlog prefix to resource name and role, so that any logs related to that can be identified properly. MFC after: 1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Mar 21 08:31:35 2011 (r219813) +++ head/sbin/hastd/hastd.c Mon Mar 21 08:33:58 2011 (r219814) @@ -842,6 +842,8 @@ connection_migrate(struct hast_resource struct proto_conn *conn; int16_t val = 0; + pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role)); + if (proto_recv(res->hr_conn, &val, sizeof(val)) < 0) { pjdlog_errno(LOG_WARNING, "Unable to receive connection command"); @@ -869,6 +871,8 @@ out: } if (val == 0 && proto_connection_send(res->hr_conn, conn) < 0) pjdlog_errno(LOG_WARNING, "Unable to send connection"); + + pjdlog_prefix_set("%s", ""); } static void From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:36:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80AAD106566B; Mon, 21 Mar 2011 08:36:50 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2B08FC16; Mon, 21 Mar 2011 08:36:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L8aoIC004896; Mon, 21 Mar 2011 08:36:50 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L8aoee004893; Mon, 21 Mar 2011 08:36:50 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103210836.p2L8aoee004893@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:36: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: r219815 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:36:50 -0000 Author: pjd Date: Mon Mar 21 08:36:50 2011 New Revision: 219815 URL: http://svn.freebsd.org/changeset/base/219815 Log: Add snprlcat() and vsnprlcat() - the functions I'm always missing. They work as a combination of snprintf(3) and strlcat(3) - the caller can append a string build based on the given format. MFC after: 1 week Modified: head/sbin/hastd/subr.c head/sbin/hastd/subr.h Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Mon Mar 21 08:33:58 2011 (r219814) +++ head/sbin/hastd/subr.c Mon Mar 21 08:36:50 2011 (r219815) @@ -38,6 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -46,6 +49,27 @@ __FBSDID("$FreeBSD$"); #include "subr.h" int +vsnprlcat(char *str, size_t size, const char *fmt, va_list ap) +{ + size_t len; + + len = strlen(str); + return (vsnprintf(str + len, size - len, fmt, ap)); +} + +int +snprlcat(char *str, size_t size, const char *fmt, ...) +{ + va_list ap; + int result; + + va_start(ap, fmt); + result = vsnprlcat(str, size, fmt, ap); + va_end(ap); + return (result); +} + +int provinfo(struct hast_resource *res, bool dowrite) { struct stat sb; Modified: head/sbin/hastd/subr.h ============================================================================== --- head/sbin/hastd/subr.h Mon Mar 21 08:33:58 2011 (r219814) +++ head/sbin/hastd/subr.h Mon Mar 21 08:36:50 2011 (r219815) @@ -45,6 +45,9 @@ errno = _rerrno; \ } while (0) +int vsnprlcat(char *str, size_t size, const char *fmt, va_list ap); +int snprlcat(char *str, size_t size, const char *fmt, ...); + int provinfo(struct hast_resource *res, bool dowrite); const char *role2str(int role); int drop_privs(void); From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:37:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F3031065673; Mon, 21 Mar 2011 08:37:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DD9F8FC19; Mon, 21 Mar 2011 08:37:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L8bpup004951; Mon, 21 Mar 2011 08:37:51 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L8bpHC004949; Mon, 21 Mar 2011 08:37:51 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103210837.p2L8bpHC004949@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:37: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: r219816 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:37:51 -0000 Author: pjd Date: Mon Mar 21 08:37:50 2011 New Revision: 219816 URL: http://svn.freebsd.org/changeset/base/219816 Log: Use snprlcat() instead of two strlcat(3)s. MFC after: 1 week Modified: head/sbin/hastd/hooks.c Modified: head/sbin/hastd/hooks.c ============================================================================== --- head/sbin/hastd/hooks.c Mon Mar 21 08:36:50 2011 (r219815) +++ head/sbin/hastd/hooks.c Mon Mar 21 08:37:50 2011 (r219816) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include "hooks.h" +#include "subr.h" #include "synch.h" /* Report processes that are running for too long not often than this value. */ @@ -184,8 +185,8 @@ hook_alloc(const char *path, char **args (void)strlcpy(hp->hp_comm, path, sizeof(hp->hp_comm)); /* We start at 2nd argument as we don't want to have exec name twice. */ for (ii = 1; args[ii] != NULL; ii++) { - (void)strlcat(hp->hp_comm, " ", sizeof(hp->hp_comm)); - (void)strlcat(hp->hp_comm, args[ii], sizeof(hp->hp_comm)); + (void)snprlcat(hp->hp_comm, sizeof(hp->hp_comm), " %s", + args[ii]); } if (strlen(hp->hp_comm) >= sizeof(hp->hp_comm) - 1) { pjdlog_error("Exec path too long, correct configuration file."); From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:38:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D758C1065676; Mon, 21 Mar 2011 08:38:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C65B28FC14; Mon, 21 Mar 2011 08:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L8cOkc005003; Mon, 21 Mar 2011 08:38:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L8cOFF005001; Mon, 21 Mar 2011 08:38:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103210838.p2L8cOFF005001@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:38: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: r219817 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:38:24 -0000 Author: pjd Date: Mon Mar 21 08:38:24 2011 New Revision: 219817 URL: http://svn.freebsd.org/changeset/base/219817 Log: Log when we start hooks checking and when we execute a hook. MFC after: 1 week Modified: head/sbin/hastd/hooks.c Modified: head/sbin/hastd/hooks.c ============================================================================== --- head/sbin/hastd/hooks.c Mon Mar 21 08:37:50 2011 (r219816) +++ head/sbin/hastd/hooks.c Mon Mar 21 08:38:24 2011 (r219817) @@ -288,6 +288,8 @@ hook_check(void) assert(hooks_initialized); + pjdlog_debug(1, "Checking hooks."); + /* * Report about processes that are running for a long time. */ @@ -363,6 +365,8 @@ hook_execv(const char *path, va_list ap) if (hp == NULL) return; + pjdlog_debug(1, "Executing hook: %s", hp->hp_comm); + pid = fork(); switch (pid) { case -1: /* Error. */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:54:45 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5CA5106564A; Mon, 21 Mar 2011 08:54:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 46DA88FC13; Mon, 21 Mar 2011 08:54:44 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p2L8cKiE017244; Mon, 21 Mar 2011 11:38:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p2L8cKVx017243; Mon, 21 Mar 2011 11:38:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 21 Mar 2011 11:38:20 +0300 From: Gleb Smirnoff To: Dmitry Chagin Message-ID: <20110321083820.GU71575@FreeBSD.org> References: <201103200835.p2K8Z05Z049647@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201103200835.p2K8Z05Z049647@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: r219791 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:54:45 -0000 On Sun, Mar 20, 2011 at 08:35:00AM +0000, Dmitry Chagin wrote: D> Author: dchagin D> Date: Sun Mar 20 08:35:00 2011 D> New Revision: 219791 D> URL: http://svn.freebsd.org/changeset/base/219791 D> D> Log: D> Remove dead code. This wasn't a code, but defines. Removing them saves nothing, but primitives deleted may be useful. D> MFC after: 1 Week D> D> Modified: D> head/sys/net/route.h D> D> Modified: head/sys/net/route.h D> ============================================================================== D> --- head/sys/net/route.h Sun Mar 20 08:27:06 2011 (r219790) D> +++ head/sys/net/route.h Sun Mar 20 08:35:00 2011 (r219791) D> @@ -325,7 +325,6 @@ struct rt_addrinfo { D> #define RT_LOCK_INIT(_rt) \ D> mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK) D> #define RT_LOCK(_rt) mtx_lock(&(_rt)->rt_mtx) D> -#define RT_TRYLOCK(_rt) mtx_trylock(&(_rt)->rt_mtx) D> #define RT_UNLOCK(_rt) mtx_unlock(&(_rt)->rt_mtx) D> #define RT_LOCK_DESTROY(_rt) mtx_destroy(&(_rt)->rt_mtx) D> #define RT_LOCK_ASSERT(_rt) mtx_assert(&(_rt)->rt_mtx, MA_OWNED) D> @@ -360,22 +359,6 @@ struct rt_addrinfo { D> RTFREE_LOCKED(_rt); \ D> } while (0) D> D> -#define RT_TEMP_UNLOCK(_rt) do { \ D> - RT_ADDREF(_rt); \ D> - RT_UNLOCK(_rt); \ D> -} while (0) D> - D> -#define RT_RELOCK(_rt) do { \ D> - RT_LOCK(_rt); \ D> - if ((_rt)->rt_refcnt <= 1) { \ D> - rtfree(_rt); \ D> - _rt = 0; /* signal that it went away */ \ D> - } else { \ D> - RT_REMREF(_rt); \ D> - /* note that _rt is still valid */ \ D> - } \ D> -} while (0) D> - D> struct radix_node_head *rt_tables_get_rnh(int, int); D> D> struct ifmultiaddr; -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 08:54:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECDC710657C1; Mon, 21 Mar 2011 08:54:59 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA4968FC0A; Mon, 21 Mar 2011 08:54:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L8sxTW005487; Mon, 21 Mar 2011 08:54:59 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L8sxnA005472; Mon, 21 Mar 2011 08:54:59 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103210854.p2L8sxnA005472@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 08:54: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: r219818 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 08:55:00 -0000 Author: pjd Date: Mon Mar 21 08:54:59 2011 New Revision: 219818 URL: http://svn.freebsd.org/changeset/base/219818 Log: In hast.conf we define the other node's address in 'remote' variable. This way we know how to connect to secondary node when we are primary. The same variable is used by the secondary node - it only accepts connections from the address stored in 'remote' variable. In cluster configurations it is common that each node has its individual IP address and there is one addtional shared IP address which is assigned to primary node. It seems it is possible that if the shared IP address is from the same network as the individual IP address it might be choosen by the kernel as a source address for connection with the secondary node. Such connection will be rejected by secondary, as it doesn't come from primary node individual IP. Add 'source' variable that allows to specify source IP address we want to bind to before connecting to the secondary node. MFC after: 1 week Modified: head/sbin/hastd/control.c head/sbin/hastd/hast.conf.5 head/sbin/hastd/hast.h head/sbin/hastd/hastd.c head/sbin/hastd/parse.y head/sbin/hastd/primary.c head/sbin/hastd/proto.c head/sbin/hastd/proto.h head/sbin/hastd/proto_impl.h head/sbin/hastd/proto_socketpair.c head/sbin/hastd/proto_tcp4.c head/sbin/hastd/proto_uds.c head/sbin/hastd/secondary.c head/sbin/hastd/token.l Modified: head/sbin/hastd/control.c ============================================================================== --- head/sbin/hastd/control.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/control.c Mon Mar 21 08:54:59 2011 (r219818) @@ -234,6 +234,8 @@ control_status(struct hastd_config *cfg, nv_add_string(nvout, res->hr_provname, "provname%u", no); nv_add_string(nvout, res->hr_localpath, "localpath%u", no); nv_add_string(nvout, res->hr_remoteaddr, "remoteaddr%u", no); + if (res->hr_sourceaddr[0] != '\0') + nv_add_string(nvout, res->hr_sourceaddr, "sourceaddr%u", no); switch (res->hr_replication) { case HAST_REPLICATION_FULLSYNC: nv_add_string(nvout, "fullsync", "replication%u", no); Modified: head/sbin/hastd/hast.conf.5 ============================================================================== --- head/sbin/hastd/hast.conf.5 Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/hast.conf.5 Mon Mar 21 08:54:59 2011 (r219818) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2010 +.Dd March 20, 2011 .Dt HAST.CONF 5 .Os .Sh NAME @@ -93,6 +93,7 @@ resource { local # Required remote + source } on { # Resource-node section @@ -101,6 +102,7 @@ resource { local # Required remote + source } } .Ed @@ -337,6 +339,14 @@ A special value of .Va none can be used when the remote address is not yet known (eg. the other node is not set up yet). +.It Ic source Aq addr +.Pp +Local address to bind to before connecting to the remote +.Nm hastd +daemon. +Format is the same as for the +.Ic listen +statement. .El .Sh FILES .Bl -tag -width ".Pa /var/run/hastctl" -compact @@ -367,10 +377,12 @@ resource shared { resource tank { on hasta { local /dev/mirror/tanka + source tcp4://10.0.0.1 remote tcp4://10.0.0.2 } on hastb { local /dev/mirror/tankb + source tcp4://10.0.0.2 remote tcp4://10.0.0.1 } } Modified: head/sbin/hastd/hast.h ============================================================================== --- head/sbin/hastd/hast.h Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/hast.h Mon Mar 21 08:54:59 2011 (r219818) @@ -169,6 +169,8 @@ struct hast_resource { /* Address of the remote component. */ char hr_remoteaddr[HAST_ADDRSIZE]; + /* Local address to bind to for outgoing connections. */ + char hr_sourceaddr[HAST_ADDRSIZE]; /* Connection for incoming data. */ struct proto_conn *hr_remotein; /* Connection for outgoing data. */ Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/hastd.c Mon Mar 21 08:54:59 2011 (r219818) @@ -360,6 +360,8 @@ resource_needs_restart(const struct hast res0->hr_role == HAST_ROLE_SECONDARY) { if (strcmp(res0->hr_remoteaddr, res1->hr_remoteaddr) != 0) return (true); + if (strcmp(res0->hr_sourceaddr, res1->hr_sourceaddr) != 0) + return (true); if (res0->hr_replication != res1->hr_replication) return (true); if (res0->hr_checksum != res1->hr_checksum) @@ -388,6 +390,8 @@ resource_needs_reload(const struct hast_ if (strcmp(res0->hr_remoteaddr, res1->hr_remoteaddr) != 0) return (true); + if (strcmp(res0->hr_sourceaddr, res1->hr_sourceaddr) != 0) + return (true); if (res0->hr_replication != res1->hr_replication) return (true); if (res0->hr_checksum != res1->hr_checksum) @@ -412,6 +416,7 @@ resource_reload(const struct hast_resour nvout = nv_alloc(); nv_add_uint8(nvout, HASTCTL_RELOAD, "cmd"); nv_add_string(nvout, res->hr_remoteaddr, "remoteaddr"); + nv_add_string(nvout, res->hr_sourceaddr, "sourceaddr"); nv_add_int32(nvout, (int32_t)res->hr_replication, "replication"); nv_add_int32(nvout, (int32_t)res->hr_checksum, "checksum"); nv_add_int32(nvout, (int32_t)res->hr_compression, "compression"); @@ -572,6 +577,8 @@ hastd_reload(void) cres->hr_name); strlcpy(cres->hr_remoteaddr, nres->hr_remoteaddr, sizeof(cres->hr_remoteaddr)); + strlcpy(cres->hr_sourceaddr, nres->hr_sourceaddr, + sizeof(cres->hr_sourceaddr)); cres->hr_replication = nres->hr_replication; cres->hr_checksum = nres->hr_checksum; cres->hr_compression = nres->hr_compression; @@ -849,7 +856,8 @@ connection_migrate(struct hast_resource "Unable to receive connection command"); return; } - if (proto_client(res->hr_remoteaddr, &conn) < 0) { + if (proto_client(res->hr_sourceaddr[0] != '\0' ? res->hr_sourceaddr : NULL, + res->hr_remoteaddr, &conn) < 0) { val = errno; pjdlog_errno(LOG_WARNING, "Unable to create outgoing connection to %s", Modified: head/sbin/hastd/parse.y ============================================================================== --- head/sbin/hastd/parse.y Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/parse.y Mon Mar 21 08:54:59 2011 (r219818) @@ -276,7 +276,7 @@ yy_config_free(struct hastd_config *conf %} %token CONTROL LISTEN PORT REPLICATION CHECKSUM COMPRESSION -%token TIMEOUT EXEC EXTENTSIZE RESOURCE NAME LOCAL REMOTE ON +%token TIMEOUT EXEC EXTENTSIZE RESOURCE NAME LOCAL REMOTE SOURCE ON %token FULLSYNC MEMSYNC ASYNC NONE CRC32 SHA256 HOLE LZF %token NUM STR OB CB @@ -652,6 +652,7 @@ resource_start: STR curres->hr_localpath[0] = '\0'; curres->hr_localfd = -1; curres->hr_remoteaddr[0] = '\0'; + curres->hr_sourceaddr[0] = '\0'; curres->hr_ggateunit = -1; } ; @@ -778,6 +779,8 @@ resource_node_entry: local_statement | remote_statement + | + source_statement ; remote_statement: REMOTE STR @@ -796,3 +799,20 @@ remote_statement: REMOTE STR free($2); } ; + +source_statement: SOURCE STR + { + assert(depth == 2); + if (mynode) { + assert(curres != NULL); + if (strlcpy(curres->hr_sourceaddr, $2, + sizeof(curres->hr_sourceaddr)) >= + sizeof(curres->hr_sourceaddr)) { + pjdlog_error("source argument is too long."); + free($2); + return (1); + } + } + free($2); + } + ; Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/primary.c Mon Mar 21 08:54:59 2011 (r219818) @@ -86,7 +86,7 @@ struct hio { */ int *hio_errors; /* - * Structure used to comunicate with GEOM Gate class. + * Structure used to communicate with GEOM Gate class. */ struct g_gate_ctl_io hio_ggio; TAILQ_ENTRY(hio) *hio_next; @@ -808,7 +808,7 @@ hastd_primary(struct hast_resource *res) * Create communication channel for sending control commands from * parent to child. */ - if (proto_client("socketpair://", &res->hr_ctrl) < 0) { + if (proto_client(NULL, "socketpair://", &res->hr_ctrl) < 0) { /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, @@ -817,7 +817,7 @@ hastd_primary(struct hast_resource *res) /* * Create communication channel for sending events from child to parent. */ - if (proto_client("socketpair://", &res->hr_event) < 0) { + if (proto_client(NULL, "socketpair://", &res->hr_event) < 0) { /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, @@ -827,7 +827,7 @@ hastd_primary(struct hast_resource *res) * Create communication channel for sending connection requests from * child to parent. */ - if (proto_client("socketpair://", &res->hr_conn) < 0) { + if (proto_client(NULL, "socketpair://", &res->hr_conn) < 0) { /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, @@ -1918,6 +1918,7 @@ primary_config_reload(struct hast_resour PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY); PJDLOG_ASSERT(gres == res); nv_assert(nv, "remoteaddr"); + nv_assert(nv, "sourceaddr"); nv_assert(nv, "replication"); nv_assert(nv, "checksum"); nv_assert(nv, "compression"); @@ -1927,11 +1928,12 @@ primary_config_reload(struct hast_resour ncomps = HAST_NCOMPONENTS; #define MODIFIED_REMOTEADDR 0x01 -#define MODIFIED_REPLICATION 0x02 -#define MODIFIED_CHECKSUM 0x04 -#define MODIFIED_COMPRESSION 0x08 -#define MODIFIED_TIMEOUT 0x10 -#define MODIFIED_EXEC 0x20 +#define MODIFIED_SOURCEADDR 0x02 +#define MODIFIED_REPLICATION 0x04 +#define MODIFIED_CHECKSUM 0x08 +#define MODIFIED_COMPRESSION 0x10 +#define MODIFIED_TIMEOUT 0x20 +#define MODIFIED_EXEC 0x40 modified = 0; vstr = nv_get_string(nv, "remoteaddr"); @@ -1943,6 +1945,11 @@ primary_config_reload(struct hast_resour */ modified |= MODIFIED_REMOTEADDR; } + vstr = nv_get_string(nv, "sourceaddr"); + if (strcmp(gres->hr_sourceaddr, vstr) != 0) { + strlcpy(gres->hr_sourceaddr, vstr, sizeof(gres->hr_sourceaddr)); + modified |= MODIFIED_SOURCEADDR; + } vint = nv_get_int32(nv, "replication"); if (gres->hr_replication != vint) { gres->hr_replication = vint; @@ -1974,7 +1981,8 @@ primary_config_reload(struct hast_resour * Don't bother if we need to reconnect. */ if ((modified & MODIFIED_TIMEOUT) != 0 && - (modified & (MODIFIED_REMOTEADDR | MODIFIED_REPLICATION)) == 0) { + (modified & (MODIFIED_REMOTEADDR | MODIFIED_SOURCEADDR | + MODIFIED_REPLICATION)) == 0) { for (ii = 0; ii < ncomps; ii++) { if (!ISREMOTE(ii)) continue; @@ -1996,7 +2004,8 @@ primary_config_reload(struct hast_resour } } } - if ((modified & (MODIFIED_REMOTEADDR | MODIFIED_REPLICATION)) != 0) { + if ((modified & (MODIFIED_REMOTEADDR | MODIFIED_SOURCEADDR | + MODIFIED_REPLICATION)) != 0) { for (ii = 0; ii < ncomps; ii++) { if (!ISREMOTE(ii)) continue; @@ -2009,6 +2018,7 @@ primary_config_reload(struct hast_resour } } #undef MODIFIED_REMOTEADDR +#undef MODIFIED_SOURCEADDR #undef MODIFIED_REPLICATION #undef MODIFIED_CHECKSUM #undef MODIFIED_COMPRESSION Modified: head/sbin/hastd/proto.c ============================================================================== --- head/sbin/hastd/proto.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/proto.c Mon Mar 21 08:54:59 2011 (r219818) @@ -105,7 +105,8 @@ proto_free(struct proto_conn *conn) } static int -proto_common_setup(const char *addr, struct proto_conn **connp, int side) +proto_common_setup(const char *srcaddr, const char *dstaddr, + struct proto_conn **connp, int side) { struct hast_proto *proto; struct proto_conn *conn; @@ -120,16 +121,16 @@ proto_common_setup(const char *addr, str if (proto->hp_client == NULL) ret = -1; else - ret = proto->hp_client(addr, &ctx); + ret = proto->hp_client(srcaddr, dstaddr, &ctx); } else /* if (side == PROTO_SIDE_SERVER_LISTEN) */ { if (proto->hp_server == NULL) ret = -1; else - ret = proto->hp_server(addr, &ctx); + ret = proto->hp_server(dstaddr, &ctx); } /* * ret == 0 - success - * ret == -1 - addr is not for this protocol + * ret == -1 - dstaddr is not for this protocol * ret > 0 - right protocol, but an error occured */ if (ret >= 0) @@ -159,10 +160,11 @@ proto_common_setup(const char *addr, str } int -proto_client(const char *addr, struct proto_conn **connp) +proto_client(const char *srcaddr, const char *dstaddr, + struct proto_conn **connp) { - return (proto_common_setup(addr, connp, PROTO_SIDE_CLIENT)); + return (proto_common_setup(srcaddr, dstaddr, connp, PROTO_SIDE_CLIENT)); } int @@ -211,7 +213,7 @@ int proto_server(const char *addr, struct proto_conn **connp) { - return (proto_common_setup(addr, connp, PROTO_SIDE_SERVER_LISTEN)); + return (proto_common_setup(NULL, addr, connp, PROTO_SIDE_SERVER_LISTEN)); } int Modified: head/sbin/hastd/proto.h ============================================================================== --- head/sbin/hastd/proto.h Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/proto.h Mon Mar 21 08:54:59 2011 (r219818) @@ -37,7 +37,8 @@ struct proto_conn; -int proto_client(const char *addr, struct proto_conn **connp); +int proto_client(const char *srcaddr, const char *dstaddr, + struct proto_conn **connp); int proto_connect(struct proto_conn *conn, int timeout); int proto_connect_wait(struct proto_conn *conn, int timeout); int proto_server(const char *addr, struct proto_conn **connp); Modified: head/sbin/hastd/proto_impl.h ============================================================================== --- head/sbin/hastd/proto_impl.h Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/proto_impl.h Mon Mar 21 08:54:59 2011 (r219818) @@ -39,7 +39,7 @@ #define __constructor __attribute__((constructor)) -typedef int hp_client_t(const char *, void **); +typedef int hp_client_t(const char *, const char *, void **); typedef int hp_connect_t(void *, int); typedef int hp_connect_wait_t(void *, int); typedef int hp_server_t(const char *, void **); Modified: head/sbin/hastd/proto_socketpair.c ============================================================================== --- head/sbin/hastd/proto_socketpair.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/proto_socketpair.c Mon Mar 21 08:54:59 2011 (r219818) @@ -57,14 +57,16 @@ struct sp_ctx { static void sp_close(void *ctx); static int -sp_client(const char *addr, void **ctxp) +sp_client(const char *srcaddr, const char *dstaddr, void **ctxp) { struct sp_ctx *spctx; int ret; - if (strcmp(addr, "socketpair://") != 0) + if (strcmp(dstaddr, "socketpair://") != 0) return (-1); + PJDLOG_ASSERT(srcaddr == NULL); + spctx = malloc(sizeof(*spctx)); if (spctx == NULL) return (errno); Modified: head/sbin/hastd/proto_tcp4.c ============================================================================== --- head/sbin/hastd/proto_tcp4.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/proto_tcp4.c Mon Mar 21 08:54:59 2011 (r219818) @@ -112,7 +112,7 @@ invalid: } static int -tcp4_addr(const char *addr, struct sockaddr_in *sinp) +tcp4_addr(const char *addr, int defport, struct sockaddr_in *sinp) { char iporhost[MAXHOSTNAMELEN]; const char *pp; @@ -139,7 +139,7 @@ tcp4_addr(const char *addr, struct socka pp = strrchr(addr, ':'); if (pp == NULL) { /* Port not given, use the default. */ - sinp->sin_port = htons(HASTD_PORT); + sinp->sin_port = htons(defport); } else { intmax_t port; @@ -183,7 +183,7 @@ tcp4_setup_new(const char *addr, int sid return (errno); /* Parse given address. */ - if ((ret = tcp4_addr(addr, &tctx->tc_sin)) != 0) { + if ((ret = tcp4_addr(addr, HASTD_PORT, &tctx->tc_sin)) != 0) { free(tctx); return (ret); } @@ -197,6 +197,8 @@ tcp4_setup_new(const char *addr, int sid return (ret); } + PJDLOG_ASSERT(tctx->tc_sin.sin_family != AF_UNSPEC); + /* Socket settings. */ nodelay = 1; if (setsockopt(tctx->tc_fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, @@ -235,10 +237,29 @@ tcp4_setup_wrap(int fd, int side, void * } static int -tcp4_client(const char *addr, void **ctxp) +tcp4_client(const char *srcaddr, const char *dstaddr, void **ctxp) { + struct tcp4_ctx *tctx; + struct sockaddr_in sin; + int ret; - return (tcp4_setup_new(addr, TCP4_SIDE_CLIENT, ctxp)); + ret = tcp4_setup_new(dstaddr, TCP4_SIDE_CLIENT, ctxp); + if (ret != 0) + return (ret); + tctx = *ctxp; + if (srcaddr == NULL) + return (0); + ret = tcp4_addr(srcaddr, 0, &sin); + if (ret != 0) { + tcp4_close(tctx); + return (ret); + } + if (bind(tctx->tc_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + ret = errno; + tcp4_close(tctx); + return (ret); + } + return (0); } static int @@ -486,7 +507,7 @@ tcp4_address_match(const void *ctx, cons PJDLOG_ASSERT(tctx != NULL); PJDLOG_ASSERT(tctx->tc_magic == TCP4_CTX_MAGIC); - if (tcp4_addr(addr, &sin) != 0) + if (tcp4_addr(addr, HASTD_PORT, &sin) != 0) return (false); ip1 = sin.sin_addr.s_addr; Modified: head/sbin/hastd/proto_uds.c ============================================================================== --- head/sbin/hastd/proto_uds.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/proto_uds.c Mon Mar 21 08:54:59 2011 (r219818) @@ -119,10 +119,17 @@ uds_common_setup(const char *addr, void } static int -uds_client(const char *addr, void **ctxp) +uds_client(const char *srcaddr, const char *dstaddr, void **ctxp) { + int ret; + + ret = uds_common_setup(dstaddr, ctxp, UDS_SIDE_CLIENT); + if (ret != 0) + return (ret); + + PJDLOG_ASSERT(srcaddr == NULL); - return (uds_common_setup(addr, ctxp, UDS_SIDE_CLIENT)); + return (0); } static int Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/secondary.c Mon Mar 21 08:54:59 2011 (r219818) @@ -351,7 +351,7 @@ hastd_secondary(struct hast_resource *re /* * Create communication channel between parent and child. */ - if (proto_client("socketpair://", &res->hr_ctrl) < 0) { + if (proto_client(NULL, "socketpair://", &res->hr_ctrl) < 0) { KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, "Unable to create control sockets between parent and child"); @@ -359,7 +359,7 @@ hastd_secondary(struct hast_resource *re /* * Create communication channel between child and parent. */ - if (proto_client("socketpair://", &res->hr_event) < 0) { + if (proto_client(NULL, "socketpair://", &res->hr_event) < 0) { KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, "Unable to create event sockets between child and parent"); @@ -368,7 +368,7 @@ hastd_secondary(struct hast_resource *re * Create communication channel for sending connection requests from * parent to child. */ - if (proto_client("socketpair://", &res->hr_conn) < 0) { + if (proto_client(NULL, "socketpair://", &res->hr_conn) < 0) { /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, Modified: head/sbin/hastd/token.l ============================================================================== --- head/sbin/hastd/token.l Mon Mar 21 08:38:24 2011 (r219817) +++ head/sbin/hastd/token.l Mon Mar 21 08:54:59 2011 (r219818) @@ -57,6 +57,7 @@ resource { DP; return RESOURCE; } name { DP; return NAME; } local { DP; return LOCAL; } remote { DP; return REMOTE; } +source { DP; return SOURCE; } on { DP; return ON; } fullsync { DP; return FULLSYNC; } memsync { DP; return MEMSYNC; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 09:40:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F295F106564A; Mon, 21 Mar 2011 09:40:01 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5A438FC18; Mon, 21 Mar 2011 09:40:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L9e1B4006505; Mon, 21 Mar 2011 09:40:01 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L9e1R5006486; Mon, 21 Mar 2011 09:40:01 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103210940.p2L9e1R5006486@svn.freebsd.org> From: Jeff Roberson Date: Mon, 21 Mar 2011 09:40: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: r219819 - in head: sys/amd64/include sys/conf sys/dev/hptmv sys/i386/include sys/kern sys/net sys/netinet sys/netinet6 sys/sys sys/vm usr.sbin/config usr.sbin/ndp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 09:40:02 -0000 Author: jeff Date: Mon Mar 21 09:40:01 2011 New Revision: 219819 URL: http://svn.freebsd.org/changeset/base/219819 Log: - Merge changes to the base system to support OFED. These include a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND, and other miscellaneous small features. Modified: head/sys/amd64/include/endian.h head/sys/conf/files head/sys/conf/kern.pre.mk head/sys/conf/options head/sys/dev/hptmv/hptproc.c head/sys/i386/include/endian.h head/sys/kern/kern_intr.c head/sys/kern/kern_jail.c head/sys/kern/kern_sx.c head/sys/kern/kern_sysctl.c head/sys/kern/subr_bus.c head/sys/net/if.c head/sys/net/if_arp.h head/sys/net/if_llatbl.h head/sys/net/if_types.h head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/net/if_vlan_var.h head/sys/netinet/if_ether.c head/sys/netinet6/in6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/sys/bus.h head/sys/sys/file.h head/sys/sys/interrupt.h head/sys/sys/jail.h head/sys/sys/sx.h head/sys/sys/sysctl.h head/sys/vm/uma_core.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h head/usr.sbin/config/config.h head/usr.sbin/config/mkmakefile.c head/usr.sbin/ndp/ndp.c Modified: head/sys/amd64/include/endian.h ============================================================================== --- head/sys/amd64/include/endian.h Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/amd64/include/endian.h Mon Mar 21 09:40:01 2011 (r219819) @@ -69,73 +69,59 @@ extern "C" { #if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE_BUILTIN_CONSTANT_P) -#define __byte_swap_int_var(x) \ -__extension__ ({ register __uint32_t __X = (x); \ - __asm ("bswap %0" : "+r" (__X)); \ - __X; }) +#define __bswap64_const(_x) \ + (((_x) >> 56) | \ + (((_x) >> 40) & (0xffUL << 8)) | \ + (((_x) >> 24) & (0xffUL << 16)) | \ + (((_x) >> 8) & (0xffUL << 24)) | \ + (((_x) << 8) & (0xffUL << 32)) | \ + (((_x) << 24) & (0xffUL << 40)) | \ + (((_x) << 40) & (0xffUL << 48)) | \ + ((_x) << 56)) + +#define __bswap32_const(_x) \ + (((_x) >> 24) | \ + (((_x) & (0xff << 16)) >> 8) | \ + (((_x) & (0xff << 8)) << 8) | \ + ((_x) << 24)) -#ifdef __OPTIMIZE__ - -#define __byte_swap_int_const(x) \ - ((((x) & 0xff000000) >> 24) | \ - (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x000000ff) << 24)) -#define __byte_swap_int(x) (__builtin_constant_p(x) ? \ - __byte_swap_int_const(x) : __byte_swap_int_var(x)) - -#else /* __OPTIMIZE__ */ - -#define __byte_swap_int(x) __byte_swap_int_var(x) - -#endif /* __OPTIMIZE__ */ - -#define __byte_swap_long_var(x) \ -__extension__ ({ register __uint64_t __X = (x); \ - __asm ("bswap %0" : "+r" (__X)); \ - __X; }) - -#ifdef __OPTIMIZE__ - -#define __byte_swap_long_const(x) \ - (((x >> 56) | \ - ((x >> 40) & 0xff00) | \ - ((x >> 24) & 0xff0000) | \ - ((x >> 8) & 0xff000000) | \ - ((x << 8) & (0xfful << 32)) | \ - ((x << 24) & (0xfful << 40)) | \ - ((x << 40) & (0xfful << 48)) | \ - ((x << 56)))) - -#define __byte_swap_long(x) (__builtin_constant_p(x) ? \ - __byte_swap_long_const(x) : __byte_swap_long_var(x)) - -#else /* __OPTIMIZE__ */ - -#define __byte_swap_long(x) __byte_swap_long_var(x) - -#endif /* __OPTIMIZE__ */ +#define __bswap16_const(_x) (__uint16_t)((_x) << 8 | (_x) >> 8) static __inline __uint64_t -__bswap64(__uint64_t _x) +__bswap64_var(__uint64_t _x) { - return (__byte_swap_long(_x)); + __asm ("bswap %0" : "+r" (_x)); + return (_x); } static __inline __uint32_t -__bswap32(__uint32_t _x) +__bswap32_var(__uint32_t _x) { - return (__byte_swap_int(_x)); + __asm ("bswap %0" : "+r" (_x)); + return (_x); } static __inline __uint16_t -__bswap16(__uint16_t _x) +__bswap16_var(__uint16_t _x) { - return (_x << 8 | _x >> 8); + + return (__bswap16_const(_x)); } +#define __bswap64(_x) \ + (__builtin_constant_p(_x) ? \ + __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x)) + +#define __bswap32(_x) \ + (__builtin_constant_p(_x) ? \ + __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x)) + +#define __bswap16(_x) \ + (__builtin_constant_p(_x) ? \ + __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)) + #define __htonl(x) __bswap32(x) #define __htons(x) __bswap16(x) #define __ntohl(x) __bswap32(x) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/conf/files Mon Mar 21 09:40:01 2011 (r219819) @@ -2791,6 +2791,281 @@ nlm/nlm_prot_server.c optional nfslockd nlm/nlm_prot_svc.c optional nfslockd | nfsd nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd + +# OpenFabrics Enterprise Distribution (Infiniband) +ofed/include/linux/linux_compat.c optional ofed \ + no-depend compile-with "${OFED_C}" +ofed/include/linux/linux_idr.c optional ofed \ + no-depend compile-with "${OFED_C}" +ofed/include/linux/linux_radix.c optional ofed \ + no-depend compile-with "${OFED_C}" +ofed/drivers/infiniband/core/addr.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/agent.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/cache.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +# XXX Mad.c must be ordered before cm.c for sysinit sets to occur in +# the correct order. +ofed/drivers/infiniband/core/mad.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/cm.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/cma.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/device.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/fmr_pool.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/iwcm.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/local_sa.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/mad_rmpp.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/multicast.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/notice.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/packer.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/sa_query.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/smi.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/sysfs.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/ucm.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/ucma.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/ud_header.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/umem.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/user_mad.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/uverbs_cmd.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/uverbs_main.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/uverbs_marshall.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" +ofed/drivers/infiniband/core/verbs.c optional ofed \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" + +ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c optional ipoib \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" +#ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c optional ipoib \ +# no-depend \ +# compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" +ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c optional ipoib \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" +ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c optional ipoib \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" +ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c optional ipoib \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" +ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c optional ipoib \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" +#ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c optional ipoib \ +# no-depend \ +# compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" + +ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" +ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" +ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" +ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" +ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp \ + no-depend \ + compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" + +ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" +ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \ + no-depend obj-prefix "mlx4ib_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" + +ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/xrcd.c optional mlx4ib | mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" + +ofed/drivers/net/mlx4/en_cq.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_frag.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_main.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_netdev.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_port.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_resources.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_rx.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +ofed/drivers/net/mlx4/en_tx.c optional mlxen \ + no-depend obj-prefix "mlx4_" \ + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" + +ofed/drivers/infiniband/hw/mthca/mthca_allocator.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_av.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_catas.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_cmd.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_cq.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_eq.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_mad.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_main.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_mcg.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_memfree.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_mr.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_pd.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_profile.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_provider.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_qp.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_reset.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_srq.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" +ofed/drivers/infiniband/hw/mthca/mthca_uar.c optional mthca \ + no-depend compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/mthca/" + # crypto support opencrypto/cast.c optional crypto | ipsec opencrypto/criov.c optional crypto Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/conf/kern.pre.mk Mon Mar 21 09:40:01 2011 (r219819) @@ -142,6 +142,14 @@ NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} +# Infiniband C flags. Correct include paths and omit errors that linux +# does not honor. +OFEDINCLUDES= -I$S/ofed/include/ +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} +OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} +OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} + GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/} SYSTEM_CFILES= config.c env.c hints.c vnode_if.c SYSTEM_DEP= Makefile ${SYSTEM_OBJS} Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/conf/options Mon Mar 21 09:40:01 2011 (r219819) @@ -862,3 +862,11 @@ X86BIOS # Flattened device tree options FDT opt_platform.h FDT_DTB_STATIC opt_platform.h + +# OFED Infiniband stack +OFED opt_ofed.h +OFED_DEBUG_INIT opt_ofed.h +SDP opt_ofed.h +SDP_DEBUG opt_ofed.h +IPOIB_DEBUG opt_ofed.h +IPOIB_CM opt_ofed.h Modified: head/sys/dev/hptmv/hptproc.c ============================================================================== --- head/sys/dev/hptmv/hptproc.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/dev/hptmv/hptproc.c Mon Mar 21 09:40:01 2011 (r219819) @@ -51,8 +51,8 @@ int hpt_rescan_all(void); static char hptproc_buffer[256]; extern char DRIVER_VERSION[]; -#define FORMAL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, int arg2, \ - struct sysctl_req *req +#define FORMAL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, \ + intptr_t arg2, struct sysctl_req *req #define REAL_HANDLER_ARGS oidp, arg1, arg2, req typedef struct sysctl_req HPT_GET_INFO; Modified: head/sys/i386/include/endian.h ============================================================================== --- head/sys/i386/include/endian.h Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/i386/include/endian.h Mon Mar 21 09:40:01 2011 (r219819) @@ -69,50 +69,59 @@ extern "C" { #if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE_BUILTIN_CONSTANT_P) -#define __byte_swap_int_var(x) \ -__extension__ ({ register __uint32_t __X = (x); \ - __asm ("bswap %0" : "+r" (__X)); \ - __X; }) - -#ifdef __OPTIMIZE__ - -#define __byte_swap_int_const(x) \ - ((((x) & 0xff000000) >> 24) | \ - (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x000000ff) << 24)) -#define __byte_swap_int(x) (__builtin_constant_p(x) ? \ - __byte_swap_int_const(x) : __byte_swap_int_var(x)) +#define __bswap64_const(_x) \ + (((_x) >> 56) | \ + (((_x) >> 40) & (0xffULL << 8)) | \ + (((_x) >> 24) & (0xffULL << 16)) | \ + (((_x) >> 8) & (0xffULL << 24)) | \ + (((_x) << 8) & (0xffULL << 32)) | \ + (((_x) << 24) & (0xffULL << 40)) | \ + (((_x) << 40) & (0xffULL << 48)) | \ + ((_x) << 56)) + +#define __bswap32_const(_x) \ + (((_x) >> 24) | \ + (((_x) & (0xff << 16)) >> 8) | \ + (((_x) & (0xff << 8)) << 8) | \ + ((_x) << 24)) -#else /* __OPTIMIZE__ */ - -#define __byte_swap_int(x) __byte_swap_int_var(x) - -#endif /* __OPTIMIZE__ */ +#define __bswap16_const(_x) (__uint16_t)((_x) << 8 | (_x) >> 8) static __inline __uint64_t -__bswap64(__uint64_t _x) +__bswap64_var(__uint64_t __x) { - return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | - ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) | - ((_x << 24) & ((__uint64_t)0xff << 40)) | - ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); + return __bswap64_const(__x); } + static __inline __uint32_t -__bswap32(__uint32_t _x) +__bswap32_var(__uint32_t _x) { - return (__byte_swap_int(_x)); + __asm ("bswap %0" : "+r" (_x)); + return (_x); } static __inline __uint16_t -__bswap16(__uint16_t _x) +__bswap16_var(__uint16_t _x) { - return (_x << 8 | _x >> 8); + + return (__bswap16_const(_x)); } +#define __bswap64(_x) \ + (__builtin_constant_p(_x) ? \ + __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x)) + +#define __bswap32(_x) \ + (__builtin_constant_p(_x) ? \ + __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x)) + +#define __bswap16(_x) \ + (__builtin_constant_p(_x) ? \ + __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)) + #define __htonl(x) __bswap32(x) #define __htons(x) __bswap16(x) #define __ntohl(x) __bswap32(x) Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/kern/kern_intr.c Mon Mar 21 09:40:01 2011 (r219819) @@ -74,6 +74,7 @@ struct intr_thread { /* Interrupt thread flags kept in it_flags */ #define IT_DEAD 0x000001 /* Thread is waiting to exit. */ +#define IT_WAIT 0x000002 /* Thread is waiting for completion. */ struct intr_entropy { struct thread *td; @@ -735,6 +736,39 @@ intr_handler_source(void *cookie) return (ie->ie_source); } +/* + * Sleep until an ithread finishes executing an interrupt handler. + * + * XXX Doesn't currently handle interrupt filters or fast interrupt + * handlers. This is intended for compatibility with linux drivers + * only. Do not use in BSD code. + */ +void +_intr_drain(int irq) +{ + struct mtx *mtx; + struct intr_event *ie; + struct intr_thread *ithd; + struct thread *td; + + ie = intr_lookup(irq); + if (ie == NULL) + return; + if (ie->ie_thread == NULL) + return; + ithd = ie->ie_thread; + td = ithd->it_thread; + thread_lock(td); + mtx = td->td_lock; + if (!TD_AWAITING_INTR(td)) { + ithd->it_flags |= IT_WAIT; + msleep_spin(ithd, mtx, "isync", 0); + } + mtx_unlock_spin(mtx); + return; +} + + #ifndef INTR_FILTER int intr_event_remove_handler(void *cookie) @@ -1271,6 +1305,7 @@ ithread_loop(void *arg) struct intr_event *ie; struct thread *td; struct proc *p; + int wake; td = curthread; p = td->td_proc; @@ -1279,6 +1314,7 @@ ithread_loop(void *arg) ("%s: ithread and proc linkage out of sync", __func__)); ie = ithd->it_event; ie->ie_count = 0; + wake = 0; /* * As long as we have interrupts outstanding, go through the @@ -1319,12 +1355,20 @@ ithread_loop(void *arg) * set again, so we have to check it again. */ thread_lock(td); - if (!ithd->it_need && !(ithd->it_flags & IT_DEAD)) { + if (!ithd->it_need && !(ithd->it_flags & (IT_DEAD | IT_WAIT))) { TD_SET_IWAIT(td); ie->ie_count = 0; mi_switch(SW_VOL | SWT_IWAIT, NULL); } + if (ithd->it_flags & IT_WAIT) { + wake = 1; + ithd->it_flags &= ~IT_WAIT; + } thread_unlock(td); + if (wake) { + wakeup(ithd); + wake = 0; + } } } @@ -1439,6 +1483,7 @@ ithread_loop(void *arg) struct thread *td; struct proc *p; int priv; + int wake; td = curthread; p = td->td_proc; @@ -1449,6 +1494,7 @@ ithread_loop(void *arg) ("%s: ithread and proc linkage out of sync", __func__)); ie = ithd->it_event; ie->ie_count = 0; + wake = 0; /* * As long as we have interrupts outstanding, go through the @@ -1492,12 +1538,20 @@ ithread_loop(void *arg) * set again, so we have to check it again. */ thread_lock(td); - if (!ithd->it_need && !(ithd->it_flags & IT_DEAD)) { + if (!ithd->it_need && !(ithd->it_flags & (IT_DEAD | IT_WAIT))) { TD_SET_IWAIT(td); ie->ie_count = 0; mi_switch(SW_VOL | SWT_IWAIT, NULL); } + if (ithd->it_flags & IT_WAIT) { + wake = 1; + ithd->it_flags &= ~IT_WAIT; + } thread_unlock(td); + if (wake) { + wakeup(ithd); + wake = 0; + } } } Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/kern/kern_jail.c Mon Mar 21 09:40:01 2011 (r219819) @@ -4182,7 +4182,7 @@ sysctl_jail_param(SYSCTL_HANDLER_ARGS) i = 0; return (SYSCTL_OUT(req, &i, sizeof(i))); case CTLTYPE_STRING: - snprintf(numbuf, sizeof(numbuf), "%d", arg2); + snprintf(numbuf, sizeof(numbuf), "%jd", (intmax_t)arg2); return (sysctl_handle_string(oidp, numbuf, sizeof(numbuf), req)); case CTLTYPE_STRUCT: Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/kern/kern_sx.c Mon Mar 21 09:40:01 2011 (r219819) @@ -194,7 +194,7 @@ sx_sysinit(void *arg) { struct sx_args *sargs = arg; - sx_init(sargs->sa_sx, sargs->sa_desc); + sx_init_flags(sargs->sa_sx, sargs->sa_desc, sargs->sa_flags); } void Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/kern/kern_sysctl.c Mon Mar 21 09:40:01 2011 (r219819) @@ -365,10 +365,31 @@ sysctl_remove_oid(struct sysctl_oid *oid return (error); } +int +sysctl_remove_name(struct sysctl_oid *parent, const char *name, + int del, int recurse) +{ + struct sysctl_oid *p, *tmp; + int error; + + error = ENOENT; + SYSCTL_XLOCK(); + SLIST_FOREACH_SAFE(p, SYSCTL_CHILDREN(parent), oid_link, tmp) { + if (strcmp(p->oid_name, name) == 0) { + error = sysctl_remove_oid_locked(p, del, recurse); + break; + } + } + SYSCTL_XUNLOCK(); + + return (error); +} + + static int sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse) { - struct sysctl_oid *p; + struct sysctl_oid *p, *tmp; int error; SYSCTL_ASSERT_XLOCKED(); @@ -387,7 +408,8 @@ sysctl_remove_oid_locked(struct sysctl_o */ if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { if (oidp->oid_refcnt == 1) { - SLIST_FOREACH(p, SYSCTL_CHILDREN(oidp), oid_link) { + SLIST_FOREACH_SAFE(p, + SYSCTL_CHILDREN(oidp), oid_link, tmp) { if (!recurse) return (ENOTEMPTY); error = sysctl_remove_oid_locked(p, del, @@ -428,14 +450,13 @@ sysctl_remove_oid_locked(struct sysctl_o } return (0); } - /* * Create new sysctls at run time. * clist may point to a valid context initialized with sysctl_ctx_init(). */ struct sysctl_oid * sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, - int number, const char *name, int kind, void *arg1, int arg2, + int number, const char *name, int kind, void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr) { struct sysctl_oid *oidp; @@ -479,6 +500,7 @@ sysctl_add_oid(struct sysctl_ctx_list *c SYSCTL_CHILDREN_SET(oidp, malloc(sizeof(struct sysctl_oid_list), M_SYSCTLOID, M_WAITOK)); SLIST_INIT(SYSCTL_CHILDREN(oidp)); + oidp->oid_arg2 = arg2; } else { oidp->oid_arg1 = arg1; oidp->oid_arg2 = arg2; Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/kern/subr_bus.c Mon Mar 21 09:40:01 2011 (r219819) @@ -1038,7 +1038,7 @@ devclass_driver_added(devclass_t dc, dri * @param dc the devclass to edit * @param driver the driver to register */ -static int +int devclass_add_driver(devclass_t dc, driver_t *driver, int pass, devclass_t *dcp) { driverlink_t dl; @@ -1172,7 +1172,7 @@ devclass_driver_deleted(devclass_t buscl * @param dc the devclass to edit * @param driver the driver to unregister */ -static int +int devclass_delete_driver(devclass_t busclass, driver_t *driver) { devclass_t dc = devclass_find(driver->name); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/net/if.c Mon Mar 21 09:40:01 2011 (r219819) @@ -1881,6 +1881,11 @@ if_route(struct ifnet *ifp, int flag, in void (*vlan_link_state_p)(struct ifnet *); /* XXX: private from if_vlan */ void (*vlan_trunk_cap_p)(struct ifnet *); /* XXX: private from if_vlan */ +struct ifnet *(*vlan_trunkdev_p)(struct ifnet *); +struct ifnet *(*vlan_devat_p)(struct ifnet *, uint16_t); +int (*vlan_tag_p)(struct ifnet *, uint16_t *); +int (*vlan_setcookie_p)(struct ifnet *, void *); +void *(*vlan_cookie_p)(struct ifnet *); /* * Handle a change in the interface link state. To avoid LORs @@ -1935,6 +1940,7 @@ do_link_state_change(void *arg, int pend if (log_link_state_change) log(LOG_NOTICE, "%s: link state changed to %s\n", ifp->if_xname, (link_state == LINK_STATE_UP) ? "UP" : "DOWN" ); + EVENTHANDLER_INVOKE(ifnet_link_event, ifp, ifp->if_link_state); CURVNET_RESTORE(); } Modified: head/sys/net/if_arp.h ============================================================================== --- head/sys/net/if_arp.h Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/net/if_arp.h Mon Mar 21 09:40:01 2011 (r219819) @@ -50,6 +50,7 @@ struct arphdr { #define ARPHRD_ARCNET 7 /* arcnet hardware format */ #define ARPHRD_FRELAY 15 /* frame relay hardware format */ #define ARPHRD_IEEE1394 24 /* firewire hardware format */ +#define ARPHRD_INFINIBAND 32 /* infiniband hardware format */ u_short ar_pro; /* format of protocol address */ u_char ar_hln; /* length of hardware address */ u_char ar_pln; /* length of protocol address */ Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/net/if_llatbl.h Mon Mar 21 09:40:01 2011 (r219819) @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #ifndef _NET_IF_LLATBL_H_ #define _NET_IF_LLATBL_H_ +#include "opt_ofed.h" + #include #include @@ -72,6 +74,9 @@ struct llentry { union { uint64_t mac_aligned; uint16_t mac16[3]; +#ifdef OFED + uint8_t mac8[20]; /* IB needs 20 bytes. */ +#endif } ll_addr; /* XXX af-private? */ Modified: head/sys/net/if_types.h ============================================================================== --- head/sys/net/if_types.h Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/net/if_types.h Mon Mar 21 09:40:01 2011 (r219819) @@ -238,6 +238,7 @@ #define IFT_ATMVCIENDPT 0xc2 /* ATM VCI End Point */ #define IFT_OPTICALCHANNEL 0xc3 /* Optical Channel */ #define IFT_OPTICALTRANSPORT 0xc4 /* Optical Transport */ +#define IFT_INFINIBAND 0xc7 /* Infiniband */ #define IFT_BRIDGE 0xd1 /* Transparent bridge interface */ #define IFT_STF 0xd7 /* 6to4 interface */ Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/net/if_var.h Mon Mar 21 09:40:01 2011 (r219819) @@ -352,6 +352,9 @@ EVENTHANDLER_DECLARE(ifnet_arrival_event /* interface departure event */ typedef void (*ifnet_departure_event_handler_t)(void *, struct ifnet *); EVENTHANDLER_DECLARE(ifnet_departure_event, ifnet_departure_event_handler_t); +/* Interface link state change event */ +typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); +EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); /* * interface groups Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Mon Mar 21 08:54:59 2011 (r219818) +++ head/sys/net/if_vlan.c Mon Mar 21 09:40:01 2011 (r219819) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -90,13 +91,14 @@ struct ifvlantrunk { }; struct vlan_mc_entry { - struct ether_addr mc_addr; + struct sockaddr_dl mc_addr; SLIST_ENTRY(vlan_mc_entry) mc_entries; }; struct ifvlan { struct ifvlantrunk *ifv_trunk; struct ifnet *ifv_ifp; + void *ifv_cookie; #define TRUNK(ifv) ((ifv)->ifv_trunk) #define PARENT(ifv) ((ifv)->ifv_trunk->parent) int ifv_pflags; /* special flags we have set on parent */ @@ -153,12 +155,12 @@ static eventhandler_tag iflladdr_tag; * however on practice it does not. Probably this is because array * is too big to fit into CPU cache. */ -static struct mtx ifv_mtx; -#define VLAN_LOCK_INIT() mtx_init(&ifv_mtx, "vlan_global", NULL, MTX_DEF) -#define VLAN_LOCK_DESTROY() mtx_destroy(&ifv_mtx) -#define VLAN_LOCK_ASSERT() mtx_assert(&ifv_mtx, MA_OWNED) -#define VLAN_LOCK() mtx_lock(&ifv_mtx) -#define VLAN_UNLOCK() mtx_unlock(&ifv_mtx) +static struct sx ifv_lock; +#define VLAN_LOCK_INIT() sx_init(&ifv_lock, "vlan_global") +#define VLAN_LOCK_DESTROY() sx_destroy(&ifv_lock) +#define VLAN_LOCK_ASSERT() sx_assert(&ifv_lock, SA_LOCKED) +#define VLAN_LOCK() sx_xlock(&ifv_lock) +#define VLAN_UNLOCK() sx_xunlock(&ifv_lock) #define TRUNK_LOCK_INIT(trunk) rw_init(&(trunk)->rw, VLANNAME) #define TRUNK_LOCK_DESTROY(trunk) rw_destroy(&(trunk)->rw) #define TRUNK_LOCK(trunk) rw_wlock(&(trunk)->rw) @@ -386,6 +388,47 @@ vlan_dumphash(struct ifvlantrunk *trunk) } } #endif /* 0 */ +#else + +static __inline struct ifvlan * +vlan_gethash(struct ifvlantrunk *trunk, uint16_t tag) +{ + + return trunk->vlans[tag]; +} + +static __inline int +vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan *ifv) +{ + + if (trunk->vlans[ifv->ifv_tag] != NULL) + return EEXIST; + trunk->vlans[ifv->ifv_tag] = ifv; + trunk->refcnt++; + + return (0); +} + +static __inline int +vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv) +{ + + trunk->vlans[ifv->ifv_tag] = NULL; + trunk->refcnt--; + + return (0); +} + +static __inline void +vlan_freehash(struct ifvlantrunk *trunk) +{ +} + +static __inline void +vlan_inithash(struct ifvlantrunk *trunk) +{ +} + #endif /* !VLAN_ARRAY */ static void @@ -394,9 +437,7 @@ trunk_destroy(struct ifvlantrunk *trunk) VLAN_LOCK_ASSERT(); TRUNK_LOCK(trunk); -#ifndef VLAN_ARRAY vlan_freehash(trunk); -#endif trunk->parent->if_vlantrunk = NULL; TRUNK_UNLOCK(trunk); TRUNK_LOCK_DESTROY(trunk); @@ -421,7 +462,6 @@ vlan_setmulti(struct ifnet *ifp) struct ifmultiaddr *ifma, *rifma = NULL; struct ifvlan *sc; struct vlan_mc_entry *mc; - struct sockaddr_dl sdl; int error; /*VLAN_LOCK_ASSERT();*/ @@ -432,17 +472,9 @@ vlan_setmulti(struct ifnet *ifp) CURVNET_SET_QUIET(ifp_p->if_vnet); - bzero((char *)&sdl, sizeof(sdl)); - sdl.sdl_len = sizeof(sdl); - sdl.sdl_family = AF_LINK; - sdl.sdl_index = ifp_p->if_index; - sdl.sdl_type = IFT_ETHER; - sdl.sdl_alen = ETHER_ADDR_LEN; - /* First, remove any existing filter entries. */ while ((mc = SLIST_FIRST(&sc->vlan_mc_listhead)) != NULL) { - bcopy((char *)&mc->mc_addr, LLADDR(&sdl), ETHER_ADDR_LEN); - error = if_delmulti(ifp_p, (struct sockaddr *)&sdl); + error = if_delmulti(ifp_p, (struct sockaddr *)&mc->mc_addr); if (error) return (error); SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); @@ -456,12 +488,11 @@ vlan_setmulti(struct ifnet *ifp) mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, M_NOWAIT); if (mc == NULL) return (ENOMEM); - bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - (char *)&mc->mc_addr, ETHER_ADDR_LEN); + bcopy(ifma->ifma_addr, &mc->mc_addr, ifma->ifma_addr->sa_len); + mc->mc_addr.sdl_index = ifp_p->if_index; SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries); - bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - LLADDR(&sdl), ETHER_ADDR_LEN); - error = if_addmulti(ifp_p, (struct sockaddr *)&sdl, &rifma); + error = if_addmulti(ifp_p, (struct sockaddr *)&mc->mc_addr, + &rifma); if (error) return (error); } @@ -503,7 +534,8 @@ vlan_iflladdr(void *arg __unused, struct LIST_FOREACH_SAFE(ifv, &ifp->if_vlantrunk->hash[i], ifv_list, next) { #endif /* VLAN_ARRAY */ VLAN_UNLOCK(); - if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), + ifp->if_addrlen); VLAN_LOCK(); } VLAN_UNLOCK(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 09:58:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4086106564A; Mon, 21 Mar 2011 09:58:25 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF2F48FC0A; Mon, 21 Mar 2011 09:58:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2L9wPTm006997; Mon, 21 Mar 2011 09:58:25 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2L9wPQd006979; Mon, 21 Mar 2011 09:58:25 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103210958.p2L9wPQd006979@svn.freebsd.org> From: Jeff Roberson Date: Mon, 21 Mar 2011 09:58: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: r219820 - in head: . contrib/ofed contrib/ofed/include contrib/ofed/include/infiniband contrib/ofed/include/rdma contrib/ofed/libibcm contrib/ofed/libibcm/config contrib/ofed/libibcm/in... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 09:58:25 -0000 Author: jeff Date: Mon Mar 21 09:58:24 2011 New Revision: 219820 URL: http://svn.freebsd.org/changeset/base/219820 Log: - Merge in OFED 1.5.3 from projects/ofed/head Added: head/contrib/ofed/ head/contrib/ofed/Makefile head/contrib/ofed/include/ head/contrib/ofed/include/Makefile head/contrib/ofed/include/infiniband/ head/contrib/ofed/include/infiniband/Makefile head/contrib/ofed/include/infiniband/byteorder.h head/contrib/ofed/include/infiniband/byteswap.h head/contrib/ofed/include/infiniband/endian.h head/contrib/ofed/include/infiniband/types.h head/contrib/ofed/include/rdma/ head/contrib/ofed/include/rdma/Makefile head/contrib/ofed/libibcm/AUTHORS (contents, props changed) head/contrib/ofed/libibcm/COPYING (contents, props changed) head/contrib/ofed/libibcm/ChangeLog (contents, props changed) head/contrib/ofed/libibcm/INSTALL (contents, props changed) head/contrib/ofed/libibcm/Makefile.am (contents, props changed) head/contrib/ofed/libibcm/Makefile.in (contents, props changed) head/contrib/ofed/libibcm/NEWS (contents, props changed) head/contrib/ofed/libibcm/README (contents, props changed) head/contrib/ofed/libibcm/aclocal.m4 (contents, props changed) head/contrib/ofed/libibcm/config.h.in (contents, props changed) head/contrib/ofed/libibcm/config/compile (contents, props changed) head/contrib/ofed/libibcm/config/config.guess (contents, props changed) head/contrib/ofed/libibcm/config/config.sub (contents, props changed) head/contrib/ofed/libibcm/config/depcomp (contents, props changed) head/contrib/ofed/libibcm/config/install-sh (contents, props changed) head/contrib/ofed/libibcm/config/ltmain.sh (contents, props changed) head/contrib/ofed/libibcm/config/missing (contents, props changed) head/contrib/ofed/libibcm/configure (contents, props changed) head/contrib/ofed/libibcm/configure.in (contents, props changed) head/contrib/ofed/libibcm/include/infiniband/cm.h (contents, props changed) head/contrib/ofed/libibcm/include/infiniband/cm_abi.h (contents, props changed) head/contrib/ofed/libibcm/libibcm.spec (contents, props changed) head/contrib/ofed/libibcm/libibcm.spec.in (contents, props changed) head/contrib/ofed/libibcm/src/cm.c (contents, props changed) head/contrib/ofed/libibcm/src/libibcm.map (contents, props changed) head/contrib/ofed/libibverbs/AUTHORS (contents, props changed) head/contrib/ofed/libibverbs/COPYING (contents, props changed) head/contrib/ofed/libibverbs/ChangeLog (contents, props changed) head/contrib/ofed/libibverbs/Makefile.am (contents, props changed) head/contrib/ofed/libibverbs/README (contents, props changed) head/contrib/ofed/libibverbs/autogen.sh (contents, props changed) head/contrib/ofed/libibverbs/configure.in (contents, props changed) head/contrib/ofed/libibverbs/debian/changelog (contents, props changed) head/contrib/ofed/libibverbs/debian/compat (contents, props changed) head/contrib/ofed/libibverbs/debian/control.in (contents, props changed) head/contrib/ofed/libibverbs/debian/copyright (contents, props changed) head/contrib/ofed/libibverbs/debian/ibverbs-utils.install (contents, props changed) head/contrib/ofed/libibverbs/debian/libibverbs-dev.install (contents, props changed) head/contrib/ofed/libibverbs/debian/libibverbs-dev.links (contents, props changed) head/contrib/ofed/libibverbs/debian/libibverbs1.install (contents, props changed) head/contrib/ofed/libibverbs/debian/libibverbs1.postinst (contents, props changed) head/contrib/ofed/libibverbs/debian/rules (contents, props changed) head/contrib/ofed/libibverbs/debian/watch (contents, props changed) head/contrib/ofed/libibverbs/examples/Makefile (contents, props changed) head/contrib/ofed/libibverbs/examples/asyncwatch.c (contents, props changed) head/contrib/ofed/libibverbs/examples/device_list.c (contents, props changed) head/contrib/ofed/libibverbs/examples/devinfo.c (contents, props changed) head/contrib/ofed/libibverbs/examples/pingpong.c (contents, props changed) head/contrib/ofed/libibverbs/examples/pingpong.h (contents, props changed) head/contrib/ofed/libibverbs/examples/rc_pingpong.c (contents, props changed) head/contrib/ofed/libibverbs/examples/srq_pingpong.c (contents, props changed) head/contrib/ofed/libibverbs/examples/uc_pingpong.c (contents, props changed) head/contrib/ofed/libibverbs/examples/ud_pingpong.c (contents, props changed) head/contrib/ofed/libibverbs/fixes/XRC_RCV_QP.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/XRC_base_implementation.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/XRC_man_pages.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/configure_in-AC_PROG_LIBTOOL-for-automake.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/pthread_cond_t_fields.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/qpt_raw_eth.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/rocee_examples.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/rocee_get_mac.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/rocee_kernel_accept_link_layer.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/rocee_link_layer.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/rpm_spec_changelog_fix.patch (contents, props changed) head/contrib/ofed/libibverbs/fixes/series (contents, props changed) head/contrib/ofed/libibverbs/fixes/verbs_man_page.patch (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/arch.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/driver.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/kern-abi.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/marshall.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/opcode.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/sa-kern-abi.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/sa.h (contents, props changed) head/contrib/ofed/libibverbs/include/infiniband/verbs.h (contents, props changed) head/contrib/ofed/libibverbs/libibverbs.spec.in (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_alloc_pd.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_asyncwatch.1 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_attach_mcast.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_ah.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_ah_from_wc.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_comp_channel.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_cq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_srq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_create_xrc_rcv_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_devices.1 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_devinfo.1 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_event_type_str.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_fork_init.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_get_async_event.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_get_cq_event.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_get_device_guid.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_get_device_list.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_get_device_name.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_modify_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_modify_srq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_modify_xrc_rcv_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_open_device.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_open_xrc_domain.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_poll_cq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_post_recv.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_post_send.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_post_srq_recv.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_device.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_gid.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_pkey.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_port.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_srq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_query_xrc_rcv_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_rate_to_mult.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_rc_pingpong.1 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_reg_mr.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_reg_xrc_rcv_qp.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_req_notify_cq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_resize_cq.3 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_srq_pingpong.1 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_uc_pingpong.1 (contents, props changed) head/contrib/ofed/libibverbs/man/ibv_ud_pingpong.1 (contents, props changed) head/contrib/ofed/libibverbs/man/verbs.7 (contents, props changed) head/contrib/ofed/libibverbs/src/cmd.c (contents, props changed) head/contrib/ofed/libibverbs/src/compat-1_0.c (contents, props changed) head/contrib/ofed/libibverbs/src/device.c (contents, props changed) head/contrib/ofed/libibverbs/src/enum_strs.c (contents, props changed) head/contrib/ofed/libibverbs/src/ibverbs.h (contents, props changed) head/contrib/ofed/libibverbs/src/init.c (contents, props changed) head/contrib/ofed/libibverbs/src/kern_abi.h (contents, props changed) head/contrib/ofed/libibverbs/src/libibverbs.map (contents, props changed) head/contrib/ofed/libibverbs/src/marshall.c (contents, props changed) head/contrib/ofed/libibverbs/src/memory.c (contents, props changed) head/contrib/ofed/libibverbs/src/sysfs.c (contents, props changed) head/contrib/ofed/libibverbs/src/verbs.c (contents, props changed) head/contrib/ofed/libmlx4/AUTHORS (contents, props changed) head/contrib/ofed/libmlx4/COPYING (contents, props changed) head/contrib/ofed/libmlx4/Makefile.am (contents, props changed) head/contrib/ofed/libmlx4/README (contents, props changed) head/contrib/ofed/libmlx4/autogen.sh (contents, props changed) head/contrib/ofed/libmlx4/configure.in (contents, props changed) head/contrib/ofed/libmlx4/debian/changelog (contents, props changed) head/contrib/ofed/libmlx4/debian/compat (contents, props changed) head/contrib/ofed/libmlx4/debian/control.in (contents, props changed) head/contrib/ofed/libmlx4/debian/copyright (contents, props changed) head/contrib/ofed/libmlx4/debian/libmlx4-1.install (contents, props changed) head/contrib/ofed/libmlx4/debian/libmlx4-dev.install (contents, props changed) head/contrib/ofed/libmlx4/debian/rules (contents, props changed) head/contrib/ofed/libmlx4/debian/watch (contents, props changed) head/contrib/ofed/libmlx4/fixes/add_supported_devices.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/fix_inline_size.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/lim_qp_resources.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/post_rcv_end_of_sg.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/rocee_add_support.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/series (contents, props changed) head/contrib/ofed/libmlx4/fixes/userspace_dev_lims.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/xrc_consolidated_v2.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/xrc_fix_close_domain.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/xrc_kernel_user_mismatch.patch (contents, props changed) head/contrib/ofed/libmlx4/fixes/xrc_rcv_qp_v2.patch (contents, props changed) head/contrib/ofed/libmlx4/libmlx4.spec.in (contents, props changed) head/contrib/ofed/libmlx4/mlx4.driver (contents, props changed) head/contrib/ofed/libmlx4/src/buf.c (contents, props changed) head/contrib/ofed/libmlx4/src/cq.c (contents, props changed) head/contrib/ofed/libmlx4/src/dbrec.c (contents, props changed) head/contrib/ofed/libmlx4/src/doorbell.h (contents, props changed) head/contrib/ofed/libmlx4/src/mlx4-abi.h (contents, props changed) head/contrib/ofed/libmlx4/src/mlx4.c (contents, props changed) head/contrib/ofed/libmlx4/src/mlx4.h (contents, props changed) head/contrib/ofed/libmlx4/src/mlx4.map (contents, props changed) head/contrib/ofed/libmlx4/src/qp.c (contents, props changed) head/contrib/ofed/libmlx4/src/srq.c (contents, props changed) head/contrib/ofed/libmlx4/src/verbs.c (contents, props changed) head/contrib/ofed/libmlx4/src/wqe.h (contents, props changed) head/contrib/ofed/libmthca/AUTHORS (contents, props changed) head/contrib/ofed/libmthca/COPYING (contents, props changed) head/contrib/ofed/libmthca/ChangeLog (contents, props changed) head/contrib/ofed/libmthca/Makefile.am (contents, props changed) head/contrib/ofed/libmthca/README (contents, props changed) head/contrib/ofed/libmthca/autogen.sh (contents, props changed) head/contrib/ofed/libmthca/configure.in (contents, props changed) head/contrib/ofed/libmthca/debian/changelog (contents, props changed) head/contrib/ofed/libmthca/debian/compat (contents, props changed) head/contrib/ofed/libmthca/debian/control.in (contents, props changed) head/contrib/ofed/libmthca/debian/copyright (contents, props changed) head/contrib/ofed/libmthca/debian/libmthca-dev.install (contents, props changed) head/contrib/ofed/libmthca/debian/libmthca1.install (contents, props changed) head/contrib/ofed/libmthca/debian/rules (contents, props changed) head/contrib/ofed/libmthca/debian/watch (contents, props changed) head/contrib/ofed/libmthca/libmthca.spec.in (contents, props changed) head/contrib/ofed/libmthca/mthca.driver (contents, props changed) head/contrib/ofed/libmthca/src/ah.c (contents, props changed) head/contrib/ofed/libmthca/src/buf.c (contents, props changed) head/contrib/ofed/libmthca/src/cq.c (contents, props changed) head/contrib/ofed/libmthca/src/doorbell.h (contents, props changed) head/contrib/ofed/libmthca/src/memfree.c (contents, props changed) head/contrib/ofed/libmthca/src/mthca-abi.h (contents, props changed) head/contrib/ofed/libmthca/src/mthca.c (contents, props changed) head/contrib/ofed/libmthca/src/mthca.h (contents, props changed) head/contrib/ofed/libmthca/src/mthca.map (contents, props changed) head/contrib/ofed/libmthca/src/qp.c (contents, props changed) head/contrib/ofed/libmthca/src/srq.c (contents, props changed) head/contrib/ofed/libmthca/src/verbs.c (contents, props changed) head/contrib/ofed/libmthca/src/wqe.h (contents, props changed) head/contrib/ofed/librdmacm/AUTHORS (contents, props changed) head/contrib/ofed/librdmacm/COPYING (contents, props changed) head/contrib/ofed/librdmacm/ChangeLog (contents, props changed) head/contrib/ofed/librdmacm/INSTALL (contents, props changed) head/contrib/ofed/librdmacm/Makefile.am (contents, props changed) head/contrib/ofed/librdmacm/Makefile.in (contents, props changed) head/contrib/ofed/librdmacm/NEWS (contents, props changed) head/contrib/ofed/librdmacm/README (contents, props changed) head/contrib/ofed/librdmacm/aclocal.m4 (contents, props changed) head/contrib/ofed/librdmacm/config.h.in (contents, props changed) head/contrib/ofed/librdmacm/config/compile (contents, props changed) head/contrib/ofed/librdmacm/config/config.guess (contents, props changed) head/contrib/ofed/librdmacm/config/config.sub (contents, props changed) head/contrib/ofed/librdmacm/config/depcomp (contents, props changed) head/contrib/ofed/librdmacm/config/install-sh (contents, props changed) head/contrib/ofed/librdmacm/config/ltmain.sh (contents, props changed) head/contrib/ofed/librdmacm/config/missing (contents, props changed) head/contrib/ofed/librdmacm/configure (contents, props changed) head/contrib/ofed/librdmacm/configure.in (contents, props changed) head/contrib/ofed/librdmacm/examples/cmatose.c (contents, props changed) head/contrib/ofed/librdmacm/examples/mckey.c (contents, props changed) head/contrib/ofed/librdmacm/examples/rping.c (contents, props changed) head/contrib/ofed/librdmacm/examples/udaddy.c (contents, props changed) head/contrib/ofed/librdmacm/include/rdma/rdma_cma.h (contents, props changed) head/contrib/ofed/librdmacm/include/rdma/rdma_cma_abi.h (contents, props changed) head/contrib/ofed/librdmacm/librdmacm.spec (contents, props changed) head/contrib/ofed/librdmacm/librdmacm.spec.in (contents, props changed) head/contrib/ofed/librdmacm/man/mckey.1 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_accept.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_ack_cm_event.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_bind_addr.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_cm.7 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_connect.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_create_event_channel.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_create_id.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_create_qp.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_destroy_event_channel.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_destroy_id.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_destroy_qp.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_disconnect.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_event_str.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_free_devices.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_get_cm_event.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_get_devices.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_get_dst_port.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_get_local_addr.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_get_peer_addr.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_get_src_port.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_join_multicast.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_leave_multicast.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_listen.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_migrate_id.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_notify.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_reject.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_resolve_addr.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_resolve_route.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rdma_set_option.3 (contents, props changed) head/contrib/ofed/librdmacm/man/rping.1 (contents, props changed) head/contrib/ofed/librdmacm/man/ucmatose.1 (contents, props changed) head/contrib/ofed/librdmacm/man/udaddy.1 (contents, props changed) head/contrib/ofed/librdmacm/src/cma.c (contents, props changed) head/contrib/ofed/librdmacm/src/librdmacm.map (contents, props changed) head/contrib/ofed/libsdp/COPYING (contents, props changed) head/contrib/ofed/libsdp/ChangeLog (contents, props changed) head/contrib/ofed/libsdp/Makefile.am (contents, props changed) head/contrib/ofed/libsdp/NEWS (contents, props changed) head/contrib/ofed/libsdp/README (contents, props changed) head/contrib/ofed/libsdp/autogen.sh (contents, props changed) head/contrib/ofed/libsdp/changelog_from_git.sh (contents, props changed) head/contrib/ofed/libsdp/config/libsdp_indent (contents, props changed) head/contrib/ofed/libsdp/configure.in (contents, props changed) head/contrib/ofed/libsdp/libsdp.conf (contents, props changed) head/contrib/ofed/libsdp/libsdp.spec.in (contents, props changed) head/contrib/ofed/libsdp/src/Makefile.am (contents, props changed) head/contrib/ofed/libsdp/src/config_parser.c (contents, props changed) head/contrib/ofed/libsdp/src/config_parser.h (contents, props changed) head/contrib/ofed/libsdp/src/config_scanner.c (contents, props changed) head/contrib/ofed/libsdp/src/libsdp.h (contents, props changed) head/contrib/ofed/libsdp/src/linux/sdp_inet.h (contents, props changed) head/contrib/ofed/libsdp/src/log.c (contents, props changed) head/contrib/ofed/libsdp/src/match.c (contents, props changed) head/contrib/ofed/libsdp/src/port.c (contents, props changed) head/contrib/ofed/libsdp/src/socket.c (contents, props changed) head/contrib/ofed/management/AUTHORS (contents, props changed) head/contrib/ofed/management/COPYING (contents, props changed) head/contrib/ofed/management/ChangeLog (contents, props changed) head/contrib/ofed/management/INSTALL (contents, props changed) head/contrib/ofed/management/Makefile (contents, props changed) head/contrib/ofed/management/NEWS (contents, props changed) head/contrib/ofed/management/README (contents, props changed) head/contrib/ofed/management/doc/diagtools-proposal.txt (contents, props changed) head/contrib/ofed/management/doc/diagtools.txt (contents, props changed) head/contrib/ofed/management/doc/ibtracer.txt (contents, props changed) head/contrib/ofed/management/doc/libibmad.txt (contents, props changed) head/contrib/ofed/management/doc/libibumad.txt (contents, props changed) head/contrib/ofed/management/gen_chlog.sh (contents, props changed) head/contrib/ofed/management/gen_ver.sh (contents, props changed) head/contrib/ofed/management/infiniband-diags/COPYING (contents, props changed) head/contrib/ofed/management/infiniband-diags/ChangeLog (contents, props changed) head/contrib/ofed/management/infiniband-diags/Makefile.am (contents, props changed) head/contrib/ofed/management/infiniband-diags/README (contents, props changed) head/contrib/ofed/management/infiniband-diags/autogen.sh (contents, props changed) head/contrib/ofed/management/infiniband-diags/configure.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/include/grouping.h (contents, props changed) head/contrib/ofed/management/infiniband-diags/include/ibdiag_common.h (contents, props changed) head/contrib/ofed/management/infiniband-diags/include/ibdiag_version.h (contents, props changed) head/contrib/ofed/management/infiniband-diags/include/ibdiag_version.h.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/include/ibnetdiscover.h (contents, props changed) head/contrib/ofed/management/infiniband-diags/infiniband-diags.spec.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/check_lft_balance.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/dump_lfts.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/dump_mfts.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibaddr.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckerrors.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckerrs.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibchecknet.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibchecknode.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckport.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckportstate.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckportwidth.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckstate.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibcheckwidth.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibclearcounters.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibclearerrors.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibdatacounters.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibdatacounts.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibdiscover.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibfindnodesusing.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibhosts.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibidsverify.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/iblinkinfo.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibnetdiscover.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibnodes.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibping.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibportstate.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibprintca.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibprintrt.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibprintswitch.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibqueryerrors.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibroute.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibrouters.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibstat.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibstatus.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibswitches.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibswportwatch.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibsysstat.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/ibtracert.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/perfquery.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/saquery.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/sminfo.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/smpdump.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/smpquery.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/man/vendstat.8 (contents, props changed) head/contrib/ofed/management/infiniband-diags/perltidy.sh (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/IBswcountlimits.pm (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/check_lft_balance.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/dump_lfts.sh (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/dump_mfts.sh (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckerrors.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckerrs.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibchecknet.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibchecknode.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckport.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckportstate.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckportwidth.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckstate.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibcheckwidth.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibclearcounters.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibclearerrors.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibdatacounters.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibdatacounts.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibdiscover.map (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibdiscover.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibfindnodesusing.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibhosts.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibidsverify.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/iblinkinfo.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibnodes.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibprintca.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibprintrt.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibprintswitch.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibqueryerrors.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibrouters.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibstatus (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibswitches.in (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/ibswportwatch.pl (contents, props changed) head/contrib/ofed/management/infiniband-diags/scripts/set_nodedesc.sh (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/grouping.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibaddr.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibdiag_common.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibnetdiscover.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibping.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibportstate.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibroute.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibsendtrap.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibstat.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibsysstat.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/ibtracert.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/mcm_rereg_test.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/perfquery.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/saquery.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/sminfo.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/smpdump.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/smpquery.c (contents, props changed) head/contrib/ofed/management/infiniband-diags/src/vendstat.c (contents, props changed) head/contrib/ofed/management/libibcommon/AUTHORS (contents, props changed) head/contrib/ofed/management/libibcommon/COPYING (contents, props changed) head/contrib/ofed/management/libibcommon/ChangeLog (contents, props changed) head/contrib/ofed/management/libibcommon/Makefile.am (contents, props changed) head/contrib/ofed/management/libibcommon/autogen.sh (contents, props changed) head/contrib/ofed/management/libibcommon/configure.in (contents, props changed) head/contrib/ofed/management/libibcommon/include/infiniband/common.h (contents, props changed) head/contrib/ofed/management/libibcommon/libibcommon.spec.in (contents, props changed) head/contrib/ofed/management/libibcommon/libibcommon.ver (contents, props changed) head/contrib/ofed/management/libibcommon/src/hash.c (contents, props changed) head/contrib/ofed/management/libibcommon/src/libibcommon.map (contents, props changed) head/contrib/ofed/management/libibcommon/src/stack.c (contents, props changed) head/contrib/ofed/management/libibcommon/src/sysfs.c (contents, props changed) head/contrib/ofed/management/libibcommon/src/time.c (contents, props changed) head/contrib/ofed/management/libibcommon/src/util.c (contents, props changed) head/contrib/ofed/management/libibmad/AUTHORS (contents, props changed) head/contrib/ofed/management/libibmad/COPYING (contents, props changed) head/contrib/ofed/management/libibmad/ChangeLog (contents, props changed) head/contrib/ofed/management/libibmad/Makefile.am (contents, props changed) head/contrib/ofed/management/libibmad/autogen.sh (contents, props changed) head/contrib/ofed/management/libibmad/configure.in (contents, props changed) head/contrib/ofed/management/libibmad/include/infiniband/mad.h (contents, props changed) head/contrib/ofed/management/libibmad/libibmad.spec.in (contents, props changed) head/contrib/ofed/management/libibmad/libibmad.ver (contents, props changed) head/contrib/ofed/management/libibmad/src/dump.c (contents, props changed) head/contrib/ofed/management/libibmad/src/fields.c (contents, props changed) head/contrib/ofed/management/libibmad/src/gs.c (contents, props changed) head/contrib/ofed/management/libibmad/src/libibmad.map (contents, props changed) head/contrib/ofed/management/libibmad/src/mad.c (contents, props changed) head/contrib/ofed/management/libibmad/src/portid.c (contents, props changed) head/contrib/ofed/management/libibmad/src/register.c (contents, props changed) head/contrib/ofed/management/libibmad/src/resolve.c (contents, props changed) head/contrib/ofed/management/libibmad/src/rpc.c (contents, props changed) head/contrib/ofed/management/libibmad/src/sa.c (contents, props changed) head/contrib/ofed/management/libibmad/src/serv.c (contents, props changed) head/contrib/ofed/management/libibmad/src/smp.c (contents, props changed) head/contrib/ofed/management/libibmad/src/vendor.c (contents, props changed) head/contrib/ofed/management/libibumad/AUTHORS (contents, props changed) head/contrib/ofed/management/libibumad/COPYING (contents, props changed) head/contrib/ofed/management/libibumad/ChangeLog (contents, props changed) head/contrib/ofed/management/libibumad/Makefile.am (contents, props changed) head/contrib/ofed/management/libibumad/autogen.sh (contents, props changed) head/contrib/ofed/management/libibumad/configure.in (contents, props changed) head/contrib/ofed/management/libibumad/include/infiniband/umad.h (contents, props changed) head/contrib/ofed/management/libibumad/libibumad.spec.in (contents, props changed) head/contrib/ofed/management/libibumad/libibumad.ver (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_addr_dump.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_alloc.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_close_port.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_debug.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_dump.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_free.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_ca.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_ca_portguids.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_cas_names.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_fd.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_issm_path.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_mad.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_mad_addr.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_pkey.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_get_port.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_init.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_open_port.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_poll.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_recv.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_register.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_register_oui.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_send.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_set_addr.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_set_addr_net.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_set_grh.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_set_grh_net.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_set_pkey.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_size.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_status.3 (contents, props changed) head/contrib/ofed/management/libibumad/man/umad_unregister.3 (contents, props changed) head/contrib/ofed/management/libibumad/src/libibumad.map (contents, props changed) head/contrib/ofed/management/libibumad/src/umad.c (contents, props changed) head/contrib/ofed/management/make.dist (contents, props changed) head/contrib/ofed/management/opensm/AUTHORS (contents, props changed) head/contrib/ofed/management/opensm/COPYING (contents, props changed) head/contrib/ofed/management/opensm/ChangeLog (contents, props changed) head/contrib/ofed/management/opensm/INSTALL (contents, props changed) head/contrib/ofed/management/opensm/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/NEWS (contents, props changed) head/contrib/ofed/management/opensm/README (contents, props changed) head/contrib/ofed/management/opensm/autogen.sh (contents, props changed) head/contrib/ofed/management/opensm/complib/ChangeLog (contents, props changed) head/contrib/ofed/management/opensm/complib/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_complib.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_dispatcher.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_event.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_event_wheel.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_list.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_log.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_map.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_nodenamemap.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_pool.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_ptr_vector.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_spinlock.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_statustext.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_thread.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_threadpool.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_timer.c (contents, props changed) head/contrib/ofed/management/opensm/complib/cl_vector.c (contents, props changed) head/contrib/ofed/management/opensm/complib/ib_statustext.c (contents, props changed) head/contrib/ofed/management/opensm/complib/libosmcomp.map (contents, props changed) head/contrib/ofed/management/opensm/complib/libosmcomp.ver (contents, props changed) head/contrib/ofed/management/opensm/config/osmvsel.m4 (contents, props changed) head/contrib/ofed/management/opensm/configure.in (contents, props changed) head/contrib/ofed/management/opensm/doc/OpenSM_PKey_Mgr.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/OpenSM_RN.pdf (contents, props changed) head/contrib/ofed/management/opensm/doc/OpenSM_UM.pdf (contents, props changed) head/contrib/ofed/management/opensm/doc/QoS_management_in_OpenSM.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/current-routing.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/modular-routing.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm-coding-style.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes-3.1.10.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes-3.1.11.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes-3.2.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes_ibg2-2.0.1.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes_openib-1.2.1.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes_openib-2.0.5.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/opensm_release_notes_openib-3.0.13.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/partition-config.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/perf-manager-arch.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/performance-manager-HOWTO.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/qos-config.txt (contents, props changed) head/contrib/ofed/management/opensm/doc/todo (contents, props changed) head/contrib/ofed/management/opensm/include/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_atomic.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_atomic_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_byteswap.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_byteswap_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_comppool.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_debug.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_debug_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_dispatcher.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_event.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_event_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_event_wheel.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_fleximap.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_list.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_log.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_map.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_math.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_nodenamemap.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_packoff.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_packon.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_passivelock.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_pool.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_ptr_vector.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_qcomppool.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_qlist.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_qmap.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_qpool.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_spinlock.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_spinlock_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_thread.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_thread_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_threadpool.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_timer.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_timer_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_types.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_types_osd.h (contents, props changed) head/contrib/ofed/management/opensm/include/complib/cl_vector.h (contents, props changed) head/contrib/ofed/management/opensm/include/iba/ib_cm_types.h (contents, props changed) head/contrib/ofed/management/opensm/include/iba/ib_types.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_attrib_req.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_base.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_config.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_config.h.in (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_console.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_console_io.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_db.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_db_pack.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_errors.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_event_plugin.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_helper.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_inform.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_lid_mgr.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_log.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_mad_pool.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_madw.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_mcast_tbl.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_mcm_info.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_mcm_port.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_msgdef.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_mtree.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_multicast.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_node.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_opensm.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_partition.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_path.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_perfmgr.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_perfmgr_db.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_pkey.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_pkey_mgr.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_port.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_port_profile.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_prefix_route.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_qos_policy.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_remote_sm.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_router.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_sa.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_sa_mad_ctrl.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_service.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_sm.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_sm_mad_ctrl.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_stats.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_subnet.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_switch.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_ucast_cache.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_ucast_mgr.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_version.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_version.h.in (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/osm_vl15intf.h (contents, props changed) head/contrib/ofed/management/opensm/include/opensm/st.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_mtl_bind.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_pkt_randomizer.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_ts_useraccess.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_umadt.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_al.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_api.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_ibumad.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_defs.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_dispatcher.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_hca.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_inout.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_rmpp_ctx.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_sar.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_sender.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_svc.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_transport.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_transport_anafa.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mlx_txn.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mtl.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mtl_hca_guid.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_mtl_transaction_mgr.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_sa_api.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_test.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_ts.h (contents, props changed) head/contrib/ofed/management/opensm/include/vendor/osm_vendor_umadt.h (contents, props changed) head/contrib/ofed/management/opensm/libvendor/ChangeLog (contents, props changed) head/contrib/ofed/management/opensm/libvendor/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/libvendor/libosmvendor.map (contents, props changed) head/contrib/ofed/management/opensm/libvendor/libosmvendor.ver (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_pkt_randomizer.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_al.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_ibumad.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_ibumad_sa.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_anafa.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_dispatcher.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_hca.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_hca_anafa.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_hca_pfs.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_hca_sim.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_ibmgt.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_rmpp_ctx.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_sa.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_sar.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_sender.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_sim.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_ts.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_ts_anafa.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mlx_txn.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mtl.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mtl_hca_guid.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_mtl_transaction_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_test.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_ts.c (contents, props changed) head/contrib/ofed/management/opensm/libvendor/osm_vendor_umadt.c (contents, props changed) head/contrib/ofed/management/opensm/man/opensm.8 (contents, props changed) head/contrib/ofed/management/opensm/man/opensm.8.in (contents, props changed) head/contrib/ofed/management/opensm/man/osmtest.8 (contents, props changed) head/contrib/ofed/management/opensm/opensm.spec.in (contents, props changed) head/contrib/ofed/management/opensm/opensm/ChangeLog (contents, props changed) head/contrib/ofed/management/opensm/opensm/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/opensm/libopensm.map (contents, props changed) head/contrib/ofed/management/opensm/opensm/libopensm.ver (contents, props changed) head/contrib/ofed/management/opensm/opensm/main.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_check (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_check_n_fix (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_console.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_console_io.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_db_files.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_db_pack.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_drop_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_dump.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_event_plugin.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_helper.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_indent (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_inform.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_lid_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_lin_fwd_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_link_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_log.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mad_pool.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mcast_fwd_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mcast_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mcast_tbl.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mcm_info.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mcm_port.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_mtree.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_multicast.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_node.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_node_desc_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_node_info_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_opensm.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_perfmgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_perfmgr_db.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_pkey.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_pkey_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_pkey_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_port.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_port_info_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_prtn.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_prtn_config.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_qos.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_qos_parser_l.l (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_qos_parser_y.y (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_qos_policy.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_remote_sm.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_req.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_resp.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_router.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_class_port_info.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_guidinfo_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_informinfo.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_lft_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_link_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_mad_ctrl.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_mcmember_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_mft_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_multipath_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_node_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_path_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_pkey_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_portinfo_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_service_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_slvl_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_sminfo_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_sw_info_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sa_vlarb_record.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_service.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_slvl_map_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sm.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sm_mad_ctrl.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sm_state_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sminfo_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_state_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_subnet.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_sw_info_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_switch.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_trap_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_ucast_cache.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_ucast_file.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_ucast_lash.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_ucast_mgr.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_ucast_updn.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_vl15intf.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/osm_vl_arb_rcv.c (contents, props changed) head/contrib/ofed/management/opensm/opensm/st.c (contents, props changed) head/contrib/ofed/management/opensm/osmeventplugin/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/osmeventplugin/libosmeventplugin.map (contents, props changed) head/contrib/ofed/management/opensm/osmeventplugin/libosmeventplugin.ver (contents, props changed) head/contrib/ofed/management/opensm/osmeventplugin/src/osmeventplugin.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/Makefile.am (contents, props changed) head/contrib/ofed/management/opensm/osmtest/include/osmt_inform.h (contents, props changed) head/contrib/ofed/management/opensm/osmtest/include/osmt_mtl_regular_qp.h (contents, props changed) head/contrib/ofed/management/opensm/osmtest/include/osmtest.h (contents, props changed) head/contrib/ofed/management/opensm/osmtest/include/osmtest_base.h (contents, props changed) head/contrib/ofed/management/opensm/osmtest/include/osmtest_subnet.h (contents, props changed) head/contrib/ofed/management/opensm/osmtest/main.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/osmt_inform.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/osmt_mtl_regular_qp.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/osmt_multicast.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/osmt_service.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/osmt_slvl_vl_arb.c (contents, props changed) head/contrib/ofed/management/opensm/osmtest/osmtest.c (contents, props changed) head/contrib/ofed/management/opensm/scripts/opensm.init.in (contents, props changed) head/contrib/ofed/management/opensm/scripts/opensm.logrotate (contents, props changed) head/contrib/ofed/management/opensm/scripts/opensm.sysconfig (contents, props changed) head/contrib/ofed/management/opensm/scripts/redhat-opensm.init.in (contents, props changed) head/contrib/ofed/management/opensm/scripts/sldd.sh.in (contents, props changed) head/contrib/ofed/usr.bin/ head/contrib/ofed/usr.bin/Makefile head/contrib/ofed/usr.bin/Makefile.inc head/contrib/ofed/usr.bin/ibaddr/ head/contrib/ofed/usr.bin/ibaddr/Makefile head/contrib/ofed/usr.bin/ibnetdiscover/ head/contrib/ofed/usr.bin/ibnetdiscover/Makefile head/contrib/ofed/usr.bin/ibping/ head/contrib/ofed/usr.bin/ibping/Makefile head/contrib/ofed/usr.bin/ibportstate/ head/contrib/ofed/usr.bin/ibportstate/Makefile head/contrib/ofed/usr.bin/ibroute/ head/contrib/ofed/usr.bin/ibroute/Makefile head/contrib/ofed/usr.bin/ibsendtrap/ head/contrib/ofed/usr.bin/ibsendtrap/Makefile head/contrib/ofed/usr.bin/ibstat/ head/contrib/ofed/usr.bin/ibstat/Makefile head/contrib/ofed/usr.bin/ibsysstat/ head/contrib/ofed/usr.bin/ibsysstat/Makefile head/contrib/ofed/usr.bin/ibtracert/ head/contrib/ofed/usr.bin/ibtracert/Makefile head/contrib/ofed/usr.bin/opensm/ head/contrib/ofed/usr.bin/opensm/Makefile head/contrib/ofed/usr.bin/perfquery/ head/contrib/ofed/usr.bin/perfquery/Makefile head/contrib/ofed/usr.bin/saquery/ head/contrib/ofed/usr.bin/saquery/Makefile head/contrib/ofed/usr.bin/sminfo/ head/contrib/ofed/usr.bin/sminfo/Makefile head/contrib/ofed/usr.bin/smpdump/ head/contrib/ofed/usr.bin/smpdump/Makefile head/contrib/ofed/usr.bin/smpquery/ head/contrib/ofed/usr.bin/smpquery/Makefile head/contrib/ofed/usr.bin/vendstat/ head/contrib/ofed/usr.bin/vendstat/Makefile head/contrib/ofed/usr.lib/ head/contrib/ofed/usr.lib/Makefile head/contrib/ofed/usr.lib/Makefile.inc head/contrib/ofed/usr.lib/libibcm/ head/contrib/ofed/usr.lib/libibcm/Makefile head/contrib/ofed/usr.lib/libibcommon/ head/contrib/ofed/usr.lib/libibcommon/Makefile head/contrib/ofed/usr.lib/libibmad/ head/contrib/ofed/usr.lib/libibmad/Makefile head/contrib/ofed/usr.lib/libibmad/config.h head/contrib/ofed/usr.lib/libibumad/ head/contrib/ofed/usr.lib/libibumad/Makefile head/contrib/ofed/usr.lib/libibumad/config.h head/contrib/ofed/usr.lib/libibverbs/ head/contrib/ofed/usr.lib/libibverbs/Makefile head/contrib/ofed/usr.lib/libibverbs/alloca.h head/contrib/ofed/usr.lib/libibverbs/config.h head/contrib/ofed/usr.lib/libmlx4/ head/contrib/ofed/usr.lib/libmlx4/Makefile head/contrib/ofed/usr.lib/libmlx4/config.h head/contrib/ofed/usr.lib/libmthca/ head/contrib/ofed/usr.lib/libmthca/Makefile head/contrib/ofed/usr.lib/libmthca/config.h head/contrib/ofed/usr.lib/libopensm/ head/contrib/ofed/usr.lib/libopensm/Makefile head/contrib/ofed/usr.lib/libosmcomp/ head/contrib/ofed/usr.lib/libosmcomp/Makefile head/contrib/ofed/usr.lib/libosmvendor/ head/contrib/ofed/usr.lib/libosmvendor/Makefile head/contrib/ofed/usr.lib/librdmacm/ head/contrib/ofed/usr.lib/librdmacm/Makefile head/contrib/ofed/usr.lib/libsdp/ head/contrib/ofed/usr.lib/libsdp/Makefile head/etc/rc.d/opensm (contents, props changed) head/sys/modules/mlx4/ head/sys/modules/mlx4/Makefile (contents, props changed) head/sys/modules/mlx4ib/ head/sys/modules/mlx4ib/Makefile (contents, props changed) head/sys/modules/mlxen/ head/sys/modules/mlxen/Makefile (contents, props changed) head/sys/modules/mthca/ head/sys/modules/mthca/Makefile (contents, props changed) head/sys/ofed/ head/sys/ofed/drivers/infiniband/Kconfig (contents, props changed) head/sys/ofed/drivers/infiniband/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/core/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/core/addr.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/agent.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/agent.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/cache.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/cm.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/cm_msgs.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/cma.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/core_priv.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/device.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/fmr_pool.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/iwcm.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/iwcm.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/local_sa.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/mad.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/mad_priv.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/mad_rmpp.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/mad_rmpp.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/multicast.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/notice.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/packer.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/sa.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/sa_query.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/smi.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/smi.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/sysfs.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/ucm.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/ucma.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/ud_header.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/umem.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/user_mad.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/uverbs.h (contents, props changed) head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/uverbs_main.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/uverbs_marshall.c (contents, props changed) head/sys/ofed/drivers/infiniband/core/verbs.c (contents, props changed) head/sys/ofed/drivers/infiniband/debug/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/debug/memtrack.c (contents, props changed) head/sys/ofed/drivers/infiniband/debug/memtrack.h (contents, props changed) head/sys/ofed/drivers/infiniband/debug/mtrack.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/Kconfig (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/ah.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/cq.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/doorbell.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/mad.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/main.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/mr.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/qp.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/srq.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/user.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/wc.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/wc.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/Kconfig (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_av.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cq.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_doorbell.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_eq.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_mad.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_mcg.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_mr.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_pd.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_profile.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_profile.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_srq.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_user.h (contents, props changed) head/sys/ofed/drivers/infiniband/hw/mthca/mthca_wqe.h (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/Kconfig (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_dbg.h (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_proc.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c (contents, props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_zcopy.c (contents, props changed) head/sys/ofed/drivers/infiniband/util/Kconfig (contents, props changed) head/sys/ofed/drivers/infiniband/util/Makefile (contents, props changed) head/sys/ofed/drivers/infiniband/util/madeye.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/Makefile (contents, props changed) head/sys/ofed/drivers/net/mlx4/alloc.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/catas.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/cmd.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/cq.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_cq.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_ethtool.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_frag.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_main.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_netdev.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_params.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_port.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_port.h (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_resources.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_rx.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_selftest.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/en_tx.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/eq.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/fw.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/fw.h (contents, props changed) head/sys/ofed/drivers/net/mlx4/icm.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/icm.h (contents, props changed) head/sys/ofed/drivers/net/mlx4/intf.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/main.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/mcg.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/mlx4.h (contents, props changed) head/sys/ofed/drivers/net/mlx4/mlx4_en.h (contents, props changed) head/sys/ofed/drivers/net/mlx4/mr.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/pd.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/port.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/profile.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/qp.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/reset.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/sense.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/srq.c (contents, props changed) head/sys/ofed/drivers/net/mlx4/xrcd.c (contents, props changed) head/sys/ofed/include/asm/atomic-long.h (contents, props changed) head/sys/ofed/include/asm/atomic.h (contents, props changed) head/sys/ofed/include/asm/byteorder.h (contents, props changed) head/sys/ofed/include/asm/current.h (contents, props changed) head/sys/ofed/include/asm/fcntl.h (contents, props changed) head/sys/ofed/include/asm/io.h (contents, props changed) head/sys/ofed/include/asm/page.h (contents, props changed) head/sys/ofed/include/asm/pgtable.h (contents, props changed) head/sys/ofed/include/asm/semaphore.h (contents, props changed) head/sys/ofed/include/asm/system.h (contents, props changed) head/sys/ofed/include/asm/types.h (contents, props changed) head/sys/ofed/include/asm/uaccess.h (contents, props changed) head/sys/ofed/include/linux/bitmap.h (contents, props changed) head/sys/ofed/include/linux/bitops.h (contents, props changed) head/sys/ofed/include/linux/cdev.h (contents, props changed) head/sys/ofed/include/linux/compat.h (contents, props changed) head/sys/ofed/include/linux/compiler.h (contents, props changed) head/sys/ofed/include/linux/completion.h (contents, props changed) head/sys/ofed/include/linux/ctype.h (contents, props changed) head/sys/ofed/include/linux/delay.h (contents, props changed) head/sys/ofed/include/linux/device.h (contents, props changed) head/sys/ofed/include/linux/dma-attrs.h (contents, props changed) head/sys/ofed/include/linux/dma-mapping.h (contents, props changed) head/sys/ofed/include/linux/dmapool.h (contents, props changed) head/sys/ofed/include/linux/err.h (contents, props changed) head/sys/ofed/include/linux/errno.h (contents, props changed) head/sys/ofed/include/linux/ethtool.h (contents, props changed) head/sys/ofed/include/linux/file.h (contents, props changed) head/sys/ofed/include/linux/fs.h (contents, props changed) head/sys/ofed/include/linux/gfp.h (contents, props changed) head/sys/ofed/include/linux/hardirq.h (contents, props changed) head/sys/ofed/include/linux/idr.h (contents, props changed) head/sys/ofed/include/linux/if_arp.h (contents, props changed) head/sys/ofed/include/linux/if_ether.h (contents, props changed) head/sys/ofed/include/linux/if_vlan.h (contents, props changed) head/sys/ofed/include/linux/in.h (contents, props changed) head/sys/ofed/include/linux/in6.h (contents, props changed) head/sys/ofed/include/linux/inet.h (contents, props changed) head/sys/ofed/include/linux/inetdevice.h (contents, props changed) head/sys/ofed/include/linux/init.h (contents, props changed) head/sys/ofed/include/linux/interrupt.h (contents, props changed) head/sys/ofed/include/linux/io-mapping.h (contents, props changed) head/sys/ofed/include/linux/io.h (contents, props changed) head/sys/ofed/include/linux/ioctl.h (contents, props changed) head/sys/ofed/include/linux/jhash.h (contents, props changed) head/sys/ofed/include/linux/jiffies.h (contents, props changed) head/sys/ofed/include/linux/kdev_t.h (contents, props changed) head/sys/ofed/include/linux/kernel.h (contents, props changed) head/sys/ofed/include/linux/kobject.h (contents, props changed) head/sys/ofed/include/linux/kref.h (contents, props changed) head/sys/ofed/include/linux/kthread.h (contents, props changed) head/sys/ofed/include/linux/linux_compat.c (contents, props changed) head/sys/ofed/include/linux/linux_idr.c (contents, props changed) head/sys/ofed/include/linux/linux_radix.c (contents, props changed) head/sys/ofed/include/linux/list.h (contents, props changed) head/sys/ofed/include/linux/lockdep.h (contents, props changed) head/sys/ofed/include/linux/log2.h (contents, props changed) head/sys/ofed/include/linux/miscdevice.h (contents, props changed) head/sys/ofed/include/linux/mlx4/cmd.h (contents, props changed) head/sys/ofed/include/linux/mlx4/cq.h (contents, props changed) head/sys/ofed/include/linux/mlx4/device.h (contents, props changed) head/sys/ofed/include/linux/mlx4/doorbell.h (contents, props changed) head/sys/ofed/include/linux/mlx4/driver.h (contents, props changed) head/sys/ofed/include/linux/mlx4/qp.h (contents, props changed) head/sys/ofed/include/linux/mlx4/srq.h (contents, props changed) head/sys/ofed/include/linux/mm.h (contents, props changed) head/sys/ofed/include/linux/module.h (contents, props changed) head/sys/ofed/include/linux/moduleparam.h (contents, props changed) head/sys/ofed/include/linux/mount.h (contents, props changed) head/sys/ofed/include/linux/mutex.h (contents, props changed) head/sys/ofed/include/linux/net.h (contents, props changed) head/sys/ofed/include/linux/netdevice.h (contents, props changed) head/sys/ofed/include/linux/notifier.h (contents, props changed) head/sys/ofed/include/linux/page.h (contents, props changed) head/sys/ofed/include/linux/pci.h (contents, props changed) head/sys/ofed/include/linux/poll.h (contents, props changed) head/sys/ofed/include/linux/radix-tree.h (contents, props changed) head/sys/ofed/include/linux/random.h (contents, props changed) head/sys/ofed/include/linux/rbtree.h (contents, props changed) head/sys/ofed/include/linux/rtnetlink.h (contents, props changed) head/sys/ofed/include/linux/rwlock.h (contents, props changed) head/sys/ofed/include/linux/rwsem.h (contents, props changed) head/sys/ofed/include/linux/scatterlist.h (contents, props changed) head/sys/ofed/include/linux/sched.h (contents, props changed) head/sys/ofed/include/linux/semaphore.h (contents, props changed) head/sys/ofed/include/linux/slab.h (contents, props changed) head/sys/ofed/include/linux/socket.h (contents, props changed) head/sys/ofed/include/linux/spinlock.h (contents, props changed) head/sys/ofed/include/linux/stddef.h (contents, props changed) head/sys/ofed/include/linux/string.h (contents, props changed) head/sys/ofed/include/linux/sysfs.h (contents, props changed) head/sys/ofed/include/linux/timer.h (contents, props changed) head/sys/ofed/include/linux/types.h (contents, props changed) head/sys/ofed/include/linux/uaccess.h (contents, props changed) head/sys/ofed/include/linux/vmalloc.h (contents, props changed) head/sys/ofed/include/linux/wait.h (contents, props changed) head/sys/ofed/include/linux/workqueue.h (contents, props changed) head/sys/ofed/include/net/addrconf.h (contents, props changed) head/sys/ofed/include/net/arp.h (contents, props changed) head/sys/ofed/include/net/ip.h (contents, props changed) head/sys/ofed/include/net/ip6_route.h (contents, props changed) head/sys/ofed/include/net/ipv6.h (contents, props changed) head/sys/ofed/include/net/neighbour.h (contents, props changed) head/sys/ofed/include/net/netevent.h (contents, props changed) head/sys/ofed/include/net/tcp.h (contents, props changed) head/sys/ofed/include/rdma/Kbuild (contents, props changed) head/sys/ofed/include/rdma/ib_addr.h (contents, props changed) head/sys/ofed/include/rdma/ib_cache.h (contents, props changed) head/sys/ofed/include/rdma/ib_cm.h (contents, props changed) head/sys/ofed/include/rdma/ib_fmr_pool.h (contents, props changed) head/sys/ofed/include/rdma/ib_mad.h (contents, props changed) head/sys/ofed/include/rdma/ib_marshall.h (contents, props changed) head/sys/ofed/include/rdma/ib_pack.h (contents, props changed) head/sys/ofed/include/rdma/ib_sa.h (contents, props changed) head/sys/ofed/include/rdma/ib_smi.h (contents, props changed) head/sys/ofed/include/rdma/ib_umem.h (contents, props changed) head/sys/ofed/include/rdma/ib_user_cm.h (contents, props changed) head/sys/ofed/include/rdma/ib_user_mad.h (contents, props changed) head/sys/ofed/include/rdma/ib_user_sa.h (contents, props changed) head/sys/ofed/include/rdma/ib_user_verbs.h (contents, props changed) head/sys/ofed/include/rdma/ib_verbs.h (contents, props changed) head/sys/ofed/include/rdma/iw_cm.h (contents, props changed) head/sys/ofed/include/rdma/rdma_cm.h (contents, props changed) head/sys/ofed/include/rdma/rdma_cm_ib.h (contents, props changed) head/sys/ofed/include/rdma/rdma_user_cm.h (contents, props changed) head/sys/ofed/include/rdma/sdp_socket.h (contents, props changed) Directory Properties: head/contrib/ofed/libibcm/ (props changed) head/contrib/ofed/libibcm/config/ (props changed) head/contrib/ofed/libibcm/include/ (props changed) head/contrib/ofed/libibcm/include/infiniband/ (props changed) head/contrib/ofed/libibcm/src/ (props changed) head/contrib/ofed/libibverbs/ (props changed) head/contrib/ofed/libibverbs/config/ (props changed) head/contrib/ofed/libibverbs/debian/ (props changed) head/contrib/ofed/libibverbs/examples/ (props changed) head/contrib/ofed/libibverbs/fixes/ (props changed) head/contrib/ofed/libibverbs/include/ (props changed) head/contrib/ofed/libibverbs/include/infiniband/ (props changed) head/contrib/ofed/libibverbs/man/ (props changed) head/contrib/ofed/libibverbs/src/ (props changed) head/contrib/ofed/libmlx4/ (props changed) head/contrib/ofed/libmlx4/config/ (props changed) head/contrib/ofed/libmlx4/debian/ (props changed) head/contrib/ofed/libmlx4/fixes/ (props changed) head/contrib/ofed/libmlx4/src/ (props changed) head/contrib/ofed/libmthca/ (props changed) head/contrib/ofed/libmthca/config/ (props changed) head/contrib/ofed/libmthca/debian/ (props changed) head/contrib/ofed/libmthca/src/ (props changed) head/contrib/ofed/librdmacm/ (props changed) head/contrib/ofed/librdmacm/config/ (props changed) head/contrib/ofed/librdmacm/examples/ (props changed) head/contrib/ofed/librdmacm/include/ (props changed) head/contrib/ofed/librdmacm/include/rdma/ (props changed) head/contrib/ofed/librdmacm/man/ (props changed) head/contrib/ofed/librdmacm/src/ (props changed) head/contrib/ofed/libsdp/ (props changed) head/contrib/ofed/libsdp/config/ (props changed) head/contrib/ofed/libsdp/src/ (props changed) head/contrib/ofed/libsdp/src/linux/ (props changed) head/contrib/ofed/management/ (props changed) head/contrib/ofed/management/doc/ (props changed) head/contrib/ofed/management/infiniband-diags/ (props changed) head/contrib/ofed/management/infiniband-diags/include/ (props changed) head/contrib/ofed/management/infiniband-diags/man/ (props changed) head/contrib/ofed/management/infiniband-diags/scripts/ (props changed) head/contrib/ofed/management/infiniband-diags/src/ (props changed) head/contrib/ofed/management/libibcommon/ (props changed) head/contrib/ofed/management/libibcommon/include/ (props changed) head/contrib/ofed/management/libibcommon/include/infiniband/ (props changed) head/contrib/ofed/management/libibcommon/src/ (props changed) head/contrib/ofed/management/libibmad/ (props changed) head/contrib/ofed/management/libibmad/include/ (props changed) head/contrib/ofed/management/libibmad/include/infiniband/ (props changed) head/contrib/ofed/management/libibmad/src/ (props changed) head/contrib/ofed/management/libibumad/ (props changed) head/contrib/ofed/management/libibumad/include/ (props changed) head/contrib/ofed/management/libibumad/include/infiniband/ (props changed) head/contrib/ofed/management/libibumad/man/ (props changed) head/contrib/ofed/management/libibumad/src/ (props changed) head/contrib/ofed/management/opensm/ (props changed) head/contrib/ofed/management/opensm/complib/ (props changed) head/contrib/ofed/management/opensm/config/ (props changed) head/contrib/ofed/management/opensm/doc/ (props changed) head/contrib/ofed/management/opensm/include/ (props changed) head/contrib/ofed/management/opensm/include/complib/ (props changed) head/contrib/ofed/management/opensm/include/iba/ (props changed) head/contrib/ofed/management/opensm/include/opensm/ (props changed) head/contrib/ofed/management/opensm/include/vendor/ (props changed) head/contrib/ofed/management/opensm/libvendor/ (props changed) head/contrib/ofed/management/opensm/man/ (props changed) head/contrib/ofed/management/opensm/opensm/ (props changed) head/contrib/ofed/management/opensm/osmeventplugin/ (props changed) head/contrib/ofed/management/opensm/osmeventplugin/src/ (props changed) head/contrib/ofed/management/opensm/osmtest/ (props changed) head/contrib/ofed/management/opensm/osmtest/include/ (props changed) head/contrib/ofed/management/opensm/scripts/ (props changed) head/sys/ofed/drivers/ (props changed) head/sys/ofed/drivers/infiniband/ (props changed) head/sys/ofed/drivers/infiniband/core/ (props changed) head/sys/ofed/drivers/infiniband/debug/ (props changed) head/sys/ofed/drivers/infiniband/hw/ (props changed) head/sys/ofed/drivers/infiniband/hw/mlx4/ (props changed) head/sys/ofed/drivers/infiniband/hw/mthca/ (props changed) head/sys/ofed/drivers/infiniband/ulp/ (props changed) head/sys/ofed/drivers/infiniband/ulp/ipoib/ (props changed) head/sys/ofed/drivers/infiniband/ulp/sdp/ (props changed) head/sys/ofed/drivers/infiniband/util/ (props changed) head/sys/ofed/drivers/net/ (props changed) head/sys/ofed/drivers/net/mlx4/ (props changed) head/sys/ofed/include/ (props changed) head/sys/ofed/include/asm/ (props changed) head/sys/ofed/include/linux/ (props changed) head/sys/ofed/include/linux/mlx4/ (props changed) head/sys/ofed/include/net/ (props changed) head/sys/ofed/include/rdma/ (props changed) Modified: head/Makefile.inc1 head/etc/defaults/rc.conf head/etc/mtree/BSD.include.dist head/etc/mtree/BSD.var.dist head/etc/rc.d/Makefile head/share/mk/bsd.own.mk head/sys/modules/Makefile head/usr.bin/netstat/Makefile head/usr.bin/netstat/inet.c head/usr.bin/netstat/main.c Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Mar 21 09:40:01 2011 (r219819) +++ head/Makefile.inc1 Mon Mar 21 09:58:24 2011 (r219820) @@ -76,6 +76,9 @@ SUBDIR+=secure SUBDIR+=share .endif SUBDIR+=sys usr.bin usr.sbin +.if ${MK_OFED} != "no" +SUBDIR+=contrib/ofed +.endif # # We must do etc/ last for install/distribute to work. # @@ -1210,7 +1213,11 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 _lib_libthr= lib/libthr .endif -_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib +.if ${MK_OFED} != "no" +_ofed_lib= contrib/ofed/usr.lib/ +.endif + +_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} lib/libopie__L lib/libtacplus__L: lib/libmd__L Added: head/contrib/ofed/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/Makefile Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,5 @@ +.include + +SUBDIR = include usr.lib usr.bin + +.include Added: head/contrib/ofed/include/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/Makefile Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,5 @@ +.include + +SUBDIR = infiniband rdma + +.include Added: head/contrib/ofed/include/infiniband/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/infiniband/Makefile Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,107 @@ +.include + +INCS= +IBINCS= byteorder.h byteswap.h endian.h types.h +IBINCSDIR= ${INCLUDEDIR}/infiniband + +IBVERBS= ${.CURDIR}/../../libibverbs/include/infiniband +VERBINCS= ${IBVERBS}/arch.h ${IBVERBS}/driver.h ${IBVERBS}/kern-abi.h +VERBINCS+= ${IBVERBS}/marshall.h ${IBVERBS}/opcode.h +VERBINCS+= ${IBVERBS}/sa-kern-abi.h ${IBVERBS}/sa.h ${IBVERBS}/verbs.h +VERBINCSDIR= ${INCLUDEDIR}/infiniband + +IBCOMMON= ${.CURDIR}/../../management/libibcommon/include/infiniband +COMMONINCS= ${IBCOMMON}/common.h +COMMONINCSDIR= ${INCLUDEDIR}/infiniband + +IBMAD= ${.CURDIR}/../../management/libibmad/include/infiniband +MADINCS= ${IBMAD}/mad.h +MADINCSDIR= ${INCLUDEDIR}/infiniband + +IBUMAD= ${.CURDIR}/../../management/libibumad/include/infiniband +UMADINCS= ${IBUMAD}/umad.h +UMADINCSDIR= ${INCLUDEDIR}/infiniband + +COMPLIB= ${.CURDIR}/../../management/opensm/include/complib +COMPLIBINCS= ${COMPLIB}/cl_atomic.h ${COMPLIB}/cl_atomic_osd.h +COMPLIBINCS+= ${COMPLIB}/cl_byteswap.h ${COMPLIB}/cl_byteswap_osd.h +COMPLIBINCS+= ${COMPLIB}/cl_comppool.h ${COMPLIB}/cl_debug.h +COMPLIBINCS+= ${COMPLIB}/cl_debug_osd.h ${COMPLIB}/cl_dispatcher.h +COMPLIBINCS+= ${COMPLIB}/cl_event.h ${COMPLIB}/cl_event_osd.h +COMPLIBINCS+= ${COMPLIB}/cl_event_wheel.h ${COMPLIB}/cl_fleximap.h +COMPLIBINCS+= ${COMPLIB}/cl_list.h ${COMPLIB}/cl_log.h +COMPLIBINCS+= ${COMPLIB}/cl_map.h ${COMPLIB}/cl_math.h +COMPLIBINCS+= ${COMPLIB}/cl_nodenamemap.h ${COMPLIB}/cl_packoff.h +COMPLIBINCS+= ${COMPLIB}/cl_packon.h ${COMPLIB}/cl_passivelock.h +COMPLIBINCS+= ${COMPLIB}/cl_pool.h ${COMPLIB}/cl_ptr_vector.h +COMPLIBINCS+= ${COMPLIB}/cl_qcomppool.h ${COMPLIB}/cl_qlist.h +COMPLIBINCS+= ${COMPLIB}/cl_qmap.h ${COMPLIB}/cl_qpool.h +COMPLIBINCS+= ${COMPLIB}/cl_spinlock.h ${COMPLIB}/cl_spinlock_osd.h +COMPLIBINCS+= ${COMPLIB}/cl_thread.h ${COMPLIB}/cl_thread_osd.h +COMPLIBINCS+= ${COMPLIB}/cl_threadpool.h ${COMPLIB}/cl_timer.h +COMPLIBINCS+= ${COMPLIB}/cl_timer_osd.h ${COMPLIB}/cl_types.h +COMPLIBINCS+= ${COMPLIB}/cl_types_osd.h ${COMPLIB}/cl_vector.h +COMPLIBINCSDIR= ${INCLUDEDIR}/infiniband/complib + +IBADIR= ${.CURDIR}/../../management/opensm/include/iba +IBAINCS= ${IBADIR}/ib_cm_types.h ${IBADIR}/ib_types.h +IBAINCSDIR= ${INCLUDEDIR}/infiniband/iba + +OPENSM= ${.CURDIR}/../../management/opensm/include/opensm + +OPENSMINCS= ${OPENSM}/osm_attrib_req.h ${OPENSM}/osm_base.h +OPENSMINCS+= ${OPENSM}/osm_config.h ${OPENSM}/osm_console.h +OPENSMINCS+= ${OPENSM}/osm_console_io.h ${OPENSM}/osm_db.h +OPENSMINCS+= ${OPENSM}/osm_db_pack.h ${OPENSM}/osm_errors.h +OPENSMINCS+= ${OPENSM}/osm_event_plugin.h ${OPENSM}/osm_helper.h +OPENSMINCS+= ${OPENSM}/osm_inform.h ${OPENSM}/osm_lid_mgr.h +OPENSMINCS+= ${OPENSM}/osm_log.h ${OPENSM}/osm_mad_pool.h +OPENSMINCS+= ${OPENSM}/osm_madw.h ${OPENSM}/osm_mcast_tbl.h +OPENSMINCS+= ${OPENSM}/osm_mcm_info.h ${OPENSM}/osm_mcm_port.h +OPENSMINCS+= ${OPENSM}/osm_msgdef.h ${OPENSM}/osm_mtree.h +OPENSMINCS+= ${OPENSM}/osm_multicast.h ${OPENSM}/osm_node.h +OPENSMINCS+= ${OPENSM}/osm_opensm.h ${OPENSM}/osm_partition.h +OPENSMINCS+= ${OPENSM}/osm_path.h ${OPENSM}/osm_perfmgr.h +OPENSMINCS+= ${OPENSM}/osm_perfmgr_db.h ${OPENSM}/osm_pkey.h +OPENSMINCS+= ${OPENSM}/osm_pkey_mgr.h ${OPENSM}/osm_port.h +OPENSMINCS+= ${OPENSM}/osm_port_profile.h ${OPENSM}/osm_prefix_route.h +OPENSMINCS+= ${OPENSM}/osm_qos_policy.h ${OPENSM}/osm_remote_sm.h +OPENSMINCS+= ${OPENSM}/osm_router.h ${OPENSM}/osm_sa.h +OPENSMINCS+= ${OPENSM}/osm_sa_mad_ctrl.h ${OPENSM}/osm_service.h +OPENSMINCS+= ${OPENSM}/osm_sm.h ${OPENSM}/osm_sm_mad_ctrl.h +OPENSMINCS+= ${OPENSM}/osm_stats.h ${OPENSM}/osm_subnet.h +OPENSMINCS+= ${OPENSM}/osm_switch.h ${OPENSM}/osm_ucast_cache.h +OPENSMINCS+= ${OPENSM}/osm_ucast_mgr.h ${OPENSM}/osm_version.h +OPENSMINCS+= ${OPENSM}/osm_vl15intf.h ${OPENSM}/st.h +OPENSMINCSDIR= ${INCLUDEDIR}/infiniband/opensm + +VENDOR= ${.CURDIR}/../../management/opensm/include/vendor +VENDORINCS= ${VENDOR}/osm_mtl_bind.h ${VENDOR}/osm_pkt_randomizer.h +VENDORINCS+= ${VENDOR}/osm_ts_useraccess.h ${VENDOR}/osm_umadt.h +VENDORINCS+= ${VENDOR}/osm_vendor.h ${VENDOR}/osm_vendor_al.h +VENDORINCS+= ${VENDOR}/osm_vendor_api.h ${VENDOR}/osm_vendor_ibumad.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx.h ${VENDOR}/osm_vendor_mlx_defs.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_dispatcher.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_hca.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_inout.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_rmpp_ctx.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_sar.h ${VENDOR}/osm_vendor_mlx_sender.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_svc.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_transport.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_transport_anafa.h +VENDORINCS+= ${VENDOR}/osm_vendor_mlx_txn.h +VENDORINCS+= ${VENDOR}/osm_vendor_mtl.h ${VENDOR}/osm_vendor_mtl_hca_guid.h +VENDORINCS+= ${VENDOR}/osm_vendor_mtl_transaction_mgr.h +VENDORINCS+= ${VENDOR}/osm_vendor_sa_api.h +VENDORINCS+= ${VENDOR}/osm_vendor_test.h ${VENDOR}/osm_vendor_ts.h +VENDORINCS+= ${VENDOR}/osm_vendor_umadt.h +VENDORINCSDIR= ${INCLUDEDIR}/infiniband/vendor + +IBCM= ${.CURDIR}/../../libibcm/include/infiniband +IBCMINCS= ${IBCM}/cm.h ${IBCM}/cm_abi.h +IBCMINCSDIR= ${INCLUDEDIR}/infiniband + +INCSGROUPS= INCS VERBINCS COMMONINCS MADINCS UMADINCS COMPLIBINCS IBAINCS +INCSGROUPS+= OPENSMINCS VENDORINCS IBCMINCS IBINCS + +.include Added: head/contrib/ofed/include/infiniband/byteorder.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/infiniband/byteorder.h Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,84 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, 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 unmodified, 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. + */ +#ifndef _INFINIBAND_BYTEORDER_H_ +#define _INFINIBAND_BYTEORDER_H_ + +#include +#include + +#if BYTE_ORDER == LITTLE_ENDIAN +#define __LITTLE_ENDIAN +#else +#define __BIG_ENDIAN +#endif + +#define cpu_to_le64 htole64 +#define le64_to_cpu le64toh +#define cpu_to_le32 htole32 +#define le32_to_cpu le32toh +#define cpu_to_le16 htole16 +#define le16_to_cpu le16toh +#define cpu_to_be64 htobe64 +#define be64_to_cpu be64toh +#define cpu_to_be32 htobe32 +#define be32_to_cpu be32toh +#define cpu_to_be16 htobe16 +#define be16_to_cpu be16toh +#define __be16_to_cpu be16toh + +#define cpu_to_le64p(x) htole64(*((uint64_t *)x)) +#define le64_to_cpup(x) le64toh(*((uint64_t *)x)) +#define cpu_to_le32p(x) htole32(*((uint32_t *)x)) +#define le32_to_cpup(x) le32toh(*((uint32_t *)x)) +#define cpu_to_le16p(x) htole16(*((uint16_t *)x)) +#define le16_to_cpup(x) le16toh(*((uint16_t *)x)) +#define cpu_to_be64p(x) htobe64(*((uint64_t *)x)) +#define be64_to_cpup(x) be64toh(*((uint64_t *)x)) +#define cpu_to_be32p(x) htobe32(*((uint32_t *)x)) +#define be32_to_cpup(x) be32toh(*((uint32_t *)x)) +#define cpu_to_be16p(x) htobe16(*((uint16_t *)x)) +#define be16_to_cpup(x) be16toh(*((uint16_t *)x)) + +#define cpu_to_le64s(x) do { *((uint64_t *)x) = cpu_to_le64p((x)) } while (0) +#define le64_to_cpus(x) do { *((uint64_t *)x) = le64_to_cpup((x)) } while (0) +#define cpu_to_le32s(x) do { *((uint32_t *)x) = cpu_to_le32p((x)) } while (0) +#define le32_to_cpus(x) do { *((uint32_t *)x) = le32_to_cpup((x)) } while (0) +#define cpu_to_le16s(x) do { *((uint16_t *)x) = cpu_to_le16p((x)) } while (0) +#define le16_to_cpus(x) do { *((uint16_t *)x) = le16_to_cpup((x)) } while (0) +#define cpu_to_be64s(x) do { *((uint64_t *)x) = cpu_to_be64p((x)) } while (0) +#define be64_to_cpus(x) do { *((uint64_t *)x) = be64_to_cpup((x)) } while (0) +#define cpu_to_be32s(x) do { *((uint32_t *)x) = cpu_to_be32p((x)) } while (0) +#define be32_to_cpus(x) do { *((uint32_t *)x) = be32_to_cpup((x)) } while (0) +#define cpu_to_be16s(x) do { *((uint16_t *)x) = cpu_to_be16p((x)) } while (0) +#define be16_to_cpus(x) do { *((uint16_t *)x) = be16_to_cpup((x)) } while (0) + +#define swab16 bswap16 +#define swab32 bswap32 +#define swab64 bswap64 + +#endif /* _INFINIBAND_BYTEORDER_H_ */ Added: head/contrib/ofed/include/infiniband/byteswap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/infiniband/byteswap.h Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, 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 unmodified, 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. + */ + +#ifndef _INFINIBAND_BYTESWAP_H_ +#define _INFINIBAND_BYTESWAP_H_ +/* + * This file is included for compatibility with the userland libraries + * accompanying the infiniband stack. + */ +#include +#include + +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 + +#endif /* _INFINIBAND_BYTESWAP_H_ */ Added: head/contrib/ofed/include/infiniband/endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/infiniband/endian.h Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, 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 unmodified, 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. + */ +/* + * This file is included for compatibility with the userland libraries + * accompanying the infiniband stack. + */ + +#ifndef _INFINIBAND_ENDIAN_H_ +#define _INFINIBAND_ENDIAN_H_ + +#include +#include +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#define __BIG_ENDIAN _BIG_ENDIAN +#define __BYTE_ORDER _BYTE_ORDER + +#endif /* _INFINIBAND_ENDIAN_H_ */ Added: head/contrib/ofed/include/infiniband/types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/infiniband/types.h Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, 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 unmodified, 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. + */ +#ifndef _INFINIBAND_TYPES_H_ +#define _INFINIBAND_TYPES_H_ + +#include +#include + +typedef int8_t s8; +typedef uint8_t u8; +typedef int8_t __s8; +typedef uint8_t __u8; + +typedef int16_t s16; +typedef uint16_t u16; +typedef int16_t __s16; +typedef uint16_t __u16; + +typedef int32_t s32; +typedef uint32_t u32; +typedef int32_t __s32; +typedef uint32_t __u32; + +typedef int64_t s64; +typedef uint64_t u64; +typedef int64_t __s64; +typedef uint64_t __u64; + +typedef uint16_t __le16; +typedef uint16_t __be16; +typedef uint32_t __le32; +typedef uint32_t __be32; +typedef uint64_t __le64; +typedef uint64_t __be64; + +typedef unsigned int uint; + +#endif /* _INFINIBAND_TYPES_H_ */ Added: head/contrib/ofed/include/rdma/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/include/rdma/Makefile Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,10 @@ +.include + +INCS= +RDMACM= ${.CURDIR}/../../librdmacm/include/rdma +RDMACMINCS= ${RDMACM}/rdma_cma.h ${RDMACM}/rdma_cma_abi.h +RDMACMINCSDIR= ${INCLUDEDIR}/rdma + +INCSGROUPS= RDMACMINCS + +.include Added: head/contrib/ofed/libibcm/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibcm/AUTHORS Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,2 @@ +Sean Hefty +Libor Michalek Added: head/contrib/ofed/libibcm/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibcm/COPYING Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,378 @@ +This software is available to you under a choice of one of two +licenses. You may choose to be licensed under the terms of the the +OpenIB.org BSD license or the GNU General Public License (GPL) Version +2, both included below. + +Copyright (c) 2004 Topspin Communications. All rights reserved. + +================================================================== + + OpenIB.org BSD license + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * 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 COPYRIGHT HOLDERS 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 +COPYRIGHT OWNER 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. + +================================================================== + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: head/contrib/ofed/libibcm/ChangeLog ============================================================================== Added: head/contrib/ofed/libibcm/INSTALL ============================================================================== Added: head/contrib/ofed/libibcm/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibcm/Makefile.am Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,34 @@ +INCLUDES = -I$(srcdir)/include + +lib_LTLIBRARIES = src/libibcm.la + +AM_CFLAGS = -g -Wall -D_GNU_SOURCE + +src_libibcm_la_CFLAGS = $(AM_CFLAGS) + +if HAVE_LD_VERSION_SCRIPT + ibcm_version_script = -Wl,--version-script=$(srcdir)/src/libibcm.map +else + ibcm_version_script = +endif + +src_libibcm_la_SOURCES = src/cm.c +src_libibcm_la_LDFLAGS = -version-info 1 -export-dynamic \ + $(libibcm_version_script) +src_libibcm_la_DEPENDENCIES = $(srcdir)/src/libibcm.map + +# Sample program requires use if librdmacm. +#bin_PROGRAMS = examples/ucmpost +#examples_ucmpost_SOURCES = examples/cmpost.c +#examples_ucmpost_LDADD = $(top_builddir)/src/libibcm.la + +libibcmincludedir = $(includedir)/infiniband + +libibcminclude_HEADERS = include/infiniband/cm_abi.h \ + include/infiniband/cm.h + +EXTRA_DIST = include/infiniband/cm_abi.h include/infiniband/cm.h \ + src/libibcm.map libibcm.spec.in + +dist-hook: libibcm.spec + cp libibcm.spec $(distdir) Added: head/contrib/ofed/libibcm/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/libibcm/Makefile.in Mon Mar 21 09:58:24 2011 (r219820) @@ -0,0 +1,660 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(libibcminclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(srcdir)/libibcm.spec.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + config/compile config/config.guess config/config.sub \ + config/depcomp config/install-sh config/ltmain.sh \ + config/missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = libibcm.spec +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" \ + "$(DESTDIR)$(libibcmincludedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +src_libibcm_la_LIBADD = +am_src_libibcm_la_OBJECTS = src_libibcm_la-cm.lo +src_libibcm_la_OBJECTS = $(am_src_libibcm_la_OBJECTS) +am__dirstamp = $(am__leading_dot)dirstamp +DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(src_libibcm_la_SOURCES) +DIST_SOURCES = $(src_libibcm_la_SOURCES) +libibcmincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(libibcminclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +HAVE_LD_VERSION_SCRIPT_FALSE = @HAVE_LD_VERSION_SCRIPT_FALSE@ +HAVE_LD_VERSION_SCRIPT_TRUE = @HAVE_LD_VERSION_SCRIPT_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 04:59:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91DEA1065670; Mon, 21 Mar 2011 04:59:39 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id E46B18FC14; Mon, 21 Mar 2011 04:59:38 +0000 (UTC) Received: by yxl31 with SMTP id 31so2634217yxl.13 for ; Sun, 20 Mar 2011 21:59:38 -0700 (PDT) Received: by 10.91.96.2 with SMTP id y2mr3324195agl.179.1300681884367; Sun, 20 Mar 2011 21:31:24 -0700 (PDT) Received: from [10.0.1.198] ([72.253.42.56]) by mx.google.com with ESMTPS id u20sm2924350anu.40.2011.03.20.21.31.20 (version=SSLv3 cipher=OTHER); Sun, 20 Mar 2011 21:31:23 -0700 (PDT) Date: Sun, 20 Mar 2011 18:34:52 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Kirk McKusick In-Reply-To: <201103210342.p2L3gWM9057768@chez.mckusick.com> Message-ID: References: <201103210342.p2L3gWM9057768@chez.mckusick.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Mon, 21 Mar 2011 11:04:14 +0000 Cc: Doug Barton , kvedulv@kvedulv.de, Jeff Roberson , Gavin Atkinson , Nathan Whitehorn , src-committers@FreeBSD.org, Marius Strobl , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 04:59:39 -0000 On Sun, 20 Mar 2011, Kirk McKusick wrote: >> Date: Sun, 20 Mar 2011 13:25:20 -0700 >> From: Doug Barton >> To: Marius Strobl >> CC: Kirk McKusick , >> Nathan Whitehorn , svn-src-head@FreeBSD.org, >> Jeff Roberson , Gavin Atkinson , >> svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, >> kvedulv@kvedulv.de >> Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit >> >> On 03/20/2011 09:22, Marius Strobl wrote: >> >>> I fear it's still a bit premature for enable SU+J by default. Rather >>> recently I was told about a SU+J filesystems lost after a panic >>> that happend after snapshotting it (report CC'ed, maybe he can >>> provide some more details) and I'm pretty sure I've seen the problem >>> described in PR 149022 also after the potential fix mentioned in its >>> feedback. >> >> +1 >> >> I tried enabling SU+J on my /var (after backing up of course) and after >> a panic random files were missing entirely. Not the last updates to >> those files, the whole file, and many of them had not been written to in >> days/weeks/months. >> >> With all due respect to the hard work that went into the code, I would >> be very uncomfortable with enabling it by default at this point. >> >> >> Doug > > With all due respect, how can we fix things that nobody reports? > If you have a problem, let us know about it. And of course, we > need something more specific than the above. I have not been following current but I read any emails sent directly to me without a mailing list in the cc. I also was not aware of this. I had not heard of any filesystem corruption problems at all. If there are any, I also am not comfortable with enabling it by default. I want to fix that first. I have blocked off next week to work on this. I already sent an email out to current@ requesting bug reports. Please if you have anything else let me know immediately so I can prioritize it and start investigating. Thanks, Jeff > > Kirk McKusick > From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 05:45:12 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF23106566C; Mon, 21 Mar 2011 05:45:11 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3288FC18; Mon, 21 Mar 2011 05:45:11 +0000 (UTC) Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.4/8.14.4) with ESMTP id p2L5j4RD005325; Sun, 20 Mar 2011 23:45:04 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: Date: Sun, 20 Mar 2011 23:45:04 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <25AA5841-B700-463A-BD52-9FD18650E859@samsco.org> References: <201103210342.p2L3gWM9057768@chez.mckusick.com> To: Jeff Roberson X-Mailer: Apple Mail (2.1082) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org X-Mailman-Approved-At: Mon, 21 Mar 2011 11:16:42 +0000 Cc: Doug Barton , kvedulv@kvedulv.de, Jeff Roberson , Kirk McKusick , Gavin Atkinson , Nathan Whitehorn , src-committers@FreeBSD.org, Marius Strobl , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 05:45:12 -0000 On Mar 20, 2011, at 10:34 PM, Jeff Roberson wrote: > On Sun, 20 Mar 2011, Kirk McKusick wrote: >=20 >>> Date: Sun, 20 Mar 2011 13:25:20 -0700 >>> From: Doug Barton >>> To: Marius Strobl >>> CC: Kirk McKusick , >>> Nathan Whitehorn , = svn-src-head@FreeBSD.org, >>> Jeff Roberson , Gavin Atkinson = , >>> svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, >>> kvedulv@kvedulv.de >>> Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit >>>=20 >>> On 03/20/2011 09:22, Marius Strobl wrote: >>>=20 >>>> I fear it's still a bit premature for enable SU+J by default. = Rather >>>> recently I was told about a SU+J filesystems lost after a panic >>>> that happend after snapshotting it (report CC'ed, maybe he can >>>> provide some more details) and I'm pretty sure I've seen the = problem >>>> described in PR 149022 also after the potential fix mentioned in = its >>>> feedback. >>>=20 >>> +1 >>>=20 >>> I tried enabling SU+J on my /var (after backing up of course) and = after >>> a panic random files were missing entirely. Not the last updates to >>> those files, the whole file, and many of them had not been written = to in >>> days/weeks/months. >>>=20 >>> With all due respect to the hard work that went into the code, I = would >>> be very uncomfortable with enabling it by default at this point. >>>=20 >>>=20 >>> Doug >>=20 >> With all due respect, how can we fix things that nobody reports? >> If you have a problem, let us know about it. And of course, we >> need something more specific than the above. >=20 > I have not been following current but I read any emails sent directly = to me without a mailing list in the cc. I also was not aware of this. = I had not heard of any filesystem corruption problems at all. If there = are any, I also am not comfortable with enabling it by default. I want = to fix that first. >=20 > I have blocked off next week to work on this. I already sent an email = out to current@ requesting bug reports. Please if you have anything = else let me know immediately so I can prioritize it and start = investigating. >=20 I haven't seen any data/metadata corruption issues with SUJ that weren't = also present with SU (or just plain UFS). The vast majority of problems = that I've witnessed have happened on systems with ATA/SATA disks, = hinting (IMHO) that it's really the long-standing problem of running = these disks with their write caches enabled. I don't think that I've = encountered any appreciable problems on RAID controllers or SAS/SCSI = disks with their write caches disabled. Maybe with CAMATA maturing and = supporting NCQ, we can turn off the SATA write caches as the default = policy. Scott From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 07:29:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A803E1065675; Mon, 21 Mar 2011 07:29:38 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id E46518FC08; Mon, 21 Mar 2011 07:29:37 +0000 (UTC) Received: by gxk28 with SMTP id 28so2670171gxk.13 for ; Mon, 21 Mar 2011 00:29:37 -0700 (PDT) Received: by 10.236.109.1 with SMTP id r1mr3289205yhg.37.1300692577040; Mon, 21 Mar 2011 00:29:37 -0700 (PDT) Received: from [10.0.1.198] ([72.253.42.56]) by mx.google.com with ESMTPS id p59sm1100998yhm.90.2011.03.21.00.29.32 (version=SSLv3 cipher=OTHER); Mon, 21 Mar 2011 00:29:36 -0700 (PDT) Date: Sun, 20 Mar 2011 21:33:05 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Doug Barton In-Reply-To: <4D8662B0.8000705@FreeBSD.org> Message-ID: References: <4D840BD0.4030306@freebsd.org> <201103200000.p2K00pue003373@chez.mckusick.com> <20110320162212.GI1606@alchemy.franken.de> <4D8662B0.8000705@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Mon, 21 Mar 2011 11:17:01 +0000 Cc: src-committers@freebsd.org, kvedulv@kvedulv.de, Jeff Roberson , Kirk McKusick , Gavin Atkinson , Nathan Whitehorn , Marius Strobl , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 07:29:38 -0000 On Sun, 20 Mar 2011, Doug Barton wrote: > On 03/20/2011 09:22, Marius Strobl wrote: > >> I fear it's still a bit premature for enable SU+J by default. Rather >> recently I was told about a SU+J filesystems lost after a panic >> that happend after snapshotting it (report CC'ed, maybe he can >> provide some more details) and I'm pretty sure I've seen the problem >> described in PR 149022 also after the potential fix mentioned in its >> feedback. > > +1 > > I tried enabling SU+J on my /var (after backing up of course) and after a > panic random files were missing entirely. Not the last updates to those > files, the whole file, and many of them had not been written to in > days/weeks/months. > So you're saying the directory entry was missing? Can you tell me how big the directory was? Number of files? Approximate directory size when you consider file names? When you fsck'd were inodes recovered and linked into lost and found? What was the actual path? I'm trying to wrap my head around how this would be possible and where the error could be and whether it could be caused by SUJ. The number of interactions with disk writes are minimal. Corruption if it occurs would most likely be caused by a bad journal recovery. Thanks, Jeff > With all due respect to the hard work that went into the code, I would be > very uncomfortable with enabling it by default at this point. > > > Doug > > -- > > Nothin' ever doesn't change, but nothin' changes much. > -- OK Go > > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/ > From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 11:52:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974041065673; Mon, 21 Mar 2011 11:52:00 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1268FC0A; Mon, 21 Mar 2011 11:52:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LBq07g004012; Mon, 21 Mar 2011 11:52:00 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LBq03c004010; Mon, 21 Mar 2011 11:52:00 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103211152.p2LBq03c004010@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 11:52: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: r219821 - head/sbin/hastctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 11:52:00 -0000 Author: pjd Date: Mon Mar 21 11:52:00 2011 New Revision: 219821 URL: http://svn.freebsd.org/changeset/base/219821 Log: Forgot to commit this as a part of r219818. MFC after: 1 week Modified: head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Mon Mar 21 09:58:24 2011 (r219820) +++ head/sbin/hastctl/hastctl.c Mon Mar 21 11:52:00 2011 (r219821) @@ -330,6 +330,9 @@ control_status(struct nv *nv) (unsigned int)nv_get_uint32(nv, "keepdirty%u", ii)); printf(" remoteaddr: %s\n", nv_get_string(nv, "remoteaddr%u", ii)); + str = nv_get_string(nv, "sourceaddr%u", ii); + if (str != NULL) + printf(" sourceaddr: %s\n", str); printf(" replication: %s\n", nv_get_string(nv, "replication%u", ii)); str = nv_get_string(nv, "status%u", ii); @@ -466,7 +469,7 @@ main(int argc, char *argv[]) } /* Setup control connection... */ - if (proto_client(cfg->hc_controladdr, &controlconn) < 0) { + if (proto_client(NULL, cfg->hc_controladdr, &controlconn) < 0) { pjdlog_exit(EX_OSERR, "Unable to setup control connection to %s", cfg->hc_controladdr); From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 12:51:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD6F106566B; Mon, 21 Mar 2011 12:51:13 +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 5DE3D8FC19; Mon, 21 Mar 2011 12:51:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LCpD2l005373; Mon, 21 Mar 2011 12:51:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LCpDJk005371; Mon, 21 Mar 2011 12:51:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103211251.p2LCpDJk005371@svn.freebsd.org> From: Adrian Chadd Date: Mon, 21 Mar 2011 12:51: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: r219822 - head/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 12:51:13 -0000 Author: adrian Date: Mon Mar 21 12:51:13 2011 New Revision: 219822 URL: http://svn.freebsd.org/changeset/base/219822 Log: Fix static ucastrate for ath_rate_sample. * Pull out the static rix stuff into a different function * I know this may slightly drop performance, but check if a static rix is needed before each packet TX. * Whilst I'm at it, add a little extra debugging to the rate control stuff to make it easier to follow what's going on. Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Mar 21 11:52:00 2011 (r219821) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Mar 21 12:51:13 2011 (r219822) @@ -250,6 +250,55 @@ pick_sample_rate(struct sample_softc *ss #undef MCS } +static int +ath_rate_get_static_rix(struct ath_softc *sc, const struct ieee80211_node *ni) +{ +#define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) +#define DOT11RATE(_ix) (rt->info[(_ix)].dot11Rate & IEEE80211_RATE_VAL) +#define MCS(_ix) (ni->ni_htrates.rs_rates[_ix] | IEEE80211_RATE_MCS) + const struct ieee80211_txparam *tp = ni->ni_txparms; + int srate; + + /* Check MCS rates */ + for (srate = ni->ni_htrates.rs_nrates - 1; srate >= 0; srate--) { + if (MCS(srate) == tp->ucastrate) + return sc->sc_rixmap[tp->ucastrate]; + } + + /* Check legacy rates */ + for (srate = ni->ni_rates.rs_nrates - 1; srate >= 0; srate--) { + if (RATE(srate) == tp->ucastrate) + return sc->sc_rixmap[tp->ucastrate]; + } + return -1; +#undef RATE +#undef DOT11RATE +#undef MCS +} + +static void +ath_rate_update_static_rix(struct ath_softc *sc, struct ieee80211_node *ni) +{ + struct ath_node *an = ATH_NODE(ni); + const struct ieee80211_txparam *tp = ni->ni_txparms; + struct sample_node *sn = ATH_NODE_SAMPLE(an); + + if (tp != NULL && tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { + /* + * A fixed rate is to be used; ucastrate is the IEEE code + * for this rate (sans basic bit). Check this against the + * negotiated rate set for the node. Note the fixed rate + * may not be available for various reasons so we only + * setup the static rate index if the lookup is successful. + */ + sn->static_rix = ath_rate_get_static_rix(sc, ni); + } else { + sn->static_rix = -1; + } +} + + + void ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, int shortPreamble, size_t frameLen, @@ -267,6 +316,8 @@ ath_rate_findrate(struct ath_softc *sc, int rix, mrr, best_rix, change_rates; unsigned average_tx_time; + ath_rate_update_static_rix(sc, &an->an_node); + if (sn->static_rix != -1) { rix = sn->static_rix; *try0 = ATH_TXMAXTRY; @@ -560,9 +611,10 @@ ath_rate_tx_complete(struct ath_softc *s * Only one rate was used; optimize work. */ IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, - &an->an_node, "%s: size %d %s rate/try %d %s/%d/%d", + &an->an_node, "%s: size %d (%d bytes) %s rate/try %d %s/%d/%d", __func__, bin_to_size(size_to_bin(frame_size)), + frame_size, ts->ts_status ? "FAIL" : "OK", dot11rate(rt, final_rix), dot11rate_label(rt, final_rix), short_tries, long_tries); update_stats(sc, an, frame_size, @@ -587,9 +639,10 @@ ath_rate_tx_complete(struct ath_softc *s IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, &an->an_node, -"%s: size %d finaltsidx %d tries %d %s rate/try [%d %s/%d %d %s/%d %d %s/%d %d %s/%d]", +"%s: size %d (%d bytes) finaltsidx %d tries %d %s rate/try [%d %s/%d %d %s/%d %d %s/%d %d %s/%d]", __func__, bin_to_size(size_to_bin(frame_size)), + frame_size, finalTSIdx, long_tries, ts->ts_status ? "FAIL" : "OK", @@ -686,12 +739,10 @@ ath_rate_ctl_reset(struct ath_softc *sc, #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) #define DOT11RATE(_ix) (rt->info[(_ix)].dot11Rate & IEEE80211_RATE_VAL) #define MCS(_ix) (ni->ni_htrates.rs_rates[_ix] | IEEE80211_RATE_MCS) - struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = ni->ni_txparms; struct sample_node *sn = ATH_NODE_SAMPLE(an); const HAL_RATE_TABLE *rt = sc->sc_currates; - int x, y, srate, rix; + int x, y, rix; KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); @@ -702,33 +753,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, ("no mrr schedule for mode %u", sc->sc_curmode)); sn->static_rix = -1; - if (tp != NULL && tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { - /* - * A fixed rate is to be used; ucastrate is the IEEE code - * for this rate (sans basic bit). Check this against the - * negotiated rate set for the node. Note the fixed rate - * may not be available for various reasons so we only - * setup the static rate index if the lookup is successful. - */ - - /* XXX todo: check MCS rates */ - - /* Check legacy rates */ - for (srate = ni->ni_rates.rs_nrates - 1; srate >= 0; srate--) - if (RATE(srate) == tp->ucastrate) { - sn->static_rix = sc->sc_rixmap[tp->ucastrate]; - break; - } -#ifdef IEEE80211_DEBUG - if (sn->static_rix == -1) { - IEEE80211_NOTE(ni->ni_vap, - IEEE80211_MSG_RATECTL, ni, - "%s: ucastrate %u not found, nrates %u", - __func__, tp->ucastrate, - ni->ni_rates.rs_nrates); - } -#endif - } + ath_rate_update_static_rix(sc, ni); /* * Construct a bitmask of usable rates. This has all From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 13:23:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2242A1065672; Mon, 21 Mar 2011 13:23:26 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 136538FC1C; Mon, 21 Mar 2011 13:23:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LDNPJf006103; Mon, 21 Mar 2011 13:23:25 GMT (envelope-from mr@svn.freebsd.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LDNPvD006100; Mon, 21 Mar 2011 13:23:25 GMT (envelope-from mr@svn.freebsd.org) Message-Id: <201103211323.p2LDNPvD006100@svn.freebsd.org> From: Michael Reifenberger Date: Mon, 21 Mar 2011 13:23: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: r219823 - in head/tools/tools/nanobsd/rescue: . Files/root X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 13:23:26 -0000 Author: mr Date: Mon Mar 21 13:23:25 2011 New Revision: 219823 URL: http://svn.freebsd.org/changeset/base/219823 Log: Delete all GPT partitions at once. (Suggested by Andrey V. Elsukov ) Fix amd64 merge script. Modified: head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh head/tools/tools/nanobsd/rescue/merge.sh Modified: head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh ============================================================================== --- head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh Mon Mar 21 12:51:13 2011 (r219822) +++ head/tools/tools/nanobsd/rescue/Files/root/GPT4ZFS_Create.sh Mon Mar 21 13:23:25 2011 (r219823) @@ -25,10 +25,7 @@ shift; while getopts :s:z: arg; do case #?) exerr ${usage};; esac; done; shift $(( ${OPTIND} - 1 )) -gpart delete -i 3 $dsk -gpart delete -i 2 $dsk -gpart delete -i 1 $dsk -gpart destroy $dsk +gpart destroy -F $dsk gpart create -s gpt $dsk # Boot Modified: head/tools/tools/nanobsd/rescue/merge.sh ============================================================================== --- head/tools/tools/nanobsd/rescue/merge.sh Mon Mar 21 12:51:13 2011 (r219822) +++ head/tools/tools/nanobsd/rescue/merge.sh Mon Mar 21 13:23:25 2011 (r219823) @@ -7,5 +7,12 @@ D2="/usr/obj/nanobsd.rescue_amd64" MD=`mdconfig -a -t vnode -f ${D1}/_.disk.full` dd if=${D2}/_.disk.image of=/dev/${MD}s2 bs=128k +tunefs -L rescues2a /dev/${MD}s2a +mount /dev/${MD}s2a ${D1}/_.mnt + +sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/conf/base/etc/fstab +sed -i "" -e 's/rescues1/rescues2/' ${D1}/_.mnt/etc/fstab + +umount ${D1}/_.mnt mdconfig -d -u ${MD} From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 13:28:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20A1D106564A; Mon, 21 Mar 2011 13:28:02 +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 11CD98FC12; Mon, 21 Mar 2011 13:28:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LDS1qa006246; Mon, 21 Mar 2011 13:28:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LDS1xr006244; Mon, 21 Mar 2011 13:28:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103211328.p2LDS1xr006244@svn.freebsd.org> From: Glen Barber Date: Mon, 21 Mar 2011 13:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219824 - stable/8/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 13:28:02 -0000 Author: gjb (doc committer) Date: Mon Mar 21 13:28:01 2011 New Revision: 219824 URL: http://svn.freebsd.org/changeset/base/219824 Log: MFC 219805: - Use 'list scan' in favor of 'scan', as 'scan' has a different purpose. Modified: stable/8/sbin/ifconfig/ifconfig.8 Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.8 Mon Mar 21 13:23:25 2011 (r219823) +++ stable/8/sbin/ifconfig/ifconfig.8 Mon Mar 21 13:28:01 2011 (r219824) @@ -2520,7 +2520,7 @@ Destroy the software network interface .Pp Scan for wireless networks using .Li wlan0 : -.Dl # ifconfig wlan0 scan +.Dl # ifconfig wlan0 list scan .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 13:28:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E0581065676; Mon, 21 Mar 2011 13:28:38 +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 8F3328FC26; Mon, 21 Mar 2011 13:28:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LDScVi006314; Mon, 21 Mar 2011 13:28:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LDScfY006312; Mon, 21 Mar 2011 13:28:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103211328.p2LDScfY006312@svn.freebsd.org> From: Glen Barber Date: Mon, 21 Mar 2011 13:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219825 - stable/7/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 13:28:38 -0000 Author: gjb (doc committer) Date: Mon Mar 21 13:28:38 2011 New Revision: 219825 URL: http://svn.freebsd.org/changeset/base/219825 Log: MFC 219805: - Use 'list scan' in favor of 'scan', as 'scan' has a different purpose. Modified: stable/7/sbin/ifconfig/ifconfig.8 Directory Properties: stable/7/sbin/ifconfig/ (props changed) Modified: stable/7/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/7/sbin/ifconfig/ifconfig.8 Mon Mar 21 13:28:01 2011 (r219824) +++ stable/7/sbin/ifconfig/ifconfig.8 Mon Mar 21 13:28:38 2011 (r219825) @@ -1949,7 +1949,7 @@ Destroy the software network interface .Pp Scan for wireless networks using .Li ath0 : -.Dl # ifconfig ath0 scan +.Dl # ifconfig ath0 list scan .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:18:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 026F8106566B; Mon, 21 Mar 2011 14:18:41 +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 E796F8FC17; Mon, 21 Mar 2011 14:18:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LEIeO8008073; Mon, 21 Mar 2011 14:18:40 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LEIe6h008071; Mon, 21 Mar 2011 14:18:40 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201103211418.p2LEIe6h008071@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 21 Mar 2011 14:18: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: r219827 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:18:41 -0000 Author: glebius Date: Mon Mar 21 14:18:40 2011 New Revision: 219827 URL: http://svn.freebsd.org/changeset/base/219827 Log: Improve locking of creating and dropping links in the graph, acquiring the topology mutex in the following functions, that manipulate pointers to peer nodes: - ng_bypass() - ng_path2noderef() when switching to the next node in sequence. Rewrite the function a bit. - ng_address_hook() - ng_address_path() This patch improves stability of large mpd5 installations. Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Mon Mar 21 14:11:37 2011 (r219826) +++ head/sys/netgraph/ng_base.c Mon Mar 21 14:18:40 2011 (r219827) @@ -1162,11 +1162,13 @@ ng_bypass(hook_p hook1, hook_p hook2) TRAP_ERROR(); return (EINVAL); } + mtx_lock(&ng_topo_mtx); hook1->hk_peer->hk_peer = hook2->hk_peer; hook2->hk_peer->hk_peer = hook1->hk_peer; hook1->hk_peer = &ng_deadhook; hook2->hk_peer = &ng_deadhook; + mtx_unlock(&ng_topo_mtx); NG_HOOK_UNREF(hook1); NG_HOOK_UNREF(hook2); @@ -1643,10 +1645,8 @@ ng_path2noderef(node_p here, const char node_p *destp, hook_p *lasthook) { char fullpath[NG_PATHSIZ]; - char *nodename, *path, pbuf[2]; + char *nodename, *path; node_p node, oldnode; - char *cp; - hook_p hook = NULL; /* Initialize */ if (destp == NULL) { @@ -1664,11 +1664,6 @@ ng_path2noderef(node_p here, const char TRAP_ERROR(); return EINVAL; } - if (path == NULL) { - pbuf[0] = '.'; /* Needs to be writable */ - pbuf[1] = '\0'; - path = pbuf; - } /* * For an absolute address, jump to the starting node. @@ -1690,41 +1685,41 @@ ng_path2noderef(node_p here, const char NG_NODE_REF(node); } + if (path == NULL) { + if (lasthook != NULL) + *lasthook = NULL; + *destp = node; + return (0); + } + /* * Now follow the sequence of hooks - * XXX - * We actually cannot guarantee that the sequence - * is not being demolished as we crawl along it - * without extra-ordinary locking etc. - * So this is a bit dodgy to say the least. - * We can probably hold up some things by holding - * the nodelist mutex for the time of this - * crawl if we wanted.. At least that way we wouldn't have to - * worry about the nodes disappearing, but the hooks would still - * be a problem. + * + * XXXGL: The path may demolish as we go the sequence, but if + * we hold the topology mutex at critical places, then, I hope, + * we would always have valid pointers in hand, although the + * path behind us may no longer exist. */ - for (cp = path; node != NULL && *cp != '\0'; ) { + for (;;) { + hook_p hook; char *segment; /* * Break out the next path segment. Replace the dot we just - * found with a NUL; "cp" points to the next segment (or the + * found with a NUL; "path" points to the next segment (or the * NUL at the end). */ - for (segment = cp; *cp != '\0'; cp++) { - if (*cp == '.') { - *cp++ = '\0'; + for (segment = path; *path != '\0'; path++) { + if (*path == '.') { + *path++ = '\0'; break; } } - /* Empty segment */ - if (*segment == '\0') - continue; - /* We have a segment, so look for a hook by that name */ hook = ng_findhook(node, segment); + mtx_lock(&ng_topo_mtx); /* Can't get there from here... */ if (hook == NULL || NG_HOOK_PEER(hook) == NULL @@ -1732,15 +1727,7 @@ ng_path2noderef(node_p here, const char || NG_HOOK_NOT_VALID(NG_HOOK_PEER(hook))) { TRAP_ERROR(); NG_NODE_UNREF(node); -#if 0 - printf("hooknotvalid %s %s %d %d %d %d ", - path, - segment, - hook == NULL, - NG_HOOK_PEER(hook) == NULL, - NG_HOOK_NOT_VALID(hook), - NG_HOOK_NOT_VALID(NG_HOOK_PEER(hook))); -#endif + mtx_unlock(&ng_topo_mtx); return (ENOENT); } @@ -1757,21 +1744,25 @@ ng_path2noderef(node_p here, const char NG_NODE_UNREF(oldnode); /* XXX another race */ if (NG_NODE_NOT_VALID(node)) { NG_NODE_UNREF(node); /* XXX more races */ - node = NULL; + mtx_unlock(&ng_topo_mtx); + TRAP_ERROR(); + return (ENXIO); } - } - /* If node somehow missing, fail here (probably this is not needed) */ - if (node == NULL) { - TRAP_ERROR(); - return (ENXIO); + if (*path == '\0') { + if (lasthook != NULL) { + if (hook != NULL) { + *lasthook = NG_HOOK_PEER(hook); + NG_HOOK_REF(*lasthook); + } else + *lasthook = NULL; + } + mtx_unlock(&ng_topo_mtx); + *destp = node; + return (0); + } + mtx_unlock(&ng_topo_mtx); } - - /* Done */ - *destp = node; - if (lasthook != NULL) - *lasthook = (hook ? NG_HOOK_PEER(hook) : NULL); - return (0); } /***************************************************************\ @@ -3501,12 +3492,14 @@ ng_address_hook(node_p here, item_p item * that the peer is still connected (even if invalid,) we know * that the peer node is present, though maybe invalid. */ + mtx_lock(&ng_topo_mtx); if ((hook == NULL) || NG_HOOK_NOT_VALID(hook) || NG_HOOK_NOT_VALID(peer = NG_HOOK_PEER(hook)) || NG_NODE_NOT_VALID(peernode = NG_PEER_NODE(hook))) { NG_FREE_ITEM(item); TRAP_ERROR(); + mtx_unlock(&ng_topo_mtx); return (ENETDOWN); } @@ -3518,6 +3511,9 @@ ng_address_hook(node_p here, item_p item NGI_SET_HOOK(item, peer); NGI_SET_NODE(item, peernode); SET_RETADDR(item, here, retaddr); + + mtx_unlock(&ng_topo_mtx); + return (0); } @@ -3539,10 +3535,9 @@ ng_address_path(node_p here, item_p item return (error); } NGI_SET_NODE(item, dest); - if ( hook) { - NG_HOOK_REF(hook); /* don't let it go while on the queue */ + if (hook) NGI_SET_HOOK(item, hook); - } + SET_RETADDR(item, here, retaddr); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:19:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6B0B106564A; Mon, 21 Mar 2011 14:19:40 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984448FC13; Mon, 21 Mar 2011 14:19:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LEJes4008129; Mon, 21 Mar 2011 14:19:40 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LEJeZF008127; Mon, 21 Mar 2011 14:19:40 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201103211419.p2LEJeZF008127@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 21 Mar 2011 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: r219828 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:19:40 -0000 Author: pluknet Date: Mon Mar 21 14:19:40 2011 New Revision: 219828 URL: http://svn.freebsd.org/changeset/base/219828 Log: Reference ifaddr object before unlocking as it can be freed from another context at the moment of later access. PR: kern/155555 Submitted by: Andrew Boyer Approved by: avg (mentor) MFC after: 2 weeks Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Mon Mar 21 14:18:40 2011 (r219827) +++ head/sys/netinet/in.c Mon Mar 21 14:19:40 2011 (r219828) @@ -1174,8 +1174,8 @@ in_scrubprefix(struct in_ifaddr *target) * doesn't support such action. */ if ((ia->ia_flags & IFA_ROUTE) == 0 - && (ia->ia_ifp->if_type != IFT_CARP) - ) { + && (ia->ia_ifp->if_type != IFT_CARP)) { + ifa_ref(&ia->ia_ifa); IN_IFADDR_RUNLOCK(); rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); @@ -1185,6 +1185,7 @@ in_scrubprefix(struct in_ifaddr *target) rtinitflags(ia) | RTF_UP); if (error == 0) ia->ia_flags |= IFA_ROUTE; + ifa_free(&ia->ia_ifa); return (error); } } From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:29:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52CAB106566C; Mon, 21 Mar 2011 14:29: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 444908FC12; Mon, 21 Mar 2011 14:29:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LETapo008403; Mon, 21 Mar 2011 14:29:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LETaWe008401; Mon, 21 Mar 2011 14:29:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103211429.p2LETaWe008401@svn.freebsd.org> From: Andriy Gapon Date: Mon, 21 Mar 2011 14:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219829 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:29:36 -0000 Author: avg Date: Mon Mar 21 14:29:35 2011 New Revision: 219829 URL: http://svn.freebsd.org/changeset/base/219829 Log: free pluknet from the official mentorship Sergey has proven as a reliable and responsible committer thus far, so let him try to earn some personal pointyhats. Approved by: kib (co-mentor) Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Mar 21 14:19:40 2011 (r219828) +++ svnadmin/conf/mentors Mon Mar 21 14:29:35 2011 (r219829) @@ -22,7 +22,6 @@ jpaetzel kib kargl das miwi rwatson nork imp -pluknet avg Co-mentor: kib randi cperciva rdivacky rpaulo rstone emaste Co-mentor: jkoshy From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:29:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E33FE10657DC; Mon, 21 Mar 2011 14:29:53 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.corbina.net (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3368FC14; Mon, 21 Mar 2011 14:29:53 +0000 (UTC) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.corbina.net (Postfix) with ESMTP id 71C82CBCD1; Mon, 21 Mar 2011 17:29:51 +0300 (MSK) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.22.99] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 310136914; Mon, 21 Mar 2011 17:29:51 +0300 Received: from dchagin.static.corbina.ru (localhost [127.0.0.1]) by dchagin.static.corbina.ru (8.14.4/8.14.4) with ESMTP id p2LETowI006672; Mon, 21 Mar 2011 17:29:50 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.4/8.14.4/Submit) id p2LETjKp006671; Mon, 21 Mar 2011 17:29:45 +0300 (MSK) (envelope-from dchagin) Date: Mon, 21 Mar 2011 17:29:45 +0300 From: Chagin Dmitry To: Gleb Smirnoff Message-ID: <20110321142945.GA6549@dchagin.static.corbina.ru> References: <201103200835.p2K8Z05Z049647@svn.freebsd.org> <20110321083820.GU71575@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <20110321083820.GU71575@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: r219791 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:29:54 -0000 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 21, 2011 at 11:38:20AM +0300, Gleb Smirnoff wrote: > On Sun, Mar 20, 2011 at 08:35:00AM +0000, Dmitry Chagin wrote: > D> Author: dchagin > D> Date: Sun Mar 20 08:35:00 2011 > D> New Revision: 219791 > D> URL: http://svn.freebsd.org/changeset/base/219791 > D>=20 > D> Log: > D> Remove dead code. >=20 > This wasn't a code, but defines. Removing them saves nothing, but > primitives deleted may be useful. >=20 Disagee here, trylock() is not a useful/common primitive, at least here. Others persisted from r183017 to r186119, most likely have been commited under the unknown drugs :) > D> MFC after: 1 Week > D>=20 > D> Modified: > D> head/sys/net/route.h > D>=20 > D> Modified: head/sys/net/route.h > D> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > D> --- head/sys/net/route.h Sun Mar 20 08:27:06 2011 (r219790) > D> +++ head/sys/net/route.h Sun Mar 20 08:35:00 2011 (r219791) > D> @@ -325,7 +325,6 @@ struct rt_addrinfo { > D> #define RT_LOCK_INIT(_rt) \ > D> mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK) > D> #define RT_LOCK(_rt) mtx_lock(&(_rt)->rt_mtx) > D> -#define RT_TRYLOCK(_rt) mtx_trylock(&(_rt)->rt_mtx) > D> #define RT_UNLOCK(_rt) mtx_unlock(&(_rt)->rt_mtx) > D> #define RT_LOCK_DESTROY(_rt) mtx_destroy(&(_rt)->rt_mtx) > D> #define RT_LOCK_ASSERT(_rt) mtx_assert(&(_rt)->rt_mtx, MA_OWNED) > D> @@ -360,22 +359,6 @@ struct rt_addrinfo { > D> RTFREE_LOCKED(_rt); \ > D> } while (0) > D> =20 > D> -#define RT_TEMP_UNLOCK(_rt) do { \ > D> - RT_ADDREF(_rt); \ > D> - RT_UNLOCK(_rt); \ > D> -} while (0) > D> - > D> -#define RT_RELOCK(_rt) do { \ > D> - RT_LOCK(_rt); \ > D> - if ((_rt)->rt_refcnt <=3D 1) { \ > D> - rtfree(_rt); \ > D> - _rt =3D 0; /* signal that it went away */ \ > D> - } else { \ > D> - RT_REMREF(_rt); \ > D> - /* note that _rt is still valid */ \ > D> - } \ > D> -} while (0) > D> - > D> struct radix_node_head *rt_tables_get_rnh(int, int); > D> =20 > D> struct ifmultiaddr; >=20 > --=20 > Totus tuus, Glebius. --=20 Have fun! chd --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAk2HYNkACgkQ0t2Tb3OO/O1ThACfX+nFlt81hVtHLBzPvL8CLlKL swIAnRevYuDn8nQ+9cdc0ZgGXkmOPmSe =l14k -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:50:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02AA71065672; Mon, 21 Mar 2011 14:50:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E879E8FC15; Mon, 21 Mar 2011 14:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LEoCUh008980; Mon, 21 Mar 2011 14:50:12 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LEoCRq008978; Mon, 21 Mar 2011 14:50:12 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103211450.p2LEoCRq008978@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 14:50: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: r219830 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:50:13 -0000 Author: pjd Date: Mon Mar 21 14:50:12 2011 New Revision: 219830 URL: http://svn.freebsd.org/changeset/base/219830 Log: Detect situation where resource internal identifier differs. This means that both nodes have separately managed resources that don't have the same data. MFC after: 1 week Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Mon Mar 21 14:29:35 2011 (r219829) +++ head/sbin/hastd/secondary.c Mon Mar 21 14:50:12 2011 (r219830) @@ -259,6 +259,19 @@ init_remote(struct hast_resource *res, s memset(map, 0xff, mapsize); } nv_add_uint8(nvout, HAST_SYNCSRC_PRIMARY, "syncsrc"); + } else if (res->hr_resuid != resuid) { + char errmsg[256]; + + (void)snprintf(errmsg, sizeof(errmsg), + "Resource unique ID mismatch (primary=%ju, secondary=%ju).", + (uintmax_t)resuid, (uintmax_t)res->hr_resuid); + pjdlog_error("%s", errmsg); + nv_add_string(nvout, errmsg, "errmsg"); + if (hast_proto_send(res, res->hr_remotein, nvout, NULL, 0) < 0) { + pjdlog_exit(EX_TEMPFAIL, "Unable to send response to %s", + res->hr_remoteaddr); + } + exit(EX_CONFIG); } else if ( /* Is primary is out-of-date? */ (res->hr_secondary_localcnt > res->hr_primary_remotecnt && From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:51:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63FC3106566B; Mon, 21 Mar 2011 14:51:16 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55ECB8FC12; Mon, 21 Mar 2011 14:51:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LEpGfH009037; Mon, 21 Mar 2011 14:51:16 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LEpGQ4009035; Mon, 21 Mar 2011 14:51:16 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103211451.p2LEpGQ4009035@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 14:51: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: r219831 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:51:16 -0000 Author: pjd Date: Mon Mar 21 14:51:16 2011 New Revision: 219831 URL: http://svn.freebsd.org/changeset/base/219831 Log: Be pedantic and free nvout before exiting. MFC after: 1 week Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Mon Mar 21 14:50:12 2011 (r219830) +++ head/sbin/hastd/secondary.c Mon Mar 21 14:51:16 2011 (r219831) @@ -271,6 +271,7 @@ init_remote(struct hast_resource *res, s pjdlog_exit(EX_TEMPFAIL, "Unable to send response to %s", res->hr_remoteaddr); } + nv_free(nvout); exit(EX_CONFIG); } else if ( /* Is primary is out-of-date? */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 14:53:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F89106566B; Mon, 21 Mar 2011 14:53:28 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 691778FC14; Mon, 21 Mar 2011 14:53:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LErSYM009127; Mon, 21 Mar 2011 14:53:28 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LErSme009125; Mon, 21 Mar 2011 14:53:28 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103211453.p2LErSme009125@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 14:53: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: r219832 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 14:53:28 -0000 Author: pjd Date: Mon Mar 21 14:53:27 2011 New Revision: 219832 URL: http://svn.freebsd.org/changeset/base/219832 Log: Increase debug level of "Checking hooks." message. MFC after: 1 week Modified: head/sbin/hastd/hooks.c Modified: head/sbin/hastd/hooks.c ============================================================================== --- head/sbin/hastd/hooks.c Mon Mar 21 14:51:16 2011 (r219831) +++ head/sbin/hastd/hooks.c Mon Mar 21 14:53:27 2011 (r219832) @@ -288,7 +288,7 @@ hook_check(void) assert(hooks_initialized); - pjdlog_debug(1, "Checking hooks."); + pjdlog_debug(2, "Checking hooks."); /* * Report about processes that are running for a long time. From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 15:08:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64622106566C; Mon, 21 Mar 2011 15:08:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 569808FC14; Mon, 21 Mar 2011 15:08:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LF8ALh009476; Mon, 21 Mar 2011 15:08:10 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LF8A41009474; Mon, 21 Mar 2011 15:08:10 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103211508.p2LF8A41009474@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 15:08: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: r219833 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 15:08:10 -0000 Author: pjd Date: Mon Mar 21 15:08:10 2011 New Revision: 219833 URL: http://svn.freebsd.org/changeset/base/219833 Log: Remove stale comment. Yes, it is valid to set role back to init. MFC after: 1 week Modified: head/sbin/hastd/control.c Modified: head/sbin/hastd/control.c ============================================================================== --- head/sbin/hastd/control.c Mon Mar 21 14:53:27 2011 (r219832) +++ head/sbin/hastd/control.c Mon Mar 21 15:08:10 2011 (r219833) @@ -327,7 +327,7 @@ control_handle(struct hastd_config *cfg) if (cmd == HASTCTL_SET_ROLE) { role = nv_get_uint8(nvin, "role"); switch (role) { - case HAST_ROLE_INIT: /* Is that valid to set, hmm? */ + case HAST_ROLE_INIT: case HAST_ROLE_PRIMARY: case HAST_ROLE_SECONDARY: break; From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 15:17:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 631C2106566B; Mon, 21 Mar 2011 15:17:03 +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 3B4B18FC0A; Mon, 21 Mar 2011 15:17:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LFH3bD009702; Mon, 21 Mar 2011 15:17:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LFH3M7009700; Mon, 21 Mar 2011 15:17:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103211517.p2LFH3M7009700@svn.freebsd.org> From: Glen Barber Date: Mon, 21 Mar 2011 15:17: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: r219834 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 15:17:03 -0000 Author: gjb (doc committer) Date: Mon Mar 21 15:17:02 2011 New Revision: 219834 URL: http://svn.freebsd.org/changeset/base/219834 Log: Bump date from previous commit. Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Mon Mar 21 15:08:10 2011 (r219833) +++ head/sbin/ifconfig/ifconfig.8 Mon Mar 21 15:17:02 2011 (r219834) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 14, 2010 +.Dd March 20, 2011 .Dt IFCONFIG 8 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 15:22:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7E54106566C; Mon, 21 Mar 2011 15:22:48 +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 99AA08FC17; Mon, 21 Mar 2011 15:22:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LFMmbr009909; Mon, 21 Mar 2011 15:22:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LFMmDk009907; Mon, 21 Mar 2011 15:22:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103211522.p2LFMmDk009907@svn.freebsd.org> From: Glen Barber Date: Mon, 21 Mar 2011 15:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219835 - stable/8/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 15:22:48 -0000 Author: gjb (doc committer) Date: Mon Mar 21 15:22:48 2011 New Revision: 219835 URL: http://svn.freebsd.org/changeset/base/219835 Log: MFC 219834: Bump date from previous commit. Modified: stable/8/sbin/ifconfig/ifconfig.8 Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.8 Mon Mar 21 15:17:02 2011 (r219834) +++ stable/8/sbin/ifconfig/ifconfig.8 Mon Mar 21 15:22:48 2011 (r219835) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 14, 2010 +.Dd March 20, 2011 .Dt IFCONFIG 8 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 15:23:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 876BC1065687; Mon, 21 Mar 2011 15:23:10 +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 78A718FC1C; Mon, 21 Mar 2011 15:23:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LFNAfv009957; Mon, 21 Mar 2011 15:23:10 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LFNAHD009955; Mon, 21 Mar 2011 15:23:10 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103211523.p2LFNAHD009955@svn.freebsd.org> From: Glen Barber Date: Mon, 21 Mar 2011 15:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219836 - stable/7/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 15:23:10 -0000 Author: gjb (doc committer) Date: Mon Mar 21 15:23:10 2011 New Revision: 219836 URL: http://svn.freebsd.org/changeset/base/219836 Log: MFC 219834: Bump date from previous commit. Modified: stable/7/sbin/ifconfig/ifconfig.8 Directory Properties: stable/7/sbin/ifconfig/ (props changed) Modified: stable/7/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/7/sbin/ifconfig/ifconfig.8 Mon Mar 21 15:22:48 2011 (r219835) +++ stable/7/sbin/ifconfig/ifconfig.8 Mon Mar 21 15:23:10 2011 (r219836) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd February 20, 2010 +.Dd March 20, 2011 .Dt IFCONFIG 8 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 15:29:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E642106566C; Mon, 21 Mar 2011 15:29:21 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3536F8FC18; Mon, 21 Mar 2011 15:29:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LFTLZM010141; Mon, 21 Mar 2011 15:29:21 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LFTL04010139; Mon, 21 Mar 2011 15:29:21 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103211529.p2LFTL04010139@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 15:29: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: r219837 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 15:29:21 -0000 Author: pjd Date: Mon Mar 21 15:29:20 2011 New Revision: 219837 URL: http://svn.freebsd.org/changeset/base/219837 Log: Before handling any events on descriptors check signals so we can update our info about worker processes if any of them was terminated in the meantime. This fixes the problem with 'hastctl status' running from a hook called on split-brain: 1. Secondary calls a hooks and terminates. 2. Hook asks for resource status via 'hastctl status'. 3. The main hastd handles the status request by sending it to the secondary worker who is already dead, but because signals weren't checked yet he doesn't know that and we get EPIPE. MFC after: 1 week Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Mar 21 15:23:10 2011 (r219836) +++ head/sbin/hastd/hastd.c Mon Mar 21 15:29:20 2011 (r219837) @@ -884,19 +884,12 @@ out: } static void -main_loop(void) +check_signals(void) { - struct hast_resource *res; - struct timeval seltimeout; struct timespec sigtimeout; - int fd, maxfd, ret, signo; - time_t lastcheck, now; sigset_t mask; - fd_set rfds; + int signo; - lastcheck = time(NULL); - seltimeout.tv_sec = REPORT_INTERVAL; - seltimeout.tv_usec = 0; sigtimeout.tv_sec = 0; sigtimeout.tv_nsec = 0; @@ -906,29 +899,45 @@ main_loop(void) PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGCHLD) == 0); + while ((signo = sigtimedwait(&mask, NULL, &sigtimeout)) != -1) { + switch (signo) { + case SIGINT: + case SIGTERM: + sigexit_received = true; + terminate_workers(); + proto_close(cfg->hc_controlconn); + exit(EX_OK); + break; + case SIGCHLD: + child_exit(); + break; + case SIGHUP: + hastd_reload(); + break; + default: + PJDLOG_ABORT("Unexpected signal (%d).", signo); + } + } +} + +static void +main_loop(void) +{ + struct hast_resource *res; + struct timeval seltimeout; + int fd, maxfd, ret; + time_t lastcheck, now; + fd_set rfds; + + lastcheck = time(NULL); + seltimeout.tv_sec = REPORT_INTERVAL; + seltimeout.tv_usec = 0; + pjdlog_info("Started successfully, running protocol version %d.", HAST_PROTO_VERSION); for (;;) { - while ((signo = sigtimedwait(&mask, NULL, &sigtimeout)) != -1) { - switch (signo) { - case SIGINT: - case SIGTERM: - sigexit_received = true; - terminate_workers(); - proto_close(cfg->hc_controlconn); - exit(EX_OK); - break; - case SIGCHLD: - child_exit(); - break; - case SIGHUP: - hastd_reload(); - break; - default: - PJDLOG_ABORT("Unexpected signal (%d).", signo); - } - } + check_signals(); /* Setup descriptors for select(2). */ FD_ZERO(&rfds); @@ -976,6 +985,12 @@ main_loop(void) pjdlog_exit(EX_OSERR, "select() failed"); } + /* + * Check for signals before we do anything to update our + * info about terminated workers in the meantime. + */ + check_signals(); + if (FD_ISSET(proto_descriptor(cfg->hc_controlconn), &rfds)) control_handle(cfg); if (FD_ISSET(proto_descriptor(cfg->hc_listenconn), &rfds)) From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 17:12:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D5F3106564A; Mon, 21 Mar 2011 17:12:03 +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 7F5398FC08; Mon, 21 Mar 2011 17:12:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LHC3RL013316; Mon, 21 Mar 2011 17:12:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LHC32P013314; Mon, 21 Mar 2011 17:12:03 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103211712.p2LHC32P013314@svn.freebsd.org> From: Adrian Chadd Date: Mon, 21 Mar 2011 17: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: r219839 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 17:12:03 -0000 Author: adrian Date: Mon Mar 21 17:12:03 2011 New Revision: 219839 URL: http://svn.freebsd.org/changeset/base/219839 Log: This CLKDRV workaround should only be for AR5416 v2.0/2.1; the check was too strict and enabled it for all non AR5416-v2.2 chipsets - including later ones. 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 Mon Mar 21 15:51:22 2011 (r219838) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Mar 21 17:12:03 2011 (r219839) @@ -277,7 +277,8 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s HAL_INI_INIT(&AH5416(ah)->ah_ini_bank7, ar5416Bank7, 2); HAL_INI_INIT(&AH5416(ah)->ah_ini_addac, ar5416Addac, 2); - if (!IS_5416V2_2(ah)) { /* Owl 2.1/2.0 */ + if (! AR_SREV_OWL_22_OR_LATER(ah)) { /* Owl 2.1/2.0 */ + ath_hal_printf(ah, "[ath] Enabling CLKDRV workaround for AR5416 < v2.2\n"); struct ini { uint32_t *data; /* NB: !const */ int rows, cols; From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 17:44:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94A12106564A; Mon, 21 Mar 2011 17:44:52 +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 854798FC12; Mon, 21 Mar 2011 17:44:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LHiqvA014657; Mon, 21 Mar 2011 17:44:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LHiqaS014655; Mon, 21 Mar 2011 17:44:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103211744.p2LHiqaS014655@svn.freebsd.org> From: Adrian Chadd Date: Mon, 21 Mar 2011 17:44: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: r219840 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 17:44:52 -0000 Author: adrian Date: Mon Mar 21 17:44:52 2011 New Revision: 219840 URL: http://svn.freebsd.org/changeset/base/219840 Log: Back that commit out - something's broken, and I need to figure out what/why. 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 Mon Mar 21 17:12:03 2011 (r219839) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Mar 21 17:44:52 2011 (r219840) @@ -277,7 +277,7 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s HAL_INI_INIT(&AH5416(ah)->ah_ini_bank7, ar5416Bank7, 2); HAL_INI_INIT(&AH5416(ah)->ah_ini_addac, ar5416Addac, 2); - if (! AR_SREV_OWL_22_OR_LATER(ah)) { /* Owl 2.1/2.0 */ + if (! IS_5416V2_2(ah)) { /* Owl 2.1/2.0 */ ath_hal_printf(ah, "[ath] Enabling CLKDRV workaround for AR5416 < v2.2\n"); struct ini { uint32_t *data; /* NB: !const */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 17:47:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B1E1065670; Mon, 21 Mar 2011 17:47:55 +0000 (UTC) (envelope-from mmoll@darkthrone.kvedulv.de) Received: from darkthrone.kvedulv.de (darkthrone.kvedulv.de [IPv6:2001:1578:400:101::2]) by mx1.freebsd.org (Postfix) with ESMTP id E6DBB8FC0C; Mon, 21 Mar 2011 17:47:54 +0000 (UTC) Received: by darkthrone.kvedulv.de (Postfix, from userid 666) id 433541CC6E; Mon, 21 Mar 2011 18:47:53 +0100 (CET) Date: Mon, 21 Mar 2011 18:47:53 +0100 From: Michael Moll To: Marius Strobl Message-ID: <20110321174753.GB32285@darkthrone.kvedulv.de> References: <4D840BD0.4030306@freebsd.org> <201103200000.p2K00pue003373@chez.mckusick.com> <20110320162212.GI1606@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110320162212.GI1606@alchemy.franken.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, kvedulv@kvedulv.de, Jeff Roberson , Kirk McKusick , Gavin Atkinson , Nathan Whitehorn , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 17:47:55 -0000 Hi All, On Sun, Mar 20, 2011 at 05:22:12PM +0100, Marius Strobl wrote: > I fear it's still a bit premature for enable SU+J by default. Rather > recently I was told about a SU+J filesystems lost after a panic > that happend after snapshotting it (report CC'ed, maybe he can > provide some more details) and I'm pretty sure I've seen the problem > described in PR 149022 also after the potential fix mentioned in its > feedback. Sorry, no details available, as I didn't record the panic and problems back then. However this was not the first panic which I attribute (maybe wrongly) to SUJ and as an consequence now all my UFS filesystems have SUJ turned off again. If SUJ really is going to be the default I would expact quite some fallout from this after my experiences. Kind Regards -- Michael Moll From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 18:20:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23D66106566B; Mon, 21 Mar 2011 18:20:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 120F78FC19; Mon, 21 Mar 2011 18:20:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LIKsBY015711; Mon, 21 Mar 2011 18:20:54 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LIKrL9015699; Mon, 21 Mar 2011 18:20:53 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201103211820.p2LIKrL9015699@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 21 Mar 2011 18:20: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: r219841 - in head/sys: conf ia64/ia64 ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 18:20:54 -0000 Author: marcel Date: Mon Mar 21 18:20:53 2011 New Revision: 219841 URL: http://svn.freebsd.org/changeset/base/219841 Log: Fix switching to physical mode as part of calling into EFI runtime services or PAL procedures. The new implementation is based on specific functions that are known to be called in certain scenarios only. This in particular fixes the PAL call to obtain information about translation registers. In general, the new implementation does not bank on virtual addresses being direct-mapped and will work when the kernel uses PBVM. When new scenarios need to be supported, new functions are added if the existing functions cannot be changed to handle the new scenario. If a single generic implementation is possible, it will become clear in due time. While here, change bootinfo to a pointer type in anticipation of future development. Added: head/sys/ia64/ia64/physical.S (contents, props changed) Modified: head/sys/conf/files.ia64 head/sys/ia64/ia64/efi.c head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/pal.S head/sys/ia64/ia64/pmap.c head/sys/ia64/ia64/support.S head/sys/ia64/include/bootinfo.h head/sys/ia64/include/efi.h head/sys/ia64/include/pal.h head/sys/ia64/include/vmparam.h Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/conf/files.ia64 Mon Mar 21 18:20:53 2011 (r219841) @@ -95,6 +95,7 @@ ia64/ia64/mem.c optional mem ia64/ia64/mp_machdep.c optional smp ia64/ia64/nexus.c standard ia64/ia64/pal.S standard +ia64/ia64/physical.S standard ia64/ia64/pmap.c standard ia64/ia64/ptrace_machdep.c standard ia64/ia64/sal.c standard Modified: head/sys/ia64/ia64/efi.c ============================================================================== --- head/sys/ia64/ia64/efi.c Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/ia64/efi.c Mon Mar 21 18:20:53 2011 (r219841) @@ -32,13 +32,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include -extern uint64_t ia64_call_efi_physical(uint64_t, uint64_t, uint64_t, uint64_t, - uint64_t, uint64_t); - static struct efi_systbl *efi_systbl; static struct efi_cfgtbl *efi_cfgtbl; static struct efi_rt *efi_runtime; @@ -96,6 +94,7 @@ efi_boot_finish(void) int efi_boot_minimal(uint64_t systbl) { + ia64_efi_f setvirt; struct efi_md *md; efi_status status; @@ -121,18 +120,16 @@ efi_boot_minimal(uint64_t systbl) md = efi_md_first(); while (md != NULL) { if (md->md_attr & EFI_MD_ATTR_RT) { - if (md->md_attr & EFI_MD_ATTR_WB) - md->md_virt = - (void *)IA64_PHYS_TO_RR7(md->md_phys); - else if (md->md_attr & EFI_MD_ATTR_UC) - md->md_virt = pmap_mapdev(md->md_phys, - md->md_pages * EFI_PAGE_SIZE); + md->md_virt = (md->md_attr & EFI_MD_ATTR_WB) ? + (void *)IA64_PHYS_TO_RR7(md->md_phys) : + (void *)IA64_PHYS_TO_RR6(md->md_phys); } md = efi_md_next(md); } - status = ia64_call_efi_physical((uint64_t)efi_runtime->rt_setvirtual, - bootinfo.bi_memmap_size, bootinfo.bi_memdesc_size, - bootinfo.bi_memdesc_version, bootinfo.bi_memmap, 0); + setvirt = (void *)IA64_PHYS_TO_RR7((u_long)efi_runtime->rt_setvirtual); + status = ia64_efi_physical(setvirt, bootinfo->bi_memmap_size, + bootinfo->bi_memdesc_size, bootinfo->bi_memdesc_version, + bootinfo->bi_memmap); return ((status < 0) ? EFAULT : 0); } @@ -165,9 +162,9 @@ struct efi_md * efi_md_first(void) { - if (bootinfo.bi_memmap == 0) + if (bootinfo->bi_memmap == 0) return (NULL); - return ((struct efi_md *)IA64_PHYS_TO_RR7(bootinfo.bi_memmap)); + return ((struct efi_md *)IA64_PHYS_TO_RR7(bootinfo->bi_memmap)); } struct efi_md * @@ -175,8 +172,8 @@ efi_md_next(struct efi_md *md) { uint64_t plim; - plim = IA64_PHYS_TO_RR7(bootinfo.bi_memmap + bootinfo.bi_memmap_size); - md = (struct efi_md *)((uintptr_t)md + bootinfo.bi_memdesc_size); + plim = IA64_PHYS_TO_RR7(bootinfo->bi_memmap + bootinfo->bi_memmap_size); + md = (struct efi_md *)((uintptr_t)md + bootinfo->bi_memdesc_size); return ((md >= (struct efi_md *)plim) ? NULL : md); } Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/ia64/machdep.c Mon Mar 21 18:20:53 2011 (r219841) @@ -116,7 +116,7 @@ SYSCTL_UINT(_hw_freq, OID_AUTO, itc, CTL int cold = 1; u_int64_t pa_bootinfo; -struct bootinfo bootinfo; +struct bootinfo *bootinfo; struct pcpu pcpu0; @@ -684,11 +684,11 @@ ia64_init(void) * pa_bootinfo is the physical address of the bootinfo block as * passed to us by the loader and set in locore.s. */ - bootinfo = *(struct bootinfo *)(IA64_PHYS_TO_RR7(pa_bootinfo)); + bootinfo = (struct bootinfo *)(IA64_PHYS_TO_RR7(pa_bootinfo)); - if (bootinfo.bi_magic != BOOTINFO_MAGIC || bootinfo.bi_version != 1) { - bzero(&bootinfo, sizeof(bootinfo)); - bootinfo.bi_kernend = (vm_offset_t) round_page(_end); + if (bootinfo->bi_magic != BOOTINFO_MAGIC || bootinfo->bi_version != 1) { + bzero(bootinfo, sizeof(*bootinfo)); + bootinfo->bi_kernend = (vm_offset_t)round_page(_end); } /* @@ -708,20 +708,20 @@ ia64_init(void) } metadata_missing = 0; - if (bootinfo.bi_modulep) - preload_metadata = (caddr_t)bootinfo.bi_modulep; + if (bootinfo->bi_modulep) + preload_metadata = (caddr_t)bootinfo->bi_modulep; else metadata_missing = 1; - if (envmode == 0 && bootinfo.bi_envp) - kern_envp = (caddr_t)bootinfo.bi_envp; + if (envmode == 0 && bootinfo->bi_envp) + kern_envp = (caddr_t)bootinfo->bi_envp; else kern_envp = static_env; /* * Look at arguments passed to us and compute boothowto. */ - boothowto = bootinfo.bi_boothowto; + boothowto = bootinfo->bi_boothowto; if (boothowto & RB_VERBOSE) bootverbose = 1; @@ -731,15 +731,15 @@ ia64_init(void) */ kernstart = trunc_page(kernel_text); #ifdef DDB - ksym_start = bootinfo.bi_symtab; - ksym_end = bootinfo.bi_esymtab; + ksym_start = bootinfo->bi_symtab; + ksym_end = bootinfo->bi_esymtab; kernend = (vm_offset_t)round_page(ksym_end); #else kernend = (vm_offset_t)round_page(_end); #endif /* But if the bootstrap tells us otherwise, believe it! */ - if (bootinfo.bi_kernend) - kernend = round_page(bootinfo.bi_kernend); + if (bootinfo->bi_kernend) + kernend = round_page(bootinfo->bi_kernend); /* * Setup the PCPU data for the bootstrap processor. It is needed @@ -775,7 +775,7 @@ ia64_init(void) * Wire things up so we can call the firmware. */ map_pal_code(); - efi_boot_minimal(bootinfo.bi_systab); + efi_boot_minimal(bootinfo->bi_systab); ia64_xiv_init(); ia64_sal_init(); calculate_frequencies(); @@ -784,8 +784,8 @@ ia64_init(void) printf("WARNING: loader(8) metadata is missing!\n"); /* Get FPSWA interface */ - fpswa_iface = (bootinfo.bi_fpswa == 0) ? NULL : - (struct fpswa_iface *)IA64_PHYS_TO_RR7(bootinfo.bi_fpswa); + fpswa_iface = (bootinfo->bi_fpswa == 0) ? NULL : + (struct fpswa_iface *)IA64_PHYS_TO_RR7(bootinfo->bi_fpswa); /* Init basic tunables, including hz */ init_param1(); @@ -940,7 +940,7 @@ uint64_t ia64_get_hcdp(void) { - return (bootinfo.bi_hcdp); + return (bootinfo->bi_hcdp); } void Modified: head/sys/ia64/ia64/pal.S ============================================================================== --- head/sys/ia64/ia64/pal.S Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/ia64/pal.S Mon Mar 21 18:20:53 2011 (r219841) @@ -75,63 +75,8 @@ psrsave = loc4 ;; srlz.d br.ret.sptk rp - END(ia64_call_pal_static) - -#ifdef _KERNEL - -/* - * struct ia64_pal_result ia64_call_pal_static_physical(u_int64_t proc, - * u_int64_t arg1, u_int64_t arg2, u_int64_t arg3) - */ -ENTRY(ia64_call_pal_static_physical, 4) - - .regstk 4,5,0,0 -palret = loc0 -entry = loc1 -rpsave = loc2 -pfssave = loc3 -psrsave = loc4 - - alloc pfssave=ar.pfs,4,5,0,0 - ;; - mov rpsave=rp - - movl entry=@gprel(ia64_pal_entry) -1: mov palret=ip // for return address - ;; - add entry=entry,gp - mov r28=in0 // procedure number - ;; - ld8 entry=[entry] // read entry point - mov r29=in1 // copy arguments - mov r30=in2 - mov r31=in3 - ;; - dep entry=0,entry,61,3 // physical address - dep palret=0,palret,61,3 // physical address - br.call.sptk.many rp=ia64_physical_mode - mov psrsave=ret0 - ;; - mov b6=entry - add palret=2f-1b,palret // calculate return address - ;; - mov b0=palret - br.cond.sptk b6 // call into firmware - ;; -2: mov r14=psrsave - ;; - br.call.sptk.many rp=ia64_change_mode - ;; - mov rp=rpsave - mov ar.pfs=pfssave - ;; - br.ret.sptk rp -END(ia64_call_pal_static_physical) - -#endif - /* * struct ia64_pal_result ia64_call_pal_stacked(u_int64_t proc, * u_int64_t arg1, u_int64_t arg2, u_int64_t arg3) @@ -172,52 +117,3 @@ psrsave = loc3 br.ret.sptk rp END(ia64_call_pal_stacked) - -#ifdef _KERNEL - -/* - * struct ia64_pal_result ia64_call_pal_stacked_physical(u_int64_t proc, - * u_int64_t arg1, u_int64_t arg2, u_int64_t arg3) - */ -ENTRY(ia64_call_pal_stacked_physical, 4) - - .regstk 4,4,4,0 -entry = loc0 -rpsave = loc1 -pfssave = loc2 -psrsave = loc3 - - alloc pfssave=ar.pfs,4,4,4,0 - ;; - mov rpsave=rp - movl entry=@gprel(ia64_pal_entry) - ;; - add entry=entry,gp - mov r28=in0 // procedure number - mov out0=in0 - ;; - ld8 entry=[entry] // read entry point - mov out1=in1 // copy arguments - mov out2=in2 - mov out3=in3 - ;; - dep entry=0,entry,61,3 // physical address - br.call.sptk.many rp=ia64_physical_mode - mov psrsave=ret0 - ;; - mov b6=entry - ;; - br.call.sptk.many rp=b6 // call into firmware - ;; - mov r14=psrsave - ;; - br.call.sptk.many rp=ia64_change_mode - ;; - mov rp=rpsave - mov ar.pfs=pfssave - ;; - br.ret.sptk rp - -END(ia64_call_pal_stacked_physical) - -#endif Added: head/sys/ia64/ia64/physical.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ia64/ia64/physical.S Mon Mar 21 18:20:53 2011 (r219841) @@ -0,0 +1,258 @@ +/*- + * Copyright (c) 2011 Marcel Moolenaar + * 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. + * + * $FreeBSD$ + */ + +#include +#include + + .text + +/* + * u_long ia64_efi_physical(ia64_efi_f, u_long, u_long, u_long, u_long) + * + * loc0 = ar.pfs + * loc1 = rp + * loc2 = psr + * loc3 = sp + * loc4 = bsp + * loc5 = gp + */ +ENTRY(ia64_efi_physical, 5) + .prologue + .regstk 5,6,4,0 + .save ar.pfs,loc0 + alloc loc0=ar.pfs,5,6,4,0 + ;; + .save rp,loc1 + mov loc1=rp + ;; + .body + mov loc2=psr // save psr + movl r16=IA64_PSR_I | IA64_PSR_IT | IA64_PSR_DT | \ + IA64_PSR_RT | IA64_PSR_DFL | IA64_PSR_DFH + ;; + andcm r14=loc2,r16 + movl r15=IA64_PSR_BN + ;; + rsm psr.i + mov r17=ar.rsc + or r16=r14,r15 // new psr + ;; + mov ar.rsc=0 + or loc2=loc2,r15 + ;; + flushrs + mov loc3=sp // save sp + ;; + mov loc4=ar.bsp // save ar.bsp + mov r18=ar.rnat + ;; + tpa r19=loc4 // new bspstore + mov loc5=gp + ;; + tpa r20=loc3 // new sp + ld8 r21=[in0],8 + ;; +1: + mov r14=ip + ;; + ld8 r22=[in0] + add r15=2f-1b,r14 + ;; + tpa r14=r15 + ;; + rsm psr.ic + ;; + srlz.i + ;; + mov cr.iip=r14 + mov cr.ifs=r0 + mov cr.ipsr=r16 + ;; + rfi +2: + mov ar.bspstore=r19 + mov sp=r20 + ;; + mov ar.rnat=r18 + mov ar.rsc=r17 + ;; + mov b6=r21 + mov gp=r22 + mov out0=in1 + mov out1=in2 + mov out2=in3 + mov out3=in4 + ;; + br.call.sptk.many rp=b6 + mov gp=loc5 + ;; + rsm psr.i | psr.ic + mov r16=ar.rsc + ;; + srlz.i + mov ar.rsc=0 + ;; + flushrs + ;; + mov r17=ar.rnat + movl r18=3f + ;; + mov cr.iip=r18 + mov cr.ifs=r0 + mov cr.ipsr=loc2 + ;; + rfi +3: + mov ar.bspstore=loc4 + mov sp=loc3 + ;; + mov ar.rnat=r17 + mov ar.rsc=r16 + ;; + mov rp=loc1 + mov ar.pfs=loc0 + ;; + br.ret.sptk.many rp +END(ia64_efi_physical) + + +/* + * ia64_pal_ret ia64_pal_physical(ia64_fw_f, u_long, u_long, u_long, u_long) + * + * loc0 = ar.pfs + * loc1 = rp + * loc2 = psr + * loc3 = sp + * loc4 = bsp + * loc5 = gp + */ +ENTRY(ia64_pal_physical, 5) + .prologue + .regstk 5,6,4,0 + .save ar.pfs,loc0 + alloc loc0=ar.pfs,5,6,4,0 + ;; + .save rp,loc1 + mov loc1=rp + ;; + .body + mov loc2=psr // save psr + movl r16=IA64_PSR_I | IA64_PSR_IT | IA64_PSR_DT | \ + IA64_PSR_RT | IA64_PSR_DFL | IA64_PSR_DFH + ;; + andcm r14=loc2,r16 + movl r15=IA64_PSR_BN + ;; + rsm psr.i + mov r17=ar.rsc + or r16=r14,r15 // new psr + ;; + mov ar.rsc=0 + or loc2=loc2,r15 + ;; + flushrs + mov loc3=sp // save sp + ;; + mov loc4=ar.bsp // save ar.bsp + mov r18=ar.rnat + ;; + mov loc5=gp + movl r14=kstack + ;; + tpa r19=r14 // new bspstore + movl r15=kstack_top + ;; + tpa r20=r15 // new sp + movl r21=ia64_pal_entry + ;; +1: + mov r14=ip + ld8 r22=[r21] + ;; + tpa r21=r22 + add r15=2f-1b,r14 + ;; + tpa r14=r15 + ;; + rsm psr.ic + ;; + srlz.i + ;; + mov cr.iip=r14 + mov cr.ifs=r0 + mov cr.ipsr=r16 + ;; + rfi +2: + mov ar.bspstore=r19 + add sp=-16,r20 + ;; + mov ar.rnat=r18 + mov ar.rsc=r17 + ;; + mov b6=r21 + mov out0=in0 + mov out1=in1 + mov out2=in2 + mov out3=in3 + // PAL static calls + mov r28=in0 + mov r29=in1 + mov r30=in2 + mov r31=in3 + br.call.sptk.many rp=b6 + mov gp=loc5 + ;; + rsm psr.i | psr.ic + mov r16=ar.rsc + ;; + srlz.i + mov ar.rsc=0 + ;; + flushrs + ;; + mov r17=ar.rnat + movl r18=3f + ;; + mov cr.iip=r18 + mov cr.ifs=r0 + mov cr.ipsr=loc2 + ;; + rfi +3: + mov ar.bspstore=loc4 + mov sp=loc3 + ;; + mov ar.rnat=r17 + mov ar.rsc=r16 + ;; + mov rp=loc1 + mov ar.pfs=loc0 + ;; + br.ret.sptk.many rp +END(ia64_pal_physical) Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/ia64/pmap.c Mon Mar 21 18:20:53 2011 (r219841) @@ -2378,8 +2378,8 @@ print_trs(int type) db_printf("V RID Virtual Page Physical Page PgSz ED AR PL D A MA P KEY\n"); for (i = 0; i <= maxtr; i++) { bzero(&buf, sizeof(buf)); - res = ia64_call_pal_stacked_physical - (PAL_VM_TR_READ, i, type, ia64_tpa((uint64_t) &buf)); + res = ia64_pal_physical(PAL_VM_TR_READ, i, type, + ia64_tpa((uint64_t)&buf)); if (!(res.pal_result[0] & 1)) buf.pte &= ~PTE_AR_MASK; if (!(res.pal_result[0] & 2)) Modified: head/sys/ia64/ia64/support.S ============================================================================== --- head/sys/ia64/ia64/support.S Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/ia64/support.S Mon Mar 21 18:20:53 2011 (r219841) @@ -58,131 +58,6 @@ .text -/* - * ia64_change_mode: change mode to/from physical mode - * - * Arguments: - * r14 psr for desired mode - * - * Modifies: - * r15-r19 scratch - * ar.bsp tranlated to new mode - */ -ENTRY_NOPROFILE(ia64_change_mode, 0) - rsm psr.i | psr.ic - mov r19=ar.rsc // save rsc while we change mode - tbit.nz p6,p7=r14,17 // physical or virtual ? - ;; - mov ar.rsc=0 // turn off RSE -(p6) mov r15=7 // RR base for virtual addresses -(p7) mov r15=0 // RR base for physical addresses - ;; - flushrs // no dirty registers please - srlz.i - ;; - mov r16=ar.bsp - mov r17=rp - mov r18=ar.rnat - ;; - dep r16=r15,r16,61,3 // new address of ar.bsp - dep r17=r15,r17,61,3 // new address of rp - dep sp=r15,sp,61,3 // new address of sp - ;; - mov ar.bspstore=r16 - mov rp=r17 - ;; -1: mov r16=ip - mov ar.rnat=r18 - mov cr.ipsr=r14 // psr for new mode - ;; - add r16=2f-1b,r16 // address to rfi to - ;; - dep r16=r15,r16,61,3 // new mode address for rfi - ;; - mov cr.iip=r16 // setup for rfi - mov cr.ifs=r0 - ;; - rfi - -2: mov ar.rsc=r19 // restore ar.rsc - br.ret.sptk.few rp // now in new mode -END(ia64_change_mode) - -/* - * ia64_physical_mode: change mode to physical mode - * - * Return: - * ret0 psr to restore - * - * Modifies: - * r15-r18 scratch - * ar.bsp tranlated to physical mode - * psr.i cleared - */ -ENTRY(ia64_physical_mode, 0) - mov r14=psr - mov ret0=psr - movl r15=(IA64_PSR_I|IA64_PSR_IT|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_DFL|IA64_PSR_DFH) - movl r16=IA64_PSR_BN - ;; - andcm r14=r14,r15 // clear various xT bits - ;; - or r14=r14,r16 // make sure BN=1 - or ret0=ret0,r16 // make sure BN=1 - - br.cond.sptk.many ia64_change_mode -END(ia64_physical_mode) - -/* - * ia64_call_efi_physical: call an EFI procedure in physical mode - * - * Arguments: - * in0 Address of EFI procedure descriptor - * in1-in5 Arguments to EFI procedure - * - * Return: - * ret0-ret3 return values from EFI - * - */ -ENTRY(ia64_call_efi_physical, 6) - .prologue - .regstk 6,4,5,0 - .save ar.pfs,loc0 - alloc loc0=ar.pfs,6,4,5,0 - ;; - .save rp,loc1 - mov loc1=rp - ;; - .body - br.call.sptk.many rp=ia64_physical_mode - ;; - mov loc2=r8 // psr to restore mode - mov loc3=gp // save kernel gp - ld8 r14=[in0],8 // function address - ;; - mov out0=in1 - mov out1=in2 - mov out2=in3 - mov out3=in4 - mov out4=in5 - ld8 gp=[in0] // function gp value - ;; - mov b6=r14 - ;; - br.call.sptk.many rp=b6 // call EFI procedure - mov gp=loc3 // restore kernel gp - ;; - mov r14=loc2 // psr to restore mode - br.call.sptk.many rp=ia64_change_mode - ;; - mov rp=loc1 - mov ar.pfs=loc0 - ;; - br.ret.sptk.many rp -END(ia64_call_efi_physical) - -/**************************************************************************/ - ENTRY(fusufault, 0) { .mib st8.rel [r15]=r0 // Clear onfault. Modified: head/sys/ia64/include/bootinfo.h ============================================================================== --- head/sys/ia64/include/bootinfo.h Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/include/bootinfo.h Mon Mar 21 18:20:53 2011 (r219841) @@ -48,4 +48,4 @@ struct bootinfo { uint64_t bi_modulep; /* preloaded modules */ }; -extern struct bootinfo bootinfo; +extern struct bootinfo *bootinfo; Modified: head/sys/ia64/include/efi.h ============================================================================== --- head/sys/ia64/include/efi.h Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/include/efi.h Mon Mar 21 18:20:53 2011 (r219841) @@ -151,6 +151,12 @@ struct efi_systbl { uint64_t st_cfgtbl; }; +#ifdef _KERNEL + +typedef u_long (*ia64_efi_f)(u_long, u_long, u_long, u_long); + +u_long ia64_efi_physical(ia64_efi_f, u_long, u_long, u_long, u_long); + void efi_boot_finish(void); int efi_boot_minimal(uint64_t); void *efi_get_table(struct uuid *); @@ -163,4 +169,6 @@ int efi_var_get(efi_char *, struct uuid int efi_var_nextname(size_t *, efi_char *, struct uuid *); int efi_var_set(efi_char *, struct uuid *, uint32_t, size_t, void *); +#endif /* _KERNEL */ + #endif /* _MACHINE_EFI_H_ */ Modified: head/sys/ia64/include/pal.h ============================================================================== --- head/sys/ia64/include/pal.h Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/include/pal.h Mon Mar 21 18:20:53 2011 (r219841) @@ -111,16 +111,12 @@ struct ia64_pal_result { uint64_t pal_result[3]; }; +struct ia64_pal_result ia64_pal_physical(u_long, u_long, u_long, u_long); + struct ia64_pal_result ia64_call_pal_static(uint64_t proc, uint64_t arg1, uint64_t arg2, uint64_t arg3); -struct ia64_pal_result ia64_call_pal_static_physical(uint64_t proc, - uint64_t arg1, uint64_t arg2, uint64_t arg3); - struct ia64_pal_result ia64_call_pal_stacked(uint64_t proc, uint64_t arg1, uint64_t arg2, uint64_t arg3); -struct ia64_pal_result ia64_call_pal_stacked_physical(uint64_t proc, - uint64_t arg1, uint64_t arg2, uint64_t arg3); - #endif /* _MACHINE_PAL_H_ */ Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Mon Mar 21 17:44:52 2011 (r219840) +++ head/sys/ia64/include/vmparam.h Mon Mar 21 18:20:53 2011 (r219841) @@ -124,7 +124,8 @@ #define IA64_RR_BASE(n) (((uint64_t) (n)) << 61) #define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1)) -#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) +#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6)) +#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7)) /* * The Itanium architecture defines that all implementations support at From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 18:49:54 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 799E4106566C; Mon, 21 Mar 2011 18:49:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id EB9D98FC13; Mon, 21 Mar 2011 18:49:53 +0000 (UTC) Received: from c122-107-125-80.carlnfd1.nsw.optusnet.com.au (c122-107-125-80.carlnfd1.nsw.optusnet.com.au [122.107.125.80]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2LInngo015166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Mar 2011 05:49:50 +1100 Date: Tue, 22 Mar 2011 05:49:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Malone In-Reply-To: <20110320094129.GA79235@walton.maths.tcd.ie> Message-ID: <20110322054501.J3574@besplex.bde.org> References: <201103151947.p2FJlK3L057573@svn.freebsd.org> <201103151701.11708.jhb@freebsd.org> <201103151714.15829.jkim@FreeBSD.org> <20110316155820.D4010@besplex.bde.org> <20110320094129.GA79235@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, Bruce Evans , svn-src-head@FreeBSD.org, Jung-uk Kim Subject: Re: svn commit: r219676 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 18:49:54 -0000 On Sun, 20 Mar 2011, David Malone wrote: > On Wed, Mar 16, 2011 at 04:34:10PM +1100, Bruce Evans wrote: >> Please revert. I use this for setting timecounters from userland. The >> sysctl is not a hack, but the primary user interface for managing the >> TSC frequency. The kern.timecounter.tc.TSC.frequency sysctl is >> secondary, and is readonly anyway, so it cannot be used to manage the >> TSC frequency or even the timecounter frequency. > > Some people have asked me if I can make kern.timecounter.tc.*.frequency > writeable. I have it on my list of jobs to look at, but haven't had > a chance yet. Are there any obvious problems with this? No new ones. Just the old ones of updating the frequency and all related variables without races. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 20:02:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DBC2106568B; Mon, 21 Mar 2011 20:02:20 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5D47D8FC14; Mon, 21 Mar 2011 20:02:20 +0000 (UTC) Received: from [78.34.140.110] (helo=r500.local) by smtprelay03.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Q1l8T-00013C-V6; Mon, 21 Mar 2011 20:51:30 +0100 Date: Mon, 21 Mar 2011 20:42:38 +0100 From: Fabian Keil To: Glen Barber Message-ID: <20110321204238.23406a66@r500.local> In-Reply-To: <201103202247.p2KMlfjk091578@svn.freebsd.org> References: <201103202247.p2KMlfjk091578@svn.freebsd.org> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/XkrBKcXmGH1C29go_NkB8MK"; protocol="application/pgp-signature" X-Df-Sender: 775067 Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r219805 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 20:02:20 -0000 --Sig_/XkrBKcXmGH1C29go_NkB8MK Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Glen Barber wrote: > Author: gjb (doc committer) > Date: Sun Mar 20 22:47:41 2011 > New Revision: 219805 > URL: http://svn.freebsd.org/changeset/base/219805 >=20 > Log: > Use 'list scan' in favor of 'scan', as 'scan' has a different purpose. > =20 > Pointed out by: bschmidt > MFC after: 1 day >=20 > Modified: > head/sbin/ifconfig/ifconfig.8 >=20 > Modified: head/sbin/ifconfig/ifconfig.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/ifconfig/ifconfig.8 Sun Mar 20 21:05:09 2011 (r219804) > +++ head/sbin/ifconfig/ifconfig.8 Sun Mar 20 22:47:41 2011 (r219805) > @@ -2539,7 +2539,7 @@ Destroy the software network interface > .Pp The next line seems to be incorrect now. > Scan for wireless networks using > .Li wlan0 : > -.Dl # ifconfig wlan0 scan > +.Dl # ifconfig wlan0 list scan Fabian --Sig_/XkrBKcXmGH1C29go_NkB8MK Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk2HqjEACgkQBYqIVf93VJ2njwCdHm2GSyHMRaZFMYDoPVHESrTe LfQAnRXX0XreS5DVexYcPxLqqRdGbhas =uxdl -----END PGP SIGNATURE----- --Sig_/XkrBKcXmGH1C29go_NkB8MK-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 20:58:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4505106566B; Mon, 21 Mar 2011 20:58:43 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA428FC15; Mon, 21 Mar 2011 20:58:42 +0000 (UTC) Received: by vws18 with SMTP id 18so6140331vws.13 for ; Mon, 21 Mar 2011 13:58:42 -0700 (PDT) Received: by 10.220.193.193 with SMTP id dv1mr1334758vcb.95.1300741122313; Mon, 21 Mar 2011 13:58:42 -0700 (PDT) Received: from [10.0.1.198] ([72.253.42.56]) by mx.google.com with ESMTPS id b26sm3995229vby.3.2011.03.21.13.58.37 (version=SSLv3 cipher=OTHER); Mon, 21 Mar 2011 13:58:40 -0700 (PDT) Date: Mon, 21 Mar 2011 11:02:10 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Michael Moll In-Reply-To: <20110321174753.GB32285@darkthrone.kvedulv.de> Message-ID: References: <4D840BD0.4030306@freebsd.org> <201103200000.p2K00pue003373@chez.mckusick.com> <20110320162212.GI1606@alchemy.franken.de> <20110321174753.GB32285@darkthrone.kvedulv.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, Jeff Roberson , Kirk McKusick , Gavin Atkinson , Nathan Whitehorn , Marius Strobl , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 20:58:43 -0000 On Mon, 21 Mar 2011, Michael Moll wrote: > Hi All, > > On Sun, Mar 20, 2011 at 05:22:12PM +0100, Marius Strobl wrote: >> I fear it's still a bit premature for enable SU+J by default. Rather >> recently I was told about a SU+J filesystems lost after a panic >> that happend after snapshotting it (report CC'ed, maybe he can >> provide some more details) and I'm pretty sure I've seen the problem >> described in PR 149022 also after the potential fix mentioned in its >> feedback. > > Sorry, no details available, as I didn't record the panic and problems > back then. However this was not the first panic which I attribute (maybe > wrongly) to SUJ and as an consequence now all my UFS filesystems have > SUJ turned off again. If SUJ really is going to be the default I would > expact quite some fallout from this after my experiences. > How long ago was this? We fixed quite a number of bugs a few months ago. Thanks, Jeff > Kind Regards > -- > Michael Moll > From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:14:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC448106567B; Mon, 21 Mar 2011 21:14:07 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3A98FC16; Mon, 21 Mar 2011 21:14:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLE72L020914; Mon, 21 Mar 2011 21:14:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLE7Hs020912; Mon, 21 Mar 2011 21:14:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103212114.p2LLE7Hs020912@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 21:14: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: r219843 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:14:08 -0000 Author: pjd Date: Mon Mar 21 21:14:07 2011 New Revision: 219843 URL: http://svn.freebsd.org/changeset/base/219843 Log: Fix typo. MFC after: 1 week Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Mon Mar 21 18:39:42 2011 (r219842) +++ head/sbin/hastd/secondary.c Mon Mar 21 21:14:07 2011 (r219843) @@ -277,7 +277,7 @@ init_remote(struct hast_resource *res, s /* Is primary is out-of-date? */ (res->hr_secondary_localcnt > res->hr_primary_remotecnt && res->hr_secondary_remotecnt == res->hr_primary_localcnt) || - /* Node are more or less in sync? */ + /* Nodes are more or less in sync? */ (res->hr_secondary_localcnt == res->hr_primary_remotecnt && res->hr_secondary_remotecnt == res->hr_primary_localcnt) || /* Is secondary is out-of-date? */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:16:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08A331065670; Mon, 21 Mar 2011 21:16:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC9AA8FC0C; Mon, 21 Mar 2011 21:16:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLGCXQ020996; Mon, 21 Mar 2011 21:16:12 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLGCRs020994; Mon, 21 Mar 2011 21:16:12 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103212116.p2LLGCRs020994@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 21:16: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: r219844 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:16:13 -0000 Author: pjd Date: Mon Mar 21 21:16:12 2011 New Revision: 219844 URL: http://svn.freebsd.org/changeset/base/219844 Log: Initialize localcnt on first write. This fixes assertion when we create resource, set role to primary, do no writes, then sent it to secondary and accept connection from primary. MFC after: 1 week Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Mar 21 21:14:07 2011 (r219843) +++ head/sbin/hastd/primary.c Mon Mar 21 21:16:12 2011 (r219844) @@ -478,7 +478,7 @@ init_local(struct hast_resource *res) * that there were no writes yet, so there is no need to synchronize * anything. */ - res->hr_primary_localcnt = 1; + res->hr_primary_localcnt = 0; res->hr_primary_remotecnt = 0; if (metadata_write(res) < 0) exit(EX_NOINPUT); @@ -1093,7 +1093,11 @@ ggate_recv_thread(void *arg) break; case BIO_WRITE: if (res->hr_resuid == 0) { - /* This is first write, initialize resuid. */ + /* + * This is first write, initialize localcnt and + * resuid. + */ + res->hr_primary_localcnt = 1; (void)init_resuid(res); } for (;;) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:16:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B77E1065845; Mon, 21 Mar 2011 21:16:25 +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 8AAE18FC1B; Mon, 21 Mar 2011 21:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLGP0s021035; Mon, 21 Mar 2011 21:16:25 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLGPGF021033; Mon, 21 Mar 2011 21:16:25 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201103212116.p2LLGPGF021033@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 21 Mar 2011 21:16: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: r219845 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:16:25 -0000 Author: hselasky Date: Mon Mar 21 21:16:25 2011 New Revision: 219845 URL: http://svn.freebsd.org/changeset/base/219845 Log: - Bugfix: Fix a EHCI hardware race, where the hardware computed data toggle value is updated after that we read it in the queue-head. This patch can fix problems with BULK timeouts. The issue was found on a Nvidia chipset. MFC after: 14 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Mon Mar 21 21:16:12 2011 (r219844) +++ head/sys/dev/usb/controller/ehci.c Mon Mar 21 21:16:25 2011 (r219845) @@ -1180,6 +1180,26 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ return (last); } +static void +ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t xlen) +{ + uint8_t full = (actlen == xlen); + uint8_t dt; + + /* count number of full packets */ + dt = (actlen / xfer->max_packet_size) & 1; + + /* cumpute remainder */ + actlen = actlen % xfer->max_packet_size; + + if (actlen > 0) + dt ^= 1; /* short packet at the end */ + else if (!full) + dt ^= 1; /* zero length packet at the end */ + + xfer->endpoint->toggle_next ^= dt; +} + static usb_error_t ehci_non_isoc_done_sub(struct usb_xfer *xfer) { @@ -1213,7 +1233,10 @@ ehci_non_isoc_done_sub(struct usb_xfer * status |= EHCI_QTD_HALTED; } else if (xfer->aframes != xfer->nframes) { xfer->frlengths[xfer->aframes] += td->len - len; + /* manually update data toggle */ + ehci_data_toggle_update(xfer, td->len - len, td->len); } + /* Check for last transfer */ if (((void *)td) == xfer->td_transfer_last) { td = NULL; @@ -1295,9 +1318,6 @@ ehci_non_isoc_done(struct usb_xfer *xfer status = hc32toh(sc, qh->qh_qtd.qtd_status); - xfer->endpoint->toggle_next = - (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0; - /* reset scanner */ xfer->td_transfer_cache = xfer->td_transfer_first; @@ -1876,6 +1896,8 @@ ehci_setup_standard_chain(struct usb_xfe if (xfer->flags_int.control_xfr) { if (xfer->flags_int.control_hdr) { + xfer->endpoint->toggle_next = 0; + temp.qtd_status &= htohc32(temp.sc, EHCI_QTD_SET_CERR(3)); temp.qtd_status |= htohc32(temp.sc, From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:16:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A682106595C; Mon, 21 Mar 2011 21:16:41 +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 2EEEE8FC25; Mon, 21 Mar 2011 21:16:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLGfj4021079; Mon, 21 Mar 2011 21:16:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLGfaB021074; Mon, 21 Mar 2011 21:16:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103212116.p2LLGfaB021074@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 21 Mar 2011 21:16: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: r219846 - in head/sys/ofed: drivers/infiniband/hw/mthca include/linux include/rdma X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:16:41 -0000 Author: kib Date: Mon Mar 21 21:16:40 2011 New Revision: 219846 URL: http://svn.freebsd.org/changeset/base/219846 Log: Allow the ofed modules to be compiled on i386. Reviewed by: jeff Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c head/sys/ofed/include/linux/gfp.h head/sys/ofed/include/linux/scatterlist.h head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Mon Mar 21 21:16:25 2011 (r219845) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Mon Mar 21 21:16:40 2011 (r219846) @@ -1228,8 +1228,8 @@ static int __devinit mthca_init_one(stru } if (id->driver_data >= ARRAY_SIZE(mthca_hca_table)) { - printk(KERN_ERR PFX "%s has invalid driver data %lx\n", - pci_name(pdev), id->driver_data); + printk(KERN_ERR PFX "%s has invalid driver data %jx\n", + pci_name(pdev), (uintmax_t)id->driver_data); mutex_unlock(&mthca_device_mutex); return -ENODEV; } Modified: head/sys/ofed/include/linux/gfp.h ============================================================================== --- head/sys/ofed/include/linux/gfp.h Mon Mar 21 21:16:25 2011 (r219845) +++ head/sys/ofed/include/linux/gfp.h Mon Mar 21 21:16:40 2011 (r219846) @@ -56,7 +56,8 @@ page_address(struct page *page) if (page->object != kmem_object && page->object != kernel_object) return (NULL); - return (void *)(VM_MIN_KERNEL_ADDRESS + IDX_TO_OFF(page->pindex)); + return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS + + IDX_TO_OFF(page->pindex))); } static inline unsigned long Modified: head/sys/ofed/include/linux/scatterlist.h ============================================================================== --- head/sys/ofed/include/linux/scatterlist.h Mon Mar 21 21:16:25 2011 (r219845) +++ head/sys/ofed/include/linux/scatterlist.h Mon Mar 21 21:16:40 2011 (r219846) @@ -36,7 +36,7 @@ struct scatterlist { struct page *page; struct scatterlist *sg; } sl_un; - unsigned long address; + dma_addr_t address; unsigned long offset; uint32_t length; uint32_t flags; Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Mon Mar 21 21:16:25 2011 (r219845) +++ head/sys/ofed/include/rdma/ib_addr.h Mon Mar 21 21:16:40 2011 (r219846) @@ -247,6 +247,7 @@ static inline int iboe_get_rate(struct n #else static inline int iboe_get_rate(struct net_device *dev) { +#ifdef __amd64__ if (dev->if_baudrate >= IF_Gbps(40ULL)) return IB_RATE_40_GBPS; else if (dev->if_baudrate >= IF_Gbps(30ULL)) @@ -256,6 +257,7 @@ static inline int iboe_get_rate(struct n else if (dev->if_baudrate >= IF_Gbps(10ULL)) return IB_RATE_10_GBPS; else +#endif return IB_RATE_PORT_CURRENT; } #endif From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:31:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F000106566B; Mon, 21 Mar 2011 21:31:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2E08FC1C; Mon, 21 Mar 2011 21:31:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLVp5v021443; Mon, 21 Mar 2011 21:31:51 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLVpT3021437; Mon, 21 Mar 2011 21:31:51 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103212131.p2LLVpT3021437@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 21 Mar 2011 21:31: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: r219847 - in head/sbin: hastctl hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:31:51 -0000 Author: pjd Date: Mon Mar 21 21:31:50 2011 New Revision: 219847 URL: http://svn.freebsd.org/changeset/base/219847 Log: When dropping privileges prefer capsicum over chroot+setgid+setuid. We can use capsicum for secondary worker processes and hastctl. When working as primary we drop privileges using chroot+setgid+setuid still as we need to send ioctl(2)s to ggate device, for which capsicum doesn't allow (yet). X-MFC after: capsicum is merged to stable/8 Modified: head/sbin/hastctl/hastctl.c head/sbin/hastd/primary.c head/sbin/hastd/secondary.c head/sbin/hastd/subr.c head/sbin/hastd/subr.h Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Mon Mar 21 21:16:40 2011 (r219846) +++ head/sbin/hastctl/hastctl.c Mon Mar 21 21:31:50 2011 (r219847) @@ -480,9 +480,8 @@ main(int argc, char *argv[]) cfg->hc_controladdr); } - if (drop_privs() != 0) + if (drop_privs(true) != 0) exit(EX_CONFIG); - pjdlog_debug(1, "Privileges successfully dropped."); /* Send the command to the server... */ if (hast_proto_send(NULL, controlconn, nv, NULL, 0) < 0) { Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Mar 21 21:16:40 2011 (r219846) +++ head/sbin/hastd/primary.c Mon Mar 21 21:31:50 2011 (r219847) @@ -874,7 +874,7 @@ hastd_primary(struct hast_resource *res) init_ggate(res); init_environment(res); - if (drop_privs() != 0) { + if (drop_privs(true) != 0) { cleanup(res); exit(EX_CONFIG); } Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Mon Mar 21 21:16:40 2011 (r219846) +++ head/sbin/hastd/secondary.c Mon Mar 21 21:31:50 2011 (r219847) @@ -440,7 +440,7 @@ hastd_secondary(struct hast_resource *re init_local(res); init_environment(); - if (drop_privs() != 0) + if (drop_privs(true) != 0) exit(EX_CONFIG); pjdlog_info("Privileges successfully dropped."); Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Mon Mar 21 21:16:40 2011 (r219846) +++ head/sbin/hastd/subr.c Mon Mar 21 21:31:50 2011 (r219847) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -39,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -144,13 +146,22 @@ role2str(int role) } int -drop_privs(void) +drop_privs(bool usecapsicum) { struct passwd *pw; uid_t ruid, euid, suid; gid_t rgid, egid, sgid; gid_t gidset[1]; + if (usecapsicum) { + if (cap_enter() == 0) { + pjdlog_debug(1, + "Privileges successfully dropped using capsicum."); + return (0); + } + pjdlog_errno(LOG_WARNING, "Unable to sandbox using capsicum"); + } + /* * According to getpwnam(3) we have to clear errno before calling the * function to be able to distinguish between an error and missing @@ -208,5 +219,8 @@ drop_privs(void) PJDLOG_VERIFY(getgroups(1, gidset) == 1); PJDLOG_VERIFY(gidset[0] == pw->pw_gid); + pjdlog_debug(1, + "Privileges successfully dropped using chroot+setgid+setuid."); + return (0); } Modified: head/sbin/hastd/subr.h ============================================================================== --- head/sbin/hastd/subr.h Mon Mar 21 21:16:40 2011 (r219846) +++ head/sbin/hastd/subr.h Mon Mar 21 21:31:50 2011 (r219847) @@ -50,6 +50,6 @@ int snprlcat(char *str, size_t size, con int provinfo(struct hast_resource *res, bool dowrite); const char *role2str(int role); -int drop_privs(void); +int drop_privs(bool usecapsicum); #endif /* !_SUBR_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:34:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 976B5106566B; Mon, 21 Mar 2011 21:34:12 +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 868938FC18; Mon, 21 Mar 2011 21:34:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLYCUR021529; Mon, 21 Mar 2011 21:34:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLYCqO021527; Mon, 21 Mar 2011 21:34:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201103212134.p2LLYCqO021527@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 21 Mar 2011 21:34: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: r219848 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:34:12 -0000 Author: hselasky Date: Mon Mar 21 21:34:12 2011 New Revision: 219848 URL: http://svn.freebsd.org/changeset/base/219848 Log: - Do not output the trailing newline to the HID report descriptor information, sysctl utility will show it for us. - Modify sysctl node description to make it more understanable. Found by: Alexander Best Submitted by: Eygene Ryabinkin MFC after: 14 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Mon Mar 21 21:31:50 2011 (r219847) +++ head/sys/dev/usb/input/ums.c Mon Mar 21 21:34:12 2011 (r219848) @@ -668,7 +668,7 @@ ums_attach(device_t dev) SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, sc, 0, ums_sysctl_handler_parseinfo, - "", "Dump UMS report parsing information"); + "", "Dump of parsed HID report descriptor"); return (0); @@ -949,10 +949,10 @@ ums_sysctl_handler_parseinfo(SYSCTL_HAND struct ums_softc *sc = arg1; struct ums_info *info; struct sbuf *sb; - int i, j, err; + int i, j, err, had_output; sb = sbuf_new_auto(); - for (i = 0; i < UMS_INFO_MAX; i++) { + for (i = 0, had_output = 0; i < UMS_INFO_MAX; i++) { info = &sc->sc_info[i]; /* Don't emit empty info */ @@ -962,6 +962,9 @@ ums_sysctl_handler_parseinfo(SYSCTL_HAND info->sc_buttons == 0) continue; + if (had_output) + sbuf_printf(sb, "\n"); + had_output = 1; sbuf_printf(sb, "i%d:", i + 1); if (info->sc_flags & UMS_FLAG_X_AXIS) sbuf_printf(sb, " X:r%d, p%d, s%d;", @@ -995,7 +998,6 @@ ums_sysctl_handler_parseinfo(SYSCTL_HAND (int)info->sc_loc_btn[j].pos, (int)info->sc_loc_btn[j].size); } - sbuf_printf(sb, "\n"); } sbuf_finish(sb); err = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 21:35:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DEF106564A; Mon, 21 Mar 2011 21:35:20 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 349F98FC1E; Mon, 21 Mar 2011 21:35:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LLZKg0021592; Mon, 21 Mar 2011 21:35:20 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LLZKUW021590; Mon, 21 Mar 2011 21:35:20 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103212135.p2LLZKUW021590@svn.freebsd.org> From: Jeff Roberson Date: Mon, 21 Mar 2011 21:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219849 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 21:35:20 -0000 Author: jeff Date: Mon Mar 21 21:35:19 2011 New Revision: 219849 URL: http://svn.freebsd.org/changeset/base/219849 Log: - For now, disable ofed module build unless MK_OFED is set. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Mar 21 21:34:12 2011 (r219848) +++ head/sys/modules/Makefile Mon Mar 21 21:35:19 2011 (r219849) @@ -185,9 +185,9 @@ SUBDIR= ${_3dfx} \ mfi \ mii \ mlx \ - mlx4 \ - mlx4ib \ - mlxen \ + ${_mlx4} \ + ${_mlx4ib} \ + ${_mlxen} \ ${_mly} \ mmc \ mmcsd \ @@ -198,7 +198,7 @@ SUBDIR= ${_3dfx} \ msdosfs_iconv \ ${_mse} \ msk \ - mthca \ + ${_mthca} \ mvs \ mwl \ mwlfw \ @@ -673,6 +673,13 @@ _zfs= zfs .endif .endif +.if ${MK_OFED} != "no" || defined(ALL_MODULES) +_mthca= mthca +_mlx4= mlx4 +_mlx4ib= mlx4ib +_mlxen= mlxen +.endif + .if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES) SUBDIR=${MODULES_OVERRIDE} .endif @@ -690,5 +697,6 @@ afterinstall: kldxref ${DESTDIR}${KMODDIR}; \ fi .endif +#endif .include From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 23:04:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA89D106566B; Mon, 21 Mar 2011 23:04:39 +0000 (UTC) (envelope-from mmoll@darkthrone.kvedulv.de) Received: from darkthrone.kvedulv.de (darkthrone.kvedulv.de [IPv6:2001:1578:400:101::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7A5E78FC0A; Mon, 21 Mar 2011 23:04:39 +0000 (UTC) Received: by darkthrone.kvedulv.de (Postfix, from userid 666) id 3D6C61CC6E; Tue, 22 Mar 2011 00:04:38 +0100 (CET) Date: Tue, 22 Mar 2011 00:04:38 +0100 From: Michael Moll To: Jeff Roberson Message-ID: <20110321230437.GE32285@darkthrone.kvedulv.de> References: <4D840BD0.4030306@freebsd.org> <201103200000.p2K00pue003373@chez.mckusick.com> <20110320162212.GI1606@alchemy.franken.de> <20110321174753.GB32285@darkthrone.kvedulv.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Mon, 21 Mar 2011 23:37:12 +0000 Cc: src-committers@freebsd.org, Michael Moll , Jeff Roberson , Kirk McKusick , Gavin Atkinson , Nathan Whitehorn , Marius Strobl , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r219667 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 23:04:40 -0000 Hi, On Mon, Mar 21, 2011 at 11:02:10AM -1000, Jeff Roberson wrote: > >Sorry, no details available, as I didn't record the panic and problems > >back then. However this was not the first panic which I attribute (maybe > >wrongly) to SUJ and as an consequence now all my UFS filesystems have > >SUJ turned off again. If SUJ really is going to be the default I would > >expact quite some fallout from this after my experiences. > > How long ago was this? Almost exactly two months ago. 19./20.01.2011 Regards -- Michael Moll From owner-svn-src-all@FreeBSD.ORG Mon Mar 21 23:59:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57584106566C; Mon, 21 Mar 2011 23:59:20 +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 476288FC0C; Mon, 21 Mar 2011 23:59:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2LNxKZj028345; Mon, 21 Mar 2011 23:59:20 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2LNxKNo028343; Mon, 21 Mar 2011 23:59:20 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201103212359.p2LNxKNo028343@svn.freebsd.org> From: Glen Barber Date: Mon, 21 Mar 2011 23: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: r219850 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 23:59:20 -0000 Author: gjb (doc committer) Date: Mon Mar 21 23:59:20 2011 New Revision: 219850 URL: http://svn.freebsd.org/changeset/base/219850 Log: s/buffer/buf as is used in the code. Submitted by: arundel (via doc@) MFC after: 3 days Modified: head/lib/libutil/humanize_number.3 Modified: head/lib/libutil/humanize_number.3 ============================================================================== --- head/lib/libutil/humanize_number.3 Mon Mar 21 21:35:19 2011 (r219849) +++ head/lib/libutil/humanize_number.3 Mon Mar 21 23:59:20 2011 (r219850) @@ -49,12 +49,12 @@ The function formats the signed 64-bit quantity given in .Fa number into -.Fa buffer . +.Fa buf . A space and then .Fa suffix is appended to the end. The buffer pointed to by -.Fa buffer +.Fa buf must be at least .Fa len bytes long. @@ -62,7 +62,7 @@ bytes long. If the formatted number (including .Fa suffix ) would be too long to fit into -.Fa buffer , +.Fa buf , then divide .Fa number by 1024 until it will. @@ -91,7 +91,7 @@ The argument must be at least 4 plus the length of .Fa suffix , in order to ensure a useful result is generated into -.Fa buffer . +.Fa buf . To use a specific prefix, specify this as .Fa scale (multiplier = 1024 ^ scale). @@ -132,7 +132,7 @@ with 1000 instead of 1024. The .Fn humanize_number function returns the number of characters stored in -.Fa buffer +.Fa buf (excluding the terminating .Dv NUL ) upon success, or \-1 upon failure. From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 00:11:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 043CC106564A; Tue, 22 Mar 2011 00:11:05 +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 E83F58FC1B; Tue, 22 Mar 2011 00:11:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M0B4rw029531; Tue, 22 Mar 2011 00:11:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M0B4sW029529; Tue, 22 Mar 2011 00:11:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220011.p2M0B4sW029529@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 00:11: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: r219851 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 00:11:05 -0000 Author: adrian Date: Tue Mar 22 00:11:04 2011 New Revision: 219851 URL: http://svn.freebsd.org/changeset/base/219851 Log: Remove the merlin delay workaround here, it isn't appropriate for the analog bank writes as Merlin never does them. 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 Mon Mar 21 23:59:20 2011 (r219850) +++ head/sys/dev/ath/ath_hal/ah.c Tue Mar 22 00:11:04 2011 (r219851) @@ -976,12 +976,6 @@ ath_hal_ini_bank_write(struct ath_hal *a for (r = 0; r < ia->rows; r++) { OS_REG_WRITE(ah, HAL_INI_VAL(ia, r, 0), data[r]); - - /* Analog shift register delay seems needed for Merlin - PR kern/154220 */ - /* XXX verify whether any analog radio bank writes will hit up this */ - /* XXX since this is a merlin work-around; and merlin doesn't use radio banks */ - if (HAL_INI_VAL(ia, r, 0) >= 0x7800 && HAL_INI_VAL(ia, r, 0) < 0x78a0) - OS_DELAY(100); DMA_YIELD(regWr); } return regWr; From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 00:12:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0367F106566B; Tue, 22 Mar 2011 00:12:27 +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 CC4088FC16; Tue, 22 Mar 2011 00:12:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M0CQnh029692; Tue, 22 Mar 2011 00:12:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M0CQo2029688; Tue, 22 Mar 2011 00:12:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220012.p2M0CQo2029688@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 00:12: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: r219852 - in head/sys/dev/ath/ath_hal: ar9001 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 00:12:27 -0000 Author: adrian Date: Tue Mar 22 00:12:26 2011 New Revision: 219852 URL: http://svn.freebsd.org/changeset/base/219852 Log: Even though it's very unlikely the misc mode register setting at -attach- would be a problem, make sure it isn't overwritten by whatever is in there at cold reset. This brings the > ar5416 init path treatment of AR_MISC_MODE. Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Tue Mar 22 00:11:04 2011 (r219851) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Tue Mar 22 00:12:26 2011 (r219852) @@ -247,7 +247,7 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s * placed into hardware. */ if (ahp->ah_miscMode != 0) - OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode); ar9160AniSetup(ah); /* Anti Noise Immunity */ Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Tue Mar 22 00:11:04 2011 (r219851) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Tue Mar 22 00:12:26 2011 (r219852) @@ -333,7 +333,7 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s * placed into hardware. */ if (ahp->ah_miscMode != 0) - OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode); ar9280AniSetup(ah); /* Anti Noise Immunity */ Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Mar 22 00:11:04 2011 (r219851) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Tue Mar 22 00:12:26 2011 (r219852) @@ -284,7 +284,7 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s * placed into hardware. */ if (ahp->ah_miscMode != 0) - OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode); ar9285AniSetup(ah); /* Anti Noise Immunity */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 00:14:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0C591065673; Tue, 22 Mar 2011 00:14: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 A08B98FC1C; Tue, 22 Mar 2011 00:14:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M0EHOO029921; Tue, 22 Mar 2011 00:14:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M0EHCu029919; Tue, 22 Mar 2011 00:14:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220014.p2M0EHCu029919@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 00:14: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: r219853 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 00:14:17 -0000 Author: adrian Date: Tue Mar 22 00:14:17 2011 New Revision: 219853 URL: http://svn.freebsd.org/changeset/base/219853 Log: Bring over a few queue changes from ath9k: * add pspoll/uapsd queue setup defaults; * enable the exponential backoff window rather than the random backoff window when doing TX contention management. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Mar 22 00:12:26 2011 (r219852) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Mar 22 00:14:17 2011 (r219853) @@ -779,6 +779,14 @@ ar5416SetupTxQueue(struct ath_hal *ah, H | HAL_TXQ_ARB_LOCKOUT_GLOBAL | HAL_TXQ_BACKOFF_DISABLE; break; + case HAL_TX_QUEUE_PSPOLL: + q = 1; /* lowest priority */ + defqflags |= HAL_TXQ_DBA_GATED + | HAL_TXQ_CBR_DIS_QEMPTY + | HAL_TXQ_CBR_DIS_BEMPTY + | HAL_TXQ_ARB_LOCKOUT_GLOBAL + | HAL_TXQ_BACKOFF_DISABLE; + break; case HAL_TX_QUEUE_UAPSD: q = pCap->halTotalQueues-3; /* nextest highest priority */ if (ahp->ah_txq[q].tqi_type != HAL_TX_QUEUE_INACTIVE) { @@ -919,6 +927,9 @@ ar5416ResetTxQueue(struct ath_hal *ah, u /* NB: always enable DCU to wait for next fragment from QCU */ dmisc = AR_D_MISC_FRAG_WAIT_EN; + /* Enable exponential backoff window */ + dmisc |= AR_D_MISC_BKOFF_PERSISTENCE; + /* * The chip reset default is to use a DCU backoff threshold of 0x2. * Restore this when programming the DCU MISC register. @@ -1021,6 +1032,12 @@ ar5416ResetTxQueue(struct ath_hal *ah, u dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL, AR_D_MISC_ARB_LOCKOUT_CNTRL); break; + case HAL_TX_QUEUE_PSPOLL: + qmisc |= AR_Q_MISC_CBR_INCR_DIS1; + break; + case HAL_TX_QUEUE_UAPSD: + dmisc |= AR_D_MISC_POST_FR_BKOFF_DIS; + break; default: /* NB: silence compiler */ break; } From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 00:43:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B69861065679; Tue, 22 Mar 2011 00:43:58 +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 8C1408FC08; Tue, 22 Mar 2011 00:43:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M0hwDe032613; Tue, 22 Mar 2011 00:43:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M0hwIg032611; Tue, 22 Mar 2011 00:43:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220043.p2M0hwIg032611@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 00:43: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: r219854 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 00:43:58 -0000 Author: adrian Date: Tue Mar 22 00:43:58 2011 New Revision: 219854 URL: http://svn.freebsd.org/changeset/base/219854 Log: Do a bit of spring cleaning in the board setup code, just to bring it in line with the rest of the register initialisation. I've verified that the 2/5ghz board values written to the chip match what was previously written. 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 Tue Mar 22 00:14:17 2011 (r219853) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Mar 22 00:43:58 2011 (r219854) @@ -1317,16 +1317,12 @@ ar5416SetDefGainValues(struct ath_hal *a AR_PHY_GAIN_2GHZ_XATTEN2_DB, pModal->xatten2Db[i]); } else { - OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) & - ~AR_PHY_GAIN_2GHZ_BSW_MARGIN) - | SM(pModal-> bswMargin[i], - AR_PHY_GAIN_2GHZ_BSW_MARGIN)); - OS_REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) & - ~AR_PHY_GAIN_2GHZ_BSW_ATTEN) - | SM(pModal->bswAtten[i], - AR_PHY_GAIN_2GHZ_BSW_ATTEN)); + OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, + AR_PHY_GAIN_2GHZ_BSW_MARGIN, + pModal->bswMargin[i]); + OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, + AR_PHY_GAIN_2GHZ_BSW_ATTEN, + pModal->bswAtten[i]); } } @@ -1338,16 +1334,12 @@ ar5416SetDefGainValues(struct ath_hal *a AR_PHY_RXGAIN + regChainOffset, AR9280_PHY_RXGAIN_TXRX_MARGIN, pModal->rxTxMarginCh[i]); } else { - OS_REG_WRITE(ah, + OS_REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset, - (OS_REG_READ(ah, AR_PHY_RXGAIN + regChainOffset) & - ~AR_PHY_RXGAIN_TXRX_ATTEN) - | SM(txRxAttenLocal, AR_PHY_RXGAIN_TXRX_ATTEN)); - OS_REG_WRITE(ah, + AR_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal); + OS_REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, - (OS_REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) & - ~AR_PHY_GAIN_2GHZ_RXTX_MARGIN) | - SM(pModal->rxTxMarginCh[i], AR_PHY_GAIN_2GHZ_RXTX_MARGIN)); + AR_PHY_GAIN_2GHZ_RXTX_MARGIN, pModal->rxTxMarginCh[i]); } } From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 00:52:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59D1E106567A; Tue, 22 Mar 2011 00:52:45 +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 312B08FC0A; Tue, 22 Mar 2011 00:52:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M0qjgJ033418; Tue, 22 Mar 2011 00:52:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M0qjvd033416; Tue, 22 Mar 2011 00:52:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220052.p2M0qjvd033416@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 00:52: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: r219855 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 00:52:45 -0000 Author: adrian Date: Tue Mar 22 00:52:44 2011 New Revision: 219855 URL: http://svn.freebsd.org/changeset/base/219855 Log: Break out the RF mode setup into ar5416SetRfMode(), mirroring what ath9k does. 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 Tue Mar 22 00:43:58 2011 (r219854) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Mar 22 00:52:44 2011 (r219855) @@ -598,6 +598,29 @@ ar5416InitUserSettings(struct ath_hal *a #endif } +static void +ar5416SetRfMode(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ + uint32_t rfMode; + + if (chan == AH_NULL) + return; + + /* treat channel B as channel G , no B mode suport in owl */ + rfMode = IEEE80211_IS_CHAN_CCK(chan) ? + AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM; + + if (AR_SREV_MERLIN_20(ah) && IS_5GHZ_FAST_CLOCK_EN(ah, chan)) { + /* phy mode bits for 5GHz channels require Fast Clock */ + rfMode |= AR_PHY_MODE_DYNAMIC + | AR_PHY_MODE_DYN_CCK_DISABLE; + } else if (!AR_SREV_MERLIN_10_OR_LATER(ah)) { + rfMode |= IEEE80211_IS_CHAN_5GHZ(chan) ? + AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ; + } + OS_REG_WRITE(ah, AR_PHY_MODE, rfMode); +} + /* * Places the hardware into reset and then pulls it out of reset */ @@ -629,22 +652,9 @@ ar5416ChipReset(struct ath_hal *ah, cons * with an active radio can result in corrupted shifts to the * radio device. */ - if (chan != AH_NULL) { - uint32_t rfMode; + if (chan != AH_NULL) + ar5416SetRfMode(ah, chan); - /* treat channel B as channel G , no B mode suport in owl */ - rfMode = IEEE80211_IS_CHAN_CCK(chan) ? - AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM; - if (AR_SREV_MERLIN_20(ah) && IS_5GHZ_FAST_CLOCK_EN(ah, chan)) { - /* phy mode bits for 5GHz channels require Fast Clock */ - rfMode |= AR_PHY_MODE_DYNAMIC - | AR_PHY_MODE_DYN_CCK_DISABLE; - } else if (!AR_SREV_MERLIN_10_OR_LATER(ah)) { - rfMode |= IEEE80211_IS_CHAN_5GHZ(chan) ? - AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ; - } - OS_REG_WRITE(ah, AR_PHY_MODE, rfMode); - } return AH_TRUE; } From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 01:14:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8565A1065673; Tue, 22 Mar 2011 01:14:53 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7432D8FC1E; Tue, 22 Mar 2011 01:14:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M1Eru8035814; Tue, 22 Mar 2011 01:14:53 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M1Ermk035805; Tue, 22 Mar 2011 01:14:53 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103220114.p2M1Ermk035805@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 22 Mar 2011 01:14: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: r219856 - in head/release: . amd64 i386 ia64 powerpc sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 01:14:53 -0000 Author: nwhitehorn Date: Tue Mar 22 01:14:53 2011 New Revision: 219856 URL: http://svn.freebsd.org/changeset/base/219856 Log: Use labels to find release media instead of hard-coded device paths. This makes booting more reliable (and working at all on USB sticks). While here, move responsibility for setting up fstab into the various platform mk-*.sh scripts. Suggested by: many Modified: head/release/Makefile head/release/amd64/make-memstick.sh head/release/amd64/mkisoimages.sh head/release/i386/make-memstick.sh head/release/i386/mkisoimages.sh head/release/ia64/mkisoimages.sh head/release/powerpc/mkisoimages.sh head/release/sparc64/mkisoimages.sh Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/Makefile Tue Mar 22 01:14:53 2011 (r219856) @@ -127,9 +127,7 @@ system: packagesystem touch ${.OBJDIR}/${.TARGET} release.iso: system - echo kernel_options=\"-C\" > ${.OBJDIR}/release/boot/loader.conf sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.OBJDIR}/release.iso ${.OBJDIR}/release - rm ${.OBJDIR}/release/boot/loader.conf memstick: system sh ${.CURDIR}/${TARGET}/make-memstick.sh ${.OBJDIR}/release ${.OBJDIR}/memstick Modified: head/release/amd64/make-memstick.sh ============================================================================== --- head/release/amd64/make-memstick.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/amd64/make-memstick.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -32,12 +32,14 @@ if [ -e ${2} ]; then exit 1 fi +echo '/dev/gpt/FreeBSD_Install / ufs rw,noatime 1 1' > ${1}/etc/fstab rm -f ${tempfile} -makefs ${tempfile} ${1} +makefs -B little ${tempfile} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi +rm ${1}/etc/fstab # # Use $BLOCKSIZE for transfers to improve efficiency. When calculating @@ -46,7 +48,7 @@ fi # filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 2)) +blocks=$(($filesize / ${BLOCKSIZE} + 256)) dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} if [ $? -ne 0 ]; then echo "creation of image file failed" @@ -59,19 +61,12 @@ if [ $? -ne 0 ]; then exit 1 fi -fdisk -BIq /dev/${unit} -if [ $? -ne 0 ]; then - echo "fdisk failed" - exit 1 -fi - -bsdlabel -B -w /dev/${unit} -if [ $? -ne 0 ]; then - echo "bsdlabel failed" - exit 1 -fi +gpart create -s GPT ${unit} +gpart add -t freebsd-boot -s 64K ${unit} +gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} +gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} -dd if=${tempfile} of=/dev/${unit}a bs=$BLOCKSIZE conv=sync +dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync if [ $? -ne 0 ]; then echo "copying filesystem into image file failed" exit 1 Modified: head/release/amd64/mkisoimages.sh ============================================================================== --- head/release/amd64/mkisoimages.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/amd64/mkisoimages.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -54,4 +54,7 @@ fi LABEL=$1; shift NAME=$1; shift +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +rm $1/etc/fstab + Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/i386/make-memstick.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -32,12 +32,14 @@ if [ -e ${2} ]; then exit 1 fi +echo '/dev/gpt/FreeBSD_Install / ufs rw,noatime 1 1' > ${1}/etc/fstab rm -f ${tempfile} -makefs ${tempfile} ${1} +makefs -B little ${tempfile} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi +rm ${1}/etc/fstab # # Use $BLOCKSIZE for transfers to improve efficiency. When calculating @@ -46,7 +48,7 @@ fi # filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 2)) +blocks=$(($filesize / ${BLOCKSIZE} + 256)) dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} if [ $? -ne 0 ]; then echo "creation of image file failed" @@ -59,19 +61,12 @@ if [ $? -ne 0 ]; then exit 1 fi -fdisk -BIq /dev/${unit} -if [ $? -ne 0 ]; then - echo "fdisk failed" - exit 1 -fi - -bsdlabel -B -w /dev/${unit} -if [ $? -ne 0 ]; then - echo "bsdlabel failed" - exit 1 -fi +gpart create -s GPT ${unit} +gpart add -t freebsd-boot -s 64K ${unit} +gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} +gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} -dd if=${tempfile} of=/dev/${unit}a bs=$BLOCKSIZE conv=sync +dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync if [ $? -ne 0 ]; then echo "copying filesystem into image file failed" exit 1 Modified: head/release/i386/mkisoimages.sh ============================================================================== --- head/release/i386/mkisoimages.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/i386/mkisoimages.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -57,4 +57,7 @@ fi LABEL=$1; shift NAME=$1; shift +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +rm $1/etc/fstab + Modified: head/release/ia64/mkisoimages.sh ============================================================================== --- head/release/ia64/mkisoimages.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/ia64/mkisoimages.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -91,6 +91,8 @@ fi publisher="The FreeBSD Project. http://www.freebsd.org/" +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab $MKISOFS $BOOTOPTS -r -J -V $LABEL -publisher "$publisher" -o $NAME $BASE $* rm -f $BASE/$EFIPART +rm $1/etc/fstab exit 0 Modified: head/release/powerpc/mkisoimages.sh ============================================================================== --- head/release/powerpc/mkisoimages.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/powerpc/mkisoimages.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -54,4 +54,7 @@ fi LABEL=$1; shift NAME=$1; shift +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab mkisofs $bootable -l -r -part -no-desktop -V $LABEL -o $NAME $* +rm $1/etc/fstab + Modified: head/release/sparc64/mkisoimages.sh ============================================================================== --- head/release/sparc64/mkisoimages.sh Tue Mar 22 00:52:44 2011 (r219855) +++ head/release/sparc64/mkisoimages.sh Tue Mar 22 01:14:53 2011 (r219856) @@ -66,5 +66,7 @@ fi LABEL=$1; shift NAME=$1; shift +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +rm $1/etc/fstab rm -f ${IMG} From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 01:21:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3B7A106564A; Tue, 22 Mar 2011 01:21:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C239F8FC0A; Tue, 22 Mar 2011 01:21:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M1Lpi2036668; Tue, 22 Mar 2011 01:21:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M1LpGY036665; Tue, 22 Mar 2011 01:21:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103220121.p2M1LpGY036665@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 22 Mar 2011 01:21: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: r219857 - head/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 01:21:51 -0000 Author: nwhitehorn Date: Tue Mar 22 01:21:51 2011 New Revision: 219857 URL: http://svn.freebsd.org/changeset/base/219857 Log: Update release(7) and build(7) to reflect new release infrastructure for the new installer. Modified: head/share/man/man7/build.7 head/share/man/man7/release.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue Mar 22 01:14:53 2011 (r219856) +++ head/share/man/man7/build.7 Tue Mar 22 01:21:51 2011 (r219857) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2011 +.Dd March 18, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -196,6 +196,13 @@ variable .Va DISTDIR . This target is used while building a release; see .Xr release 7 . +.It Cm packageworld +Archive the results of +.Cm distributeworld , +placing the results in +.Va DISTDIR . +This target is used while building a release; see +.Xr release 7 . .It Cm installworld Install everything built by a preceding .Cm buildworld @@ -248,7 +255,7 @@ Create a build toolchain for each archit Kernel specific build targets in .Pa /usr/src are: -.Bl -tag -width ".Cm reinstallkernel" +.Bl -tag -width ".Cm distributekernel" .It Cm buildkernel Rebuild the kernel and the kernel modules. .It Cm installkernel @@ -265,6 +272,18 @@ and .Va KODIR .Xr make 1 variables. +.It Cm distributekernel +Install the kernel to the directory +.Pa ${DISTDIR}/kernel/boot/kernel . +This target is used while building a release; see +.Xr release 7 . +.It Cm packagekernel +Archive the results of +.Cm distributekernel , +placing the results in +.Va DISTDIR . +This target is used while building a release; see +.Xr release 7 . .It Cm kernel Equivalent to .Cm buildkernel Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Tue Mar 22 01:14:53 2011 (r219856) +++ head/share/man/man7/release.7 Tue Mar 22 01:21:51 2011 (r219857) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2009 +.Dd March 18, 2011 .Dt RELEASE 7 .Os .Sh NAME @@ -45,28 +45,109 @@ installation floppies, and an FTP instal This command is aptly named .Dq Li "make release" . .Pp +For some users, it may be desirable to provide an absolutely clean +build environment, with no local modifications to the source tree or to +.Xr make.conf 5 , +and with clean checkouts of specific versions of the doc, src, and ports +trees. For this purpose, a script +.Pq Pa src/release/generate-release.sh +is provided to automate these checkouts and then execute +.Dq Li "make release" +in a clean +.Xr chroot 8 . +.Pp Before attempting to build a release, the user is expected to be familiar with the contents of .Xr build 7 , and should have experience upgrading systems from source. +.Pp The release build process requires that .Pa /usr/obj be populated with the output of -a native -.Dq Li "make buildworld" -compiled from sources matching the currently running kernel. -This is necessary so that the object files for a complete system can -be installed into a clean +.Dq Li "make buildworld" . +This is necessary to provide the object files for the release or, when +using +.Pa generate-release.sh , +so that the object files for a complete system can be installed into a clean .Xr chroot 8 -environment. -The release procedure also requires that the +environment. In this second case, the built world must be capable of running +on the build system (i.e. it must be for the same architecture and be +compatible with the installed kernel). +The release procedure on some architectures may also require that the .Xr md 4 (memory disk) device driver be present in the kernel (either by being compiled in or available as a module). .Pp This document does not cover source code management, quality assurance, or other aspects of the release engineering process. -.Sh TARGETS +.Sh CLEAN RELEASE GENERATION +Official releases of FreeBSD are produced in a totally clean environment to +ensure consistency between the versions of the src, ports, and doc trees +and to avoid contamination from the host system (e.g. local patches, changes +to +.Xr make.conf 5 , +etc.). This is accomplished using the wrapper script +.Pa src/release/generate-release.sh . +.Pp +.Ic generate-release.sh +svn-branch scratch-dir +.Pp +.Ic generate-release.sh +calls +.Dq Li "make installworld" +to generate a +.Xr chroot 8 +environment in +.Ar scratch-dir . +It then checks out the src tree specified by +.Ar svn-branch +using +.Xr svn 1 +and (optionally) the ports and documentation trees using +.Xr csup 1 +or +.Xr cvs 1 . +Once the various source trees have been obtained, it executes +.Dq Li "make release" +within the +.Xr chroot 8 +environment and places the result in +.Pa $scratch-dir/R . +Note that because this uses a chroot, it cannot be used to cross-build +.Fx +release media. +.Pp +Environment variables: +.Bl -tag -width ".Cm MAKE_FLAGS" +.It Ev CVSUP_HOST +The CVSUP server to use for the doc and ports trees. One of +.Ev CVSUP_HOST +or +.Ev CVSROOT +must be specified for ports and documentation to be included in the release. +.It Ev CVSROOT +The location of the +.Fx +CVS repository to use for the doc and ports trees. One of +.Ev CVSUP_HOST +or +.Ev CVSROOT +must be specified for ports and documentation to be included in the release. +.It Ev CVS_TAG +If the variable +.Ev CVS_TAG +is set, that tag will be used for CVS checkouts (doc and ports), otherwise +.Ic generate-release.sh +will use HEAD. +.It Ev MAKE_FLAGS +This environment variable can be set to pass flags (e.g. -j) to +.Xr make 1 +when invoked by the script. +.It Ev SVNROOT +The location of the FreeBSD SVN source repository. Defaults to +.Pa svn://svn.freebsd.org/base . +.El +.Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile is fairly abstruse. @@ -74,273 +155,86 @@ Most developers will only be concerned w .Cm release target. .\" XXX: Some sort of introduction to this list? All the others have one. -.Bl -tag -width ".Cm package-split" +.Bl -tag -width ".Cm packagesystem" .It Cm release -Uses -.Dq Li "make installworld" -to install a clean system into a -.Xr chroot 8 -environment on the file system. -Checks out the specified version of the source code and then rebuilds -the entire system in the clean environment with -.Dq Li "make buildworld" . -The detailed steps that follow are then executed to package up the -different distributions, build the installation floppy disks, build -release documentation, and so on. -.Pp -This target must be built as root with the -.Va kern.securelevel -sysctl set to \-1 (the default). -.It Cm rerelease -Assumes that the output of a release build has been manually modified, -and performs the minimal number of steps to rebuild the release using -the intermediate output of the previous -.Dq Li "make release" . -.It Cm floppies -Generate a new set of boot and fixit floppies. -This will call the -.Cm release.4 , -.Cm release.8 , -.Cm floppies.1 , -.Cm floppies.2 , -and -.Cm floppies.3 -targets to re-generate the floppy images of a previous -.Dq Li "make release" . -This is most often used to build custom boot floppies. -.It Cm package-split -Generates the portions of the disc 1 and disc 2 images related to packages. -It uses the list of desired packages from the -.Pa src/release/scripts/package-split.py -script to pull packages out of a package build provided by the ports team -and organize them appropriately. -The resulting directory can then be passed to -.Dq Li "make release" -via the -.Va CD_PACKAGE_TREE -variable to populate the ISO images built by the -.Cm iso.1 -target with the correct package related bits. +Meta-target to build all release media and distributions applicable to this +platform. All output goes to +.Pa ${.OBJDIR} , +which will likely be either +.Pa src/release +or the equivalent path in +.Pa /usr/obj . +.It Cm cdrom +Builds installation CD-ROM images. On some systems, this may require that +.Xr mkisofs 8 +be installed +.Pq Pa sysutils/cdrtools +and possibly that the +.Xr md 4 +(memory disk) device driver be present in the kernel +(either by being compiled in or available as a module). This target +produces a file called +.Pa release.iso +as its output. +.It Cm memstick +Builds an installation memory stick image named +.Pa memstick . +Not applicable on all platforms. Requires that the +.Xr md 4 +(memory disk) device driver be present in the kernel +(either by being compiled in or available as a module). +.It Cm ftp +Creates a directory named +.Pa ftp +containing the distribution files used in network installations +and suitable for upload to an FTP mirror. .El .Pp -Targets called by -.Dq Li "make release" : -.Bl -tag -width ".Cm fetch-distfiles" -.It Cm release.1 -Cleans out the -.Pa ${CHROOTDIR}/R -directory and uses -.Xr mtree 8 -to build the directory hierarchy for the system. -.It Cm release.2 -Installs the system into the distribution directories. -.It Cm release.3 -Makes and installs the -.Pa GENERIC -kernel as well as any other kernels listed in -.Va KERNELS . -.It Cm release.4 -Uses -.Xr crunchgen 1 -to build -.Dq crunched -binaries to live on the installation floppies. -.It Cm release.5 -Builds synthetic distributions, and cleans up the previously built -distribution trees. -.It Cm release.6 -Creates tarballs of the assembled distribution trees. -.It Cm release.7 -Makes source distributions. -.It Cm release.8 -Creates the MFS root file systems. -.It Cm floppies.1 -Creates the boot and kernel floppies. -.It Cm floppies.2 -Creates the fixit floppy. -.It Cm floppies.3 -Finalizes the -.Pa ${CHROOTDIR}/R/ftp/stage/floppies -staging directory. -.It Cm ftp.1 -Sets up a suitable area for FTP installations in -.Pa ${CHROOTDIR}/R/ftp . -.It Cm cdrom.1 -Create the layout for the live file system CD-ROM image in -.Pa ${CHROOTDIR}/R/cdrom . -.It Cm cdrom.2 -Create the layout for the first and second CD-ROM images. -.It Cm cdrom.3 -Create the layout for the boot-only CD-ROM image and the boot-only UFS -miniroot image. -.It Cm iso.1 -Builds ISO images (installation and -.Dq live -file system) from the CD-ROM release area -(disabled by default, see -.Va MAKE_ISOS -below). -.It Cm fetch-distfiles -Fetches distfiles needed during the release build that are not already in -.Va RELEASEDISTFILES . -.It Cm doc.1 -Builds all of the necessary tools to turn the -.Fx -Documentation Project source documents (SGML, XML) into HTML -and text documents that will accompany the release. -Also, builds and installs the actual user documentation. -This includes the Handbook, FAQ, articles, and so on. -.It Cm doc.2 +Major subtargets called by targets above: +.Bl -tag -width ".Cm packagesystem" +.It Cm packagesystem +Generates all the distribution archives (e.g. base, kernel, ports, doc) +applicable on this platform. +.It Cm system +Builds a bootable installation system containing all the distribution files +packaged by the +.Cm packagesystem +target, and suitable for imaging by the +.Cm cdrom +and +.Cm memstick +targets. +.It Cm reldoc Builds the release documentation. This includes the release notes, -hardware guide, and installation instructions. +hardware guide, and installation instructions. Other documentation (e.g. +the Handbook) is built during the +.Cm base.txz +target invoked by +.Cm packagesystem. .El .Sh ENVIRONMENT -Variables that must be specified: -.Bl -tag -width ".Va CHROOTDIR" -.It Va CHROOTDIR -The directory to be used as the -.Xr chroot 8 -environment for the entire release build. -.\" XXX: I recommend against hardcoding specific numbers like "2.3" here; -.\" XXX: perhaps it should be replaced with something to the effect of -.\" XXX: "we do not know how much space you'll need, but make sure you have -.\" XXX: at least 3 GB to be safe" (I know i'm still hardcoding a number, -.\" XXX: but at least it looks less like a decree and more like an estimate. -This file system should have at least 3.2 gigabytes of free space on the -i386 architecture. -.It Va CVSROOT -The location of the -.Fx -CVS repository. -This path name is in reference to the real system root, -.Em not -the root of the -.Xr chroot 8 -directory tree. -.El -.Pp Optional variables: -.Bl -tag -width ".Va NO_PREFETCHDISTFILES" -.It Va BUILDNAME -The name of the release to be built. -This is used to set the -.Va RELEASE -value in -.Pa sys/conf/newvers.sh , -which affects the output of -.Xr uname 1 . -If not set, a name with the timestamp and the -.Dq Li -SNAP -suffix will be generated. -.It Va CD_PACKAGE_TREE -A directory containing extra bits for the first and second CD-ROM images. -The extra files for the first disc should be in -.Pa ${CD_PACKAGE_TREE}/disc1 -and the extra files for the second disc should be in -.Pa ${CD_PACKAGE_TREE}/disc2 . -Typically, this variable will be set to the output directory of an earlier -invocation of the -.Cm package-split -target. -.It Va CVSARGS -Additional arguments for -.Xr cvs 1 -that come before the subcommands such as -.Dq Li "-qR" . -.It Va CVSCMDARGS -Additional arguments for -.Xr cvs 1 -.Ic checkout -and -.Ic update -commands. -For example, setting this variable to -.Dq Li "-D '01/01/2002 00:00:00 GMT'" -for -.Dq Li "make release" -or -.Dq Li "make rerelease" -will ask -.Xr cvs 1 -to check out or update sources as of 00:00:00 GMT, January 1 2002, respectively. -.It Va DOC_LANG -The list of languages and encodings the SGML-based documentation -should be built for. -If not set, the documentation is built for all available languages. -.It Va DOCRELEASETAG -The CVS tag to use when checking out the documentation tree. -Usually, -the head of the documentation tree is used by default. -If -.Va RELEASETAG -specifies a release tag, -then the associated release version is used as the default instead. -.It Va EXTLOCALDIR -The directory that will be copied to -.Pa ${CHROOTDIR}/usr/local . -.It Va EXTSRCDIR -The directory specified by this variable will be copied into -.Pa ${CHROOTDIR}/usr/src -instead of that directory being populated by a CVS checkout. -For -.Dq Li "rerelease" , -this will NOT be copied; cvs update will be used instead. -.It Va EXTDOCDIR -The directory specified by this variable will be copied into -.Pa ${CHROOTDIR}/usr/doc . -For -.Dq Li "rerelease" , -this will NOT be copied again. -.It Va EXTPORTSDIR -The directory specified by this variable will be copied into -.Pa ${CHROOTDIR}/usr/ports . -For -.Dq Li "rerelease" , -this will do NOTHING. -.It Va KERNEL_FLAGS -The contents of this variable are passed to -.Xr make 1 -when building kernels during the release build. -For example, setting this variable to -.Dq Li "-j 4" -will instruct -.Xr make 1 -to execute up to four processes at a time. -.It Va KERNELS -Specifies a list of additional kernel configurations to compile and -install into the -.Dq base -distribution. -Each kernel is installed into -.Pa /boot/ -so that it can be booted from the loader via -.Dq Li "boot " . -.It Va LOCAL_PATCHES -Patch files against -.Pa /usr/src -that will be applied in the -.Xr chroot 8 -environment before the release build begins. -.It Va PATCH_FLAGS -Arguments for the -.Xr patch 1 -command used to apply -.Va LOCAL_PATCHES -patch file. -.It Va LOCAL_SCRIPT -A script that will be run in the -.Xr chroot 8 -environment immediately after any local patches are applied. -.It Va MAKE_DVD -If defined, build a bootable ISO DVD image in the CD-ROM -stage directory. -This option may not be available for all architectures. -.It Va MAKE_ISOS -If defined, bootable ISO CD-ROM images will be created from the -contents of the CD-ROM stage directory. -.It Va NOCDROM -If defined, the CD-ROM stage directories will not be created. +.Bl -tag -width ".Va TARGET_ARCH" +.It Va WORLDDIR +Location of a directory containing the src tree. By default, the directory +above the one containing the makefile +.Pq Pa src . +.It Va PORTSDIR +Location of a directory containing the ports tree. By default, +.Pa /usr/ports . +If it is unset or cannot be found, ports will not be included in the release. +.It Va DOCDIR +Location of a directory containing the doc tree. By default, +.Pa /usr/doc . +If it is unset or cannot be found, most documentation will not be included in +the release; see +.Ev NODOC +below. +.It Va NOPORTS +If defined, the Ports Collection will be omitted from the release. +.It Va NOSRC +If set, do not include system source code in the release. .It Va NODOC If defined, the SGML-based documentation from the .Fx @@ -350,85 +244,6 @@ However, the distribution will still be created with the minimal documentation set provided in .Pa src/share/doc . -.It Va NO_FLOPPIES -If defined, no boot and fixit floppy disk images will be created (for those -platforms supporting them). -.It Va NOPORTS -If defined, the Ports Collection will be omitted from the release. -.It Va PORTSRELEASETAG -The CVS tag to use when checking out the ports tree. -Usually, -the head of the ports tree is used by default. -If -.Va RELEASETAG -specifies a release tag, -then the associated release version is used as the default instead. -.It Va NO_PREFETCHDISTFILES -If this variable is defined, -then distfiles needed during the release build will not be downloaded prior to -entering the -.Xr chroot 8 -environment. -Note that if -.Va NO_PREFETCHDISTFILES -is not set, -the fetching is done after any distfiles are obtained via -.Va RELEASEDISTFILES . -.It Va RELEASEDISTFILES -The directory where the distribution files for ports required by the -release build can be found. -This may save a significant amount of time over downloading the -distfiles through a slow link. -.It Va RELEASENOUPDATE -If this variable is defined for -.Dq Li "make rerelease" , -the source code will not be updated with -.Dq Li "cvs update" . -.It Va RELEASETAG -The CVS tag corresponding to the release that is to be built. -If undefined, the release will be built from the -.Dv HEAD -of the CVS tree -(a -.Dq "-CURRENT snapshot" ) . -.It Va SEPARATE_LIVEFS -Store the live file system on its own CD-ROM image rather than placing it on -the first disc. -.It Va SVNCMDARGS -Additional arguments for svn -.Ic checkout -and -.Ic switch -commands. -.It Va SVNROOT -The location of the FreeBSD SVN source repository. -If this variable is set, -then the source tree will be extracted using Subversion rather than -CVS. -.It Va SVNBRANCH -The branch to check out from a SVN source repository. -It is specified as a path such as -.Pa head -or -.Pa stable/7 . -If this variable is not set, -then the branch that corresponds to the current value of -.Va RELEASETAG -will be used. -If neither -.Va SVNBRANCH -nor -.Va RELEASETAG -are set, -then the -.Pa head -branch will be used. -.It Va TARGET_ARCH -The target machine processor architecture. -This is analogous to the -.Dq Nm uname Fl p -output. -Set this to cross-build for a different architecture. .It Va TARGET The target hardware platform. This is analogous to the @@ -439,22 +254,23 @@ For example, cross-building for PC98 mac .Va TARGET_ARCH Ns = Ns Li i386 and .Va TARGET Ns = Ns Li pc98 . -.It Va WORLDDIR -The directory where -.Dq Li "make buildworld" -was run; defaults to -.Pa ${.CURDIR}/.. -which usually points to -.Pa /usr/src . -.It Va WORLD_FLAGS -The contents of this variable are passed to -.Xr make 1 -when building world during the release build. -For example, setting this variable to -.Dq Li "-j 4" -will instruct -.Xr make 1 -to execute up to four processes at a time. +If not set, +.Va TARGET +defaults to the current hardware platform. +.It Va TARGET_ARCH +The target machine processor architecture. +This is analogous to the +.Dq Nm uname Fl p +output. +Set this to cross-build for a different architecture. +If not set, +.Va TARGET_ARCH +defaults to the current machine architecture, unless +.Va TARGET +is also set, in which case it defaults to the appropriate +value for that platform. +Typically, one only needs to set +.Va TARGET . .El .Sh FILES .Bl -tag -compact @@ -466,47 +282,44 @@ to execute up to four processes at a tim .It Pa /usr/src/Makefile .It Pa /usr/src/Makefile.inc1 .It Pa /usr/src/release/Makefile -.It Pa /usr/src/release/${arch}/boot_crunch.conf -.It Pa /usr/src/release/${arch}/fixit_crunch.conf +.It Pa /usr/src/release/generate-release.sh .El .Sh EXAMPLES -The following sequence of commands was used to build the -.Fx 4.9 -release: +The following sequence of commands can be used to build a +.Dq "-CURRENT snapshot": .Bd -literal -offset indent cd /usr -cvs co -rRELENG_4_9_0_RELEASE src +svn co svn://svn.freebsd.org/base/head src cd src make buildworld cd release -make release CHROOTDIR=/local3/release BUILDNAME=4.9-RELEASE \\ - CVSROOT=/host/cvs/usr/home/ncvs RELEASETAG=RELENG_4_9_0_RELEASE +make obj release .Ed .Pp After running these commands, a complete system suitable for FTP or CD-ROM distribution is available in the -.Pa /local3/release/R +.Pa /usr/obj/usr/src/release directory. .Pp The following sequence of commands can be used to build a .Dq "-CURRENT snapshot" -of a -locally modified source tree: +in a clean environment, including ports and documentation: .Bd -literal -offset indent cd /usr/src -cvs diff -u > /path/to/local.patch make buildworld cd release -make release CHROOTDIR=/local3/release BUILDNAME=6.0-CURRENT \\ - CVSROOT=/host/cvs/usr/home/ncvs LOCAL_PATCHES=/path/to/local.patch +export CVSUP_HOST=cvsupN.freebsd.org +sh generate-release.sh head /local3/release .Ed +.Pp +After running these commands, all prepared release files are available in the +.Pa /local3/release/R +directory. .Sh SEE ALSO .Xr cc 1 , -.Xr crunchgen 1 , .Xr cvs 1 , .Xr install 1 , .Xr make 1 , -.Xr patch 1 , .Xr svn 1 Pq Pa ports/devel/subversion-freebsd , .Xr uname 1 , .Xr md 4 , @@ -545,6 +358,14 @@ effort was spent getting into a shape where it could at least automate most of the tediousness of building a release in a sterile environment. .Pp +For the +.Fx 9.0 +release, +.Pa src/release/Makefile +was overhauled and the wrapper script +.Pa src/release/generate-release.sh +introduced to support the introduction of a new installer. +.Pp At near 1000 revisions spread over multiple branches, the .Xr cvs 1 log of @@ -561,14 +382,3 @@ and .An Poul-Henning Kamp . This manual page was written by .An Murray Stokely Aq murray@FreeBSD.org . -.Sh BUGS -Infrastructure changes are occasionally made to the -.Fx -documentation set in such a way that release builds on security -branches can fail. -To work around this, release builds can be made to checkout the -documentation from the last fully supported release of -.Fx . -For example: -.Pp -.Dl "make release RELEASETAG=RELENG_4_9 DOCRELEASETAG=RELEASE_4_9_0 ..." From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 04:31:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1210C106566B; Tue, 22 Mar 2011 04:31:36 +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 F27458FC08; Tue, 22 Mar 2011 04:31:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M4VZLi044772; Tue, 22 Mar 2011 04:31:35 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M4VZL4044764; Tue, 22 Mar 2011 04:31:35 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201103220431.p2M4VZL4044764@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 22 Mar 2011 04:31: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: r219858 - head/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 04:31:36 -0000 Author: glebius Date: Tue Mar 22 04:31:35 2011 New Revision: 219858 URL: http://svn.freebsd.org/changeset/base/219858 Log: Give better URL to the list of available CVSup mirrors. Modified: head/share/examples/cvsup/cvs-supfile head/share/examples/cvsup/doc-supfile head/share/examples/cvsup/gnats-supfile head/share/examples/cvsup/ports-supfile head/share/examples/cvsup/stable-supfile head/share/examples/cvsup/standard-supfile head/share/examples/cvsup/www-supfile Modified: head/share/examples/cvsup/cvs-supfile ============================================================================== --- head/share/examples/cvsup/cvs-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/cvs-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -46,7 +46,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/home/ncvs Modified: head/share/examples/cvsup/doc-supfile ============================================================================== --- head/share/examples/cvsup/doc-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/doc-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -45,7 +45,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr Modified: head/share/examples/cvsup/gnats-supfile ============================================================================== --- head/share/examples/cvsup/gnats-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/gnats-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -45,7 +45,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr Modified: head/share/examples/cvsup/ports-supfile ============================================================================== --- head/share/examples/cvsup/ports-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/ports-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -45,7 +45,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr Modified: head/share/examples/cvsup/stable-supfile ============================================================================== --- head/share/examples/cvsup/stable-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/stable-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -62,7 +62,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr Modified: head/share/examples/cvsup/standard-supfile ============================================================================== --- head/share/examples/cvsup/standard-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/standard-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -45,7 +45,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr Modified: head/share/examples/cvsup/www-supfile ============================================================================== --- head/share/examples/cvsup/www-supfile Tue Mar 22 01:21:51 2011 (r219857) +++ head/share/examples/cvsup/www-supfile Tue Mar 22 04:31:35 2011 (r219858) @@ -24,7 +24,7 @@ # This specifies the server host which will supply the # file updates. You must change it to one of the CVSup # mirror sites listed in the FreeBSD Handbook at -# http://www.freebsd.org/doc/handbook/mirrors.html. +# http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. # You can override this setting on the command line # with cvsup's "-h host" option. # @@ -45,7 +45,7 @@ # Defaults that apply to all the collections # # IMPORTANT: Change the next line to use one of the CVSup mirror sites -# listed at http://www.freebsd.org/doc/handbook/mirrors.html. +# listed at http://www.freebsd.org/doc/handbook/cvsup.html#CVSUP-MIRRORS. *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 05:16:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D73B106564A; Tue, 22 Mar 2011 05:16:08 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09FA58FC14; Tue, 22 Mar 2011 05:16:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M5G88s046365; Tue, 22 Mar 2011 05:16:08 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M4or17045829; Tue, 22 Mar 2011 04:50:53 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103220450.p2M4or17045829@svn.freebsd.org> From: Jeff Roberson Date: Tue, 22 Mar 2011 04:50: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: r219859 - head/sys/ofed/drivers/net/mlx4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 05:16:08 -0000 Author: jeff Date: Tue Mar 22 04:50:47 2011 New Revision: 219859 URL: http://svn.freebsd.org/changeset/base/219859 Log: - Don't use a separate set of rx queues for UDP, hash them into the same set as TCP. - Eliminate the fully linear non-scatter/gather rx path, there is no harm in using arrays of clusters for both TCP and UDP. - Implement support for enabling/disabling per-vlan priority pause and queues via sysctl. Modified: head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/en_rx.c head/sys/ofed/drivers/net/mlx4/mlx4_en.h Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Tue Mar 22 04:31:35 2011 (r219858) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Tue Mar 22 04:50:47 2011 (r219859) @@ -236,9 +236,8 @@ static void *mlx4_en_add(struct mlx4_dev mlx4_info(mdev, "Using %d tx rings for port:%d\n", mdev->profile.prof[i].tx_ring_num, i); mdev->profile.prof[i].rx_ring_num = rounddown_pow_of_two( - min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS/2)) + - (mdev->profile.udp_rss ? rounddown_pow_of_two( - min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS/2)) : 1); + min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS)); + mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n", mdev->profile.prof[i].rx_ring_num, i); } Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Tue Mar 22 04:31:35 2011 (r219858) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Tue Mar 22 04:50:47 2011 (r219859) @@ -277,10 +277,7 @@ static void mlx4_en_netpoll(struct net_d cq = &priv->rx_cq[i]; spin_lock_irqsave(&cq->lock, flags); napi_synchronize(&cq->napi); - if (priv->rx_ring[i].use_frags) - mlx4_en_process_rx_cq(dev, cq, 0); - else - mlx4_en_process_rx_cq_mb(dev, cq, 0); + mlx4_en_process_rx_cq(dev, cq, 0); spin_unlock_irqrestore(&cq->lock, flags); } } @@ -866,10 +863,6 @@ int mlx4_en_alloc_resources(struct mlx4_ prof->rx_ring_size, i, RX)) goto err; - if (i > priv->rx_ring_num - priv->udp_rings - 1) - priv->rx_ring[i].use_frags = 0; - else - priv->rx_ring[i].use_frags = 1; if (mlx4_en_create_rx_ring(priv, &priv->rx_ring[i], prof->rx_ring_size)) goto err; @@ -880,7 +873,7 @@ int mlx4_en_alloc_resources(struct mlx4_ /* Populate Tx priority mappings */ mlx4_en_set_prio_map(priv, priv->tx_prio_map, - prof->tx_ring_num - MLX4_EN_NUM_HASH_RINGS); + priv->tx_ring_num - MLX4_EN_NUM_HASH_RINGS); return 0; @@ -1193,6 +1186,83 @@ static int mlx4_en_set_tx_ring_size(SYSC return (error); } +static int mlx4_en_set_tx_ppp(SYSCTL_HANDLER_ARGS) +{ + struct mlx4_en_priv *priv; + int ppp; + int error; + + priv = arg1; + ppp = priv->prof->tx_ppp; + error = sysctl_handle_int(oidp, &ppp, 0, req); + if (error || !req->newptr) + return (error); + if (ppp > 0xff || ppp < 0) + return (-EINVAL); + priv->prof->tx_ppp = ppp; + error = -mlx4_SET_PORT_general(priv->mdev->dev, priv->port, + priv->rx_mb_size + ETHER_CRC_LEN, + priv->prof->tx_pause, + priv->prof->tx_ppp, + priv->prof->rx_pause, + priv->prof->rx_ppp); + + return (error); +} + +static int mlx4_en_set_rx_ppp(SYSCTL_HANDLER_ARGS) +{ + struct mlx4_en_priv *priv; + struct mlx4_en_dev *mdev; + int tx_ring_num; + int ppp; + int error; + int port_up; + + port_up = 0; + priv = arg1; + mdev = priv->mdev; + ppp = priv->prof->rx_ppp; + error = sysctl_handle_int(oidp, &ppp, 0, req); + if (error || !req->newptr) + return (error); + if (ppp > 0xff || ppp < 0) + return (-EINVAL); + /* See if we have to change the number of tx queues. */ + if (!ppp != !priv->prof->rx_ppp) { + tx_ring_num = MLX4_EN_NUM_HASH_RINGS + 1 + + (!!ppp) * MLX4_EN_NUM_PPP_RINGS; + mutex_lock(&mdev->state_lock); + if (priv->port_up) { + port_up = 1; + mlx4_en_stop_port(priv->dev); + } + mlx4_en_free_resources(priv); + priv->tx_ring_num = tx_ring_num; + priv->prof->rx_ppp = ppp; + error = -mlx4_en_alloc_resources(priv); + if (error) + en_err(priv, "Failed reallocating port resources\n"); + if (error == 0 && port_up) { + error = -mlx4_en_start_port(priv->dev); + if (error) + en_err(priv, "Failed starting port\n"); + } + mutex_unlock(&mdev->state_lock); + return (error); + + } + priv->prof->rx_ppp = ppp; + error = -mlx4_SET_PORT_general(priv->mdev->dev, priv->port, + priv->rx_mb_size + ETHER_CRC_LEN, + priv->prof->tx_pause, + priv->prof->tx_ppp, + priv->prof->rx_pause, + priv->prof->rx_ppp); + + return (error); +} + static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv) { struct net_device *dev; @@ -1222,14 +1292,20 @@ static void mlx4_en_sysctl_conf(struct m CTLTYPE_INT | CTLFLAG_RD, &priv->tx_ring_num, 0, "Number of transmit rings"); SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_size", - CTLTYPE_INT | CTLFLAG_RW, priv, 0, mlx4_en_set_rx_ring_size, "I", - "Receive ring size"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, + mlx4_en_set_rx_ring_size, "I", "Receive ring size"); SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "tx_size", - CTLTYPE_INT | CTLFLAG_RW, priv, 0, mlx4_en_set_tx_ring_size, "I", - "Transmit ring size"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, + mlx4_en_set_tx_ring_size, "I", "Transmit ring size"); SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "ip_reasm", - CTLFLAG_RD, &priv->mdev->profile.ip_reasm, 0, + CTLFLAG_RW, &priv->ip_reasm, 0, "Allow reassembly of IP fragments."); + SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "tx_ppp", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, + mlx4_en_set_tx_ppp, "I", "TX Per-priority pause"); + SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "rx_ppp", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, + mlx4_en_set_rx_ppp, "I", "RX Per-priority pause"); /* Add coalescer configuration. */ coal = SYSCTL_ADD_NODE(ctx, node_list, OID_AUTO, @@ -1416,9 +1492,9 @@ int mlx4_en_init_netdev(struct mlx4_en_d priv->flags = prof->flags; priv->tx_ring_num = prof->tx_ring_num; priv->rx_ring_num = prof->rx_ring_num; - priv->udp_rings = mdev->profile.udp_rss ? prof->rx_ring_num / 2 : 1; priv->mac_index = -1; priv->msg_enable = MLX4_EN_MSG_LEVEL; + priv->ip_reasm = priv->mdev->profile.ip_reasm; mtx_init(&priv->stats_lock.m, "mlx4 stats", NULL, MTX_DEF); mtx_init(&priv->vlan_lock.m, "mlx4 vlan", NULL, MTX_DEF); INIT_WORK(&priv->mcast_task, mlx4_en_do_set_multicast); Modified: head/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_rx.c Tue Mar 22 04:31:35 2011 (r219858) +++ head/sys/ofed/drivers/net/mlx4/en_rx.c Tue Mar 22 04:50:47 2011 (r219859) @@ -69,16 +69,6 @@ static int mlx4_en_alloc_buf(struct mlx4 return 0; } -static void -mlx4_en_init_rx_desc_mb(struct mlx4_en_priv *priv, - struct mlx4_en_rx_ring *ring, int index) -{ - struct mlx4_en_rx_desc *rx_desc = ring->buf + ring->stride * index; - - rx_desc->data->byte_count = cpu_to_be32(priv->rx_mb_size); - rx_desc->data->lkey = cpu_to_be32(priv->mdev->mr.key); -} - static void mlx4_en_init_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { @@ -104,42 +94,6 @@ static void mlx4_en_init_rx_desc(struct } } -static int -mlx4_en_alloc_rx_mb(struct mlx4_en_priv *priv, - struct mlx4_en_rx_desc *rx_desc, - struct mbuf **pmb, int unmap) -{ - struct mlx4_en_dev *mdev = priv->mdev; - dma_addr_t dma; - int size = priv->rx_mb_size; - struct mbuf *new_mb; - - new_mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, size); - if (unlikely(new_mb == NULL)) { - priv->port_stats.rx_alloc_failed++; - return -ENOMEM; - } - - if (unmap) - pci_unmap_single(mdev->pdev, be64_to_cpu(rx_desc->data->addr), - be32_to_cpu(rx_desc->data->byte_count), - PCI_DMA_FROMDEVICE); - dma = pci_map_single(priv->mdev->pdev, new_mb->m_data, size, DMA_FROM_DEVICE); - *pmb = new_mb; - rx_desc->data->addr = cpu_to_be64(dma); - return 0; -} - -static int -mlx4_en_prepare_rx_desc_mb(struct mlx4_en_priv *priv, - struct mlx4_en_rx_ring *ring, int index) -{ - struct mlx4_en_rx_desc *rx_desc = ring->buf + (index * ring->stride); - struct mbuf **pmb = (struct mbuf **) ring->rx_info + index; - - return mlx4_en_alloc_rx_mb(priv, rx_desc, pmb, 0); -} - static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { @@ -171,30 +125,20 @@ static void mlx4_en_free_rx_desc(struct struct mlx4_en_frag_info *frag_info; struct mlx4_en_dev *mdev = priv->mdev; struct mbuf **mb_list; - struct mbuf *mb; struct mlx4_en_rx_desc *rx_desc = ring->buf + (index << ring->log_stride); dma_addr_t dma; int nr; - if (ring->use_frags) { - mb_list = ring->rx_info + (index << priv->log_rx_info); - for (nr = 0; nr < priv->num_frags; nr++) { - en_dbg(DRV, priv, "Freeing fragment:%d\n", nr); - frag_info = &priv->frag_info[nr]; - dma = be64_to_cpu(rx_desc->data[nr].addr); - - en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma); - pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, - PCI_DMA_FROMDEVICE); - m_free(mb_list[nr]); - } - } else { - mb = *((struct mbuf **) ring->rx_info + index); - dma = be64_to_cpu(rx_desc->data->addr); - pci_unmap_single(mdev->pdev, dma, - priv->rx_mb_size, + mb_list = ring->rx_info + (index << priv->log_rx_info); + for (nr = 0; nr < priv->num_frags; nr++) { + en_dbg(DRV, priv, "Freeing fragment:%d\n", nr); + frag_info = &priv->frag_info[nr]; + dma = be64_to_cpu(rx_desc->data[nr].addr); + + en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma); + pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, PCI_DMA_FROMDEVICE); - m_free(mb); + m_free(mb_list[nr]); } } @@ -210,12 +154,8 @@ static int mlx4_en_fill_rx_buffers(struc for (ring_ind = 0; ring_ind < priv->rx_ring_num; ring_ind++) { ring = &priv->rx_ring[ring_ind]; - if (ring->use_frags) - err = mlx4_en_prepare_rx_desc(priv, ring, - ring->actual_size); - else - err = mlx4_en_prepare_rx_desc_mb(priv, ring, - ring->actual_size); + err = mlx4_en_prepare_rx_desc(priv, ring, + ring->actual_size); if (err) { if (ring->actual_size == 0) { en_err(priv, "Failed to allocate " @@ -280,16 +220,12 @@ int mlx4_en_create_rx_ring(struct mlx4_e ring->size = size; ring->size_mask = size - 1; ring->stride = roundup_pow_of_two(sizeof(struct mlx4_en_rx_desc) + - DS_SIZE * (ring->use_frags ? - MLX4_EN_MAX_RX_FRAGS : 1)); + DS_SIZE * MLX4_EN_MAX_RX_FRAGS); ring->log_stride = ffs(ring->stride) - 1; ring->buf_size = ring->size * ring->stride + TXBB_SIZE; - if (ring->use_frags) - tmp = size * roundup_pow_of_two(MLX4_EN_MAX_RX_FRAGS * - sizeof(struct mbuf *)); - else - tmp = size * sizeof(struct mbuf *); + tmp = size * roundup_pow_of_two(MLX4_EN_MAX_RX_FRAGS * + sizeof(struct mbuf *)); ring->rx_info = kmalloc(tmp, GFP_KERNEL); if (!ring->rx_info) { @@ -338,9 +274,7 @@ int mlx4_en_activate_rx_rings(struct mlx ring->cons = 0; ring->actual_size = 0; ring->cqn = priv->rx_cq[ring_ind].mcq.cqn; - - if (ring->use_frags) - ring->stride = stride; + ring->stride = stride; if (ring->stride <= TXBB_SIZE) ring->buf += TXBB_SIZE; @@ -350,14 +284,9 @@ int mlx4_en_activate_rx_rings(struct mlx memset(ring->buf, 0, ring->buf_size); mlx4_en_update_rx_prod_db(ring); - if (ring->use_frags) { - /* Initailize all descriptors */ - for (i = 0; i < ring->size; i++) - mlx4_en_init_rx_desc(priv, ring, i); - } else { - for (i = 0; i < ring->size; i++) - mlx4_en_init_rx_desc_mb(priv, ring, i); - } + /* Initailize all descriptors */ + for (i = 0; i < ring->size; i++) + mlx4_en_init_rx_desc(priv, ring, i); /* Configure lro mngr */ if (priv->dev->if_capenable & IFCAP_LRO) { if (tcp_lro_init(&ring->lro)) @@ -384,7 +313,6 @@ err_buffers: for (ring_ind = 0; ring_ind < priv->rx_ring_num; ring_ind++) mlx4_en_free_rx_buf(priv, &priv->rx_ring[ring_ind]); - ring_ind = priv->rx_ring_num - 1; return err; } @@ -458,21 +386,6 @@ fail: } -static struct mbuf *mlx4_en_rx_mb(struct mlx4_en_priv *priv, - struct mlx4_en_rx_desc *rx_desc, - struct mbuf **mb_list, - unsigned int length) -{ - struct mbuf *mb; - - mb = mb_list[0]; - /* Move relevant fragments to mb */ - if (unlikely(mlx4_en_complete_rx_desc(priv, rx_desc, mb_list, length))) - return NULL; - - return mb; -} - static inline int invalid_cqe(struct mlx4_en_priv *priv, struct mlx4_cqe *cqe) { @@ -493,40 +406,6 @@ static inline int invalid_cqe(struct mlx return 0; } -static struct mbuf * -mlx4_en_get_rx_mb(struct mlx4_en_priv *priv, - struct mlx4_en_rx_desc *rx_desc, - struct mbuf **pmb, - unsigned int length) -{ - struct mlx4_en_dev *mdev = priv->mdev; - struct mbuf *mb; - dma_addr_t dma; - - if (length <= SMALL_PACKET_SIZE) { - mb = m_gethdr(M_WAITOK, MT_DATA); - if (unlikely(mb == NULL)) - return NULL; - /* We are copying all relevant data to the mb - temporarily - * synch buffers for the copy */ - dma = be64_to_cpu(rx_desc->data->addr); - dma_sync_single_range_for_cpu(&mdev->pdev->dev, dma, 0, - length, DMA_FROM_DEVICE); - memcpy(mb->m_data, (*pmb)->m_data, length); - dma_sync_single_range_for_device(&mdev->pdev->dev, dma, 0, - length, DMA_FROM_DEVICE); - - } else { - mb = *pmb; - if (unlikely(mlx4_en_alloc_rx_mb(priv, rx_desc, pmb, 1))) - return NULL; - } - - mb->m_len = length; - mb->m_pkthdr.len = length; - return mb; -} - static void validate_loopback(struct mlx4_en_priv *priv, struct mbuf *mb) { int i; @@ -543,107 +422,22 @@ out_loopback: m_freem(mb); } -int mlx4_en_process_rx_cq_mb(struct net_device *dev, - struct mlx4_en_cq *cq, int budget) +static struct mbuf *mlx4_en_rx_mb(struct mlx4_en_priv *priv, + struct mlx4_en_rx_desc *rx_desc, + struct mbuf **mb_list, + unsigned int length) { - struct mlx4_en_priv *priv = netdev_priv(dev); - struct mlx4_cqe *cqe; - struct mlx4_en_rx_ring *ring = &priv->rx_ring[cq->ring]; - struct mlx4_en_rx_desc *rx_desc; - struct mbuf **pmb; struct mbuf *mb; - int index; - unsigned int length; - int polled = 0; - - if (!priv->port_up) - return 0; - - /* We assume a 1:1 mapping between CQEs and Rx descriptors, so Rx - * descriptor offset can be deduced from the CQE index instead of - * reading 'cqe->index' */ - index = cq->mcq.cons_index & ring->size_mask; - cqe = &cq->buf[index]; - - /* Process all completed CQEs */ - while (XNOR(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK, - cq->mcq.cons_index & cq->size)) { - - pmb = (struct mbuf **) ring->rx_info + index; - rx_desc = ring->buf + (index << ring->log_stride); - /* - * make sure we read the CQE after we read the ownership bit - */ - rmb(); - - if (invalid_cqe(priv, cqe)) - goto next; - - /* - * Packet is OK - process it. - */ - length = be32_to_cpu(cqe->byte_cnt); - - mb = mlx4_en_get_rx_mb(priv, rx_desc, pmb, length); - if (unlikely(!mb)){ - ring->errors++; - goto next; - } - - ring->bytes += length; - ring->packets++; - - if (unlikely(priv->validate_loopback)) { - validate_loopback(priv, mb); - goto next; - } - mb->m_pkthdr.flowid = cq->ring; - mb->m_flags |= M_FLOWID; - mb->m_pkthdr.rcvif = dev; - if (be32_to_cpu(cqe->vlan_my_qpn) & - MLX4_CQE_VLAN_PRESENT_MASK) { - mb->m_pkthdr.ether_vtag = be16_to_cpu(cqe->sl_vid); - mb->m_flags |= M_VLANTAG; - } - - if (likely(priv->rx_csum && cqe->checksum == 0xffff)) { - priv->port_stats.rx_chksum_good++; - mb->m_pkthdr.csum_flags = - CSUM_IP_CHECKED | CSUM_IP_VALID | - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - mb->m_pkthdr.csum_data = htons(0xffff); - } else { - priv->port_stats.rx_chksum_none++; - mb->m_pkthdr.csum_flags = 0; - if (priv->mdev->profile.ip_reasm && - cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV4) && - !mlx4_en_rx_frags(priv, ring, mb, cqe)) - goto next; - } - /* Push it up the stack */ - dev->if_input(dev, mb); - -next: - ++cq->mcq.cons_index; - index = (cq->mcq.cons_index) & ring->size_mask; - cqe = &cq->buf[index]; - if (++polled == budget) - break; - } - - /* If CQ is empty, flush all pending IP reassembly sessions */ - mlx4_en_flush_frags(priv, ring); + mb = mb_list[0]; + /* Move relevant fragments to mb */ + if (unlikely(mlx4_en_complete_rx_desc(priv, rx_desc, mb_list, length))) + return NULL; - AVG_PERF_COUNTER(priv->pstats.rx_coal_avg, polled); - mlx4_cq_set_ci(&cq->mcq); - wmb(); /* ensure HW sees CQ consumer before we post new buffers */ - ring->cons = cq->mcq.cons_index; - ring->prod += polled; /* Polled descriptors were realocated in place */ - mlx4_en_update_rx_prod_db(ring); - return polled; + return mb; } + int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int budget) { struct mlx4_en_priv *priv = netdev_priv(dev); @@ -733,6 +527,10 @@ int mlx4_en_process_rx_cq(struct net_dev } else { mb->m_pkthdr.csum_flags = 0; priv->port_stats.rx_chksum_none++; + if (priv->ip_reasm && + cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV4) && + !mlx4_en_rx_frags(priv, ring, mb, cqe)) + goto next; } /* Push it up the stack */ @@ -743,8 +541,11 @@ next: index = (cq->mcq.cons_index) & ring->size_mask; cqe = &cq->buf[index]; if (++polled == budget) - break; + goto out; } + /* Flush all pending IP reassembly sessions */ +out: + mlx4_en_flush_frags(priv, ring); while ((queued = SLIST_FIRST(&ring->lro.lro_active)) != NULL) { SLIST_REMOVE_HEAD(&ring->lro.lro_active, next); tcp_lro_flush(&ring->lro, queued); @@ -763,14 +564,9 @@ next: static int mlx4_en_poll_rx_cq(struct mlx4_en_cq *cq, int budget) { struct net_device *dev = cq->dev; - struct mlx4_en_priv *priv = netdev_priv(dev); int done; - if (priv->rx_ring[cq->ring].use_frags) - done = mlx4_en_process_rx_cq(dev, cq, budget); - else - done = mlx4_en_process_rx_cq_mb(dev, cq, budget); - + done = mlx4_en_process_rx_cq(dev, cq, budget); cq->tot_rx += done; return done; @@ -835,17 +631,7 @@ void mlx4_en_calc_rx_buf(struct net_devi } priv->num_frags = frag; - /* - * For use_frags == 0 calculate the size extbuf we require. - */ - if (eff_mtu <= MCLBYTES) - priv->rx_mb_size = MCLBYTES; - else if (eff_mtu <= MJUMPAGESIZE) - priv->rx_mb_size = MJUMPAGESIZE; - else if (eff_mtu <= MJUM9BYTES) - priv->rx_mb_size = MJUM9BYTES; - else - priv->rx_mb_size = MJUM16BYTES; + priv->rx_mb_size = eff_mtu; priv->log_rx_info = ROUNDUP_LOG2(priv->num_frags * sizeof(struct mbuf *)); @@ -906,11 +692,15 @@ int mlx4_en_config_rss_steer(struct mlx4 struct mlx4_qp_context context; struct mlx4_en_rss_context *rss_context; void *ptr; - u8 rss_mask = (priv->udp_rings > 1) ? 0x3f : 0x14; + u8 rss_mask; int i, qpn; int err = 0; int good_qps = 0; + if (mdev->profile.udp_rss) + rss_mask = 0x3f; + else + rss_mask = 0x14; en_dbg(DRV, priv, "Configuring rss steering\n"); err = mlx4_qp_reserve_range(mdev->dev, priv->rx_ring_num, roundup_pow_of_two(priv->rx_ring_num), @@ -950,14 +740,11 @@ int mlx4_en_config_rss_steer(struct mlx4 ptr = ((void *) &context) + 0x3c; rss_context = (struct mlx4_en_rss_context *) ptr; - rss_context->base_qpn = cpu_to_be32(ilog2(priv->rx_ring_num - priv->udp_rings) << 24 | + rss_context->base_qpn = cpu_to_be32(ilog2(priv->rx_ring_num) << 24 | (rss_map->base_qpn)); - rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn + - priv->rx_ring_num - - priv->udp_rings); + rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn); rss_context->flags = rss_mask; - if (priv->udp_rings > 1) - rss_context->base_qpn_udp = rss_context->default_qpn; + rss_context->base_qpn_udp = rss_context->default_qpn; err = mlx4_qp_to_ready(mdev->dev, &priv->res.mtt, &context, &rss_map->indir_qp, &rss_map->indir_state); Modified: head/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4_en.h Tue Mar 22 04:31:35 2011 (r219858) +++ head/sys/ofed/drivers/net/mlx4/mlx4_en.h Tue Mar 22 04:50:47 2011 (r219859) @@ -335,7 +335,6 @@ struct mlx4_en_rx_ring { unsigned long bytes; unsigned long packets; unsigned long errors; - unsigned int use_frags; struct lro_ctrl lro; struct mlx4_en_ipfrag ipfrag[MLX4_EN_NUM_IPFRAG_SESSIONS]; }; @@ -383,9 +382,9 @@ struct mlx4_en_port_profile { u32 tx_ring_size; u32 rx_ring_size; u8 rx_pause; - u8 rx_ppp; u8 tx_pause; - u8 tx_ppp; + u32 rx_ppp; + u32 tx_ppp; }; struct mlx4_en_profile { @@ -533,11 +532,11 @@ struct mlx4_en_priv { #define MLX4_EN_FLAG_PROMISC 0x1 u32 tx_ring_num; u32 rx_ring_num; - u32 udp_rings; u32 rx_mb_size; struct mlx4_en_frag_info frag_info[MLX4_EN_MAX_RX_FRAGS]; u16 num_frags; u16 log_rx_info; + int ip_reasm; struct mlx4_en_tx_ring tx_ring[MAX_TX_RINGS]; struct mlx4_en_rx_ring rx_ring[MAX_RX_RINGS]; From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 05:47:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4923B106564A; Tue, 22 Mar 2011 05:47:49 +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 37BC88FC12; Tue, 22 Mar 2011 05:47:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M5lnHL047011; Tue, 22 Mar 2011 05:47:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M5lne9047009; Tue, 22 Mar 2011 05:47:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220547.p2M5lne9047009@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 05:47: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: r219860 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 05:47:49 -0000 Author: adrian Date: Tue Mar 22 05:47:48 2011 New Revision: 219860 URL: http://svn.freebsd.org/changeset/base/219860 Log: Set the "right" CCA register. Obtained From: 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 Tue Mar 22 04:50:47 2011 (r219859) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Mar 22 05:47:48 2011 (r219860) @@ -1463,7 +1463,7 @@ ar5416SetBoardValues(struct ath_hal *ah, } else { OS_REG_RMW_FIELD(ah, AR_PHY_CCA, AR_PHY_CCA_THRESH62, pModal->thresh62); - OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA_THRESH62, + OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA, AR_PHY_EXT_CCA_THRESH62, pModal->thresh62); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 05:50:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F79F106564A; Tue, 22 Mar 2011 05:50:55 +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 4CA378FC08; Tue, 22 Mar 2011 05:50:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M5otfw047109; Tue, 22 Mar 2011 05:50:55 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M5otlc047106; Tue, 22 Mar 2011 05:50:55 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201103220550.p2M5otlc047106@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 22 Mar 2011 05:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219861 - stable/8/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 05:50:55 -0000 Author: ae Date: Tue Mar 22 05:50:55 2011 New Revision: 219861 URL: http://svn.freebsd.org/changeset/base/219861 Log: MFC r219415 (adapted for stable/8): Add -p option to `gpart show` command to show provider's names of partitions instead of partition's indexes. This may be useful with GPT partitioning scheme or EBR without GEOM_PART_EBR_COMPAT option. MFC r219416: It is better to sometimes have not aligned columns than often have wrapped lines. Modified: stable/8/sbin/geom/class/part/geom_part.c stable/8/sbin/geom/class/part/gpart.8 Directory Properties: stable/8/sbin/geom/class/part/ (props changed) Modified: stable/8/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/8/sbin/geom/class/part/geom_part.c Tue Mar 22 05:47:48 2011 (r219860) +++ stable/8/sbin/geom/class/part/geom_part.c Tue Mar 22 05:50:55 2011 (r219861) @@ -83,7 +83,7 @@ static void gpart_bootcode(struct gctl_r static void *gpart_bootfile_read(const char *, ssize_t *); static void gpart_issue(struct gctl_req *, unsigned int); static void gpart_show(struct gctl_req *, unsigned int); -static void gpart_show_geom(struct ggeom *, const char *); +static void gpart_show_geom(struct ggeom *, const char *, int); static int gpart_show_hasopt(struct gctl_req *, const char *, const char *); static void gpart_write_partcode(struct ggeom *, int, void *, ssize_t); static void gpart_write_partcode_vtoc8(struct ggeom *, int, void *); @@ -151,8 +151,9 @@ struct g_command PUBSYM(class_commands)[ { "show", 0, gpart_show, { { 'l', "show_label", NULL, G_TYPE_BOOL }, { 'r', "show_rawtype", NULL, G_TYPE_BOOL }, + { 'p', "show_providers", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-lr] [geom ...]" + NULL, "[-lrp] [geom ...]" }, { "undo", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, { "unset", 0, gpart_issue, { @@ -541,13 +542,13 @@ done: } static void -gpart_show_geom(struct ggeom *gp, const char *element) +gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) { struct gprovider *pp; const char *s, *scheme; off_t first, last, sector, end; off_t length, secsz; - int idx, wblocks, wname; + int idx, wblocks, wname, wmax; scheme = find_geomcfg(gp, "scheme"); s = find_geomcfg(gp, "first"); @@ -558,7 +559,15 @@ gpart_show_geom(struct ggeom *gp, const s = find_geomcfg(gp, "state"); if (s != NULL && *s != 'C') s = NULL; - wname = strlen(gp->lg_name); + wmax = strlen(gp->lg_name); + if (show_providers) { + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + wname = strlen(pp->lg_name); + if (wname > wmax) + wmax = wname; + } + } + wname = wmax; pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; secsz = pp->lg_sectorsize; printf("=>%*jd %*jd %*s %s (%s)%s\n", @@ -592,10 +601,18 @@ gpart_show_geom(struct ggeom *gp, const (intmax_t)(sector - first), wname, "", fmtsize((sector - first) * secsz)); } - printf(" %*jd %*jd %*d %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, (intmax_t)length, - wname, idx, find_provcfg(pp, element), - fmtattrib(pp), fmtsize(pp->lg_mediasize)); + if (show_providers) { + printf(" %*jd %*jd %*s %s %s (%s)\n", + wblocks, (intmax_t)sector, wblocks, + (intmax_t)length, wname, pp->lg_name, + find_provcfg(pp, element), fmtattrib(pp), + fmtsize(pp->lg_mediasize)); + } else + printf(" %*jd %*jd %*d %s %s (%s)\n", + wblocks, (intmax_t)sector, wblocks, + (intmax_t)length, wname, idx, + find_provcfg(pp, element), fmtattrib(pp), + fmtsize(pp->lg_mediasize)); first = end + 1; } if (first <= last) { @@ -628,7 +645,7 @@ gpart_show(struct gctl_req *req, unsigne struct gclass *classp; struct ggeom *gp; const char *element, *name; - int error, i, nargs; + int error, i, nargs, show_providers; element = NULL; if (gpart_show_hasopt(req, "show_label", element)) @@ -649,19 +666,20 @@ gpart_show(struct gctl_req *req, unsigne geom_deletetree(&mesh); errx(EXIT_FAILURE, "Class %s not found.", name); } + show_providers = gctl_get_int(req, "show_providers"); nargs = gctl_get_int(req, "nargs"); if (nargs > 0) { for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); gp = find_geom(classp, name); if (gp != NULL) - gpart_show_geom(gp, element); + gpart_show_geom(gp, element, show_providers); else errx(EXIT_FAILURE, "No such geom: %s.", name); } } else { LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - gpart_show_geom(gp, element); + gpart_show_geom(gp, element, show_providers); } } geom_deletetree(&mesh); Modified: stable/8/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/8/sbin/geom/class/part/gpart.8 Tue Mar 22 05:47:48 2011 (r219860) +++ stable/8/sbin/geom/class/part/gpart.8 Tue Mar 22 05:50:55 2011 (r219861) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2011 +.Dd March 9, 2011 .Dt GPART 8 .Os .Sh NAME @@ -162,7 +162,7 @@ utility: .\" ==== SHOW ==== .Nm .Cm show -.Op Fl lr +.Op Fl lrp .Op Ar geom ... .\" ==== UNDO ==== .Nm @@ -468,6 +468,8 @@ Additional options include: .It Fl l For partition schemes that support partition labels print them instead of partition type. +.It Fl p +Show provider names instead of partition indexes. .It Fl r Show raw partition type instead of symbolic name. .El From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 07:19:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 749D6106566B; Tue, 22 Mar 2011 07:19:49 +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 655758FC19; Tue, 22 Mar 2011 07:19:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2M7JnUc049148; Tue, 22 Mar 2011 07:19:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2M7Jnwh049146; Tue, 22 Mar 2011 07:19:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103220719.p2M7Jnwh049146@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 07:19: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: r219862 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 07:19:49 -0000 Author: adrian Date: Tue Mar 22 07:19:49 2011 New Revision: 219862 URL: http://svn.freebsd.org/changeset/base/219862 Log: Fix OFDM ANI statistics gathering for the AR5416 and later chips. I found this when trying to figure out why the RX PHY error count didn't match the OFDM error count ANI was using. It turns out there was two problems: * What this commit addresses - using the wrong mask for OFDM errors, and * The RX filter is set incorrectly after a channel scan (at least) even if interference mitigation is enabled by default. ANI is still disabled by default for the AR5416 and later chips. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Mar 22 05:50:55 2011 (r219861) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Mar 22 07:19:49 2011 (r219862) @@ -488,7 +488,7 @@ ar5416AniRestart(struct ath_hal *ah, str OS_REG_WRITE(ah, AR_PHY_ERR_1, params->ofdmPhyErrBase); OS_REG_WRITE(ah, AR_PHY_ERR_2, params->cckPhyErrBase); OS_REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_OFDM_TIMING); - OS_REG_WRITE(ah, AR_PHY_ERR_MASK_1, AR_PHY_ERR_CCK_TIMING); + OS_REG_WRITE(ah, AR_PHY_ERR_MASK_2, AR_PHY_ERR_CCK_TIMING); /* Clear the mib counters and save them in the stats */ ar5212UpdateMibCounters(ah, &ahp->ah_mibStats); From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 10:29:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB38D106564A; Tue, 22 Mar 2011 10:29:36 +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 AB30E8FC0C; Tue, 22 Mar 2011 10:29:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MATasY054731; Tue, 22 Mar 2011 10:29:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MATa0X054727; Tue, 22 Mar 2011 10:29:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103221029.p2MATa0X054727@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 10:29: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: r219863 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 10:29:36 -0000 Author: adrian Date: Tue Mar 22 10:29:36 2011 New Revision: 219863 URL: http://svn.freebsd.org/changeset/base/219863 Log: Bring over an XPA (external power amplifer) bias fix for the AR9160. This fix modifies the const addac initval array, rather than modifying a local copy. It means that running >1 AR9160 on a board may prove to be unpredictable. The AR5416 init path also does something similar, so supporting >1 AR5416 of different revisions could cause problems. The later fix will be to create a private copy of the Addac data for the AR5416, AR9160 (and AR9100 when it's merged in) and then modify that as needed. Obtained From: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Mar 22 07:19:49 2011 (r219862) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Mar 22 10:29:36 2011 (r219863) @@ -235,6 +235,8 @@ extern void ar5416GetTargetPowersLeg(str uint16_t numRates, HAL_BOOL isExtTarget); extern void ar5416InitChainMasks(struct ath_hal *ah); extern void ar5416RestoreChainMask(struct ath_hal *ah); +extern void ar5416EepromSetAddac(struct ath_hal *ah, + const struct ieee80211_channel *chan); /* TX power setup related routines in ar5416_reset.c */ extern void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Mar 22 07:19:49 2011 (r219862) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Mar 22 10:29:36 2011 (r219863) @@ -474,10 +474,11 @@ ar5416WriteIni(struct ath_hal *ah, const * Write addac shifts */ OS_REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_EXTERNAL_RADIO); -#if 0 + /* NB: only required for Sowl */ - ar5416EepromSetAddac(ah, chan); -#endif + if (AR_SREV_SOWL(ah)) + ar5416EepromSetAddac(ah, chan); + regWrites = ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_addac, 1, regWrites); OS_REG_WRITE(ah, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_INTERNAL_ADDAC); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Mar 22 07:19:49 2011 (r219862) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Mar 22 10:29:36 2011 (r219863) @@ -2425,3 +2425,76 @@ ar5416OverrideIni(struct ath_hal *ah, co OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); } } + +struct ini { + uint32_t *data; /* NB: !const */ + int rows, cols; +}; + +/* + * Override XPA bias level based on operating frequency. + * This is a v14 EEPROM specific thing for the AR9160. + */ +void +ar5416EepromSetAddac(struct ath_hal *ah, const struct ieee80211_channel *chan) +{ +#define XPA_LVL_FREQ(cnt) (pModal->xpaBiasLvlFreq[cnt]) + MODAL_EEP_HEADER *pModal; + HAL_EEPROM_v14 *ee = AH_PRIVATE(ah)->ah_eeprom; + struct ar5416eeprom *eep = &ee->ee_base; + uint8_t biaslevel; + + if (! AR_SREV_SOWL(ah)) + return; + + if (EEP_MINOR(ah) < AR5416_EEP_MINOR_VER_7) + return; + + pModal = &(eep->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)]); + + if (pModal->xpaBiasLvl != 0xff) + biaslevel = pModal->xpaBiasLvl; + else { + uint16_t resetFreqBin, freqBin, freqCount = 0; + CHAN_CENTERS centers; + + ar5416GetChannelCenters(ah, chan, ¢ers); + + resetFreqBin = FREQ2FBIN(centers.synth_center, IEEE80211_IS_CHAN_2GHZ(chan)); + freqBin = XPA_LVL_FREQ(0) & 0xff; + biaslevel = (uint8_t) (XPA_LVL_FREQ(0) >> 14); + + freqCount++; + + while (freqCount < 3) { + if (XPA_LVL_FREQ(freqCount) == 0x0) + break; + + freqBin = XPA_LVL_FREQ(freqCount) & 0xff; + if (resetFreqBin >= freqBin) + biaslevel = (uint8_t)(XPA_LVL_FREQ(freqCount) >> 14); + else + break; + freqCount++; + } + } + + HALDEBUG(ah, HAL_DEBUG_EEPROM, "%s: overriding XPA bias level = %d\n", + __func__, biaslevel); + + /* + * This is a dirty workaround for the const initval data, + * which will upset multiple AR9160's on the same board. + * + * The HAL should likely just have a private copy of the addac + * data per instance. + */ + if (IEEE80211_IS_CHAN_2GHZ(chan)) + HAL_INI_VAL((struct ini *) &AH5416(ah)->ah_ini_addac, 7, 1) = + (HAL_INI_VAL(&AH5416(ah)->ah_ini_addac, 7, 1) & (~0x18)) | biaslevel << 3; + else + HAL_INI_VAL((struct ini *) &AH5416(ah)->ah_ini_addac, 6, 1) = + (HAL_INI_VAL(&AH5416(ah)->ah_ini_addac, 6, 1) & (~0xc0)) | biaslevel << 6; +#undef XPA_LVL_FREQ +} + From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 10:39:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4330A106566B; Tue, 22 Mar 2011 10:39:35 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 335718FC08; Tue, 22 Mar 2011 10:39:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MAdZJp054971; Tue, 22 Mar 2011 10:39:35 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MAdZ10054963; Tue, 22 Mar 2011 10:39:35 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103221039.p2MAdZ10054963@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 22 Mar 2011 10:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219864 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 10:39:35 -0000 Author: pjd Date: Tue Mar 22 10:39:34 2011 New Revision: 219864 URL: http://svn.freebsd.org/changeset/base/219864 Log: White space cleanups. MFC after: 1 week Modified: head/sbin/hastd/activemap.c head/sbin/hastd/hastd.8 head/sbin/hastd/hastd.c head/sbin/hastd/primary.c head/sbin/hastd/proto_tcp4.c head/sbin/hastd/secondary.c head/sbin/hastd/subr.c Modified: head/sbin/hastd/activemap.c ============================================================================== --- head/sbin/hastd/activemap.c Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/activemap.c Tue Mar 22 10:39:34 2011 (r219864) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #define ACTIVEMAP_MAGIC 0xac71e4 struct activemap { int am_magic; /* Magic value. */ - off_t am_mediasize; /* Media size in bytes. */ + off_t am_mediasize; /* Media size in bytes. */ uint32_t am_extentsize; /* Extent size in bytes, must be power of 2. */ uint8_t am_extentshift;/* 2 ^ extentbits == extentsize */ Modified: head/sbin/hastd/hastd.8 ============================================================================== --- head/sbin/hastd/hastd.8 Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/hastd.8 Tue Mar 22 10:39:34 2011 (r219864) @@ -95,7 +95,7 @@ following option: .Bd -ragged -offset indent .Cd "options GEOM_GATE" .Ed -.Pp +.Pp The connection between two .Nm daemons is always initiated from the one running as primary to the one Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/hastd.c Tue Mar 22 10:39:34 2011 (r219864) @@ -132,19 +132,19 @@ dtype2str(mode_t mode) if (S_ISBLK(mode)) return ("block device"); - else if (S_ISCHR(mode)) + else if (S_ISCHR(mode)) return ("character device"); - else if (S_ISDIR(mode)) + else if (S_ISDIR(mode)) return ("directory"); else if (S_ISFIFO(mode)) return ("pipe or FIFO"); - else if (S_ISLNK(mode)) + else if (S_ISLNK(mode)) return ("symbolic link"); - else if (S_ISREG(mode)) + else if (S_ISREG(mode)) return ("regular file"); else if (S_ISSOCK(mode)) return ("socket"); - else if (S_ISWHT(mode)) + else if (S_ISWHT(mode)) return ("whiteout"); else return ("unknown"); @@ -929,7 +929,7 @@ main_loop(void) time_t lastcheck, now; fd_set rfds; - lastcheck = time(NULL); + lastcheck = time(NULL); seltimeout.tv_sec = REPORT_INTERVAL; seltimeout.tv_usec = 0; Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/primary.c Tue Mar 22 10:39:34 2011 (r219864) @@ -183,7 +183,7 @@ static pthread_mutex_t metadata_lock; while (((hio) = TAILQ_FIRST(&hio_##name##_list[(ncomp)])) == NULL && !_last) { \ cv_timedwait(&hio_##name##_list_cond[(ncomp)], \ &hio_##name##_list_lock[(ncomp)], (timeout)); \ - if ((timeout) != 0) \ + if ((timeout) != 0) \ _last = true; \ } \ if (hio != NULL) { \ @@ -1268,7 +1268,7 @@ keepalive_send(struct hast_resource *res rw_unlock(&hio_remote_lock[ncomp]); return; } - + PJDLOG_ASSERT(res->hr_remotein != NULL); PJDLOG_ASSERT(res->hr_remoteout != NULL); @@ -1314,7 +1314,7 @@ remote_send_thread(void *arg) /* Remote component is 1 for now. */ ncomp = 1; - lastcheck = time(NULL); + lastcheck = time(NULL); for (;;) { pjdlog_debug(2, "remote_send: Taking request."); Modified: head/sbin/hastd/proto_tcp4.c ============================================================================== --- head/sbin/hastd/proto_tcp4.c Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/proto_tcp4.c Tue Mar 22 10:39:34 2011 (r219864) @@ -337,7 +337,7 @@ tcp4_connect_wait(void *ctx, int timeout tv.tv_usec = 0; again: FD_ZERO(&fdset); - FD_SET(tctx->tc_fd, &fdset); + FD_SET(tctx->tc_fd, &fdset); ret = select(tctx->tc_fd + 1, NULL, &fdset, NULL, &tv); if (ret == 0) { error = ETIMEDOUT; Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/secondary.c Tue Mar 22 10:39:34 2011 (r219864) @@ -65,8 +65,8 @@ __FBSDID("$FreeBSD$"); #include "synch.h" struct hio { - uint64_t hio_seq; - int hio_error; + uint64_t hio_seq; + int hio_error; struct nv *hio_nv; void *hio_data; uint8_t hio_cmd; Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Tue Mar 22 10:29:36 2011 (r219863) +++ head/sbin/hastd/subr.c Tue Mar 22 10:39:34 2011 (r219864) @@ -134,12 +134,12 @@ const char * role2str(int role) { - switch (role) { - case HAST_ROLE_INIT: + switch (role) { + case HAST_ROLE_INIT: return ("init"); - case HAST_ROLE_PRIMARY: + case HAST_ROLE_PRIMARY: return ("primary"); - case HAST_ROLE_SECONDARY: + case HAST_ROLE_SECONDARY: return ("secondary"); } return ("unknown"); From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 12:05:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C6361065679; Tue, 22 Mar 2011 12:05: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 4517A8FC1D; Tue, 22 Mar 2011 12:05:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MC5nTv058937; Tue, 22 Mar 2011 12:05:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MC5nDT058934; Tue, 22 Mar 2011 12:05:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103221205.p2MC5nDT058934@svn.freebsd.org> From: John Baldwin Date: Tue, 22 Mar 2011 12:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219865 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 12:05:50 -0000 Author: jhb Date: Tue Mar 22 12:05:49 2011 New Revision: 219865 URL: http://svn.freebsd.org/changeset/base/219865 Log: Rename pci_find_extcap() to pci_find_cap(). PCI now uses the term "extended capabilities" to refer to the new set of capability structures starting at offset 0x100 in config space for PCI-express devices. For now both function names will still work. I will merge this to older branches to ease driver portability, but 9.0 will ship with a new pci_find_extcap() function that locates extended capabilities instead. Reviewed by: imp MFC after: 1 week Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue Mar 22 10:39:34 2011 (r219864) +++ head/sys/dev/pci/pci.c Tue Mar 22 12:05:49 2011 (r219865) @@ -93,7 +93,7 @@ static char *pci_describe_device(device static int pci_modevent(module_t mod, int what, void *arg); static void pci_hdrtypedata(device_t pcib, int b, int s, int f, pcicfgregs *cfg); -static void pci_read_extcap(device_t pcib, pcicfgregs *cfg); +static void pci_read_cap(device_t pcib, pcicfgregs *cfg); static int pci_read_vpd_reg(device_t pcib, pcicfgregs *cfg, int reg, uint32_t *data); #if 0 @@ -536,7 +536,7 @@ pci_read_device(device_t pcib, int d, in pci_hdrtypedata(pcib, b, s, f, cfg); if (REG(PCIR_STATUS, 2) & PCIM_STATUS_CAPPRESENT) - pci_read_extcap(pcib, cfg); + pci_read_cap(pcib, cfg); STAILQ_INSERT_TAIL(devlist_head, devlist_entry, pci_links); @@ -564,7 +564,7 @@ pci_read_device(device_t pcib, int d, in } static void -pci_read_extcap(device_t pcib, pcicfgregs *cfg) +pci_read_cap(device_t pcib, pcicfgregs *cfg) { #define REG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w) #define WREG(n, v, w) PCIB_WRITE_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, v, w) @@ -1665,7 +1665,7 @@ pci_get_max_read_req(device_t dev) int cap; uint16_t val; - if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0) + if (pci_find_cap(dev, PCIY_EXPRESS, &cap) != 0) return (0); val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); val &= PCIM_EXP_CTL_MAX_READ_REQUEST; @@ -1679,7 +1679,7 @@ pci_set_max_read_req(device_t dev, int s int cap; uint16_t val; - if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) != 0) + if (pci_find_cap(dev, PCIY_EXPRESS, &cap) != 0) return (0); if (size < 128) size = 128; Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Tue Mar 22 10:39:34 2011 (r219864) +++ head/sys/dev/pci/pcivar.h Tue Mar 22 12:05:49 2011 (r219865) @@ -401,9 +401,15 @@ pci_get_powerstate(device_t dev) } static __inline int +pci_find_cap(device_t dev, int capability, int *capreg) +{ + return (PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg)); +} + +static __inline int pci_find_extcap(device_t dev, int capability, int *capreg) { - return PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg); + return (PCI_FIND_EXTCAP(device_get_parent(dev), dev, capability, capreg)); } static __inline int From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 13:20:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88CC4106566B; Tue, 22 Mar 2011 13:20: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 776E68FC13; Tue, 22 Mar 2011 13:20:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MDKBR7060725; Tue, 22 Mar 2011 13:20:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MDKB3T060723; Tue, 22 Mar 2011 13:20:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103221320.p2MDKB3T060723@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 13:20: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: r219868 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 13:20:11 -0000 Author: adrian Date: Tue Mar 22 13:20:11 2011 New Revision: 219868 URL: http://svn.freebsd.org/changeset/base/219868 Log: This isn't actually needed any longer, A-MPDU frames work fine if only tagged for 11n nodes. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Mar 22 13:19:29 2011 (r219867) +++ head/sys/dev/ath/if_ath.c Tue Mar 22 13:20:11 2011 (r219868) @@ -3531,15 +3531,6 @@ rx_accept: rs->rs_keyix == HAL_RXKEYIX_INVALID ? IEEE80211_KEYIX_NONE : rs->rs_keyix); sc->sc_lastrs = rs; - /* tag AMPDU aggregates for reorder processing */ -#if 0 - /* - * Just make sure all frames are tagged for AMPDU reorder checking. - * As there seems to be some situations where single frames aren't - * matching a node but bump the seqno. This needs to be investigated. - */ - m->m_flags |= M_AMPDU; -#endif /* Keep statistics on the number of aggregate packets received */ if (rs->rs_isaggr) From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 13:35:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE22C106566B; Tue, 22 Mar 2011 13:35:56 +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 CD3518FC08; Tue, 22 Mar 2011 13:35:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MDZutZ061083; Tue, 22 Mar 2011 13:35:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MDZu8k061080; Tue, 22 Mar 2011 13:35:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103221335.p2MDZu8k061080@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 13:35: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: r219869 - in head/sys: conf dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 13:35:57 -0000 Author: adrian Date: Tue Mar 22 13:35:56 2011 New Revision: 219869 URL: http://svn.freebsd.org/changeset/base/219869 Log: Flip this over to be a configurable option for people who wish to play with it. It's still not ready for prime-time - there's some TX niggles with these 11n cards that I'm still trying to wrap my head around, and AMPDU-TX is just not implemented so things will come to a crashing halt if you're not careful. Modified: head/sys/conf/options head/sys/dev/ath/if_ath.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Mar 22 13:20:11 2011 (r219868) +++ head/sys/conf/options Tue Mar 22 13:35:56 2011 (r219869) @@ -783,6 +783,7 @@ AH_NEED_DESC_SWAP opt_ah.h AH_USE_INIPDGAIN opt_ah.h AH_MAXCHAN opt_ah.h AH_RXCFG_SDMAMW_4BYTES opt_ah.h +AH_ENABLE_11N opt_ah.h # options for the Broadcom BCM43xx driver (bwi) BWI_DEBUG opt_bwi.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Mar 22 13:20:11 2011 (r219868) +++ head/sys/dev/ath/if_ath.c Tue Mar 22 13:35:56 2011 (r219869) @@ -612,7 +612,7 @@ ath_attach(u_int16_t devid, struct ath_s * Don't think of doing that unless you know what you're doing. */ -#ifdef DO_ATH_11N +#ifdef AH_ENABLE_11N /* * Query HT capabilities */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 13:39:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D73A1065677; Tue, 22 Mar 2011 13:39:00 +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 5C2E78FC08; Tue, 22 Mar 2011 13:39:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MDd08V061170; Tue, 22 Mar 2011 13:39:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MDd0PH061168; Tue, 22 Mar 2011 13:39:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103221339.p2MDd0PH061168@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 13:39: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: r219870 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 13:39:00 -0000 Author: adrian Date: Tue Mar 22 13:39:00 2011 New Revision: 219870 URL: http://svn.freebsd.org/changeset/base/219870 Log: Clean up setting the short preamble bit in the rate - this way it is very obvious (and cleanly so) that it occurs for non-11n rates. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Tue Mar 22 13:35:56 2011 (r219869) +++ head/sys/dev/ath/if_ath_tx_ht.c Tue Mar 22 13:39:00 2011 (r219870) @@ -143,9 +143,6 @@ ath_rateseries_setup(struct ath_softc *s #endif series[i].Rate = rt->info[rix[i]].rateCode; - /* the short preamble field is only applicable for non-MCS rates */ - if (shortPreamble && ! (series[i].Rate & IEEE80211_RATE_MCS)) - series[i].Rate |= rt->info[rix[i]].shortPreamble; /* PktDuration doesn't include slot, ACK, RTS, etc timing - it's just the packet duration */ if (series[i].Rate & IEEE80211_RATE_MCS) { @@ -156,6 +153,8 @@ ath_rateseries_setup(struct ath_softc *s , series[i].RateFlags & HAL_RATESERIES_2040 , series[i].RateFlags & HAL_RATESERIES_HALFGI); } else { + if (shortPreamble) + series[i].Rate |= rt->info[rix[i]].shortPreamble; series[i].PktDuration = ath_hal_computetxtime(ah, rt, pktlen, rix[i], shortPreamble); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 14:40:15 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60ABA106564A; Tue, 22 Mar 2011 14:40:15 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id 36D8C8FC27; Tue, 22 Mar 2011 14:40:13 +0000 (UTC) Received: from mail-gw12.york.ac.uk ([144.32.129.162]) by gse-mta-27.emailfiltering.com with emfmta (version 4.8.0.437) by TLS id 946253928 for hselasky@FreeBSD.org; 1a0728ac11f53231; Tue, 22 Mar 2011 14:40:12 +0000 Received: from buffy-128.york.ac.uk ([144.32.128.160]:17302 helo=buffy.york.ac.uk) by mail-gw12.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Q22kl-0007ro-Px; Tue, 22 Mar 2011 14:40:11 +0000 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id p2MEeBlL021881; Tue, 22 Mar 2011 14:40:11 GMT (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id p2MEeA0J021880; Tue, 22 Mar 2011 14:40:11 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Hans Petter Selasky In-Reply-To: <201103212116.p2LLGPGF021033@svn.freebsd.org> References: <201103212116.p2LLGPGF021033@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Tue, 22 Mar 2011 14:40:10 +0000 Message-ID: <1300804810.20711.12.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, thompsa@FreeBSD.org Subject: Re: svn commit: r219845 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 14:40:15 -0000 Hi, On Mon, 2011-03-21 at 21:16 +0000, Hans Petter Selasky wrote: > Date: Mon Mar 21 21:16:25 2011 > New Revision: 219845 > URL: http://svn.freebsd.org/changeset/base/219845 >=20 > Log: > - Bugfix: Fix a EHCI hardware race, where the hardware computed data to= ggle > value is updated after that we read it in the queue-head. This patch ca= n > fix problems with BULK timeouts. The issue was found on a Nvidia chipse= t. >=20 > Modified: > head/sys/dev/usb/controller/ehci.c >=20 > Modified: head/sys/dev/usb/controller/ehci.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/sys/dev/usb/controller/ehci.c Mon Mar 21 21:16:12 2011 (r219844) > +++ head/sys/dev/usb/controller/ehci.c Mon Mar 21 21:16:25 2011 (r219845) > @@ -1180,6 +1180,26 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ > return (last); > } > =20 > +static void > +ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t= xlen) > +{ > + uint8_t full =3D (actlen =3D=3D xlen); style(9) strongly advises against initialising variables in the declaration. > + uint8_t dt; > + > + /* count number of full packets */ > + dt =3D (actlen / xfer->max_packet_size) & 1; > + > + /* cumpute remainder */ > + actlen =3D actlen % xfer->max_packet_size; > + > + if (actlen > 0) > + dt ^=3D 1; /* short packet at the end */ > + else if (!full) Especially in this case - this would seem to be better written as else if (actlen !=3D xlen) > + dt ^=3D 1; /* zero length packet at the end */ > + > + xfer->endpoint->toggle_next ^=3D dt; > +} As an aside, over the years there are several PRs about bulk timeouts on EHCI on nVidia - is it possible that this fixes any of them? Some of the PRs date back to 6.x and 7.x - if I'm understanding the change properly, it seems that it is possible that this could be the cause? Do you have any opinions on whether this could fix any of those PRs? Thanks, Gavin --=20 Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B) From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 15:01:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BC671065673; Tue, 22 Mar 2011 15:01:07 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 189008FC16; Tue, 22 Mar 2011 15:01:05 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=118a5bn0tGnRZbUa9ClBty6BTuM1bA5mUZqmf2RHYp4= c=1 sm=1 a=IU0TiZmyZPMA:10 a=yTxM5DjhyGsA:10 a=N659UExz7-8A:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=6I5d2MoRAAAA:8 a=ryKf44oYO0ZEnny9_hcA:9 a=gqaOcW-znfXyNU4YBYtoExXC9koA:4 a=pILNOxqGKmIA:10 a=kFvEmTdc9h0Gig2r:21 a=-i7RyuqCfTGhr2yl:21 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 103754247; Tue, 22 Mar 2011 15:50:58 +0100 Received-SPF: softfail receiver=mailfe07.swip.net; client-ip=188.126.198.129; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: Gavin Atkinson Date: Tue, 22 Mar 2011 15:50:15 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <201103212116.p2LLGPGF021033@svn.freebsd.org> <1300804810.20711.12.camel@buffy.york.ac.uk> In-Reply-To: <1300804810.20711.12.camel@buffy.york.ac.uk> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201103221550.15901.hselasky@freebsd.org> Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" , "thompsa@FreeBSD.org" Subject: Re: svn commit: r219845 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 15:01:07 -0000 On Tuesday 22 March 2011 15:40:10 Gavin Atkinson wrote: > Hi, > > On Mon, 2011-03-21 at 21:16 +0000, Hans Petter Selasky wrote: > > Date: Mon Mar 21 21:16:25 2011 > > New Revision: 219845 > > URL: http://svn.freebsd.org/changeset/base/219845 > > > > Log: > > - Bugfix: Fix a EHCI hardware race, where the hardware computed data > > toggle value is updated after that we read it in the queue-head. This > > patch can fix problems with BULK timeouts. The issue was found on a > > Nvidia chipset. > > > > Modified: > > head/sys/dev/usb/controller/ehci.c > > > > Modified: head/sys/dev/usb/controller/ehci.c > > ========================================================================= > > ===== --- head/sys/dev/usb/controller/ehci.c Mon Mar 21 21:16:12 > > 2011 (r219844) +++ head/sys/dev/usb/controller/ehci.c Mon Mar 21 > > 21:16:25 2011 (r219845) @@ -1180,6 +1180,26 @@ _ehci_remove_qh(ehci_qh_t > > *sqh, ehci_qh_ > > > > return (last); > > > > } > > > > +static void > > +ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t > > xlen) +{ > > + uint8_t full = (actlen == xlen); Hi Gavin, > > style(9) strongly advises against initialising variables in the > declaration. Thanks for pointing out. > > > + uint8_t dt; > > + > > + /* count number of full packets */ > > + dt = (actlen / xfer->max_packet_size) & 1; > > + > > + /* cumpute remainder */ > > + actlen = actlen % xfer->max_packet_size; > > + > > + if (actlen > 0) > > + dt ^= 1; /* short packet at the end */ > > + else if (!full) > > Especially in this case - this would seem to be better written as Should be "oldactlen != xlen". I will try to fix the style issues, probably not before tomorrow, because I'm busy tonight. > else if (actlen != xlen) > > > + dt ^= 1; /* zero length packet at the end */ > > + > > + xfer->endpoint->toggle_next ^= dt; > > +} > > As an aside, over the years there are several PRs about bulk timeouts on > EHCI on nVidia - is it possible that this fixes any of them? Yes, I believe so. I'm not sure about 6.x and 7.x. What I caught red-handed was that the final DATA toggle value was not properly written back to the queue head at the time the last TD was not active. The data toggle only has two values 0 or 1, so there is a 50% chance it will cause a timeout when the race happens. > Some of > the PRs date back to 6.x and 7.x - if I'm understanding the change > properly, it seems that it is possible that this could be the cause? Do > you have any opinions on whether this could fix any of those PRs? --HPS From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 16:21:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B44B106566C; Tue, 22 Mar 2011 16:21:11 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7288FC08; Tue, 22 Mar 2011 16:21:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MGLBtI064692; Tue, 22 Mar 2011 16:21:11 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MGLBpM064684; Tue, 22 Mar 2011 16:21:11 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103221621.p2MGLBpM064684@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 22 Mar 2011 16:21: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: r219873 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 16:21:11 -0000 Author: pjd Date: Tue Mar 22 16:21:11 2011 New Revision: 219873 URL: http://svn.freebsd.org/changeset/base/219873 Log: The proto API is a general purpose API, so don't use 'hast' in structures or function names. It can now be used outside of HAST. MFC after: 1 week Modified: head/sbin/hastd/Makefile head/sbin/hastd/hast.h head/sbin/hastd/proto.c head/sbin/hastd/proto_impl.h head/sbin/hastd/proto_socketpair.c head/sbin/hastd/proto_tcp4.c head/sbin/hastd/proto_uds.c Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/Makefile Tue Mar 22 16:21:11 2011 (r219873) @@ -20,6 +20,7 @@ SRCS+= y.tab.h MAN= hastd.8 hast.conf.5 NO_WFORMAT= +CFLAGS+=-DPROTO_TCP4_DEFAULT_PORT=8457 CFLAGS+=-I${.CURDIR} CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" Modified: head/sbin/hastd/hast.h ============================================================================== --- head/sbin/hastd/hast.h Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/hast.h Tue Mar 22 16:21:11 2011 (r219873) @@ -86,7 +86,6 @@ #define HAST_TIMEOUT 5 #define HAST_CONFIG "/etc/hast.conf" #define HAST_CONTROL "/var/run/hastctl" -#define HASTD_PORT 8457 #define HASTD_LISTEN "tcp4://0.0.0.0:8457" #define HASTD_PIDFILE "/var/run/hastd.pid" Modified: head/sbin/hastd/proto.c ============================================================================== --- head/sbin/hastd/proto.c Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/proto.c Tue Mar 22 16:21:11 2011 (r219873) @@ -45,33 +45,33 @@ __FBSDID("$FreeBSD$"); #define PROTO_CONN_MAGIC 0x907041c struct proto_conn { - int pc_magic; - struct hast_proto *pc_proto; - void *pc_ctx; - int pc_side; + int pc_magic; + struct proto *pc_proto; + void *pc_ctx; + int pc_side; #define PROTO_SIDE_CLIENT 0 #define PROTO_SIDE_SERVER_LISTEN 1 #define PROTO_SIDE_SERVER_WORK 2 }; -static TAILQ_HEAD(, hast_proto) protos = TAILQ_HEAD_INITIALIZER(protos); +static TAILQ_HEAD(, proto) protos = TAILQ_HEAD_INITIALIZER(protos); void -proto_register(struct hast_proto *proto, bool isdefault) +proto_register(struct proto *proto, bool isdefault) { static bool seen_default = false; if (!isdefault) - TAILQ_INSERT_HEAD(&protos, proto, hp_next); + TAILQ_INSERT_HEAD(&protos, proto, prt_next); else { PJDLOG_ASSERT(!seen_default); seen_default = true; - TAILQ_INSERT_TAIL(&protos, proto, hp_next); + TAILQ_INSERT_TAIL(&protos, proto, prt_next); } } static struct proto_conn * -proto_alloc(struct hast_proto *proto, int side) +proto_alloc(struct proto *proto, int side) { struct proto_conn *conn; @@ -108,7 +108,7 @@ static int proto_common_setup(const char *srcaddr, const char *dstaddr, struct proto_conn **connp, int side) { - struct hast_proto *proto; + struct proto *proto; struct proto_conn *conn; void *ctx; int ret; @@ -116,17 +116,17 @@ proto_common_setup(const char *srcaddr, PJDLOG_ASSERT(side == PROTO_SIDE_CLIENT || side == PROTO_SIDE_SERVER_LISTEN); - TAILQ_FOREACH(proto, &protos, hp_next) { + TAILQ_FOREACH(proto, &protos, prt_next) { if (side == PROTO_SIDE_CLIENT) { - if (proto->hp_client == NULL) + if (proto->prt_client == NULL) ret = -1; else - ret = proto->hp_client(srcaddr, dstaddr, &ctx); + ret = proto->prt_client(srcaddr, dstaddr, &ctx); } else /* if (side == PROTO_SIDE_SERVER_LISTEN) */ { - if (proto->hp_server == NULL) + if (proto->prt_server == NULL) ret = -1; else - ret = proto->hp_server(dstaddr, &ctx); + ret = proto->prt_server(dstaddr, &ctx); } /* * ret == 0 - success @@ -148,8 +148,8 @@ proto_common_setup(const char *srcaddr, } conn = proto_alloc(proto, side); if (conn == NULL) { - if (proto->hp_close != NULL) - proto->hp_close(ctx); + if (proto->prt_close != NULL) + proto->prt_close(ctx); errno = ENOMEM; return (-1); } @@ -176,10 +176,10 @@ proto_connect(struct proto_conn *conn, i PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_side == PROTO_SIDE_CLIENT); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_connect != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_connect != NULL); PJDLOG_ASSERT(timeout >= -1); - ret = conn->pc_proto->hp_connect(conn->pc_ctx, timeout); + ret = conn->pc_proto->prt_connect(conn->pc_ctx, timeout); if (ret != 0) { errno = ret; return (-1); @@ -197,10 +197,10 @@ proto_connect_wait(struct proto_conn *co PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_side == PROTO_SIDE_CLIENT); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_connect_wait != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_connect_wait != NULL); PJDLOG_ASSERT(timeout >= 0); - ret = conn->pc_proto->hp_connect_wait(conn->pc_ctx, timeout); + ret = conn->pc_proto->prt_connect_wait(conn->pc_ctx, timeout); if (ret != 0) { errno = ret; return (-1); @@ -226,13 +226,13 @@ proto_accept(struct proto_conn *conn, st PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_side == PROTO_SIDE_SERVER_LISTEN); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_accept != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_accept != NULL); newconn = proto_alloc(conn->pc_proto, PROTO_SIDE_SERVER_WORK); if (newconn == NULL) return (-1); - ret = conn->pc_proto->hp_accept(conn->pc_ctx, &newconn->pc_ctx); + ret = conn->pc_proto->prt_accept(conn->pc_ctx, &newconn->pc_ctx); if (ret != 0) { proto_free(newconn); errno = ret; @@ -252,9 +252,9 @@ proto_send(const struct proto_conn *conn PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_send != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_send != NULL); - ret = conn->pc_proto->hp_send(conn->pc_ctx, data, size, -1); + ret = conn->pc_proto->prt_send(conn->pc_ctx, data, size, -1); if (ret != 0) { errno = ret; return (-1); @@ -270,9 +270,9 @@ proto_recv(const struct proto_conn *conn PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_recv != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_recv != NULL); - ret = conn->pc_proto->hp_recv(conn->pc_ctx, data, size, NULL); + ret = conn->pc_proto->prt_recv(conn->pc_ctx, data, size, NULL); if (ret != 0) { errno = ret; return (-1); @@ -289,16 +289,16 @@ proto_connection_send(const struct proto PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_send != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_send != NULL); PJDLOG_ASSERT(mconn != NULL); PJDLOG_ASSERT(mconn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(mconn->pc_proto != NULL); fd = proto_descriptor(mconn); PJDLOG_ASSERT(fd >= 0); - protoname = mconn->pc_proto->hp_name; + protoname = mconn->pc_proto->prt_name; PJDLOG_ASSERT(protoname != NULL); - ret = conn->pc_proto->hp_send(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname, strlen(protoname) + 1, fd); proto_close(mconn); if (ret != 0) { @@ -313,19 +313,19 @@ proto_connection_recv(const struct proto struct proto_conn **newconnp) { char protoname[128]; - struct hast_proto *proto; + struct proto *proto; struct proto_conn *newconn; int ret, fd; PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_recv != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_recv != NULL); PJDLOG_ASSERT(newconnp != NULL); bzero(protoname, sizeof(protoname)); - ret = conn->pc_proto->hp_recv(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname, sizeof(protoname) - 1, &fd); if (ret != 0) { errno = ret; @@ -334,8 +334,8 @@ proto_connection_recv(const struct proto PJDLOG_ASSERT(fd >= 0); - TAILQ_FOREACH(proto, &protos, hp_next) { - if (strcmp(proto->hp_name, protoname) == 0) + TAILQ_FOREACH(proto, &protos, prt_next) { + if (strcmp(proto->prt_name, protoname) == 0) break; } if (proto == NULL) { @@ -347,8 +347,8 @@ proto_connection_recv(const struct proto client ? PROTO_SIDE_CLIENT : PROTO_SIDE_SERVER_WORK); if (newconn == NULL) return (-1); - PJDLOG_ASSERT(newconn->pc_proto->hp_wrap != NULL); - ret = newconn->pc_proto->hp_wrap(fd, client, &newconn->pc_ctx); + PJDLOG_ASSERT(newconn->pc_proto->prt_wrap != NULL); + ret = newconn->pc_proto->prt_wrap(fd, client, &newconn->pc_ctx); if (ret != 0) { proto_free(newconn); errno = ret; @@ -367,9 +367,9 @@ proto_descriptor(const struct proto_conn PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_descriptor != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_descriptor != NULL); - return (conn->pc_proto->hp_descriptor(conn->pc_ctx)); + return (conn->pc_proto->prt_descriptor(conn->pc_ctx)); } bool @@ -379,9 +379,9 @@ proto_address_match(const struct proto_c PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_address_match != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_address_match != NULL); - return (conn->pc_proto->hp_address_match(conn->pc_ctx, addr)); + return (conn->pc_proto->prt_address_match(conn->pc_ctx, addr)); } void @@ -391,9 +391,9 @@ proto_local_address(const struct proto_c PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_local_address != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_local_address != NULL); - conn->pc_proto->hp_local_address(conn->pc_ctx, addr, size); + conn->pc_proto->prt_local_address(conn->pc_ctx, addr, size); } void @@ -403,9 +403,9 @@ proto_remote_address(const struct proto_ PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_remote_address != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_remote_address != NULL); - conn->pc_proto->hp_remote_address(conn->pc_ctx, addr, size); + conn->pc_proto->prt_remote_address(conn->pc_ctx, addr, size); } int @@ -439,8 +439,8 @@ proto_close(struct proto_conn *conn) PJDLOG_ASSERT(conn != NULL); PJDLOG_ASSERT(conn->pc_magic == PROTO_CONN_MAGIC); PJDLOG_ASSERT(conn->pc_proto != NULL); - PJDLOG_ASSERT(conn->pc_proto->hp_close != NULL); + PJDLOG_ASSERT(conn->pc_proto->prt_close != NULL); - conn->pc_proto->hp_close(conn->pc_ctx); + conn->pc_proto->prt_close(conn->pc_ctx); proto_free(conn); } Modified: head/sbin/hastd/proto_impl.h ============================================================================== --- head/sbin/hastd/proto_impl.h Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/proto_impl.h Tue Mar 22 16:21:11 2011 (r219873) @@ -39,39 +39,39 @@ #define __constructor __attribute__((constructor)) -typedef int hp_client_t(const char *, const char *, void **); -typedef int hp_connect_t(void *, int); -typedef int hp_connect_wait_t(void *, int); -typedef int hp_server_t(const char *, void **); -typedef int hp_accept_t(void *, void **); -typedef int hp_wrap_t(int, bool, void **); -typedef int hp_send_t(void *, const unsigned char *, size_t, int); -typedef int hp_recv_t(void *, unsigned char *, size_t, int *); -typedef int hp_descriptor_t(const void *); -typedef bool hp_address_match_t(const void *, const char *); -typedef void hp_local_address_t(const void *, char *, size_t); -typedef void hp_remote_address_t(const void *, char *, size_t); -typedef void hp_close_t(void *); - -struct hast_proto { - const char *hp_name; - hp_client_t *hp_client; - hp_connect_t *hp_connect; - hp_connect_wait_t *hp_connect_wait; - hp_server_t *hp_server; - hp_accept_t *hp_accept; - hp_wrap_t *hp_wrap; - hp_send_t *hp_send; - hp_recv_t *hp_recv; - hp_descriptor_t *hp_descriptor; - hp_address_match_t *hp_address_match; - hp_local_address_t *hp_local_address; - hp_remote_address_t *hp_remote_address; - hp_close_t *hp_close; - TAILQ_ENTRY(hast_proto) hp_next; +typedef int prt_client_t(const char *, const char *, void **); +typedef int prt_connect_t(void *, int); +typedef int prt_connect_wait_t(void *, int); +typedef int prt_server_t(const char *, void **); +typedef int prt_accept_t(void *, void **); +typedef int prt_wrap_t(int, bool, void **); +typedef int prt_send_t(void *, const unsigned char *, size_t, int); +typedef int prt_recv_t(void *, unsigned char *, size_t, int *); +typedef int prt_descriptor_t(const void *); +typedef bool prt_address_match_t(const void *, const char *); +typedef void prt_local_address_t(const void *, char *, size_t); +typedef void prt_remote_address_t(const void *, char *, size_t); +typedef void prt_close_t(void *); + +struct proto { + const char *prt_name; + prt_client_t *prt_client; + prt_connect_t *prt_connect; + prt_connect_wait_t *prt_connect_wait; + prt_server_t *prt_server; + prt_accept_t *prt_accept; + prt_wrap_t *prt_wrap; + prt_send_t *prt_send; + prt_recv_t *prt_recv; + prt_descriptor_t *prt_descriptor; + prt_address_match_t *prt_address_match; + prt_local_address_t *prt_local_address; + prt_remote_address_t *prt_remote_address; + prt_close_t *prt_close; + TAILQ_ENTRY(proto) prt_next; }; -void proto_register(struct hast_proto *proto, bool isdefault); +void proto_register(struct proto *proto, bool isdefault); int proto_common_send(int sock, const unsigned char *data, size_t size, int fd); int proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp); Modified: head/sbin/hastd/proto_socketpair.c ============================================================================== --- head/sbin/hastd/proto_socketpair.c Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/proto_socketpair.c Tue Mar 22 16:21:11 2011 (r219873) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "hast.h" #include "pjdlog.h" #include "proto_impl.h" @@ -221,13 +220,13 @@ sp_close(void *ctx) free(spctx); } -static struct hast_proto sp_proto = { - .hp_name = "socketpair", - .hp_client = sp_client, - .hp_send = sp_send, - .hp_recv = sp_recv, - .hp_descriptor = sp_descriptor, - .hp_close = sp_close +static struct proto sp_proto = { + .prt_name = "socketpair", + .prt_client = sp_client, + .prt_send = sp_send, + .prt_recv = sp_recv, + .prt_descriptor = sp_descriptor, + .prt_close = sp_close }; static __constructor void Modified: head/sbin/hastd/proto_tcp4.c ============================================================================== --- head/sbin/hastd/proto_tcp4.c Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/proto_tcp4.c Tue Mar 22 16:21:11 2011 (r219873) @@ -31,6 +31,9 @@ __FBSDID("$FreeBSD$"); #include /* MAXHOSTNAMELEN */ +#include + +#include #include #include @@ -44,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "hast.h" #include "pjdlog.h" #include "proto_impl.h" #include "subr.h" @@ -183,7 +185,8 @@ tcp4_setup_new(const char *addr, int sid return (errno); /* Parse given address. */ - if ((ret = tcp4_addr(addr, HASTD_PORT, &tctx->tc_sin)) != 0) { + if ((ret = tcp4_addr(addr, PROTO_TCP4_DEFAULT_PORT, + &tctx->tc_sin)) != 0) { free(tctx); return (ret); } @@ -507,7 +510,7 @@ tcp4_address_match(const void *ctx, cons PJDLOG_ASSERT(tctx != NULL); PJDLOG_ASSERT(tctx->tc_magic == TCP4_CTX_MAGIC); - if (tcp4_addr(addr, HASTD_PORT, &sin) != 0) + if (tcp4_addr(addr, PROTO_TCP4_DEFAULT_PORT, &sin) != 0) return (false); ip1 = sin.sin_addr.s_addr; @@ -569,21 +572,21 @@ tcp4_close(void *ctx) free(tctx); } -static struct hast_proto tcp4_proto = { - .hp_name = "tcp4", - .hp_client = tcp4_client, - .hp_connect = tcp4_connect, - .hp_connect_wait = tcp4_connect_wait, - .hp_server = tcp4_server, - .hp_accept = tcp4_accept, - .hp_wrap = tcp4_wrap, - .hp_send = tcp4_send, - .hp_recv = tcp4_recv, - .hp_descriptor = tcp4_descriptor, - .hp_address_match = tcp4_address_match, - .hp_local_address = tcp4_local_address, - .hp_remote_address = tcp4_remote_address, - .hp_close = tcp4_close +static struct proto tcp4_proto = { + .prt_name = "tcp4", + .prt_client = tcp4_client, + .prt_connect = tcp4_connect, + .prt_connect_wait = tcp4_connect_wait, + .prt_server = tcp4_server, + .prt_accept = tcp4_accept, + .prt_wrap = tcp4_wrap, + .prt_send = tcp4_send, + .prt_recv = tcp4_recv, + .prt_descriptor = tcp4_descriptor, + .prt_address_match = tcp4_address_match, + .prt_local_address = tcp4_local_address, + .prt_remote_address = tcp4_remote_address, + .prt_close = tcp4_close }; static __constructor void Modified: head/sbin/hastd/proto_uds.c ============================================================================== --- head/sbin/hastd/proto_uds.c Tue Mar 22 14:55:31 2011 (r219872) +++ head/sbin/hastd/proto_uds.c Tue Mar 22 16:21:11 2011 (r219873) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); /* UDS - UNIX Domain Socket */ #include +#include #include #include @@ -42,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "hast.h" #include "pjdlog.h" #include "proto_impl.h" @@ -338,19 +338,19 @@ uds_close(void *ctx) free(uctx); } -static struct hast_proto uds_proto = { - .hp_name = "uds", - .hp_client = uds_client, - .hp_connect = uds_connect, - .hp_connect_wait = uds_connect_wait, - .hp_server = uds_server, - .hp_accept = uds_accept, - .hp_send = uds_send, - .hp_recv = uds_recv, - .hp_descriptor = uds_descriptor, - .hp_local_address = uds_local_address, - .hp_remote_address = uds_remote_address, - .hp_close = uds_close +static struct proto uds_proto = { + .prt_name = "uds", + .prt_client = uds_client, + .prt_connect = uds_connect, + .prt_connect_wait = uds_connect_wait, + .prt_server = uds_server, + .prt_accept = uds_accept, + .prt_send = uds_send, + .prt_recv = uds_recv, + .prt_descriptor = uds_descriptor, + .prt_local_address = uds_local_address, + .prt_remote_address = uds_remote_address, + .prt_close = uds_close }; static __constructor void From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 17:02:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE2D5106564A; Tue, 22 Mar 2011 17:02:33 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B05BF8FC08; Tue, 22 Mar 2011 17:02:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MH2XYw065765; Tue, 22 Mar 2011 17:02:33 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MH2XdL065763; Tue, 22 Mar 2011 17:02:33 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201103221702.p2MH2XdL065763@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 22 Mar 2011 17:02: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: r219875 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 17:02:33 -0000 Author: marcel Date: Tue Mar 22 17:02:33 2011 New Revision: 219875 URL: http://svn.freebsd.org/changeset/base/219875 Log: Branch from contrib/binutils/ld/emulparams/elf64_ia64_fbsd.s so that we can modify it. Added: head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh - copied unchanged from r219857, head/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh Copied: head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh (from r219857, head/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh Tue Mar 22 17:02:33 2011 (r219875, copy of r219857, head/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh) @@ -0,0 +1,7 @@ +. ${srcdir}/emulparams/elf64_ia64.sh +TEXT_START_ADDR="0x2000000000000000" +unset DATA_ADDR +unset SMALL_DATA_CTOR +unset SMALL_DATA_DTOR +. ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-ia64-freebsd" From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 17:19:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD24F1065670; Tue, 22 Mar 2011 17:19:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A521E8FC12; Tue, 22 Mar 2011 17:19:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MHJZPj066184; Tue, 22 Mar 2011 17:19:35 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MHJZxi066181; Tue, 22 Mar 2011 17:19:35 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201103221719.p2MHJZxi066181@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 22 Mar 2011 17:19: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: r219876 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 17:19:35 -0000 Author: marcel Date: Tue Mar 22 17:19:35 2011 New Revision: 219876 URL: http://svn.freebsd.org/changeset/base/219876 Log: Change the load address from offset 0 in region 1 to offset 4G in region 0. This (almost) gives us the address space back (at the bottom) that we lost at the top. Region 0 has traditionally been reserved for IA-32 emulation, which has not been of great interest. By starting 64-bit processes at the 4G boundary we at least preserve some of the advantages: 1. Any invalid pointer cast (from int to pointer and back) will still always fail and not only when more than 4GB of memory is in use. 2. Memory sharing between 64-bit and 32-bit processes is still possibly by using addresses < 4G. Modified: head/gnu/usr.bin/binutils/ld/Makefile.ia64 head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh Modified: head/gnu/usr.bin/binutils/ld/Makefile.ia64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.ia64 Tue Mar 22 17:02:33 2011 (r219875) +++ head/gnu/usr.bin/binutils/ld/Makefile.ia64 Tue Mar 22 17:19:35 2011 (r219876) @@ -4,12 +4,13 @@ NATIVE_EMULATION= elf64_ia64_fbsd SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c -e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ +e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ - ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} + ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ + ${.CURDIR}/${NATIVE_EMULATION}.sh #XXX EMS+= eelf64_ia64 Modified: head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh ============================================================================== --- head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh Tue Mar 22 17:02:33 2011 (r219875) +++ head/gnu/usr.bin/binutils/ld/elf64_ia64_fbsd.sh Tue Mar 22 17:19:35 2011 (r219876) @@ -1,5 +1,6 @@ +# $FreeBSD$ . ${srcdir}/emulparams/elf64_ia64.sh -TEXT_START_ADDR="0x2000000000000000" +TEXT_START_ADDR="0x0000000100000000" unset DATA_ADDR unset SMALL_DATA_CTOR unset SMALL_DATA_DTOR From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 17:26:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5009F106566C; Tue, 22 Mar 2011 17:26:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41D968FC1A; Tue, 22 Mar 2011 17:26:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MHQvgO066379; Tue, 22 Mar 2011 17:26:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MHQvAh066376; Tue, 22 Mar 2011 17:26:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201103221726.p2MHQvAh066376@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 22 Mar 2011 17:26: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: r219877 - head/tools/regression/acltools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 17:26:57 -0000 Author: trasz Date: Tue Mar 22 17:26:56 2011 New Revision: 219877 URL: http://svn.freebsd.org/changeset/base/219877 Log: Add test for acl_is_trivial_np(3). Added: head/tools/regression/acltools/04.t - copied, changed from r219697, head/tools/regression/acltools/01.t head/tools/regression/acltools/tools-nfs4-trivial.test (contents, props changed) Copied and modified: head/tools/regression/acltools/04.t (from r219697, head/tools/regression/acltools/01.t) ============================================================================== --- head/tools/regression/acltools/01.t Wed Mar 16 12:40:58 2011 (r219697, copy source) +++ head/tools/regression/acltools/04.t Tue Mar 22 17:26:56 2011 (r219877) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2008, 2009 Edward Tomasz NapieraÅ‚a +# Copyright (c) 2011 Edward Tomasz NapieraÅ‚a # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,19 +27,11 @@ # $FreeBSD$ # -# This is a wrapper script to run tools-nfs4.test on ZFS filesystem. +# This is a wrapper script to run tools-nfs4-trivial.test on ZFS filesystem. # # WARNING: It uses hardcoded ZFS pool name "acltools" -# -# If any of the tests fails, here is how to debug it: go to -# the directory with problematic filesystem mounted on it, -# and do /path/to/test run /path/to/test tools-nfs4.test, e.g. -# -# /usr/src/tools/regression/acltools/run /usr/src/tools/regression/acltools/tools-nfs4.test -# -# Output should be obvious. -echo "1..4" +echo "1..3" if [ `whoami` != "root" ]; then echo "not ok 1 - you need to be root to run this test." @@ -61,21 +53,12 @@ echo "ok 1" cd $MNT -# First, check whether we can crash the kernel by creating too many -# entries. For some reason this won't work in the test file. -touch xxx -setfacl -x2 xxx -while :; do setfacl -a0 u:42:rwx:allow xxx 2> /dev/null; if [ $? -ne 0 ]; then break; fi; done -chmod 600 xxx -rm xxx -echo "ok 2" - -perl $TESTDIR/run $TESTDIR/tools-nfs4-psarc.test > /dev/null +perl $TESTDIR/run $TESTDIR/tools-nfs4-trivial.test > /dev/null if [ $? -eq 0 ]; then - echo "ok 3" + echo "ok 2" else - echo "not ok 3" + echo "not ok 2" fi cd / @@ -83,4 +66,4 @@ zpool destroy -f acltools rmdir $MNT mdconfig -du $MD -echo "ok 4" +echo "ok 3" Added: head/tools/regression/acltools/tools-nfs4-trivial.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/acltools/tools-nfs4-trivial.test Tue Mar 22 17:26:56 2011 (r219877) @@ -0,0 +1,82 @@ +# Copyright (c) 2011 Edward Tomasz NapieraÅ‚a +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# This is a tools-level test for acl_is_trivial_np(3). Run it as root on ZFS. +# Note that this does not work on UFS with NFSv4 ACLs enabled - UFS recognizes +# both kind of trivial ACLs and replaces it by the default one. +# +# WARNING: Creates files in unsafe way. + +$ whoami +> root +$ umask 022 + +# Check whether ls(1) correctly recognizes PSARC/2010/029-style trivial ACLs. +$ touch xxx + +$ ls -l xxx | cut -d' ' -f1 +> -rw-r--r-- + +$ getfacl -q xxx +> owner@:rw-p--aARWcCos:------:allow +> group@:r-----a-R-c--s:------:allow +> everyone@:r-----a-R-c--s:------:allow + +# Check whether ls(1) correctly recognizes draft-style trivial ACLs. +$ rm xxx +$ touch xxx +$ setfacl -a0 owner@:x:deny,owner@:rwpAWCo:allow,group@:wxp:deny,group@:r:allow,everyone@:wxpAWCo:deny,everyone@:raRcs:allow xxx +$ setfacl -x5 xxx +$ setfacl -x5 xxx +$ setfacl -x5 xxx + +$ ls -l xxx | cut -d' ' -f1 +> -rw-r--r-- + +$ getfacl -q xxx +> owner@:--x-----------:------:deny +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +# Make sure ls(1) actually can recognize something as non-trivial. +$ setfacl -x0 xxx + +$ ls -l xxx | cut -d' ' -f1 +> -rw-r--r--+ + +$ getfacl -q xxx +> owner@:rw-p---A-W-Co-:------:allow +> group@:-wxp----------:------:deny +> group@:r-------------:------:allow +> everyone@:-wxp---A-W-Co-:------:deny +> everyone@:r-----a-R-c--s:------:allow + +$ rm xxx + From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 17:44:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D4E3106564A; Tue, 22 Mar 2011 17:44:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F04D8FC13; Tue, 22 Mar 2011 17:44:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MHi8ua066788; Tue, 22 Mar 2011 17:44:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MHi8u6066784; Tue, 22 Mar 2011 17:44:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201103221744.p2MHi8u6066784@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 22 Mar 2011 17:44: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: r219878 - in head: lib/libc/posix1e sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 17:44:08 -0000 Author: trasz Date: Tue Mar 22 17:44:07 2011 New Revision: 219878 URL: http://svn.freebsd.org/changeset/base/219878 Log: Move the code around so that libc behaviour does not depend on a variable that was supposed to be kernel-only. There should be no functional changes. Modified: head/lib/libc/posix1e/acl_strip.c head/sys/kern/subr_acl_nfs4.c head/sys/sys/acl.h Modified: head/lib/libc/posix1e/acl_strip.c ============================================================================== --- head/lib/libc/posix1e/acl_strip.c Tue Mar 22 17:26:56 2011 (r219877) +++ head/lib/libc/posix1e/acl_strip.c Tue Mar 22 17:44:07 2011 (r219878) @@ -36,13 +36,12 @@ __FBSDID("$FreeBSD$"); #include "acl_support.h" /* - * These three routines from sys/kern/subr_acl_nfs4.c are used by both kernel + * These routines from sys/kern/subr_acl_nfs4.c are used by both kernel * and libc. */ -void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode); -void acl_nfs4_sync_acl_from_mode(struct acl *aclp, mode_t mode, - int file_owner_id); void acl_nfs4_sync_mode_from_acl(mode_t *_mode, const struct acl *aclp); +void acl_nfs4_trivial_from_mode_libc(struct acl *aclp, int file_owner_id, + int canonical_six); static acl_t _nfs4_acl_strip_np(const acl_t aclp, int canonical_six) @@ -59,10 +58,7 @@ _nfs4_acl_strip_np(const acl_t aclp, int _acl_brand_as(newacl, ACL_BRAND_NFS4); acl_nfs4_sync_mode_from_acl(&mode, &(aclp->ats_acl)); - if (canonical_six) - acl_nfs4_sync_acl_from_mode(&(newacl->ats_acl), mode, -1); - else - acl_nfs4_trivial_from_mode(&(newacl->ats_acl), mode); + acl_nfs4_trivial_from_mode_libc(&(newacl->ats_acl), mode, canonical_six); return (newacl); } Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Tue Mar 22 17:26:56 2011 (r219877) +++ head/sys/kern/subr_acl_nfs4.c Tue Mar 22 17:44:07 2011 (r219878) @@ -51,14 +51,14 @@ __FBSDID("$FreeBSD$"); #define KASSERT(a, b) assert(a) #define CTASSERT(a) -void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode); - #endif /* !_KERNEL */ -static int acl_nfs4_old_semantics = 1; - #ifdef _KERNEL +static void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode); + +static int acl_nfs4_old_semantics = 1; + SYSCTL_INT(_vfs, OID_AUTO, acl_nfs4_old_semantics, CTLFLAG_RW, &acl_nfs4_old_semantics, 1, "Use pre-PSARC/2010/029 NFSv4 ACL semantics"); @@ -703,6 +703,7 @@ acl_nfs4_sync_acl_from_mode_draft(struct a5->ae_perm |= ACL_EXECUTE; } +#ifdef _KERNEL void acl_nfs4_sync_acl_from_mode(struct acl *aclp, mode_t mode, int file_owner_id) @@ -713,6 +714,7 @@ acl_nfs4_sync_acl_from_mode(struct acl * else acl_nfs4_trivial_from_mode(aclp, mode); } +#endif /* _KERNEL */ void acl_nfs4_sync_mode_from_acl(mode_t *_mode, const struct acl *aclp) @@ -837,6 +839,7 @@ acl_nfs4_sync_mode_from_acl(mode_t *_mod *_mode = mode | (old_mode & ACL_PRESERVE_MASK); } +#ifdef _KERNEL /* * Calculate inherited ACL in a manner compatible with NFSv4 Minor Version 1, * draft-ietf-nfsv4-minorversion1-03.txt. @@ -1000,6 +1003,7 @@ acl_nfs4_compute_inherited_acl_draft(con */ acl_nfs4_sync_acl_from_mode(child_aclp, mode, file_owner_id); } +#endif /* _KERNEL */ /* * Populate the ACL with entries inherited from parent_aclp. @@ -1182,6 +1186,7 @@ acl_nfs4_compute_inherited_acl_psarc(con _acl_append(aclp, ACL_EVERYONE, everyone_allow, ACL_ENTRY_TYPE_ALLOW); } +#ifdef _KERNEL void acl_nfs4_compute_inherited_acl(const struct acl *parent_aclp, struct acl *child_aclp, mode_t mode, int file_owner_id, @@ -1195,17 +1200,15 @@ acl_nfs4_compute_inherited_acl(const str acl_nfs4_compute_inherited_acl_psarc(parent_aclp, child_aclp, mode, file_owner_id, is_directory); } +#endif /* _KERNEL */ /* * Calculate trivial ACL in a manner compatible with PSARC/2010/029. * Note that this results in an ACL different from (but semantically * equal to) the "canonical six" trivial ACL computed using algorithm * described in draft-ietf-nfsv4-minorversion1-03.txt, 3.16.6.2. - * - * This routine is not static only because the code is being used in libc. - * Kernel code should call acl_nfs4_sync_acl_from_mode() instead. */ -void +static void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode) { @@ -1213,6 +1216,23 @@ acl_nfs4_trivial_from_mode(struct acl *a acl_nfs4_compute_inherited_acl_psarc(NULL, aclp, mode, -1, -1); } +#ifndef _KERNEL +/* + * This routine is used by libc to implement acl_strip_np(3) + * and acl_is_trivial_np(3). + */ +void +acl_nfs4_trivial_from_mode_libc(struct acl *aclp, int mode, int canonical_six) +{ + + aclp->acl_cnt = 0; + if (canonical_six) + acl_nfs4_sync_acl_from_mode_draft(aclp, mode, -1); + else + acl_nfs4_trivial_from_mode(aclp, mode); +} +#endif /* !_KERNEL */ + #ifdef _KERNEL static int _acls_are_equal(const struct acl *a, const struct acl *b) Modified: head/sys/sys/acl.h ============================================================================== --- head/sys/sys/acl.h Tue Mar 22 17:26:56 2011 (r219877) +++ head/sys/sys/acl.h Tue Mar 22 17:44:07 2011 (r219878) @@ -285,8 +285,6 @@ mode_t acl_posix1e_newfilemode(mode_t struct acl *acl_alloc(int flags); void acl_free(struct acl *aclp); -void acl_nfs4_trivial_from_mode(struct acl *aclp, - mode_t mode); void acl_nfs4_sync_acl_from_mode(struct acl *aclp, mode_t mode, int file_owner_id); void acl_nfs4_sync_mode_from_acl(mode_t *mode, From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 19:49:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A89F6106564A; Tue, 22 Mar 2011 19:49:27 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C1D98FC12; Tue, 22 Mar 2011 19:49:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MJnR5Z069320; Tue, 22 Mar 2011 19:49:27 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MJnRJV069318; Tue, 22 Mar 2011 19:49:27 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201103221949.p2MJnRJV069318@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 22 Mar 2011 19:49: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: r219879 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 19:49:27 -0000 Author: trociny Date: Tue Mar 22 19:49:27 2011 New Revision: 219879 URL: http://svn.freebsd.org/changeset/base/219879 Log: For requests that are sent only to remote component use the error from remote. Approved by: pjd (mentor) MFC after: 1 week Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Mar 22 17:44:07 2011 (r219878) +++ head/sbin/hastd/primary.c Tue Mar 22 19:49:27 2011 (r219879) @@ -1610,9 +1610,14 @@ ggate_send_thread(void *arg) if (ii == ncomps) { /* * None of the requests were successful. - * Use first error. + * Use the error from local component except the + * case when we did only remote request. */ - ggio->gctl_error = hio->hio_errors[0]; + if (ggio->gctl_cmd == BIO_READ && + res->hr_syncsrc == HAST_SYNCSRC_SECONDARY) + ggio->gctl_error = hio->hio_errors[1]; + else + ggio->gctl_error = hio->hio_errors[0]; } if (ggio->gctl_error == 0 && ggio->gctl_cmd == BIO_WRITE) { mtx_lock(&res->hr_amp_lock); From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 19:52:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3D3C106564A; Tue, 22 Mar 2011 19:52:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A78C58FC12; Tue, 22 Mar 2011 19:52:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MJqTHx069423; Tue, 22 Mar 2011 19:52:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MJqTJF069421; Tue, 22 Mar 2011 19:52:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201103221952.p2MJqTJF069421@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 22 Mar 2011 19:52: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: r219880 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 19:52:29 -0000 Author: trasz Date: Tue Mar 22 19:52:29 2011 New Revision: 219880 URL: http://svn.freebsd.org/changeset/base/219880 Log: Make UFS use PSARC/2010/029 NFSv4 ACL semantics by default, bringing it in line with ZFSv28. X-MFC-After: ZFSv28. Modified: head/sys/kern/subr_acl_nfs4.c Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Tue Mar 22 19:49:27 2011 (r219879) +++ head/sys/kern/subr_acl_nfs4.c Tue Mar 22 19:52:29 2011 (r219880) @@ -57,10 +57,10 @@ __FBSDID("$FreeBSD$"); static void acl_nfs4_trivial_from_mode(struct acl *aclp, mode_t mode); -static int acl_nfs4_old_semantics = 1; +static int acl_nfs4_old_semantics = 0; SYSCTL_INT(_vfs, OID_AUTO, acl_nfs4_old_semantics, CTLFLAG_RW, - &acl_nfs4_old_semantics, 1, "Use pre-PSARC/2010/029 NFSv4 ACL semantics"); + &acl_nfs4_old_semantics, 0, "Use pre-PSARC/2010/029 NFSv4 ACL semantics"); static struct { accmode_t accmode; From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 20:27:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18FA91065676; Tue, 22 Mar 2011 20:27:27 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA1C8FC14; Tue, 22 Mar 2011 20:27:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MKRQJF070216; Tue, 22 Mar 2011 20:27:26 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MKRQ8R070214; Tue, 22 Mar 2011 20:27:26 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201103222027.p2MKRQ8R070214@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 22 Mar 2011 20:27: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: r219882 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 20:27:27 -0000 Author: trociny Date: Tue Mar 22 20:27:26 2011 New Revision: 219882 URL: http://svn.freebsd.org/changeset/base/219882 Log: After synchronization is complete we should make primary counters be equal to secondary counters: primary_localcnt = secondary_remotecnt primary_remotecnt = secondary_localcnt Previously it was done wrong and split-brain was observed after primary had synchronized up-to-date data from secondary. Approved by: pjd (mentor) MFC after: 1 week Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Tue Mar 22 20:00:27 2011 (r219881) +++ head/sbin/hastd/primary.c Tue Mar 22 20:27:26 2011 (r219882) @@ -1757,13 +1757,13 @@ sync_thread(void *arg __unused) mtx_lock(&metadata_lock); res->hr_syncsrc = HAST_SYNCSRC_UNDEF; res->hr_primary_localcnt = - res->hr_secondary_localcnt; - res->hr_primary_remotecnt = res->hr_secondary_remotecnt; + res->hr_primary_remotecnt = + res->hr_secondary_localcnt; pjdlog_debug(1, "Setting localcnt to %ju and remotecnt to %ju.", (uintmax_t)res->hr_primary_localcnt, - (uintmax_t)res->hr_secondary_localcnt); + (uintmax_t)res->hr_primary_remotecnt); (void)metadata_write(res); mtx_unlock(&metadata_lock); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 21:05:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE2D1065675; Tue, 22 Mar 2011 21:05:56 +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 BD3198FC14; Tue, 22 Mar 2011 21:05:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2ML5u0I071208; Tue, 22 Mar 2011 21:05:56 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2ML5uoE071206; Tue, 22 Mar 2011 21:05:56 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103222105.p2ML5uoE071206@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 22 Mar 2011 21:05: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: r219883 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 21:05:56 -0000 Author: np Date: Tue Mar 22 21:05:56 2011 New Revision: 219883 URL: http://svn.freebsd.org/changeset/base/219883 Log: Fix an error while constructing the table that maps context id -> egress queue. MFC after: 1 day Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue Mar 22 20:27:26 2011 (r219882) +++ head/sys/dev/cxgbe/t4_sge.c Tue Mar 22 21:05:56 2011 (r219883) @@ -1134,7 +1134,7 @@ alloc_iq_fl(struct port_info *pi, struct fl->cntxt_id = be16toh(c.fl0id); fl->pidx = fl->cidx = 0; - cntxt_id = iq->cntxt_id - sc->sge.eq_start; + cntxt_id = fl->cntxt_id - sc->sge.eq_start; KASSERT(cntxt_id < sc->sge.neq, ("%s: fl->cntxt_id (%d) more than the max (%d)", __func__, cntxt_id, sc->sge.neq - 1)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 21:11:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69201106566C; Tue, 22 Mar 2011 21:11:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0CE8FC0A; Tue, 22 Mar 2011 21:11:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MLBaH9071369; Tue, 22 Mar 2011 21:11:36 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MLBaTH071367; Tue, 22 Mar 2011 21:11:36 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103222111.p2MLBaTH071367@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 22 Mar 2011 21:11: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: r219884 - head/sbin/hastctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 21:11:36 -0000 Author: pjd Date: Tue Mar 22 21:11:36 2011 New Revision: 219884 URL: http://svn.freebsd.org/changeset/base/219884 Log: Forgot to commit this as part of r219873. MFC after: 1 week Modified: head/sbin/hastctl/Makefile Modified: head/sbin/hastctl/Makefile ============================================================================== --- head/sbin/hastctl/Makefile Tue Mar 22 21:05:56 2011 (r219883) +++ head/sbin/hastctl/Makefile Tue Mar 22 21:11:36 2011 (r219884) @@ -13,7 +13,7 @@ SRCS+= lzf.c SRCS+= metadata.c SRCS+= nv.c SRCS+= parse.y pjdlog.c -SRCS+= proto.c proto_common.c proto_tcp4.c proto_uds.c +SRCS+= proto.c proto_common.c proto_uds.c SRCS+= token.l SRCS+= subr.c SRCS+= y.tab.h From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 21:19:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17BE1065673; Tue, 22 Mar 2011 21:19:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C264E8FC0A; Tue, 22 Mar 2011 21:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MLJp7L071670; Tue, 22 Mar 2011 21:19:51 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MLJpmS071667; Tue, 22 Mar 2011 21:19:51 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103222119.p2MLJpmS071667@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 22 Mar 2011 21:19: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: r219887 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 21:19:51 -0000 Author: pjd Date: Tue Mar 22 21:19:51 2011 New Revision: 219887 URL: http://svn.freebsd.org/changeset/base/219887 Log: Add my copyright. MFC after: 1 week Modified: head/sbin/hastd/subr.c head/sbin/hastd/subr.h Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Tue Mar 22 21:16:14 2011 (r219886) +++ head/sbin/hastd/subr.c Tue Mar 22 21:19:51 2011 (r219887) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010 The FreeBSD Foundation + * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from Modified: head/sbin/hastd/subr.h ============================================================================== --- head/sbin/hastd/subr.h Tue Mar 22 21:16:14 2011 (r219886) +++ head/sbin/hastd/subr.h Tue Mar 22 21:19:51 2011 (r219887) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010 The FreeBSD Foundation + * Copyright (c) 2011 Pawel Jakub Dawidek * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from From owner-svn-src-all@FreeBSD.ORG Tue Mar 22 22:59:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD7111065670; Tue, 22 Mar 2011 22:59:09 +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 CDE238FC22; Tue, 22 Mar 2011 22:59:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2MMx9ch073886; Tue, 22 Mar 2011 22:59:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2MMx9i3073884; Tue, 22 Mar 2011 22:59:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103222259.p2MMx9i3073884@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Mar 2011 22:59: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: r219891 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 22:59:10 -0000 Author: adrian Date: Tue Mar 22 22:59:09 2011 New Revision: 219891 URL: http://svn.freebsd.org/changeset/base/219891 Log: Enable setting the MCS rate bit for ast_tx_rate. This allows ath_stats to print the MCS rate when TX'ing. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Mar 22 22:39:42 2011 (r219890) +++ head/sys/dev/ath/if_ath.c Tue Mar 22 22:59:09 2011 (r219891) @@ -5151,9 +5151,10 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, sc->sc_stats.ast_tdma_tsfadjm = TDMA_AVG(sc->sc_avgtsfdeltam); #endif rt = sc->sc_currates; - /* XXX HT rates */ sc->sc_stats.ast_tx_rate = rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC; + if (rt->info[sc->sc_txrix].phy & IEEE80211_T_HT) + sc->sc_stats.ast_tx_rate |= IEEE80211_RATE_MCS; return copyout(&sc->sc_stats, ifr->ifr_data, sizeof (sc->sc_stats)); case SIOCZATHSTATS: From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 01:26:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B377106564A; Wed, 23 Mar 2011 01:26:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0738FC14; Wed, 23 Mar 2011 01:26:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N1QL3s077124; Wed, 23 Mar 2011 01:26:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N1QLFo077121; Wed, 23 Mar 2011 01:26:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103230126.p2N1QLFo077121@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 23 Mar 2011 01: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: r219892 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 01:26:22 -0000 Author: nwhitehorn Date: Wed Mar 23 01:26:21 2011 New Revision: 219892 URL: http://svn.freebsd.org/changeset/base/219892 Log: Allow setting of parameters for file systems (e.g. softupdates), turn on SUJ by default, and allow creation and mounting of FAT filesystems from the installer. Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c head/usr.sbin/bsdinstall/partedit/partedit.h Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Mar 22 22:59:09 2011 (r219891) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed Mar 23 01:26:21 2011 (r219892) @@ -78,6 +78,86 @@ scheme_supports_labels(const char *schem return (0); } +static void +newfs_command(const char *fstype, char *command, int use_default) +{ + if (strcmp(fstype, "freebsd-ufs") == 0) { + int i; + DIALOG_LISTITEM items[] = { + {"UFS1", "UFS Version 1", + "Use version 1 of the UFS file system instead " + "of version 2 (not recommended)", 0 }, + {"SU", "Softupdates", + "Enable softupdates (default)", 1 }, + {"SUJ", "Softupdates journaling", + "Enable file system journaling (default - " + "turn off for SSDs)", 1 }, + {"TRIM", "Enable SSD TRIM support", + "Enable TRIM support, useful on solid-state drives", + 0 }, + }; + + if (!use_default) { + int choice; + choice = dlg_checklist("UFS Options", "", 0, 0, 0, + sizeof(items)/sizeof(items[0]), items, NULL, + FLAG_CHECK, &i); + if (choice == 1) /* Cancel */ + return; + } + + strcpy(command, "newfs "); + for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) { + if (items[i].state == 0) + continue; + if (strcmp(items[i].name, "UFS1") == 0) + strcat(command, "-O1 "); + else if (strcmp(items[i].name, "SU") == 0) + strcat(command, "-U "); + else if (strcmp(items[i].name, "SUJ") == 0) + strcat(command, "-j "); + else if (strcmp(items[i].name, "TRIM") == 0) + strcat(command, "-t "); + } + } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0) { + int i; + DIALOG_LISTITEM items[] = { + {"FAT32", "FAT Type 32", + "Create a FAT32 filesystem (default)", 1 }, + {"FAT16", "FAT Type 16", + "Create a FAT16 filesystem", 0 }, + {"FAT12", "FAT Type 12", + "Create a FAT12 filesystem", 0 }, + }; + + if (!use_default) { + int choice; + choice = dlg_checklist("FAT Options", "", 0, 0, 0, + sizeof(items)/sizeof(items[0]), items, NULL, + FLAG_RADIO, &i); + if (choice == 1) /* Cancel */ + return; + } + + strcpy(command, "newfs_msdos "); + for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) { + if (items[i].state == 0) + continue; + if (strcmp(items[i].name, "FAT32") == 0) + strcat(command, "-F 32 "); + else if (strcmp(items[i].name, "FAT16") == 0) + strcat(command, "-F 16 "); + else if (strcmp(items[i].name, "SUJ") == 0) + strcat(command, "-F 12 "); + } + } else { + if (!use_default) + dialog_msgbox("Error", "No configurable options exist " + "for this filesystem.", 0, 0, TRUE); + command[0] = '\0'; + } +} + int gpart_partition(const char *lg_name, const char *scheme) { @@ -332,6 +412,7 @@ gpart_edit(struct gprovider *pp) const char *errstr, *oldtype, *scheme; struct partition_metadata *md; char sizestr[32]; + char newfs[64]; intmax_t idx; int hadlabel, choice, junk, nitems; unsigned i; @@ -444,16 +525,6 @@ editpart: goto editpart; } - if (strncmp(items[0].text, "freebsd-", 8) != 0 && - items[0].text[0] != '\0') { - char message[512]; - - sprintf(message, "Cannot mount unknown file system %s!\n", - items[0].text); - dialog_msgbox("Error", message, 0, 0, TRUE); - goto editpart; - } - r = gctl_get_handle(); gctl_ro_param(r, "class", -1, "PART"); gctl_ro_param(r, "arg0", -1, geom->lg_name); @@ -471,8 +542,10 @@ editpart: } gctl_free(r); + newfs_command(items[0].text, newfs, 1); set_default_part_metadata(pp->lg_name, scheme, items[0].text, - items[2].text, strcmp(oldtype, items[0].text) != 0); + items[2].text, (strcmp(oldtype, items[0].text) != 0) ? + newfs : NULL); for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) if (items[i].text_free) @@ -481,7 +554,7 @@ editpart: void set_default_part_metadata(const char *name, const char *scheme, - const char *type, const char *mountpoint, int newfs) + const char *type, const char *mountpoint, const char *newfs) { struct partition_metadata *md; @@ -494,9 +567,10 @@ set_default_part_metadata(const char *na md->newfs = NULL; } - if (strcmp(type, "freebsd-ufs") == 0) { - md->newfs = malloc(255); - sprintf(md->newfs, "newfs -U /dev/%s", name); + if (newfs != NULL && newfs[0] != '\0') { + md->newfs = malloc(strlen(newfs) + strlen(" /dev/") + + strlen(name) + 1); + sprintf(md->newfs, "%s /dev/%s", newfs, name); } } @@ -533,11 +607,12 @@ set_default_part_metadata(const char *na sprintf(md->fstab->fs_spec, "/dev/%s", name); md->fstab->fs_file = strdup(mountpoint); /* Get VFS from text after freebsd-, if possible */ - if (strncmp("freebsd-", type, 8)) + if (strncmp("freebsd-", type, 8) == 0) md->fstab->fs_vfstype = strdup(&type[8]); + else if (strcmp("fat32", type) == 0 || strcmp("efi", type) == 0) + md->fstab->fs_vfstype = strdup("msdosfs"); else md->fstab->fs_vfstype = strdup(type); /* Guess */ - md->fstab->fs_vfstype = strdup(&type[8]); if (strcmp(type, "freebsd-swap") == 0) { md->fstab->fs_type = strdup(FSTAB_SW); md->fstab->fs_freq = 0; @@ -665,6 +740,7 @@ gpart_create(struct gprovider *pp, char struct ggeom *geom; const char *errstr, *scheme; char sizestr[32], startstr[32], output[64]; + char newfs[64], options_fstype[64]; intmax_t maxsize, size, sector, firstfree, stripe; uint64_t bytes; int nitems, choice, junk; @@ -756,12 +832,37 @@ gpart_create(struct gprovider *pp, char if (default_mountpoint != NULL) items[2].text = default_mountpoint; + /* Default options */ + strncpy(options_fstype, items[0].text, + sizeof(options_fstype)); + newfs_command(options_fstype, newfs, 1); addpartform: if (interactive) { + dialog_vars.extra_label = "Options"; + dialog_vars.extra_button = TRUE; choice = dlg_form("Add Partition", "", 0, 0, 0, nitems, items, &junk); - if (choice) /* Cancel pressed */ + dialog_vars.extra_button = FALSE; + switch (choice) { + case 0: /* OK */ + break; + case 1: /* Cancel */ return; + case 3: /* Options */ + strncpy(options_fstype, items[0].text, + sizeof(options_fstype)); + newfs_command(options_fstype, newfs, 0); + goto addpartform; + } + } + + /* + * If the user changed the fs type after specifying options, undo + * their choices in favor of the new filesystem's defaults. + */ + if (strcmp(options_fstype, items[0].name) != 0) { + strncpy(options_fstype, items[0].text, sizeof(options_fstype)); + newfs_command(options_fstype, newfs, 1); } size = maxsize; @@ -881,7 +982,7 @@ addpartform: gpart_partition(strtok(output, " "), "BSD"); else set_default_part_metadata(strtok(output, " "), scheme, - items[0].text, items[2].text, 1); + items[0].text, items[2].text, newfs); for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) if (items[i].text_free) Modified: head/usr.sbin/bsdinstall/partedit/partedit.h ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit.h Tue Mar 22 22:59:09 2011 (r219891) +++ head/usr.sbin/bsdinstall/partedit/partedit.h Wed Mar 23 01:26:21 2011 (r219892) @@ -68,7 +68,7 @@ void gpart_revert_all(struct gmesh *mesh void gpart_commit(struct gmesh *mesh); int gpart_partition(const char *lg_name, const char *scheme); void set_default_part_metadata(const char *name, const char *scheme, - const char *type, const char *mountpoint, int newfs); + const char *type, const char *mountpoint, const char *newfs); /* machine-dependent bootability checks */ const char *default_scheme(void); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 02:47:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21060106567E; Wed, 23 Mar 2011 02:47:05 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1149F8FC20; Wed, 23 Mar 2011 02:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N2l459078727; Wed, 23 Mar 2011 02:47:04 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N2l4xp078723; Wed, 23 Mar 2011 02:47:04 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103230247.p2N2l4xp078723@svn.freebsd.org> From: Jeff Roberson Date: Wed, 23 Mar 2011 02:47: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: r219893 - head/sys/ofed/drivers/net/mlx4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 02:47:05 -0000 Author: jeff Date: Wed Mar 23 02:47:04 2011 New Revision: 219893 URL: http://svn.freebsd.org/changeset/base/219893 Log: - Correct the vlan filter programming. The device filter is built in reverse order. - Name the cq taskqueues according to whether they handle rx or tx. - Default LRO to on. Modified: head/sys/ofed/drivers/net/mlx4/en_cq.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/en_port.c Modified: head/sys/ofed/drivers/net/mlx4/en_cq.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_cq.c Wed Mar 23 01:26:21 2011 (r219892) +++ head/sys/ofed/drivers/net/mlx4/en_cq.c Wed Mar 23 02:47:04 2011 (r219893) @@ -51,21 +51,23 @@ int mlx4_en_create_cq(struct mlx4_en_pri int err; cq->size = entries; + cq->tq = taskqueue_create_fast("mlx4_en_que", M_NOWAIT, + taskqueue_thread_enqueue, &cq->tq); if (mode == RX) { cq->buf_size = cq->size * sizeof(struct mlx4_cqe); cq->vector = (ring + priv->port) % mdev->dev->caps.num_comp_vectors; TASK_INIT(&cq->cq_task, 0, mlx4_en_rx_que, cq); + taskqueue_start_threads(&cq->tq, 1, PI_NET, "%s rx cq", + if_name(priv->dev)); } else { cq->buf_size = sizeof(struct mlx4_cqe); cq->vector = MLX4_LEAST_ATTACHED_VECTOR; TASK_INIT(&cq->cq_task, 0, mlx4_en_tx_que, cq); + taskqueue_start_threads(&cq->tq, 1, PI_NET, "%s tx cq", + if_name(priv->dev)); } - cq->tq = taskqueue_create_fast("mlx4_en_que", M_NOWAIT, - taskqueue_thread_enqueue, &cq->tq); - taskqueue_start_threads(&cq->tq, 1, PI_NET, "%s cq", - if_name(priv->dev)); cq->ring = ring; cq->is_tx = mode; mtx_init(&cq->lock.m, "mlx4 cq", NULL, MTX_DEF); Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Wed Mar 23 01:26:21 2011 (r219892) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Wed Mar 23 02:47:04 2011 (r219893) @@ -53,13 +53,11 @@ static void mlx4_en_vlan_rx_add_vid(void if ((vid == 0) || (vid > 4095)) /* Invalid */ return; - en_dbg(HW, priv, "adding VLAN:%d\n", vid); - - spin_lock(&priv->vlan_lock); - priv->vlgrp_modified = true; idx = vid >> 5; field = 1 << (vid & 0x1f); + spin_lock(&priv->vlan_lock); + priv->vlgrp_modified = true; if (priv->vlan_unregister[idx] & field) priv->vlan_unregister[idx] &= ~field; else @@ -77,10 +75,10 @@ static void mlx4_en_vlan_rx_kill_vid(voi if ((vid == 0) || (vid > 4095)) /* Invalid */ return; en_dbg(HW, priv, "Killing VID:%d\n", vid); - spin_lock(&priv->vlan_lock); - priv->vlgrp_modified = true; idx = vid >> 5; field = 1 << (vid & 0x1f); + spin_lock(&priv->vlan_lock); + priv->vlgrp_modified = true; if (priv->vlan_register[idx] & field) priv->vlan_register[idx] &= ~field; else @@ -1541,12 +1539,9 @@ int mlx4_en_init_netdev(struct mlx4_en_d #endif if (mdev->LSO_support) dev->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; - - /* Don't enable LOR unless the user requests. */ - dev->if_capenable = dev->if_capabilities; - if (mdev->profile.num_lro) dev->if_capabilities |= IFCAP_LRO; + dev->if_capenable = dev->if_capabilities; /* Register for VLAN events */ priv->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, Modified: head/sys/ofed/drivers/net/mlx4/en_port.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_port.c Wed Mar 23 01:26:21 2011 (r219892) +++ head/sys/ofed/drivers/net/mlx4/en_port.c Wed Mar 23 02:47:04 2011 (r219893) @@ -51,7 +51,7 @@ int mlx4_SET_VLAN_FLTR(struct mlx4_dev * { struct mlx4_cmd_mailbox *mailbox; struct mlx4_set_vlan_fltr_mbox *filter; - int i; + int i, j; int err = 0; mailbox = mlx4_alloc_cmd_mailbox(dev); @@ -61,8 +61,9 @@ int mlx4_SET_VLAN_FLTR(struct mlx4_dev * filter = mailbox->buf; memset(filter, 0, sizeof *filter); if (vlans) - for (i = 0; i < VLAN_FLTR_SIZE; i ++) - filter->entry[i] = cpu_to_be32(vlans[i]); + for (i = 0, j = VLAN_FLTR_SIZE - 1; i < VLAN_FLTR_SIZE; + i++, j--) + filter->entry[j] = cpu_to_be32(vlans[i]); err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_VLAN_FLTR, MLX4_CMD_TIME_CLASS_B); mlx4_free_cmd_mailbox(dev, mailbox); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 03:58:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC3D21065686; Wed, 23 Mar 2011 03:58:55 +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 9B7478FC14; Wed, 23 Mar 2011 03:58:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N3wtKw080583; Wed, 23 Mar 2011 03:58:55 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N3wtbW080581; Wed, 23 Mar 2011 03:58:55 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103230358.p2N3wtbW080581@svn.freebsd.org> From: Adrian Chadd Date: Wed, 23 Mar 2011 03:58: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: r219894 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 03:58:55 -0000 Author: adrian Date: Wed Mar 23 03:58:55 2011 New Revision: 219894 URL: http://svn.freebsd.org/changeset/base/219894 Log: The AR5416+ chips all have MIB counters (which the AR5416 ANI code assumes) so there's no need to enable the RX of invalid frames just to do ANI. The if_ath code and AR5212 ANI code setup the RX filter bits to enable receiving OFDM/CCK errors if the device doesn't have the hardware MIB counters. It isn't initialising it for the AR5416+ because all of those chips have hardware MIB counters. This fixes the odd (and performance affecting!) situation where if ani is enabled (via sysctl dev.ath.X.intmit) then suddenly there's be a very large volume of phy errors - which is good to track, but not what was intended. Since each PHY error is a received (0 length) frame, it can significantly tie up the RX side of things. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed Mar 23 02:47:04 2011 (r219893) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed Mar 23 03:58:55 2011 (r219894) @@ -310,14 +310,10 @@ ar5416AniControl(struct ath_hal *ah, HAL ahp->ah_procPhyErr &= ~HAL_ANI_ENA; /* Turn off HW counters if we have them */ ar5416AniDetach(ah); - ar5212SetRxFilter(ah, - ar5212GetRxFilter(ah) &~ HAL_RX_FILTER_PHYERR); } else { /* normal/auto mode */ /* don't mess with state if already enabled */ if (ahp->ah_procPhyErr & HAL_ANI_ENA) break; - ar5212SetRxFilter(ah, - ar5212GetRxFilter(ah) &~ HAL_RX_FILTER_PHYERR); /* Enable MIB Counters */ enableAniMIBCounters(ah, ahp->ah_curani != AH_NULL ? ahp->ah_curani->params: &ahp->ah_aniParams24 /*XXX*/); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 05:13:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D679C106567A; Wed, 23 Mar 2011 05:13:54 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C437C8FC0A; Wed, 23 Mar 2011 05:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N5DsSR082179; Wed, 23 Mar 2011 05:13:54 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N5DsCb082175; Wed, 23 Mar 2011 05:13:54 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201103230513.p2N5DsCb082175@svn.freebsd.org> From: Kirk McKusick Date: Wed, 23 Mar 2011 05:13: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: r219895 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 05:13:54 -0000 Author: mckusick Date: Wed Mar 23 05:13:54 2011 New Revision: 219895 URL: http://svn.freebsd.org/changeset/base/219895 Log: Add retry code analogous to the block allocation retry code to avoid running out of inodes. Reported by: Peter Holm Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Wed Mar 23 03:58:55 2011 (r219894) +++ head/sys/ufs/ffs/ffs_alloc.c Wed Mar 23 05:13:54 2011 (r219895) @@ -219,7 +219,7 @@ nospace: #endif if (fs->fs_pendingblocks > 0 && reclaimed == 0) { reclaimed = 1; - softdep_request_cleanup(fs, ITOV(ip)); + softdep_request_cleanup(fs, ITOV(ip), FLUSH_BLOCKS_WAIT); goto retry; } UFS_UNLOCK(ump); @@ -420,7 +420,7 @@ nospace: */ if (fs->fs_pendingblocks > 0 && reclaimed == 0) { reclaimed = 1; - softdep_request_cleanup(fs, vp); + softdep_request_cleanup(fs, vp, FLUSH_BLOCKS_WAIT); UFS_UNLOCK(ump); if (bp) { brelse(bp); @@ -936,7 +936,7 @@ ffs_valloc(pvp, mode, cred, vpp) struct ufsmount *ump; ino_t ino, ipref; u_int cg; - int error, error1; + int error, error1, reclaimed; static struct timeval lastfail; static int curfail; @@ -946,6 +946,8 @@ ffs_valloc(pvp, mode, cred, vpp) ump = pip->i_ump; UFS_LOCK(ump); + reclaimed = 0; +retry: if (fs->fs_cstotal.cs_nifree == 0) goto noinodes; @@ -1019,6 +1021,11 @@ dup_alloc: (*vpp)->v_op = &ffs_vnodeops1; return (0); noinodes: + if (fs->fs_pendinginodes > 0 && reclaimed == 0) { + reclaimed = 1; + softdep_request_cleanup(fs, pvp, FLUSH_INODES_WAIT); + goto retry; + } UFS_UNLOCK(ump); if (ppsratecheck(&lastfail, &curfail, 1)) { ffs_fserr(fs, pip->i_number, "out of inodes"); Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Wed Mar 23 03:58:55 2011 (r219894) +++ head/sys/ufs/ffs/ffs_extern.h Wed Mar 23 05:13:54 2011 (r219895) @@ -120,7 +120,7 @@ int softdep_flushfiles(struct mount *, i void softdep_update_inodeblock(struct inode *, struct buf *, int); void softdep_load_inodeblock(struct inode *); void softdep_freefile(struct vnode *, ino_t, int); -int softdep_request_cleanup(struct fs *, struct vnode *); +int softdep_request_cleanup(struct fs *, struct vnode *, int); void softdep_setup_freeblocks(struct inode *, off_t, int); void softdep_setup_inomapdep(struct buf *, struct inode *, ino_t); void softdep_setup_blkmapdep(struct buf *, struct mount *, ufs2_daddr_t, @@ -147,6 +147,13 @@ int softdep_waitidle(struct mount *); int softdep_prealloc(struct vnode *, int); int softdep_journal_lookup(struct mount *, struct vnode **); +/* + * Things to request flushing in softdep_request_cleanup() + */ +#define FLUSH_INODES 1 +#define FLUSH_INODES_WAIT 2 +#define FLUSH_BLOCKS 3 +#define FLUSH_BLOCKS_WAIT 4 int ffs_rdonly(struct inode *); Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Mar 23 03:58:55 2011 (r219894) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Mar 23 05:13:54 2011 (r219895) @@ -1105,10 +1105,7 @@ static int *stat_countp; /* statistic to static struct callout softdep_callout; static int req_pending; static int req_clear_inodedeps; /* syncer process flush some inodedeps */ -#define FLUSH_INODES 1 static int req_clear_remove; /* syncer process flush some freeblks */ -#define FLUSH_REMOVE 2 -#define FLUSH_REMOVE_WAIT 3 static long num_freeblkdep; /* number of freeblks workitems allocated */ /* @@ -7131,7 +7128,7 @@ newdirrem(bp, dp, ip, isrmdir, prevdirre */ ACQUIRE_LOCK(&lk); if (!(ip->i_flags & SF_SNAPSHOT) && num_dirrem > max_softdeps / 2) - (void) request_cleanup(ITOV(dp)->v_mount, FLUSH_REMOVE); + (void) request_cleanup(ITOV(dp)->v_mount, FLUSH_BLOCKS); num_dirrem += 1; FREE_LOCK(&lk); dirrem = malloc(sizeof(struct dirrem), @@ -10868,19 +10865,22 @@ softdep_slowdown(vp) /* * Called by the allocation routines when they are about to fail - * in the hope that we can free up some disk space. + * in the hope that we can free up the requested resource (inodes + * or disk space). * * First check to see if the work list has anything on it. If it has, - * clean up entries until we successfully free some space. Because this - * process holds inodes locked, we cannot handle any remove requests - * that might block on a locked inode as that could lead to deadlock. - * If the worklist yields no free space, encourage the syncer daemon - * to help us. In no event will we try for longer than tickdelay seconds. + * clean up entries until we successfully free the requested resource. + * Because this process holds inodes locked, we cannot handle any remove + * requests that might block on a locked inode as that could lead to + * deadlock. If the worklist yields none of the requested resource, + * encourage the syncer daemon to help us. In no event will we try for + * longer than tickdelay seconds. */ int -softdep_request_cleanup(fs, vp) +softdep_request_cleanup(fs, vp, resource) struct fs *fs; struct vnode *vp; + int resource; { struct ufsmount *ump; long starttime; @@ -10889,7 +10889,12 @@ softdep_request_cleanup(fs, vp) ump = VTOI(vp)->i_ump; mtx_assert(UFS_MTX(ump), MA_OWNED); - needed = fs->fs_cstotal.cs_nbfree + fs->fs_contigsumsize; + if (resource == FLUSH_BLOCKS_WAIT) + needed = fs->fs_cstotal.cs_nbfree + fs->fs_contigsumsize; + else if (resource == FLUSH_INODES_WAIT) + needed = fs->fs_cstotal.cs_nifree + 2; + else + return (0); starttime = time_second + tickdelay; /* * If we are being called because of a process doing a @@ -10903,7 +10908,10 @@ softdep_request_cleanup(fs, vp) if (error != 0) return (0); } - while (fs->fs_pendingblocks > 0 && fs->fs_cstotal.cs_nbfree <= needed) { + while ((resource == FLUSH_BLOCKS_WAIT && fs->fs_pendingblocks > 0 && + fs->fs_cstotal.cs_nbfree <= needed) || + (resource == FLUSH_INODES_WAIT && fs->fs_pendinginodes > 0 && + fs->fs_cstotal.cs_nifree <= needed)) { if (time_second > starttime) return (0); UFS_UNLOCK(ump); @@ -10916,7 +10924,7 @@ softdep_request_cleanup(fs, vp) UFS_LOCK(ump); continue; } - request_cleanup(UFSTOVFS(ump), FLUSH_REMOVE_WAIT); + request_cleanup(UFSTOVFS(ump), resource); FREE_LOCK(&lk); UFS_LOCK(ump); } @@ -10963,7 +10971,9 @@ request_cleanup(mp, resource) * Next, we attempt to speed up the syncer process. If that * is successful, then we allow the process to continue. */ - if (softdep_speedup() && resource != FLUSH_REMOVE_WAIT) + if (softdep_speedup() && + resource != FLUSH_BLOCKS_WAIT && + resource != FLUSH_INODES_WAIT) return(0); /* * If we are resource constrained on inode dependencies, try @@ -10978,13 +10988,14 @@ request_cleanup(mp, resource) switch (resource) { case FLUSH_INODES: + case FLUSH_INODES_WAIT: stat_ino_limit_push += 1; req_clear_inodedeps += 1; stat_countp = &stat_ino_limit_hit; break; - case FLUSH_REMOVE: - case FLUSH_REMOVE_WAIT: + case FLUSH_BLOCKS: + case FLUSH_BLOCKS_WAIT: stat_blk_limit_push += 1; req_clear_remove += 1; stat_countp = &stat_blk_limit_hit; From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 06:19:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB88E106567E; Wed, 23 Mar 2011 06:19: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 98C4B8FC19; Wed, 23 Mar 2011 06:19:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N6JHE2083598; Wed, 23 Mar 2011 06:19:17 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N6JHx2083596; Wed, 23 Mar 2011 06:19:17 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201103230619.p2N6JHx2083596@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 23 Mar 2011 06:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219896 - stable/8/sys/boot/i386/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 06:19:17 -0000 Author: ae Date: Wed Mar 23 06:19:17 2011 New Revision: 219896 URL: http://svn.freebsd.org/changeset/base/219896 Log: MFC r219702: Set control flags in putc(). This should fix zfsboot hangs in drvread(). PR: kern/153552 Reviewed by: jhb Modified: stable/8/sys/boot/i386/common/cons.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/boot/i386/common/cons.c ============================================================================== --- stable/8/sys/boot/i386/common/cons.c Wed Mar 23 05:13:54 2011 (r219895) +++ stable/8/sys/boot/i386/common/cons.c Wed Mar 23 06:19:17 2011 (r219896) @@ -37,6 +37,7 @@ void putc(int c) { + v86.ctl = V86_FLAGS; v86.addr = 0x10; v86.eax = 0xe00 | (c & 0xff); v86.ebx = 0x7; From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 08:27:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F775106568E; Wed, 23 Mar 2011 08:27:58 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5FF8FC12; Wed, 23 Mar 2011 08:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N8RvO2086419; Wed, 23 Mar 2011 08:27:57 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N8RvDd086417; Wed, 23 Mar 2011 08:27:57 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103230827.p2N8RvDd086417@svn.freebsd.org> From: Jeff Roberson Date: Wed, 23 Mar 2011 08:27: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: r219898 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 08:27:58 -0000 Author: jeff Date: Wed Mar 23 08:27:57 2011 New Revision: 219898 URL: http://svn.freebsd.org/changeset/base/219898 Log: - Move ofed modules into the i386 and amd64 specific sections to fix universe on other architectures. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Mar 23 06:31:45 2011 (r219897) +++ head/sys/modules/Makefile Wed Mar 23 08:27:57 2011 (r219898) @@ -418,6 +418,12 @@ _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux _mse= mse +.if ${MK_OFED} != "no" || defined(ALL_MODULES) +_mlx4= mlx4 +_mlx4ib= mlx4ib +_mlxen= mlxen +_mthca= mthca +.endif .if ${MK_NCP} != "no" _ncp= ncp .endif @@ -566,6 +572,12 @@ _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux _mly= mly +.if ${MK_OFED} != "no" || defined(ALL_MODULES) +_mlx4= mlx4 +_mlx4ib= mlx4ib +_mlxen= mlxen +_mthca= mthca +.endif _ndis= ndis _nfe= nfe _nve= nve @@ -673,13 +685,6 @@ _zfs= zfs .endif .endif -.if ${MK_OFED} != "no" || defined(ALL_MODULES) -_mthca= mthca -_mlx4= mlx4 -_mlx4ib= mlx4ib -_mlxen= mlxen -.endif - .if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES) SUBDIR=${MODULES_OVERRIDE} .endif @@ -697,6 +702,5 @@ afterinstall: kldxref ${DESTDIR}${KMODDIR}; \ fi .endif -#endif .include From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 08:33:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6846810656B9; Wed, 23 Mar 2011 08:33:12 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 563378FC08; Wed, 23 Mar 2011 08:33:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2N8XC8Q086573; Wed, 23 Mar 2011 08:33:12 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2N8XC5n086571; Wed, 23 Mar 2011 08:33:12 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201103230833.p2N8XC5n086571@svn.freebsd.org> From: Juli Mallett Date: Wed, 23 Mar 2011 08: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: r219899 - head/sbin/dumpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 08:33:12 -0000 Author: jmallett Date: Wed Mar 23 08:33:12 2011 New Revision: 219899 URL: http://svn.freebsd.org/changeset/base/219899 Log: Add support for displaying newfs flags for SU+J and TRIM. Modified: head/sbin/dumpfs/dumpfs.c Modified: head/sbin/dumpfs/dumpfs.c ============================================================================== --- head/sbin/dumpfs/dumpfs.c Wed Mar 23 08:27:57 2011 (r219898) +++ head/sbin/dumpfs/dumpfs.c Wed Mar 23 08:33:12 2011 (r219899) @@ -402,7 +402,9 @@ marshal(const char *name) printf("-g %d ", fs->fs_avgfilesize); printf("-h %d ", fs->fs_avgfpdir); /* -i is dumb */ - /* -j..l unimplemented */ + if (fs->fs_flags & FS_SUJ) + printf("-j "); + /* -k..l unimplemented */ printf("-m %d ", fs->fs_minfree); /* -n unimplemented */ printf("-o "); @@ -419,6 +421,8 @@ marshal(const char *name) } /* -p..r unimplemented */ printf("-s %jd ", (intmax_t)fsbtodb(fs, fs->fs_size)); + if (fs->fs_flags & FS_TRIM) + printf("-t "); printf("%s ", disk.d_name); printf("\n"); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 11:09:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8D1106564A; Wed, 23 Mar 2011 11:09:04 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD7F68FC1A; Wed, 23 Mar 2011 11:09:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NB94cu091634; Wed, 23 Mar 2011 11:09:04 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NB94ek091631; Wed, 23 Mar 2011 11:09:04 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103231109.p2NB94ek091631@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 23 Mar 2011 11:09: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: r219900 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 11:09:04 -0000 Author: pjd Date: Wed Mar 23 11:09:04 2011 New Revision: 219900 URL: http://svn.freebsd.org/changeset/base/219900 Log: Don't create socketpair for connection forwarding between parent and secondary. Secondary doesn't need to connect anywhere. MFC after: 1 week Modified: head/sbin/hastd/hastd.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Wed Mar 23 08:33:12 2011 (r219899) +++ head/sbin/hastd/hastd.c Wed Mar 23 11:09:04 2011 (r219900) @@ -224,7 +224,8 @@ descriptors_assert(const struct hast_res fd, dtype2str(mode), dtype2str(S_IFSOCK)); break; } - } else if (fd == proto_descriptor(res->hr_conn)) { + } else if (res->hr_role == HAST_ROLE_PRIMARY && + fd == proto_descriptor(res->hr_conn)) { if (!isopen) { (void)snprintf(msg, sizeof(msg), "Descriptor %d (conn) is closed, but should be open.", @@ -238,6 +239,15 @@ descriptors_assert(const struct hast_res break; } } else if (res->hr_role == HAST_ROLE_SECONDARY && + res->hr_conn != NULL && + fd == proto_descriptor(res->hr_conn)) { + if (isopen) { + (void)snprintf(msg, sizeof(msg), + "Descriptor %d (conn) is open, but should be closed.", + fd); + break; + } + } else if (res->hr_role == HAST_ROLE_SECONDARY && fd == proto_descriptor(res->hr_remotein)) { if (!isopen) { (void)snprintf(msg, sizeof(msg), @@ -851,6 +861,8 @@ connection_migrate(struct hast_resource pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role)); + PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY); + if (proto_recv(res->hr_conn, &val, sizeof(val)) < 0) { pjdlog_errno(LOG_WARNING, "Unable to receive connection command"); @@ -951,17 +963,19 @@ main_loop(void) TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { if (res->hr_event == NULL) continue; - PJDLOG_ASSERT(res->hr_conn != NULL); fd = proto_descriptor(res->hr_event); PJDLOG_ASSERT(fd >= 0); FD_SET(fd, &rfds); maxfd = fd > maxfd ? fd : maxfd; if (res->hr_role == HAST_ROLE_PRIMARY) { /* Only primary workers asks for connections. */ + PJDLOG_ASSERT(res->hr_conn != NULL); fd = proto_descriptor(res->hr_conn); PJDLOG_ASSERT(fd >= 0); FD_SET(fd, &rfds); maxfd = fd > maxfd ? fd : maxfd; + } else { + PJDLOG_ASSERT(res->hr_conn == NULL); } } @@ -998,20 +1012,26 @@ main_loop(void) TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { if (res->hr_event == NULL) continue; - PJDLOG_ASSERT(res->hr_conn != NULL); if (FD_ISSET(proto_descriptor(res->hr_event), &rfds)) { if (event_recv(res) == 0) continue; /* The worker process exited? */ proto_close(res->hr_event); res->hr_event = NULL; - proto_close(res->hr_conn); - res->hr_conn = NULL; + if (res->hr_conn != NULL) { + proto_close(res->hr_conn); + res->hr_conn = NULL; + } continue; } - if (res->hr_role == HAST_ROLE_PRIMARY && - FD_ISSET(proto_descriptor(res->hr_conn), &rfds)) { - connection_migrate(res); + if (res->hr_role == HAST_ROLE_PRIMARY) { + PJDLOG_ASSERT(res->hr_conn != NULL); + if (FD_ISSET(proto_descriptor(res->hr_conn), + &rfds)) { + connection_migrate(res); + } + } else { + PJDLOG_ASSERT(res->hr_conn == NULL); } } } Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Wed Mar 23 08:33:12 2011 (r219899) +++ head/sbin/hastd/secondary.c Wed Mar 23 11:09:04 2011 (r219900) @@ -378,16 +378,6 @@ hastd_secondary(struct hast_resource *re pjdlog_exit(EX_OSERR, "Unable to create event sockets between child and parent"); } - /* - * Create communication channel for sending connection requests from - * parent to child. - */ - if (proto_client(NULL, "socketpair://", &res->hr_conn) < 0) { - /* TODO: There's no need for this to be fatal error. */ - KEEP_ERRNO((void)pidfile_remove(pfh)); - pjdlog_exit(EX_OSERR, - "Unable to create connection sockets between parent and child"); - } pid = fork(); if (pid < 0) { @@ -405,7 +395,6 @@ hastd_secondary(struct hast_resource *re proto_recv(res->hr_event, NULL, 0); /* Declare that we are sender. */ proto_send(res->hr_ctrl, NULL, 0); - proto_send(res->hr_conn, NULL, 0); res->hr_workerpid = pid; return; } @@ -418,7 +407,6 @@ hastd_secondary(struct hast_resource *re proto_send(res->hr_event, NULL, 0); /* Declare that we are receiver. */ proto_recv(res->hr_ctrl, NULL, 0); - proto_recv(res->hr_conn, NULL, 0); descriptors_cleanup(res); descriptors_assert(res, mode); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 11:16:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6299F1065670; Wed, 23 Mar 2011 11:16:06 +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 5377A8FC12; Wed, 23 Mar 2011 11:16:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NBG63i091814; Wed, 23 Mar 2011 11:16:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NBG6rI091812; Wed, 23 Mar 2011 11:16:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103231116.p2NBG6rI091812@svn.freebsd.org> From: Adrian Chadd Date: Wed, 23 Mar 2011 11:16: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: r219901 - head/tools/tools/ath/ath_ee_v14_print X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 11:16:06 -0000 Author: adrian Date: Wed Mar 23 11:16:06 2011 New Revision: 219901 URL: http://svn.freebsd.org/changeset/base/219901 Log: Oops, fix badness i must've introduced earlier. Modified: head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c Modified: head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c ============================================================================== --- head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c Wed Mar 23 11:09:04 2011 (r219900) +++ head/tools/tools/ath/ath_ee_v14_print/ath_ee_v14_print.c Wed Mar 23 11:16:06 2011 (r219901) @@ -146,12 +146,12 @@ eeprom_v14_modal_print(uint16_t *buf, in MODAL_EEP_HEADER *mh = &eep->ee_base.modalHeader[m]; int i; - printf("| antCtrlCommon: 0x%.4x |\n", mh->antCtrlCommon); + printf("| antCtrlCommon: 0x%.8x |\n", mh->antCtrlCommon); printf("| switchSettling: 0x%.2x |\n", mh->switchSettling); printf("| adcDesiredSize: %d |\n| pgaDesiredSize: %.2f dBm |\n", mh->adcDesiredSize, (float) mh->pgaDesiredSize / 2.0); - printf("| antCtrlChain: 0:0x%.4x 1:0x%.4x 2:0x%.4x |\n", + printf("| antCtrlChain: 0:0x%.8x 1:0x%.8x 2:0x%.8x |\n", mh->antCtrlChain[0], mh->antCtrlChain[1], mh->antCtrlChain[2]); printf("| antennaGainCh: 0:0x%.2x 1:0x%.2x 2:0x%.2x |\n", mh->antennaGainCh[0], mh->antennaGainCh[1], mh->antennaGainCh[2]); @@ -288,9 +288,9 @@ eeprom_v14_calfreqpiers_print(uint16_t * for (n = 0; n < AR5416_MAX_CHAINS; n++) { printf(" Chain %d:\n", n); if (eep->ee_base.baseEepHeader.openLoopPwrCntl) - eeprom_v14_print_caldata_perfreq_op_loop((void *) (&eep->ee_base.calPierData2G[n][i])); + eeprom_v14_print_caldata_perfreq_op_loop((void *) (&eep->ee_base.calPierData5G[n][i])); else - eeprom_v14_print_caldata_perfreq(&eep->ee_base.calPierData2G[n][i]); + eeprom_v14_print_caldata_perfreq(&eep->ee_base.calPierData5G[n][i]); } } } From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:10:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C41D5106564A; Wed, 23 Mar 2011 13:10:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1DCF8FC1B; Wed, 23 Mar 2011 13:10:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NDAGnf095249; Wed, 23 Mar 2011 13:10:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NDAGi5095211; Wed, 23 Mar 2011 13:10:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103231310.p2NDAGi5095211@svn.freebsd.org> From: John Baldwin Date: Wed, 23 Mar 2011 13:10: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: r219902 - in head/sys: dev/ae dev/age dev/agp dev/aic7xxx dev/alc dev/ale dev/bce dev/bge dev/bwn dev/bxe dev/cxgb dev/drm dev/e1000 dev/et dev/fxp dev/iwn dev/ixgbe dev/jme dev/malo de... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:10:16 -0000 Author: jhb Date: Wed Mar 23 13:10:15 2011 New Revision: 219902 URL: http://svn.freebsd.org/changeset/base/219902 Log: Do a sweep of the tree replacing calls to pci_find_extcap() with calls to pci_find_cap() instead. Modified: head/sys/dev/ae/if_ae.c head/sys/dev/age/if_age.c head/sys/dev/agp/agp.c head/sys/dev/aic7xxx/aic79xx_pci.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/bce/if_bce.c head/sys/dev/bge/if_bge.c head/sys/dev/bwn/if_bwn.c head/sys/dev/bxe/if_bxe.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/drm/drm_agpsupport.c head/sys/dev/e1000/e1000_osdep.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_lem.c head/sys/dev/et/if_et.c head/sys/dev/fxp/if_fxp.c head/sys/dev/iwn/if_iwn.c head/sys/dev/ixgbe/ixv.c head/sys/dev/jme/if_jme.c head/sys/dev/malo/if_malo_pci.c head/sys/dev/msk/if_msk.c head/sys/dev/mxge/if_mxge.c head/sys/dev/nfe/if_nfe.c head/sys/dev/nge/if_nge.c head/sys/dev/pci/hostb_pci.c head/sys/dev/re/if_re.c head/sys/dev/siba/siba_core.c head/sys/dev/sis/if_sis.c head/sys/dev/ste/if_ste.c head/sys/dev/txp/if_txp.c head/sys/dev/vge/if_vge.c head/sys/dev/vr/if_vr.c head/sys/dev/xl/if_xl.c head/sys/ofed/include/linux/pci.h head/sys/pci/if_rl.c Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/ae/if_ae.c Wed Mar 23 13:10:15 2011 (r219902) @@ -341,7 +341,7 @@ ae_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { ifp->if_capabilities |= IFCAP_WOL_MAGIC; sc->flags |= AE_FLAG_PMG; } @@ -929,7 +929,7 @@ ae_check_eeprom_present(ae_softc_t *sc, val &= ~AE_SPICTL_VPD_EN; AE_WRITE_4(sc, AE_SPICTL_REG, val); } - error = pci_find_extcap(sc->dev, PCIY_VPD, vpdc); + error = pci_find_cap(sc->dev, PCIY_VPD, vpdc); return (error); } @@ -1383,7 +1383,7 @@ ae_pm_init(ae_softc_t *sc) /* * Configure PME. */ - pci_find_extcap(sc->dev, PCIY_PMG, &pmc); + pci_find_cap(sc->dev, PCIY_PMG, &pmc); pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((ifp->if_capenable & IFCAP_WOL) != 0) Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/age/if_age.c Wed Mar 23 13:10:15 2011 (r219902) @@ -346,7 +346,7 @@ age_get_macaddr(struct age_softc *sc) CSR_WRITE_4(sc, AGE_SPI_CTRL, reg); } - if (pci_find_extcap(sc->age_dev, PCIY_VPD, &vpdc) == 0) { + if (pci_find_cap(sc->age_dev, PCIY_VPD, &vpdc) == 0) { /* * PCI VPD capability found, let TWSI reload EEPROM. * This will set ethernet address of controller. @@ -563,7 +563,7 @@ age_attach(device_t dev) /* Get DMA parameters from PCIe device control register. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, &i) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { sc->age_flags |= AGE_FLAG_PCIE; burst = pci_read_config(dev, i + 0x08, 2); /* Max read request size. */ @@ -610,7 +610,7 @@ age_attach(device_t dev) IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; ifp->if_hwassist = AGE_CSUM_FEATURES | CSUM_TSO; - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { sc->age_flags |= AGE_FLAG_PMCAP; ifp->if_capabilities |= IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST; } @@ -1329,7 +1329,7 @@ age_setwol(struct age_softc *sc) AGE_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->age_dev, PCIY_PMG, &pmc) != 0) { + if (pci_find_cap(sc->age_dev, PCIY_PMG, &pmc) != 0) { CSR_WRITE_4(sc, AGE_WOL_CFG, 0); /* * No PME capability, PHY power down. Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/agp/agp.c Wed Mar 23 13:10:15 2011 (r219902) @@ -98,7 +98,7 @@ agp_find_caps(device_t dev) int capreg; - if (pci_find_extcap(dev, PCIY_AGP, &capreg) != 0) + if (pci_find_cap(dev, PCIY_AGP, &capreg) != 0) capreg = 0; return (capreg); } Modified: head/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_pci.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/aic7xxx/aic79xx_pci.c Wed Mar 23 13:10:15 2011 (r219902) @@ -353,7 +353,7 @@ ahd_pci_config(struct ahd_softc *ahd, st * Find the PCI-X cap pointer. If we don't find it, * pcix_ptr will be 0. */ - pci_find_extcap(ahd->dev_softc, PCIY_PCIX, &ahd->pcix_ptr); + pci_find_cap(ahd->dev_softc, PCIY_PCIX, &ahd->pcix_ptr); devconfig = aic_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4); if ((devconfig & PCIXINITPAT) == PCIXINIT_PCI33_66) { ahd->chip |= AHD_PCI; Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/alc/if_alc.c Wed Mar 23 13:10:15 2011 (r219902) @@ -783,7 +783,7 @@ alc_attach(device_t dev) sc->alc_dma_rd_burst = 0; sc->alc_dma_wr_burst = 0; sc->alc_rcb = DMA_CFG_RCB_64; - if (pci_find_extcap(dev, PCIY_EXPRESS, &base) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, &base) == 0) { sc->alc_flags |= ALC_FLAG_PCIE; sc->alc_expcap = base; burst = CSR_READ_2(sc, base + PCIR_EXPRESS_DEVICE_CTL); @@ -963,7 +963,7 @@ alc_attach(device_t dev) IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_TSO4; ifp->if_hwassist = ALC_CSUM_FEATURES | CSUM_TSO; - if (pci_find_extcap(dev, PCIY_PMG, &base) == 0) { + if (pci_find_cap(dev, PCIY_PMG, &base) == 0) { ifp->if_capabilities |= IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST; sc->alc_flags |= ALC_FLAG_PM; sc->alc_pmcap = base; Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/ale/if_ale.c Wed Mar 23 13:10:15 2011 (r219902) @@ -330,7 +330,7 @@ ale_get_macaddr(struct ale_softc *sc) CSR_WRITE_4(sc, ALE_SPI_CTRL, reg); } - if (pci_find_extcap(sc->ale_dev, PCIY_VPD, &vpdc) == 0) { + if (pci_find_cap(sc->ale_dev, PCIY_VPD, &vpdc) == 0) { /* * PCI VPD capability found, let TWSI reload EEPROM. * This will set ethernet address of controller. @@ -544,7 +544,7 @@ ale_attach(device_t dev) } /* Get DMA parameters from PCIe device control register. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, &i) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { sc->ale_flags |= ALE_FLAG_PCIE; burst = pci_read_config(dev, i + 0x08, 2); /* Max read request size. */ @@ -591,7 +591,7 @@ ale_attach(device_t dev) IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4; ifp->if_hwassist = ALE_CSUM_FEATURES | CSUM_TSO; - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { sc->ale_flags |= ALE_FLAG_PMCAP; ifp->if_capabilities |= IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST; } @@ -1469,7 +1469,7 @@ ale_setwol(struct ale_softc *sc) ALE_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->ale_dev, PCIY_PMG, &pmc) != 0) { + if (pci_find_cap(sc->ale_dev, PCIY_PMG, &pmc) != 0) { /* Disable WOL. */ CSR_WRITE_4(sc, ALE_WOL_CFG, 0); reg = CSR_READ_4(sc, ALE_PCIE_PHYMISC); @@ -1548,7 +1548,7 @@ ale_resume(device_t dev) sc = device_get_softc(dev); ALE_LOCK(sc); - if (pci_find_extcap(sc->ale_dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->ale_dev, PCIY_PMG, &pmc) == 0) { /* Disable PME and clear PME status. */ pmstat = pci_read_config(sc->ale_dev, pmc + PCIR_POWER_STATUS, 2); Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/bce/if_bce.c Wed Mar 23 13:10:15 2011 (r219902) @@ -801,13 +801,13 @@ bce_probe_pci_caps(device_t dev, struct DBENTER(BCE_VERBOSE_LOAD); /* Check if PCI-X capability is enabled. */ - if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) { + if (pci_find_cap(dev, PCIY_PCIX, ®) == 0) { if (reg != 0) sc->bce_cap_flags |= BCE_PCIX_CAPABLE_FLAG; } /* Check if PCIe capability is enabled. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { if (reg != 0) { u16 link_status = pci_read_config(dev, reg + 0x12, 2); DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = " @@ -820,13 +820,13 @@ bce_probe_pci_caps(device_t dev, struct } /* Check if MSI capability is enabled. */ - if (pci_find_extcap(dev, PCIY_MSI, ®) == 0) { + if (pci_find_cap(dev, PCIY_MSI, ®) == 0) { if (reg != 0) sc->bce_cap_flags |= BCE_MSI_CAPABLE_FLAG; } /* Check if MSI-X capability is enabled. */ - if (pci_find_extcap(dev, PCIY_MSIX, ®) == 0) { + if (pci_find_cap(dev, PCIY_MSIX, ®) == 0) { if (reg != 0) sc->bce_cap_flags |= BCE_MSIX_CAPABLE_FLAG; } Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/bge/if_bge.c Wed Mar 23 13:10:15 2011 (r219902) @@ -2883,7 +2883,7 @@ bge_attach(device_t dev) /* * Check if this is a PCI-X or PCI Express device. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { /* * Found a PCI Express capabilities register, this * must be a PCI Express device. @@ -2897,7 +2897,7 @@ bge_attach(device_t dev) * Check if the device is in PCI-X Mode. * (This bit is not valid on PCI Express controllers.) */ - if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) + if (pci_find_cap(dev, PCIY_PCIX, ®) == 0) sc->bge_pcixcap = reg; if ((pci_read_config(dev, BGE_PCI_PCISTATE, 4) & BGE_PCISTATE_PCI_BUSMODE) == 0) @@ -2917,7 +2917,7 @@ bge_attach(device_t dev) * normal operation. */ rid = 0; - if (pci_find_extcap(sc->bge_dev, PCIY_MSI, ®) == 0) { + if (pci_find_cap(sc->bge_dev, PCIY_MSI, ®) == 0) { sc->bge_msicap = reg; if (bge_can_use_msi(sc)) { msicount = pci_msi_count(dev); Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/bwn/if_bwn.c Wed Mar 23 13:10:15 2011 (r219902) @@ -979,7 +979,7 @@ bwn_attach(device_t dev) /* * setup PCI resources and interrupt. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { msic = pci_msi_count(dev); if (bootverbose) device_printf(sc->sc_dev, "MSI count : %d\n", msic); Modified: head/sys/dev/bxe/if_bxe.c ============================================================================== --- head/sys/dev/bxe/if_bxe.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/bxe/if_bxe.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1568,7 +1568,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) DBENTER(BXE_EXTREME_LOAD); /* Check if PCI Power Management capability is enabled. */ - if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) { + if (pci_find_cap(dev, PCIY_PMG, ®) == 0) { if (reg != 0) { DBPRINT(sc, BXE_EXTREME_LOAD, "%s(): Found PM capability at 0x%04X\n", @@ -1578,7 +1578,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) } /* Check if PCIe capability is enabled. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { if (reg != 0) { link_status = pci_read_config(dev, reg + 0x12, 2); @@ -1612,7 +1612,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) /* Check if MSI capability is enabled. */ - if (pci_find_extcap(dev, PCIY_MSI, ®) == 0) { + if (pci_find_cap(dev, PCIY_MSI, ®) == 0) { if (reg != 0) { DBPRINT(sc, BXE_EXTREME_LOAD, "%s(): Found MSI capability at 0x%04X\n", @@ -1622,7 +1622,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) } /* Check if MSI-X capability is enabled. */ - if (pci_find_extcap(dev, PCIY_MSIX, ®) == 0) { + if (pci_find_cap(dev, PCIY_MSIX, ®) == 0) { if (reg != 0) { DBPRINT(sc, BXE_EXTREME_LOAD, "%s(): Found MSI-X capability at 0x%04X\n", Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/cxgb/cxgb_main.c Wed Mar 23 13:10:15 2011 (r219902) @@ -458,7 +458,7 @@ cxgb_controller_attach(device_t dev) ai = cxgb_get_adapter_info(dev); /* find the PCIe link width and set max read request to 4KB*/ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { uint16_t lnk; lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2); Modified: head/sys/dev/drm/drm_agpsupport.c ============================================================================== --- head/sys/dev/drm/drm_agpsupport.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/drm/drm_agpsupport.c Wed Mar 23 13:10:15 2011 (r219902) @@ -51,7 +51,7 @@ drm_device_find_capability(struct drm_de { #if __FreeBSD_version >= 602102 - return (pci_find_extcap(dev->device, cap, NULL) == 0); + return (pci_find_cap(dev->device, cap, NULL) == 0); #else /* Code taken from agp.c. IWBNI that was a public interface. */ u_int32_t status; Modified: head/sys/dev/e1000/e1000_osdep.c ============================================================================== --- head/sys/dev/e1000/e1000_osdep.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/e1000/e1000_osdep.c Wed Mar 23 13:10:15 2011 (r219902) @@ -75,7 +75,7 @@ e1000_read_pcie_cap_reg(struct e1000_hw device_t dev = ((struct e1000_osdep *)hw->back)->dev; u32 offset; - pci_find_extcap(dev, PCIY_EXPRESS, &offset); + pci_find_cap(dev, PCIY_EXPRESS, &offset); *value = pci_read_config(dev, offset + reg, 2); return (E1000_SUCCESS); } @@ -89,7 +89,7 @@ e1000_write_pcie_cap_reg(struct e1000_hw device_t dev = ((struct e1000_osdep *)hw->back)->dev; u32 offset; - pci_find_extcap(dev, PCIY_EXPRESS, &offset); + pci_find_cap(dev, PCIY_EXPRESS, &offset); pci_write_config(dev, offset + reg, *value, 2); return (E1000_SUCCESS); } Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/e1000/if_em.c Wed Mar 23 13:10:15 2011 (r219902) @@ -4756,7 +4756,7 @@ em_enable_wakeup(device_t dev) u32 pmc, ctrl, ctrl_ext, rctl; u16 status; - if ((pci_find_extcap(dev, PCIY_PMG, &pmc) != 0)) + if ((pci_find_cap(dev, PCIY_PMG, &pmc) != 0)) return; /* Advertise the wakeup capability */ @@ -4924,7 +4924,7 @@ em_disable_aspm(struct adapter *adapter) default: return; } - if (pci_find_extcap(dev, PCIY_EXPRESS, &base) != 0) + if (pci_find_cap(dev, PCIY_EXPRESS, &base) != 0) return; reg = base + PCIR_EXPRESS_LINK_CAP; link_cap = pci_read_config(dev, reg, 2); Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/e1000/if_lem.c Wed Mar 23 13:10:15 2011 (r219902) @@ -3939,7 +3939,7 @@ lem_enable_wakeup(device_t dev) u32 pmc, ctrl, ctrl_ext, rctl; u16 status; - if ((pci_find_extcap(dev, PCIY_PMG, &pmc) != 0)) + if ((pci_find_cap(dev, PCIY_PMG, &pmc) != 0)) return; /* Advertise the wakeup capability */ Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/et/if_et.c Wed Mar 23 13:10:15 2011 (r219902) @@ -275,7 +275,7 @@ et_attach(device_t dev) } msic = 0; - if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, &cap) == 0) { sc->sc_expcap = cap; sc->sc_flags |= ET_FLAG_PCIE; msic = pci_msi_count(dev); Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 23 13:10:15 2011 (r219902) @@ -521,7 +521,7 @@ fxp_attach(device_t dev) sc->revision != FXP_REV_82559S_A) { fxp_read_eeprom(sc, &data, 10, 1); if ((data & 0x20) != 0 && - pci_find_extcap(sc->dev, PCIY_PMG, &pmc) == 0) + pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) sc->flags |= FXP_FLAG_WOLCAP; } @@ -1054,7 +1054,7 @@ fxp_suspend(device_t dev) FXP_LOCK(sc); ifp = sc->ifp; - if (pci_find_extcap(sc->dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) { pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) { @@ -1088,7 +1088,7 @@ fxp_resume(device_t dev) FXP_LOCK(sc); - if (pci_find_extcap(sc->dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) == 0) { sc->flags &= ~FXP_FLAG_WOL; pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2); /* Disable PME and clear PME status. */ Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/iwn/if_iwn.c Wed Mar 23 13:10:15 2011 (r219902) @@ -429,7 +429,7 @@ iwn_attach(device_t dev) * Get the offset of the PCI Express Capability Structure in PCI * Configuration Space. */ - error = pci_find_extcap(dev, PCIY_EXPRESS, &sc->sc_cap_off); + error = pci_find_cap(dev, PCIY_EXPRESS, &sc->sc_cap_off); if (error != 0) { device_printf(dev, "PCIe capability structure not found!\n"); return error; Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/ixgbe/ixv.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1627,7 +1627,7 @@ ixv_allocate_msix(struct adapter *adapte */ if (adapter->hw.mac.type == ixgbe_mac_82599_vf) { int msix_ctrl; - pci_find_extcap(dev, PCIY_MSIX, &rid); + pci_find_cap(dev, PCIY_MSIX, &rid); rid += PCIR_MSIX_CTRL; msix_ctrl = pci_read_config(dev, rid, 2); msix_ctrl |= PCIM_MSIXCTRL_MSIX_ENABLE; Modified: head/sys/dev/jme/if_jme.c ============================================================================== --- head/sys/dev/jme/if_jme.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/jme/if_jme.c Wed Mar 23 13:10:15 2011 (r219902) @@ -778,7 +778,7 @@ jme_attach(device_t dev) sc->jme_phyaddr = 0; /* Set max allowable DMA size. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, &i) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { sc->jme_flags |= JME_FLAG_PCIE; burst = pci_read_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, 2); if (bootverbose) { @@ -827,7 +827,7 @@ jme_attach(device_t dev) /* JMC250 supports Tx/Rx checksum offload as well as TSO. */ ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; ifp->if_hwassist = JME_CSUM_FEATURES | CSUM_TSO; - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) { sc->jme_flags |= JME_FLAG_PMCAP; ifp->if_capabilities |= IFCAP_WOL_MAGIC; } @@ -1591,7 +1591,7 @@ jme_setwol(struct jme_softc *sc) JME_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->jme_dev, PCIY_PMG, &pmc) != 0) { + if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) != 0) { /* Remove Tx MAC/offload clock to save more power. */ if ((sc->jme_flags & JME_FLAG_TXCLK) != 0) CSR_WRITE_4(sc, JME_GHC, CSR_READ_4(sc, JME_GHC) & @@ -1663,7 +1663,7 @@ jme_resume(device_t dev) sc = device_get_softc(dev); JME_LOCK(sc); - if (pci_find_extcap(sc->jme_dev, PCIY_PMG, &pmc) != 0) { + if (pci_find_cap(sc->jme_dev, PCIY_PMG, &pmc) != 0) { pmstat = pci_read_config(sc->jme_dev, pmc + PCIR_POWER_STATUS, 2); /* Disable PME clear PME status. */ Modified: head/sys/dev/malo/if_malo_pci.c ============================================================================== --- head/sys/dev/malo/if_malo_pci.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/malo/if_malo_pci.c Wed Mar 23 13:10:15 2011 (r219902) @@ -175,7 +175,7 @@ malo_pci_attach(device_t dev) */ sc->malo_invalid = 1; - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { msic = pci_msi_count(dev); if (bootverbose) device_printf(dev, "MSI count : %d\n", msic); Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/msk/if_msk.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1759,10 +1759,10 @@ mskc_attach(device_t dev) } /* Check bus type. */ - if (pci_find_extcap(sc->msk_dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(sc->msk_dev, PCIY_EXPRESS, ®) == 0) { sc->msk_bustype = MSK_PEX_BUS; sc->msk_expcap = reg; - } else if (pci_find_extcap(sc->msk_dev, PCIY_PCIX, ®) == 0) { + } else if (pci_find_cap(sc->msk_dev, PCIY_PCIX, ®) == 0) { sc->msk_bustype = MSK_PCIX_BUS; sc->msk_pcixcap = reg; } else Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/mxge/if_mxge.c Wed Mar 23 13:10:15 2011 (r219902) @@ -553,7 +553,7 @@ mxge_firmware_probe(mxge_softc_t *sc) * Verify the max read request size was set to 4KB * before trying the test with 4KB. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { pectl = pci_read_config(dev, reg + 0x8, 2); if ((pectl & (5 << 12)) != (5 << 12)) { device_printf(dev, "Max Read Req. size != 4k (0x%x\n", @@ -3731,7 +3731,7 @@ mxge_setup_cfg_space(mxge_softc_t *sc) uint16_t cmd, lnk, pectl; /* find the PCIe link width and set max read request to 4KB*/ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { lnk = pci_read_config(dev, reg + 0x12, 2); sc->link_width = (lnk >> 4) & 0x3f; @@ -3760,7 +3760,7 @@ mxge_read_reboot(mxge_softc_t *sc) uint32_t vs; /* find the vendor specific offset */ - if (pci_find_extcap(dev, PCIY_VENDOR, &vs) != 0) { + if (pci_find_cap(dev, PCIY_VENDOR, &vs) != 0) { device_printf(sc->dev, "could not find vendor specific offset\n"); return (uint32_t)-1; Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/nfe/if_nfe.c Wed Mar 23 13:10:15 2011 (r219902) @@ -363,7 +363,7 @@ nfe_attach(device_t dev) return (ENXIO); } - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { uint16_t v, width; v = pci_read_config(dev, reg + 0x08, 2); @@ -596,7 +596,7 @@ nfe_attach(device_t dev) IFCAP_VLAN_HWTSO; } - if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) + if (pci_find_cap(dev, PCIY_PMG, ®) == 0) ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; @@ -3354,7 +3354,7 @@ nfe_set_wol(struct nfe_softc *sc) NFE_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->nfe_dev, PCIY_PMG, &pmc) != 0) + if (pci_find_cap(sc->nfe_dev, PCIY_PMG, &pmc) != 0) return; ifp = sc->nfe_ifp; if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) Modified: head/sys/dev/nge/if_nge.c ============================================================================== --- head/sys/dev/nge/if_nge.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/nge/if_nge.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1061,7 +1061,7 @@ nge_attach(device_t dev) * supply(3VAUX) to drive PME such that checking PCI power * management capability is necessary. */ - if (pci_find_extcap(sc->nge_dev, PCIY_PMG, &i) == 0) + if (pci_find_cap(sc->nge_dev, PCIY_PMG, &i) == 0) ifp->if_capabilities |= IFCAP_WOL; ifp->if_capenable = ifp->if_capabilities; @@ -2689,7 +2689,7 @@ nge_wol(struct nge_softc *sc) NGE_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->nge_dev, PCIY_PMG, &pmc) != 0) + if (pci_find_cap(sc->nge_dev, PCIY_PMG, &pmc) != 0) return; ifp = sc->nge_ifp; @@ -2776,7 +2776,7 @@ nge_resume(device_t dev) NGE_LOCK(sc); ifp = sc->nge_ifp; - if (pci_find_extcap(sc->nge_dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->nge_dev, PCIY_PMG, &pmc) == 0) { /* Disable PME and clear PME status. */ pmstat = pci_read_config(sc->nge_dev, pmc + PCIR_POWER_STATUS, 2); Modified: head/sys/dev/pci/hostb_pci.c ============================================================================== --- head/sys/dev/pci/hostb_pci.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/pci/hostb_pci.c Wed Mar 23 13:10:15 2011 (r219902) @@ -78,7 +78,7 @@ pci_hostb_attach(device_t dev) * If AGP capabilities are present on this device, then create * an AGP child. */ - if (pci_find_extcap(dev, PCIY_AGP, NULL) == 0) + if (pci_find_cap(dev, PCIY_AGP, NULL) == 0) device_add_child(dev, "agp", -1); bus_generic_attach(dev); return (0); Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/re/if_re.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1237,7 +1237,7 @@ re_attach(device_t dev) msic = pci_msi_count(dev); msixc = pci_msix_count(dev); - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) sc->rl_flags |= RL_FLAG_PCIE; if (bootverbose) { device_printf(dev, "MSI count : %d\n", msic); @@ -1561,7 +1561,7 @@ re_attach(device_t dev) if (ifp->if_capabilities & IFCAP_HWCSUM) ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; /* Enable WOL if PM is supported. */ - if (pci_find_extcap(sc->rl_dev, PCIY_PMG, ®) == 0) + if (pci_find_cap(sc->rl_dev, PCIY_PMG, ®) == 0) ifp->if_capabilities |= IFCAP_WOL; ifp->if_capenable = ifp->if_capabilities; /* @@ -3565,7 +3565,7 @@ re_setwol(struct rl_softc *sc) RL_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) != 0) + if (pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) != 0) return; ifp = sc->rl_ifp; @@ -3633,7 +3633,7 @@ re_clrwol(struct rl_softc *sc) RL_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) != 0) + if (pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) != 0) return; /* Enable config register write. */ Modified: head/sys/dev/siba/siba_core.c ============================================================================== --- head/sys/dev/siba/siba_core.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/siba/siba_core.c Wed Mar 23 13:10:15 2011 (r219902) @@ -362,7 +362,7 @@ siba_scan(struct siba_softc *siba) case SIBA_DEVID_PCI: case SIBA_DEVID_PCIE: n_pci++; - error = pci_find_extcap(siba->siba_dev, PCIY_EXPRESS, + error = pci_find_cap(siba->siba_dev, PCIY_EXPRESS, &base); is_pcie = (error == 0) ? 1 : 0; Modified: head/sys/dev/sis/if_sis.c ============================================================================== --- head/sys/dev/sis/if_sis.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/sis/if_sis.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1192,7 +1192,7 @@ sis_attach(device_t dev) ifp->if_snd.ifq_drv_maxlen = SIS_TX_LIST_CNT - 1; IFQ_SET_READY(&ifp->if_snd); - if (pci_find_extcap(sc->sis_dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->sis_dev, PCIY_PMG, &pmc) == 0) { if (sc->sis_type == SIS_TYPE_83815) ifp->if_capabilities |= IFCAP_WOL; else @@ -2472,7 +2472,7 @@ sis_wol(struct sis_softc *sc) /* Enable silent RX mode. */ SIS_SETBIT(sc, SIS_CSR, SIS_CSR_RX_ENABLE); } else { - if (pci_find_extcap(sc->sis_dev, PCIY_PMG, &pmc) != 0) + if (pci_find_cap(sc->sis_dev, PCIY_PMG, &pmc) != 0) return; val = 0; if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/ste/if_ste.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1176,7 +1176,7 @@ ste_attach(device_t dev) */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_MTU; - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) ifp->if_capabilities |= IFCAP_WOL_MAGIC; ifp->if_capenable = ifp->if_capabilities; #ifdef DEVICE_POLLING @@ -2157,7 +2157,7 @@ ste_resume(device_t dev) sc = device_get_softc(dev); STE_LOCK(sc); - if (pci_find_extcap(sc->ste_dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->ste_dev, PCIY_PMG, &pmc) == 0) { /* Disable PME and clear PME status. */ pmstat = pci_read_config(sc->ste_dev, pmc + PCIR_POWER_STATUS, 2); @@ -2261,7 +2261,7 @@ ste_setwol(struct ste_softc *sc) STE_LOCK_ASSERT(sc); - if (pci_find_extcap(sc->ste_dev, PCIY_PMG, &pmc) != 0) { + if (pci_find_cap(sc->ste_dev, PCIY_PMG, &pmc) != 0) { /* Disable WOL. */ CSR_READ_1(sc, STE_WAKE_EVENT); CSR_WRITE_1(sc, STE_WAKE_EVENT, 0); Modified: head/sys/dev/txp/if_txp.c ============================================================================== --- head/sys/dev/txp/if_txp.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/txp/if_txp.c Wed Mar 23 13:10:15 2011 (r219902) @@ -423,7 +423,7 @@ txp_attach(device_t dev) * advertise the whole capability anyway. */ ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM; - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) ifp->if_capabilities |= IFCAP_WOL_MAGIC; /* Enable all capabilities. */ ifp->if_capenable = ifp->if_capabilities; @@ -1153,7 +1153,7 @@ txp_suspend(device_t dev) WRITE_REG(sc, TXP_IER, TXP_INTR_NONE); WRITE_REG(sc, TXP_IMR, TXP_INTR_ALL); txp_sleep(sc, sc->sc_ifp->if_capenable); - if (pci_find_extcap(sc->sc_dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->sc_dev, PCIY_PMG, &pmc) == 0) { /* Request PME. */ pmstat = pci_read_config(sc->sc_dev, pmc + PCIR_POWER_STATUS, 2); @@ -1178,7 +1178,7 @@ txp_resume(device_t dev) sc = device_get_softc(dev); TXP_LOCK(sc); - if (pci_find_extcap(sc->sc_dev, PCIY_PMG, &pmc) == 0) { + if (pci_find_cap(sc->sc_dev, PCIY_PMG, &pmc) == 0) { /* Disable PME and clear PME status. */ pmstat = pci_read_config(sc->sc_dev, pmc + PCIR_POWER_STATUS, 2); Modified: head/sys/dev/vge/if_vge.c ============================================================================== --- head/sys/dev/vge/if_vge.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/vge/if_vge.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1004,12 +1004,12 @@ vge_attach(device_t dev) goto fail; } - if (pci_find_extcap(dev, PCIY_EXPRESS, &cap) == 0) { + if (pci_find_cap(dev, PCIY_EXPRESS, &cap) == 0) { sc->vge_flags |= VGE_FLAG_PCIE; sc->vge_expcap = cap; } else sc->vge_flags |= VGE_FLAG_JUMBO; - if (pci_find_extcap(dev, PCIY_PMG, &cap) == 0) { + if (pci_find_cap(dev, PCIY_PMG, &cap) == 0) { sc->vge_flags |= VGE_FLAG_PMCAP; sc->vge_pmcap = cap; } Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/vr/if_vr.c Wed Mar 23 13:10:15 2011 (r219902) @@ -696,7 +696,7 @@ vr_attach(device_t dev) } if (sc->vr_revid >= REV_ID_VT6102_A && - pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) + pci_find_cap(dev, PCIY_PMG, &pmc) == 0) ifp->if_capabilities |= IFCAP_WOL_UCAST | IFCAP_WOL_MAGIC; /* Rhine supports oversized VLAN frame. */ @@ -711,7 +711,7 @@ vr_attach(device_t dev) * shuts down. Be sure to kick it in the head to wake it * up again. */ - if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) + if (pci_find_cap(dev, PCIY_PMG, &pmc) == 0) VR_CLRBIT(sc, VR_STICKHW, (VR_STICKHW_DS0|VR_STICKHW_DS1)); /* @@ -2494,7 +2494,7 @@ vr_setwol(struct vr_softc *sc) VR_LOCK_ASSERT(sc); if (sc->vr_revid < REV_ID_VT6102_A || - pci_find_extcap(sc->vr_dev, PCIY_PMG, &pmc) != 0) + pci_find_cap(sc->vr_dev, PCIY_PMG, &pmc) != 0) return; ifp = sc->vr_ifp; Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/dev/xl/if_xl.c Wed Mar 23 13:10:15 2011 (r219902) @@ -1407,7 +1407,7 @@ xl_attach(device_t dev) /* Check availability of WOL. */ if ((sc->xl_caps & XL_CAPS_PWRMGMT) != 0 && - pci_find_extcap(dev, PCIY_PMG, &pmcap) == 0) { + pci_find_cap(dev, PCIY_PMG, &pmcap) == 0) { sc->xl_pmcap = pmcap; sc->xl_flags |= XL_FLAG_WOL; sinfo2 = 0; Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/ofed/include/linux/pci.h Wed Mar 23 13:10:15 2011 (r219902) @@ -299,7 +299,7 @@ pci_find_capability(struct pci_dev *pdev { int reg; - if (pci_find_extcap(pdev->dev.bsddev, capid, ®)) + if (pci_find_cap(pdev->dev.bsddev, capid, ®)) return (0); return (reg); } Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Wed Mar 23 11:16:06 2011 (r219901) +++ head/sys/pci/if_rl.c Wed Mar 23 13:10:15 2011 (r219902) @@ -939,7 +939,7 @@ rl_attach(device_t dev) ifp->if_capabilities = IFCAP_VLAN_MTU; /* Check WOL for RTL8139B or newer controllers. */ if (sc->rl_type == RL_8139 && - pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { + pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; switch (hwrev) { case RL_HWREV_8139B: @@ -2122,7 +2122,7 @@ rl_resume(device_t dev) RL_LOCK(sc); if ((ifp->if_capabilities & IFCAP_WOL) != 0 && - pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { + pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { /* Disable PME and clear PME status. */ pmstat = pci_read_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, 2); @@ -2187,7 +2187,7 @@ rl_setwol(struct rl_softc *sc) ifp = sc->rl_ifp; if ((ifp->if_capabilities & IFCAP_WOL) == 0) return; - if (pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) != 0) + if (pci_find_cap(sc->rl_dev, PCIY_PMG, &pmc) != 0) return; /* Enable config register write. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:43:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED5FF1065678; Wed, 23 Mar 2011 13:43:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE5958FC12; Wed, 23 Mar 2011 13:43:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NDhuxk096000; Wed, 23 Mar 2011 13:43:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NDhuRs095998; Wed, 23 Mar 2011 13:43:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103231343.p2NDhuRs095998@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 23 Mar 2011 13:43: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: r219903 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:43:57 -0000 Author: nwhitehorn Date: Wed Mar 23 13:43:56 2011 New Revision: 219903 URL: http://svn.freebsd.org/changeset/base/219903 Log: Mark any distfiles with no checksum entries in the manifest "Skipped" instead of "Passed". Modified: head/usr.sbin/bsdinstall/scripts/checksum Modified: head/usr.sbin/bsdinstall/scripts/checksum ============================================================================== --- head/usr.sbin/bsdinstall/scripts/checksum Wed Mar 23 13:10:15 2011 (r219902) +++ head/usr.sbin/bsdinstall/scripts/checksum Wed Mar 23 13:43:56 2011 (r219903) @@ -42,17 +42,23 @@ for dist in $DISTRIBUTIONS; do 0 0 $percentage $items CK=`sha256 -q $BSDINSTALL_DISTDIR/$dist` - awk -v checksum=$CK -v dist=$dist '{ + awk -v checksum=$CK -v dist=$dist -v found=0 '{ if (dist == $1) { + found = 1 if (checksum == $2) exit(0) else - exit(1) + exit(2) } - }' $BSDINSTALL_DISTDIR/MANIFEST + } END {if (!found) exit(1);}' $BSDINSTALL_DISTDIR/MANIFEST - if [ $? -eq 0 ]; then - eval "status_$distname=2" + CK_VALID=$? + if [ $CK_VALID -le 1 ]; then + if [ $CK_VALID -eq 0 ]; then + eval "status_$distname=2" + else + eval "status_$distname=6" + fi percentage=$(echo $percentage + 100/`echo $DISTRIBUTIONS | wc -w` | bc) else eval "status_$distname=1" From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:44:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE459106566B; Wed, 23 Mar 2011 13:44:09 +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 858A38FC1B; Wed, 23 Mar 2011 13:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NDi9FL096057; Wed, 23 Mar 2011 13:44:09 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NDi9MU096055; Wed, 23 Mar 2011 13:44:09 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201103231344.p2NDi9MU096055@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 23 Mar 2011 13:44: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: r219904 - head/sbin/mount_unionfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:44:09 -0000 Author: glebius Date: Wed Mar 23 13:44:09 2011 New Revision: 219904 URL: http://svn.freebsd.org/changeset/base/219904 Log: Fix SYNOPSIS. Modified: head/sbin/mount_unionfs/mount_unionfs.8 Modified: head/sbin/mount_unionfs/mount_unionfs.8 ============================================================================== --- head/sbin/mount_unionfs/mount_unionfs.8 Wed Mar 23 13:43:56 2011 (r219903) +++ head/sbin/mount_unionfs/mount_unionfs.8 Wed Mar 23 13:44:09 2011 (r219904) @@ -39,7 +39,7 @@ .Nd mount union file systems .Sh SYNOPSIS .Nm -.Op Fl br +.Op Fl b .Op Fl o Ar options .Ar directory .Ar uniondir From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:44:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8F66106564A; Wed, 23 Mar 2011 13:44:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA9578FC0A; Wed, 23 Mar 2011 13:44:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NDiWHw096105; Wed, 23 Mar 2011 13:44:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NDiW0S096103; Wed, 23 Mar 2011 13:44:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103231344.p2NDiW0S096103@svn.freebsd.org> From: John Baldwin Date: Wed, 23 Mar 2011 13:44: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: r219905 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:44:33 -0000 Author: jhb Date: Wed Mar 23 13:44:32 2011 New Revision: 219905 URL: http://svn.freebsd.org/changeset/base/219905 Log: Small style fix. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Mar 23 13:44:09 2011 (r219904) +++ head/sys/kern/kern_sig.c Wed Mar 23 13:44:32 2011 (r219905) @@ -1632,7 +1632,7 @@ killpg1(struct thread *td, int sig, int LIST_FOREACH(p, &pgrp->pg_members, p_pglist) { PROC_LOCK(p); if (p->p_pid <= 1 || p->p_flag & P_SYSTEM || - p->p_state == PRS_NEW ) { + p->p_state == PRS_NEW) { PROC_UNLOCK(p); continue; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:45:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 446EF106564A; Wed, 23 Mar 2011 13:45:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7768FC18; Wed, 23 Mar 2011 13:45:41 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A6DB746B98; Wed, 23 Mar 2011 09:45:40 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 46A548A027; Wed, 23 Mar 2011 09:45:40 -0400 (EDT) From: John Baldwin To: "Jung-uk Kim" Date: Wed, 23 Mar 2011 08:34:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201103161644.p2GGi8ug098283@svn.freebsd.org> <20110317200156.GB65858@server.vk2pj.dyndns.org> <201103171706.12993.jkim@FreeBSD.org> In-Reply-To: <201103171706.12993.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103230834.19151.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Mar 2011 09:45:40 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Jeremy Subject: Re: svn commit: r219700 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:45:41 -0000 On Thursday, March 17, 2011 5:06:09 pm Jung-uk Kim wrote: > On Thursday 17 March 2011 04:01 pm, Peter Jeremy wrote: > > On 2011-Mar-16 16:44:08 +0000, Jung-uk Kim wrote: > > >Log: > > > Revert r219676. > > > > Thanks also. For extra kudos, how about adding a similar function > > to allow the HPET frequency to be over-ridden. That is currently > > the only timecounter that does not allow the user to compensate for > > incorrect hardware frequencies. > > I really hate the idea of adjusting timecounter frequency from > userland. I guess "use ntpd(8)" is not a good answer for some > people. :-( Actually, that doesn't work well if your timecounter frequency is off by a lot. Having the timecounter frequency accurate improves the accuracy of things like ntpd and ptpd. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:45:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53900106566C; Wed, 23 Mar 2011 13:45:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2871A8FC19; Wed, 23 Mar 2011 13:45:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D2ACF46B99; Wed, 23 Mar 2011 09:45:41 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 491118A02A; Wed, 23 Mar 2011 09:45:41 -0400 (EDT) From: John Baldwin To: Garrett Cooper Date: Wed, 23 Mar 2011 09:03:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201103192306.p2JN6Inv037425@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103230903.59651.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Mar 2011 09:45:41 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Nathan Whitehorn Subject: Re: svn commit: r219788 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:45:42 -0000 On Saturday, March 19, 2011 7:10:40 pm Garrett Cooper wrote: > On Sat, Mar 19, 2011 at 4:06 PM, Nathan Whitehorn > wrote: > > Author: nwhitehorn > > Date: Sat Mar 19 23:06:17 2011 > > New Revision: 219788 > > URL: http://svn.freebsd.org/changeset/base/219788 > > > > Log: > > Add support for checking out ports and doc trees from a CVS repository, > > in addition to CVSUP, and add support for alternate SVN roots for src. > > > > Requested by: jhb > > Although this seems good and all, wouldn't it make sense to split off > the pulling infrastructure into separate scripts so that someone could > have hooks to do: > > - pre-pull (create paths, whatever) > - pull > - post-pull (patch?) > > That way someone could choose any arbitrary SCM (git, hg, etc), > specify necessary configuration files, and apply local patches as > necessary. The old release(7) infrastructure did do that (see things like LOCAL_PATCHES, EXTSRCDIR, LOCAL_SCRIPTS, etc.). However, we should definitely streamline the case for the tools that re@ will actually use for official releases (doc and ports from CVS, src from either CVS or SVN). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:45:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1918F1065676; Wed, 23 Mar 2011 13:45:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B92E08FC1B; Wed, 23 Mar 2011 13:45:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6B33046B9B; Wed, 23 Mar 2011 09:45:42 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0D9418A02B; Wed, 23 Mar 2011 09:45:42 -0400 (EDT) From: John Baldwin To: Julian Elischer Date: Wed, 23 Mar 2011 09:45:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201103180647.p2I6lNCB051745@svn.freebsd.org> <4D831A82.7070308@freebsd.org> In-Reply-To: <4D831A82.7070308@freebsd.org> MIME-Version: 1.0 Message-Id: <201103230945.37726.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Mar 2011 09:45:42 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r219727 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:45:43 -0000 On Friday, March 18, 2011 4:40:34 am Julian Elischer wrote: > On 3/17/11 11:47 PM, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Mar 18 06:47:23 2011 > > New Revision: 219727 > > URL: http://svn.freebsd.org/changeset/base/219727 > > > > Log: > > In vm_daemon(), when iterating over all processes in the system, skip those > > which are not yet fully initialized (i.e. ones with p_state == PRS_NEW). > > Without it, we could panic in _thread_lock_flags(). > > > > Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that > > require similar fix. > > In the past each process was only put on the process list after it was > fully set up. > Did someone change that recently? that would be "A Bad Thing" (TM). Err, no, that has never been true. The reason it has to go on the list immediately is to reserve the PID against concurrent fork()s. Hmm, the locking of prs_state is a bit busted it seems. Both the PROC_LOCK() and PROC_SLOCK() are supposed to be held when it is written to, but PROC_LOCK() is missing in fork1() when moving the state to PRS_NORMAL. Also, this commit should check against PRS_NORMAL after acquiring the proc lock, not before. Hmm, I did an audit of prs_state and there is lots of locking rot. :( Below is a set of fixes I will commit once it has been tested some: Index: kern/kern_thread.c =================================================================== --- kern/kern_thread.c (revision 219902) +++ kern/kern_thread.c (working copy) @@ -981,7 +981,9 @@ td = NULL; break; } + PROC_LOCK(td->td_proc); if (td->td_proc->p_state == PRS_NEW) { + PROC_UNLOCK(td->td_proc); td = NULL; break; } @@ -990,12 +992,10 @@ LIST_REMOVE(td, td_hash); LIST_INSERT_HEAD(TIDHASH(td->td_tid), td, td_hash); - PROC_LOCK(td->td_proc); rw_wunlock(&tidhash_lock); return (td); } } - PROC_LOCK(td->td_proc); break; } run++; Index: kern/kern_proc.c =================================================================== --- kern/kern_proc.c (revision 219902) +++ kern/kern_proc.c (working copy) @@ -291,11 +291,11 @@ sx_slock(&allproc_lock); LIST_FOREACH(p, PIDHASH(pid), p_hash) if (p->p_pid == pid) { + PROC_LOCK(p); if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); p = NULL; - break; } - PROC_LOCK(p); break; } sx_sunlock(&allproc_lock); @@ -756,7 +756,6 @@ kp->ki_sigcatch = ps->ps_sigcatch; mtx_unlock(&ps->ps_mtx); } - PROC_SLOCK(p); if (p->p_state != PRS_NEW && p->p_state != PRS_ZOMBIE && p->p_vmspace != NULL) { @@ -782,12 +781,11 @@ kp->ki_swtime = (ticks - p->p_swtick) / hz; kp->ki_pid = p->p_pid; kp->ki_nice = p->p_nice; - rufetch(p, &kp->ki_rusage); - kp->ki_runtime = cputick2usec(p->p_rux.rux_runtime); - PROC_SUNLOCK(p); kp->ki_start = p->p_stats->p_start; timevaladd(&kp->ki_start, &boottime); PROC_SLOCK(p); + rufetch(p, &kp->ki_rusage); + kp->ki_runtime = cputick2usec(p->p_rux.rux_runtime); calcru(p, &kp->ki_rusage.ru_utime, &kp->ki_rusage.ru_stime); PROC_SUNLOCK(p); calccru(p, &kp->ki_childutime, &kp->ki_childstime); @@ -1213,13 +1211,11 @@ /* * Skip embryonic processes. */ - PROC_SLOCK(p); + PROC_LOCK(p); if (p->p_state == PRS_NEW) { - PROC_SUNLOCK(p); + PROC_UNLOCK(p); continue; } - PROC_SUNLOCK(p); - PROC_LOCK(p); KASSERT(p->p_ucred != NULL, ("process credential is NULL for non-NEW proc")); /* Index: kern/kern_descrip.c =================================================================== --- kern/kern_descrip.c (revision 219902) +++ kern/kern_descrip.c (working copy) @@ -2634,9 +2634,11 @@ xf.xf_size = sizeof(xf); sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_state == PRS_NEW) + PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); continue; - PROC_LOCK(p); + } if (p_cansee(req->td, p) != 0) { PROC_UNLOCK(p); continue; Index: kern/kern_fork.c =================================================================== --- kern/kern_fork.c (revision 219902) +++ kern/kern_fork.c (working copy) @@ -630,12 +630,13 @@ /* * Set the child start time and mark the process as being complete. */ + PROC_LOCK(p2); + PROC_LOCK(p1); microuptime(&p2->p_stats->p_start); PROC_SLOCK(p2); p2->p_state = PRS_NORMAL; PROC_SUNLOCK(p2); - PROC_LOCK(p1); #ifdef KDTRACE_HOOKS /* * Tell the DTrace fasttrap provider about the new process @@ -643,11 +644,8 @@ * p_state is PRS_NORMAL since the fasttrap module will use pfind() * later on. */ - if (dtrace_fasttrap_fork) { - PROC_LOCK(p2); + if (dtrace_fasttrap_fork) dtrace_fasttrap_fork(p1, p2); - PROC_UNLOCK(p2); - } #endif if ((p1->p_flag & (P_TRACED | P_FOLLOWFORK)) == (P_TRACED | P_FOLLOWFORK)) { @@ -660,12 +658,11 @@ */ td->td_dbgflags |= TDB_FORK; td->td_dbg_forked = p2->p_pid; - PROC_LOCK(p2); td2->td_dbgflags |= TDB_STOPATFORK; _PHOLD(p2); p2_held = 1; - PROC_UNLOCK(p2); } + PROC_UNLOCK(p2); if ((flags & RFSTOPPED) == 0) { /* * If RFSTOPPED not requested, make child runnable and Index: fs/nfsclient/nfs_clport.c =================================================================== --- fs/nfsclient/nfs_clport.c (revision 219902) +++ fs/nfsclient/nfs_clport.c (working copy) @@ -1102,11 +1102,11 @@ LIST_FOREACH(p, PIDHASH(pid), p_hash) if (p->p_pid == pid) { + PROC_LOCK(p); if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); p = NULL; - break; } - PROC_LOCK(p); break; } return (p); Index: vm/vm_pageout.c =================================================================== --- vm/vm_pageout.c (revision 219902) +++ vm/vm_pageout.c (working copy) @@ -1281,14 +1281,13 @@ FOREACH_PROC_IN_SYSTEM(p) { int breakout; - if (p->p_state != PRS_NORMAL) - continue; if (PROC_TRYLOCK(p) == 0) continue; /* * If this is a system, protected or killed process, skip it. */ - if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || + if (p->p_state != PRS_NORMAL || + (p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || (p->p_pid == 1) || P_KILLED(p) || ((p->p_pid < 48) && (swap_pager_avail != 0))) { PROC_UNLOCK(p); @@ -1651,14 +1650,13 @@ FOREACH_PROC_IN_SYSTEM(p) { vm_pindex_t limit, size; - if (p->p_state != PRS_NORMAL) - continue; /* * if this is a system process or if we have already * looked at this process, skip it. */ PROC_LOCK(p); - if (p->p_flag & (P_INEXEC | P_SYSTEM | P_WEXIT)) { + if (p->p_state != PRS_NORMAL || + p->p_flag & (P_INEXEC | P_SYSTEM | P_WEXIT)) { PROC_UNLOCK(p); continue; } Index: vm/vm_meter.c =================================================================== --- vm/vm_meter.c (revision 219902) +++ vm/vm_meter.c (working copy) @@ -130,15 +130,12 @@ if (p->p_flag & P_SYSTEM) continue; PROC_LOCK(p); - PROC_SLOCK(p); switch (p->p_state) { case PRS_NEW: - PROC_SUNLOCK(p); PROC_UNLOCK(p); continue; break; default: - PROC_SUNLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); switch (td->td_state) { -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 13:46:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1C8910657D9; Wed, 23 Mar 2011 13:46:17 +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 D37778FC0C; Wed, 23 Mar 2011 13:46:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NDkHuM096187; Wed, 23 Mar 2011 13:46:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NDkH0E096185; Wed, 23 Mar 2011 13:46:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103231346.p2NDkH0E096185@svn.freebsd.org> From: John Baldwin Date: Wed, 23 Mar 2011 13:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219906 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 13:46:18 -0000 Author: jhb Date: Wed Mar 23 13:46:17 2011 New Revision: 219906 URL: http://svn.freebsd.org/changeset/base/219906 Log: Update a comment. The kernel stopped using the S* process state constants a long time ago. Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Mar 23 13:44:32 2011 (r219905) +++ head/sys/sys/proc.h Wed Mar 23 13:46:17 2011 (r219906) @@ -487,7 +487,7 @@ struct proc { PRS_NEW = 0, /* In creation */ PRS_NORMAL, /* threads can be run. */ PRS_ZOMBIE - } p_state; /* (j/c) S* process status. */ + } p_state; /* (j/c) Process status. */ pid_t p_pid; /* (b) Process identifier. */ LIST_ENTRY(proc) p_hash; /* (d) Hash chain. */ LIST_ENTRY(proc) p_pglist; /* (g + e) List of processes in pgrp. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 14:19:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A47106564A; Wed, 23 Mar 2011 14:19:00 +0000 (UTC) (envelope-from osa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1628FC1B; Wed, 23 Mar 2011 14:19:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NEJ0Ku097023; Wed, 23 Mar 2011 14:19:00 GMT (envelope-from osa@svn.freebsd.org) Received: (from osa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NEJ0xD097018; Wed, 23 Mar 2011 14:19:00 GMT (envelope-from osa@svn.freebsd.org) Message-Id: <201103231419.p2NEJ0xD097018@svn.freebsd.org> From: "Sergey A. Osokin" Date: Wed, 23 Mar 2011 14:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219907 - in stable/8/usr.bin/calendar: . calendars calendars/ru_RU.KOI8-R X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 14:19:00 -0000 Author: osa (ports committer) Date: Wed Mar 23 14:18:59 2011 New Revision: 219907 URL: http://svn.freebsd.org/changeset/base/219907 Log: MFC r211819: Add one more new memory day for Russian Federation: the end of Second World War. MFC r212027: Add dim to calendar.freebsd. MFC r212218: Add swills to calendar.freebsd. MFC r212260: Add andreast to calendar.freebsd. MFC r212591: Remove extra ; from parse.c. MFC r213001: Add sunpoet to calendar.freebsd. MFC r213482: Add pluknet to calendar.freebsd. MFC r213990: Add culot to calendar.freebsd. MFC r214027: Fix spaces by a tab after the date, introduced in r213990. MFC r214973: A traditional (once per three years) sort by month/day/year/login. While here, fixed badly formatted lines. MFC r214974: Add/expand country/state. MFC r215096: Add zack to calendar.freebsd. MFC r215836: Pet make checkdpadd. MFC r216282: Add flo to calendar.freebsd. MFC r216895: Add jpaetzel to calendar.freebsd. MFC r219478: Add trociny to calendar.freebsd. MFC r219638: Add dchagin to calendar.freebsd. MFC r219731: Add sbz to calendar.freebsd. Modified: stable/8/usr.bin/calendar/Makefile stable/8/usr.bin/calendar/calendars/calendar.freebsd stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military (contents, props changed) stable/8/usr.bin/calendar/parsedata.c Directory Properties: stable/8/usr.bin/calendar/ (props changed) Modified: stable/8/usr.bin/calendar/Makefile ============================================================================== --- stable/8/usr.bin/calendar/Makefile Wed Mar 23 13:46:17 2011 (r219906) +++ stable/8/usr.bin/calendar/Makefile Wed Mar 23 14:18:59 2011 (r219907) @@ -4,6 +4,7 @@ PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c +DPADD= ${LIBM} LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Wed Mar 23 13:46:17 2011 (r219906) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Wed Mar 23 14:18:59 2011 (r219907) @@ -7,6 +7,7 @@ #ifndef _calendar_freebsd_ #define _calendar_freebsd_ +01/01 Dimitry Andric born in Utrecht, the Netherlands, 1969 01/01 Alexander Langer born in Duesseldorf, Nordrhein-Westfalen, Germany, 1981 01/02 Ion-Mihai "IOnut" Tetcu born in Bucharest, Romania, 1980 01/02 Patrick Li born in Beijing, People's Republic of China, 1985 @@ -23,13 +24,13 @@ 01/16 Vanilla I. Shu born in Taipei, Taiwan, Republic of China, 1978 01/18 Dejan Lesjak born in Ljubljana, Slovenia, Yugoslavia, 1977 01/19 Marshall Kirk McKusick born in Wilmington, Delaware, United States, 1954 -01/19 Marcelo S. Araujo born in Joinville, Santa Catarina, Brazil, 1981 01/19 Ruslan Ermilov born in Simferopol, USSR, 1974 +01/19 Marcelo S. Araujo born in Joinville, Santa Catarina, Brazil, 1981 01/20 Poul-Henning Kamp born in Korsoer, Denmark, 1966 01/22 Johann Visagie born in Cape Town, South Africa, 1970 01/23 Hideyuki KURASHINA born in Niigata, Japan, 1982 -01/24 Matteo Riondato born in Padova, Italy, 1986 01/24 Fabien Thomas born in Avignon, France, 1971 +01/24 Matteo Riondato born in Padova, Italy, 1986 01/25 Bernd Walter born in Moers, Nordrhein-Westfalen, Germany, 1974 01/26 Andrew Gallatin born in Buffalo, New York, United States, 1970 01/27 Nick Sayer born in San Diego, California, United States, 1968 @@ -40,20 +41,22 @@ 02/01 Paul Saab born in Champaign-Urbana, Illinois, United States, 1978 02/01 Martin Wilke born in Ludwigsfelde, Brandenburg, Germany, 1980 02/01 Christian Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1982 -02/01 Steven Kreuzer born in Oceanside, New York, 1982 +02/01 Steven Kreuzer born in Oceanside, New York, United States, 1982 02/01 Juli Mallett born in Washington, Pennsylvania, United States, 1985 -02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 02/02 Diomidis D. Spinellis born in Athens, Greece, 1967 +02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 +02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 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/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 02/13 David W. Chapman Jr. born in Bethel, Connecticut, United States, 1981 -02/14 Erwin Lansing born in 's-Hertogenbosch, the Netherlands, 1975 02/14 Manolis Kiagias born in Chania, Greece, 1970 +02/14 Erwin Lansing born in 's-Hertogenbosch, the Netherlands, 1975 02/14 Martin Blapp born in Olten, Switzerland, 1976 02/19 Murray Stokely born in Jacksonville, Florida, United States, 1979 02/20 Anders Nordby born in Oslo, Norway, 1976 @@ -65,6 +68,7 @@ 02/24 Johan Karlsson born in Mariannelund, Sweden, 1974 02/24 Colin Percival born in Burnaby, Canada, 1981 02/26 Pietro Cerutti born in Faido, Switzerland, 1984 +05/19 Sofian Brabez born in Toulouse, France, 1984 02/28 Daichi GOTO born in Shimizu Suntou, Shizuoka, Japan, 1980 03/01 Hye-Shik Chang born in Daejeon, Republic of Korea, 1980 03/02 Cy Schubert born in Edmonton, Alberta, Canada, 1956 @@ -90,10 +94,10 @@ 03/17 Alexander Motin born in Simferopol, Ukraine, 1979 03/18 Koop Mast born in Dokkum, the Netherlands, 1981 03/19 Mikhail Teterin born in Kyiv, Ukraine, 1972 +03/20 Joseph S. Atkinson born in Batesville, Arkansas, United States, 1977 +03/20 Henrik Brix Andersen born in Aarhus, Denmark, 1978 03/20 MANTANI Nobutaka born in Hiroshima, Japan, 1978 03/20 Cameron Grant died in Hemel Hempstead, United Kingdom, 2005 -03/20 Henrik Brix Andersen born in Aarhus, Denmark, 1978 -03/20 Joseph S. Atkinson born in Batesville, Arkansas, United States, 1977 03/22 Brad Davis born in Farmington, New Mexico, United States, 1983 03/23 Daniel C. Sobral born in Brasilia, Distrito Federal, Brazil, 1971 03/23 Benno Rice born in Adelaide, South Australia, Australia, 1977 @@ -103,13 +107,14 @@ 03/27 Josef El-Rayes born in Linz, Austria, 1982 03/28 Sean C. Farley born in Indianapolis, Indiana, United States, 1970 03/29 Thierry Thomas born in Luxeuil les Bains, France, 1961 +03/30 Po-Chuan Hsieh born in Taipei, Taiwan, Republic of China, 1978 04/01 Matthew Jacob born in San Francisco, California, United States, 1958 04/01 Bill Fenner born in Bellefonte, Pennsylvania, United States, 1971 04/01 Peter Edwards born in Dublin, Ireland, 1973 04/03 Hellmuth Michaelis born in Kiel, Schleswig-Holstein, Germany, 1958 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 -04/05 Stacey Son born in Burley, Idaho, United States. 1967 +04/05 Stacey Son born in Burley, Idaho, United States, 1967 04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 @@ -138,9 +143,9 @@ 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 05/11 Roman Kurakin born in Moscow, USSR, 1979 05/13 Pete Fritchman born in Lansdale, Pennsylvania, United States, 1983 -05/14 Bruce Cran born in Cambridge, United Kingdom, 1981 05/14 Tatsumi Hosokawa born in Tokyo, Japan, 1968 05/14 Shigeyuku Fukushima born in Osaka, Japan, 1974 +05/14 Bruce Cran born in Cambridge, United Kingdom, 1981 05/16 Johann Kois born in Wolfsberg, Austria, 1975 05/16 Marcus Alves Grando born in Florianopolis, Santa Catarina, Brazil, 1979 05/17 Thomas Abthorpe born in Port Arthur, Ontario, Canada, 1968 @@ -149,36 +154,40 @@ 05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 05/21 Kris Kennaway born in Winnipeg, Manitoba, Canada, 1978 05/22 Clive Tong-I Lin born in Changhua, Taiwan, Republic of China, 1978 -05/22 Michael Bushkov born in Rostov-on-Don, Russia, 1985 -05/22 Rui Paulo , born in Evora, Portugal, 1986 +05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 +05/22 Rui Paulo born in Evora, Portugal, 1986 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 -05/25 Roman Divacky born in Brno, Czech Republic, 1983 05/25 Tom Rhodes born in Ellwood City, Pennsylvania, United States, 1981 +05/25 Roman Divacky born in Brno, Czech Republic, 1983 05/26 Jim Pirzyk born in Chicago, Illinois, United States, 1968 +05/26 Florian Smeets born in Schwerte, Nordrhein-Westfalen, Germany, 1982 05/27 Ollivier Robert born in Paris, France, 1967 05/29 Wilko Bulte born in Arnhem, the Netherlands, 1965 05/29 Seigo Tanimura born in Kitakyushu, Fukuoka, Japan, 1976 05/31 Ville Skytta born in Helsinki, Finland, 1974 06/02 Jean-Marc Zucconi born in Pontarlier, France, 1954 -06/02 Alexander Botero-Lowry born in Austin, TX, USA, 1986 +06/02 Alexander Botero-Lowry born in Austin, Texas, United States, 1986 06/03 CHOI Junho born in Seoul, Korea, 1974 -06/03 Wesley Shields born in Binghamton, NY, USA, 1981 +06/03 Wesley Shields born in Binghamton, New York, United States, 1981 06/04 Julian Elischer born in Perth, Australia, 1959 -06/04 Jason Evans born in Greeley, Colorado, United States, 1973 06/04 Justin Gibbs born in San Pedro, California, United States, 1973 +06/04 Jason Evans born in Greeley, Colorado, United States, 1973 06/04 Thomas Moestl born in Braunschweig, Niedersachsen, Germany, 1980 +06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 06/06 Sergei Kolobov born in Karpinsk, Russian Federation, 1972 06/06 Alan Eldridge died in Denver, Colorado, 2003 -06/07 Benjamin Close born in Adelaide, Australia, 1978 06/07 Jimmy Olgeni born in Milano, Italy, 1976 +06/07 Benjamin Close born in Adelaide, Australia, 1978 +06/14 Josh Paetzel born in Minneapolis, Minnesota, United States, 1973 06/17 Tilman Linneweh born in Weinheim, Baden-Wuertemberg, Germany, 1978 06/18 Li-Wen Hsu born in Taipei, Taiwan, Republic of China, 1984 06/18 Roman Bogorodskiy born in Saratov, Russian Federation, 1986 06/19 Charlie Root born in Portland, Oregon, United States, 1993 06/21 Ganbold Tsagaankhuu born in Ulaanbaatar, Mongolia, 1971 06/21 Niels Heinen born in Markelo, the Netherlands, 1978 +06/22 Andreas Tobler born in Heiden, Switzerland, 1968 06/24 Chris Faulhaber born in Springfield, Illinois, United States, 1971 06/26 Brian Somers born in Dundrum, Dublin, Ireland, 1967 06/28 Mark Santcroos born in Rotterdam, the Netherlands, 1979 @@ -192,6 +201,7 @@ 07/02 Vasil Venelinov Dimov born in Shumen, Bulgaria, 1982 07/04 Motoyuki Konno born in Musashino, Tokyo, Japan, 1969 07/04 Florent Thoumie born in Montmorency, Val d'Oise, France, 1982 +07/05 Sergey Kandaurov born in Gubkin, Russian Federation, 1985 07/07 Andrew Thompson born in Lower Hutt, Wellington, New Zealand, 1979 07/07 Maxime Henrion born in Metz, France, 1981 07/07 George Reid born in Frimley, Hampshire, United Kingdom, 1983 @@ -223,17 +233,18 @@ 08/06 Anton Berezin born in Dnepropetrovsk, Ukraine, 1970 08/06 John-Mark Gurney born in Detroit, Michigan, United States, 1978 08/07 Jonathan Mini born in San Mateo, California, United States, 1979 +08/08 Mikolaj Golub born in Kharkov, USSR, 1977 08/10 Peter Pentchev born in Sofia, Bulgaria, 1977 08/12 Joe Marcus Clarke born in Lakeland, Florida, United States, 1976 -08/12 Max Brazhnikov born in Leningradskaya, Russia, 1979 +08/12 Max Brazhnikov born in Leningradskaya, Russian Federation, 1979 08/14 Stefan Esser born in Cologne, Nordrhein-Westfalen, Germany, 1961 08/17 Olivier Houchard born in Nancy, France, 1980 -08/19 Pav Lucistnik born in Kutna Hora, Czech Republic, 1980 08/19 Chin-San Huang born in Yi-Lan, Taiwan, Republic of China, 1979 +08/19 Pav Lucistnik born in Kutna Hora, Czech Republic, 1980 08/20 Michael Heffner born in Cleona, Pennsylvania, United States, 1981 08/24 Mark Linimon born in Houston, Texas, United States, 1955 -08/25 Jean Milanez Melo born in Divinopolis, Minas Gerais, Brazil, 1982 08/25 Beech Rintoul born in Oakland, California, United States, 1952 +08/25 Jean Milanez Melo born in Divinopolis, Minas Gerais, Brazil, 1982 08/26 Dima Ruban born in Nalchik, USSR, 1970 08/26 Marc Fonvieille born in Avignon, France, 1972 08/26 Herve Quiroz born in Aix-en-Provence, France, 1977 @@ -253,8 +264,8 @@ 09/09 Yoshio Mita born in Hiroshima, Japan, 1972 09/10 Wesley R. Peters born in Hartford, Alabama, United States, 1961 09/12 Weongyo Jeong born in Haman, Korea, 1980 -09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 +09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 @@ -268,7 +279,7 @@ 10/02 Beat Gaetzi born in Zurich, Switzerland, 1980 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 -10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, 1978 +10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 10/12 Pawel Jakub Dawidek born in Radzyn Podlaski, Poland, 1980 10/15 Maxim Konovalov born in Khabarovsk, USSR, 1973 10/16 Remko Lodder born in Rotterdam, the Netherlands, 1983 @@ -282,10 +293,10 @@ 10/22 Jean-Sebastien Pedron born in Redon, Ille-et-Vilaine, France, 1980 10/23 Mario Sergio Fujikawa Ferreira born in Brasilia, Distrito Federal, Brazil, 1976 10/25 Eric Melville born in Los Gatos, California, United States, 1980 -10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 +10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 -11/09 Coleman Kane born in Cincinnati, OH, United States, 1980 +11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 @@ -297,6 +308,7 @@ 11/19 Konstantin Belousov born in Kiev, USSR, 1972 11/20 Dmitry Morozovsky born in Moscow, USSR, 1968 11/20 Gavin Atkinson born in Middlesbrough, United Kingdom, 1979 +11/22 Frederic Culot born in Saint-Germain-En-Laye, France, 1976 11/23 Josef Lawrence Karthauser born in Pembury, Kent, United Kingdom, 1972 11/24 Andrey Zakhvatov born in Chelyabinsk, Russian Federation, 1974 11/24 Daniel Gerzo born in Bratislava, Slovakia, 1986 @@ -304,7 +316,7 @@ 11/28 Stanislav Sedov born in Chelyabinsk, USSR, 1985 12/01 Hajimu Umemoto born in Nara, Japan, 1961 12/01 Alexey Dokuchaev born in Magadan, USSR, 1980 -12/02 Ermal Luçi born in Tirane, Albania, 1980 +12/02 Ermal Luçi born in Tirane, Albania, 1980 12/03 Diane Bruce born in Ottawa, Ontario, Canada, 1952 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military ============================================================================== --- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military Wed Mar 23 13:46:17 2011 (r219906) +++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military Wed Mar 23 14:18:59 2011 (r219907) @@ -16,6 +16,7 @@ LANG=ru_RU.KOI8-R 10 ÉÀÌ äÅÎØ ÐÏÂÅÄÙ ÒÕÓÓËÏÊ ÁÒÍÉÉ ÐÏÄ ËÏÍÁÎÄÏ×ÁÎÉÅÍ ðÅÔÒÁ ðÅÒ×ÏÇÏ ÎÁÄ Û×ÅÄÁÍÉ × ðÏÌÔÁ×ÓËÏÍ ÓÒÁÖÅÎÉÉ (1709 ÇÏÄ) 9 Á×Ç äÅÎØ ÐÅÒ×ÏÊ × ÒÏÓÓÉÊÓËÏÊ ÉÓÔÏÒÉÉ ÍÏÒÓËÏÊ ÐÏÂÅÄÙ ÒÕÓÓËÏÇÏ ÆÌÏÔÁ ÐÏÄ ËÏÍÁÎÄÏ×ÁÎÉÅÍ ðÅÔÒÁ ðÅÒ×ÏÇÏ ÎÁÄ Û×ÅÄÁÍÉ Õ ÍÙÓÁ çÁÎÇÕÔ (1714 ÇÏÄ) 23 Á×Ç äÅÎØ ÒÁÚÇÒÏÍÁ ÓÏ×ÅÔÓËÉÍÉ ×ÏÊÓËÁÍÉ ÎÅÍÅÃËÏ-ÆÁÛÉÓÔÓËÉÈ ×ÏÊÓË × ëÕÒÓËÏÊ ÂÉÔ×Å (1943 ÇÏÄ) + 2 ÓÅÎ äÅÎØ ÏËÏÎÞÁÎÉÑ ÷ÔÏÒÏÊ ÍÉÒÏ×ÏÊ ×ÏÊÎÙ (1945 ÇÏÄ) 8 ÓÅÎ äÅÎØ âÏÒÏÄÉÎÓËÏÇÏ ÓÒÁÖÅÎÉÑ ÒÕÓÓËÏÊ ÁÒÍÉÉ ÐÏÄ ËÏÍÁÎÄÏ×ÁÎÉÅÍ í.é. ëÕÔÕÚÏ×Á Ó ÆÒÁÎÃÕÚÓËÏÊ ÁÒÍÉÅÊ (1812 ÇÏÄ) 11 ÓÅÎ äÅÎØ ÐÏÂÅÄÙ ÒÕÓÓËÏÊ ÜÓËÁÄÒÙ ÐÏÄ ËÏÍÁÎÄÏ×ÁÎÉÅÍ æ.æ. õÛÁËÏ×Á ÎÁÄ ÔÕÒÅÃËÏÊ ÜÓËÁÄÒÏÊ Õ ÍÙÓÁ ôÅÎÄÒÁ (1790 ÇÏÄ) 21 ÓÅÎ äÅÎØ ÐÏÂÅÄÙ ÒÕÓÓËÉÈ ÐÏÌËÏ× ×Ï ÇÌÁ×Å Ó ×ÅÌÉËÉÍ ËÎÑÚÅÍ äÍÉÔÒÉÅÍ äÏÎÓËÉÍ ÎÁÄ ÍÏÎÇÏÌÏ-ÔÁÔÁÒÓËÉÍÉ ×ÏÊÓËÁÍÉ × ëÕÌÉËÏ×ÓËÏÊ ÂÉÔ×Å (1380 ÇÏÄ) Modified: stable/8/usr.bin/calendar/parsedata.c ============================================================================== --- stable/8/usr.bin/calendar/parsedata.c Wed Mar 23 13:46:17 2011 (r219906) +++ stable/8/usr.bin/calendar/parsedata.c Wed Mar 23 14:18:59 2011 (r219907) @@ -972,7 +972,7 @@ floattoday(int year, double f) int *cumdays = cumdaytab[isleap(year)]; for (i = 0; 1 + cumdays[i] < f; i++) - ;; + ; m = --i; d = floor(f - 1 - cumdays[i]); f -= floor(f); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 14:34:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93A361065672; Wed, 23 Mar 2011 14:34:39 +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 2BD628FC0C; Wed, 23 Mar 2011 14:34:38 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p2NEYYPA007289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Mar 2011 16:34:34 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p2NEYYmv026328; Wed, 23 Mar 2011 16:34:34 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p2NEYYp8026327; Wed, 23 Mar 2011 16:34:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 23 Mar 2011 16:34:34 +0200 From: Kostik Belousov To: John Baldwin Message-ID: <20110323143434.GZ78089@deviant.kiev.zoral.com.ua> References: <201103180647.p2I6lNCB051745@svn.freebsd.org> <4D831A82.7070308@freebsd.org> <201103230945.37726.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lrjEzJmCELwGVYdX" Content-Disposition: inline In-Reply-To: <201103230945.37726.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, Edward Tomasz Napierala , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r219727 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 14:34:39 -0000 --lrjEzJmCELwGVYdX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 23, 2011 at 09:45:37AM -0400, John Baldwin wrote: > On Friday, March 18, 2011 4:40:34 am Julian Elischer wrote: > > On 3/17/11 11:47 PM, Edward Tomasz Napierala wrote: > > > Author: trasz > > > Date: Fri Mar 18 06:47:23 2011 > > > New Revision: 219727 > > > URL: http://svn.freebsd.org/changeset/base/219727 > > > > > > Log: > > > In vm_daemon(), when iterating over all processes in the system, s= kip those > > > which are not yet fully initialized (i.e. ones with p_state =3D=3D= PRS_NEW). > > > Without it, we could panic in _thread_lock_flags(). > > > > > > Note that there may be other instances of FOREACH_PROC_IN_SYSTEM()= that > > > require similar fix. > >=20 > > In the past each process was only put on the process list after it was= =20 > > fully set up. > > Did someone change that recently? that would be "A Bad Thing" (TM). >=20 > Err, no, that has never been true. The reason it has to go on the list > immediately is to reserve the PID against concurrent fork()s. >=20 > Hmm, the locking of prs_state is a bit busted it seems. Both the PROC_LO= CK() > and PROC_SLOCK() are supposed to be held when it is written to, but > PROC_LOCK() is missing in fork1() when moving the state to PRS_NORMAL. >=20 > Also, this commit should check against PRS_NORMAL after acquiring the proc > lock, not before. In the case of this commit, it does not matter much, I think. The reason is that all the check want is to make sure that there is at least one fully initialized thread linked into the process. --lrjEzJmCELwGVYdX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2KBPoACgkQC3+MBN1Mb4iRDwCggjYS4Qc/ppF79O93HpMv9oyW 408AoM/4CuEUI/LCRBoThNNH8Duhyl9R =egLS -----END PGP SIGNATURE----- --lrjEzJmCELwGVYdX-- From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 15:28:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C13E1065673; Wed, 23 Mar 2011 15:28:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D3B908FC12; Wed, 23 Mar 2011 15:28:48 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8CE5746B32; Wed, 23 Mar 2011 11:28:48 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2E1308A01B; Wed, 23 Mar 2011 11:28:48 -0400 (EDT) From: John Baldwin To: Kostik Belousov Date: Wed, 23 Mar 2011 11:25:47 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201103180647.p2I6lNCB051745@svn.freebsd.org> <201103230945.37726.jhb@freebsd.org> <20110323143434.GZ78089@deviant.kiev.zoral.com.ua> In-Reply-To: <20110323143434.GZ78089@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201103231125.48082.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Mar 2011 11:28:48 -0400 (EDT) Cc: svn-src-head@freebsd.org, Edward Tomasz Napierala , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r219727 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 15:28:49 -0000 On Wednesday, March 23, 2011 10:34:34 am Kostik Belousov wrote: > On Wed, Mar 23, 2011 at 09:45:37AM -0400, John Baldwin wrote: > > On Friday, March 18, 2011 4:40:34 am Julian Elischer wrote: > > > On 3/17/11 11:47 PM, Edward Tomasz Napierala wrote: > > > > Author: trasz > > > > Date: Fri Mar 18 06:47:23 2011 > > > > New Revision: 219727 > > > > URL: http://svn.freebsd.org/changeset/base/219727 > > > > > > > > Log: > > > > In vm_daemon(), when iterating over all processes in the system, skip those > > > > which are not yet fully initialized (i.e. ones with p_state == PRS_NEW). > > > > Without it, we could panic in _thread_lock_flags(). > > > > > > > > Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that > > > > require similar fix. > > > > > > In the past each process was only put on the process list after it was > > > fully set up. > > > Did someone change that recently? that would be "A Bad Thing" (TM). > > > > Err, no, that has never been true. The reason it has to go on the list > > immediately is to reserve the PID against concurrent fork()s. > > > > Hmm, the locking of prs_state is a bit busted it seems. Both the PROC_LOCK() > > and PROC_SLOCK() are supposed to be held when it is written to, but > > PROC_LOCK() is missing in fork1() when moving the state to PRS_NORMAL. > > > > Also, this commit should check against PRS_NORMAL after acquiring the proc > > lock, not before. > In the case of this commit, it does not matter much, I think. The reason > is that all the check want is to make sure that there is at least one > fully initialized thread linked into the process. It already checks other things under the proc lock, so it costs nothing to be completely correct in this case. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 16:22:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25E89106568E; Wed, 23 Mar 2011 16:22:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECFE68FC16; Wed, 23 Mar 2011 16:22:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NGM8cK000322; Wed, 23 Mar 2011 16:22:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NGM8kK000321; Wed, 23 Mar 2011 16:22:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103231622.p2NGM8kK000321@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 23 Mar 2011 16:22: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: r219918 - head/release/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 16:22:09 -0000 Author: nwhitehorn Date: Wed Mar 23 16:22:08 2011 New Revision: 219918 URL: http://svn.freebsd.org/changeset/base/219918 Log: Add support for memstick generation on PowerPC. This is a little suboptimal since glabel doesn't know about APM partitioning yet, but works well enough. Added: head/release/powerpc/make-memstick.sh (contents, props changed) Added: head/release/powerpc/make-memstick.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/powerpc/make-memstick.sh Wed Mar 23 16:22:08 2011 (r219918) @@ -0,0 +1,78 @@ +#!/bin/sh +# +# This script generates a "memstick image" (image that can be copied to a +# USB memory stick) from a directory tree. Note that the script does not +# clean up after itself very well for error conditions on purpose so the +# problem can be diagnosed (full filesystem most likely but ...). +# +# Usage: make-memstick.sh +# +# $FreeBSD$ +# + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +export PATH + +BLOCKSIZE=10240 + +if [ $# -ne 2 ]; then + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 +fi + +tempfile="${2}.$$" + +if [ ! -d ${1} ]; then + echo "${1} must be a directory" + exit 1 +fi + +if [ -e ${2} ]; then + echo "won't overwrite ${2}" + exit 1 +fi + +echo '/dev/da0s3 / ufs rw,noatime 1 1' > ${1}/etc/fstab +rm -f ${tempfile} +makefs -B big ${tempfile} ${1} +if [ $? -ne 0 ]; then + echo "makefs failed" + exit 1 +fi +rm ${1}/etc/fstab + +# +# Use $BLOCKSIZE for transfers to improve efficiency. When calculating +# how many blocks to transfer "+ 2" is to account for truncation in the +# division and to provide space for the label. +# + +filesize=`stat -f "%z" ${tempfile}` +blocks=$(($filesize / ${BLOCKSIZE} + 1728)) +dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} +if [ $? -ne 0 ]; then + echo "creation of image file failed" + exit 1 +fi + +unit=`mdconfig -a -t vnode -f ${2}` +if [ $? -ne 0 ]; then + echo "mdconfig failed" + exit 1 +fi + +gpart create -s APM ${unit} +gpart add -t freebsd-boot -s 800K ${unit} +gpart bootcode -p ${1}/boot/boot1.hfs -i 1 ${unit} +gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} + +dd if=${tempfile} of=/dev/${unit}s3 bs=$BLOCKSIZE conv=sync +if [ $? -ne 0 ]; then + echo "copying filesystem into image file failed" + exit 1 +fi + +mdconfig -d -u ${unit} + +rm -f ${tempfile} + From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 16:38:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE7C8106564A; Wed, 23 Mar 2011 16:38:29 +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 9B2378FC08; Wed, 23 Mar 2011 16:38:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NGcTbl000743; Wed, 23 Mar 2011 16:38:29 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NGcTxU000738; Wed, 23 Mar 2011 16:38:29 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201103231638.p2NGcTxU000738@svn.freebsd.org> From: Alan Cox Date: Wed, 23 Mar 2011 16:38: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: r219920 - in head/sys: i386/include kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 16:38:29 -0000 Author: alc Date: Wed Mar 23 16:38:29 2011 New Revision: 219920 URL: http://svn.freebsd.org/changeset/base/219920 Log: Modestly increase the maximum allowed size of the kmem map on i386. Also, express this new maximum as a fraction of the kernel's address space size rather than a constant so that increasing KVA_PAGES will automatically increase this maximum. As a side-effect of this change, kern.maxvnodes will automatically increase by a proportional amount. While I'm here ensure that this change doesn't result in an unintended increase in maxpipekva on i386. Calculate maxpipekva based upon the size of the kernel address space and the amount of physical memory instead of the size of the kmem map. The memory backing pipes is not allocated from the kmem map. It is allocated from its own submap of the kernel map. In short, it has no real connection to the kmem map. (In fact, the commit messages for the maxpipekva auto-sizing talk about using the kernel map size, cf. r117325 and r117391, even though the implementation actually used the kmem map size.) Although the calculation is now done differently, the resulting value for maxpipekva should remain almost the same on i386. However, on amd64, the value will be reduced by 2/3. This is intentional. The recent change to VM_KMEM_SIZE_SCALE on amd64 for the benefit of ZFS also had the unnecessary side-effect of increasing maxpipekva. This change is effectively restoring maxpipekva on amd64 to its prior value. Eliminate init_param3() since it is no longer used. Modified: head/sys/i386/include/vmparam.h head/sys/kern/kern_malloc.c head/sys/kern/subr_param.c head/sys/sys/systm.h Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Wed Mar 23 16:28:11 2011 (r219919) +++ head/sys/i386/include/vmparam.h Wed Mar 23 16:38:29 2011 (r219920) @@ -189,7 +189,8 @@ * Ceiling on amount of kmem_map kva space. */ #ifndef VM_KMEM_SIZE_MAX -#define VM_KMEM_SIZE_MAX (320 * 1024 * 1024) +#define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ + VM_MIN_KERNEL_ADDRESS) * 2 / 5) #endif /* initial pagein size of beginning of executable file */ Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Wed Mar 23 16:28:11 2011 (r219919) +++ head/sys/kern/kern_malloc.c Wed Mar 23 16:38:29 2011 (r219920) @@ -709,11 +709,6 @@ kmeminit(void *dummy) if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count) vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE; - /* - * Tune settings based on the kmem map's size at this time. - */ - init_param3(vm_kmem_size / PAGE_SIZE); - #ifdef DEBUG_MEMGUARD tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max); #else Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Wed Mar 23 16:28:11 2011 (r219919) +++ head/sys/kern/subr_param.c Wed Mar 23 16:38:29 2011 (r219920) @@ -48,7 +48,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include /* * System parameter formulae. @@ -293,22 +295,17 @@ init_param2(long physpages) ncallout = 16 + maxproc + maxfiles; TUNABLE_INT_FETCH("kern.ncallout", &ncallout); -} - -/* - * Boot time overrides that are scaled against the kmem map - */ -void -init_param3(long kmempages) -{ /* - * The default for maxpipekva is max(5% of the kmem map, 512KB). - * See sys_pipe.c for more details. + * The default for maxpipekva is min(1/64 of the kernel address space, + * max(1/64 of main memory, 512KB)). See sys_pipe.c for more details. */ - maxpipekva = (kmempages / 20) * PAGE_SIZE; + maxpipekva = (physpages / 64) * PAGE_SIZE; if (maxpipekva < 512 * 1024) maxpipekva = 512 * 1024; + if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64) + maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / + 64; TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); } Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Wed Mar 23 16:28:11 2011 (r219919) +++ head/sys/sys/systm.h Wed Mar 23 16:38:29 2011 (r219920) @@ -171,7 +171,6 @@ void critical_enter(void); void critical_exit(void); void init_param1(void); void init_param2(long physpages); -void init_param3(long kmempages); void init_static_kenv(char *, size_t); void tablefull(const char *); int kvprintf(char const *, void (*)(int, void*), void *, int, From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 17:20:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id CC086106564A; Wed, 23 Mar 2011 17:20:32 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-146-214.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id AE43614DB46; Wed, 23 Mar 2011 17:20:23 +0000 (UTC) Message-ID: <4D8A2BD7.2000005@FreeBSD.org> Date: Wed, 23 Mar 2011 10:20:23 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110319 Thunderbird/3.1.9 MIME-Version: 1.0 To: John Baldwin References: <201103231310.p2NDAGi5095211@svn.freebsd.org> In-Reply-To: <201103231310.p2NDAGi5095211@svn.freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r219902 - in head/sys: dev/ae dev/age dev/agp dev/aic7xxx dev/alc dev/ale dev/bce dev/bge dev/bwn dev/bxe dev/cxgb dev/drm dev/e1000 dev/et dev/fxp dev/iwn dev/ixgbe dev/jme dev/malo de... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 17:20:32 -0000 On 03/23/2011 06:10, John Baldwin wrote: > Log: > Do a sweep of the tree replacing calls to pci_find_extcap() with calls to > pci_find_cap() instead. I'm not questioning this change, just curious about why. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 17:33:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73D51065675; Wed, 23 Mar 2011 17:33:04 +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 D4AFE8FC1B; Wed, 23 Mar 2011 17:33:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NHX4oK002174; Wed, 23 Mar 2011 17:33:04 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NHX4Zx002172; Wed, 23 Mar 2011 17:33:04 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103231733.p2NHX4Zx002172@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 23 Mar 2011 17:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219924 - stable/8/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 17:33:05 -0000 Author: np Date: Wed Mar 23 17:33:04 2011 New Revision: 219924 URL: http://svn.freebsd.org/changeset/base/219924 Log: MFC r219883: Fix an error while constructing the table that maps context id -> egress queue Modified: stable/8/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_sge.c Wed Mar 23 17:18:31 2011 (r219923) +++ stable/8/sys/dev/cxgbe/t4_sge.c Wed Mar 23 17:33:04 2011 (r219924) @@ -1134,7 +1134,7 @@ alloc_iq_fl(struct port_info *pi, struct fl->cntxt_id = be16toh(c.fl0id); fl->pidx = fl->cidx = 0; - cntxt_id = iq->cntxt_id - sc->sge.eq_start; + cntxt_id = fl->cntxt_id - sc->sge.eq_start; KASSERT(cntxt_id < sc->sge.neq, ("%s: fl->cntxt_id (%d) more than the max (%d)", __func__, cntxt_id, sc->sge.neq - 1)); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 17:56:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F875106566B; Wed, 23 Mar 2011 17:56:39 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0298FC13; Wed, 23 Mar 2011 17:56:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NHudnT002690; Wed, 23 Mar 2011 17:56:39 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NHudeh002688; Wed, 23 Mar 2011 17:56:39 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103231756.p2NHudeh002688@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 23 Mar 2011 17:56: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: r219925 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 17:56:40 -0000 Author: jh Date: Wed Mar 23 17:56:38 2011 New Revision: 219925 URL: http://svn.freebsd.org/changeset/base/219925 Log: Recognize "ro", "rdonly", "norw", "rw" and "noro" as equal options in vfs_equalopts(). This allows vfs_sanitizeopts() to filter redundant occurrences of these options. It was possible that for example both "ro" and "rw" options became active concurrently. PR: kern/133614 Discussed on: freebsd-hackers MFC after: 1 month Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Wed Mar 23 17:33:04 2011 (r219924) +++ head/sys/kern/vfs_mount.c Wed Mar 23 17:56:38 2011 (r219925) @@ -175,6 +175,27 @@ vfs_deleteopt(struct vfsoptlist *opts, c } } +static int +vfs_isopt_ro(const char *opt) +{ + + if (strcmp(opt, "ro") == 0 || strcmp(opt, "rdonly") == 0 || + strcmp(opt, "norw") == 0) + return (1); + else + return (0); +} + +static int +vfs_isopt_rw(const char *opt) +{ + + if (strcmp(opt, "rw") == 0 || strcmp(opt, "noro") == 0) + return (1); + else + return (0); +} + /* * Check if options are equal (with or without the "no" prefix). */ @@ -203,6 +224,11 @@ vfs_equalopts(const char *opt1, const ch if (strncmp(opt2, "no", 2) == 0 && strcmp(opt1, opt2 + 2) == 0) return (1); } + /* "ro" / "rdonly" / "norw" / "rw" / "noro" */ + if ((vfs_isopt_ro(opt1) || vfs_isopt_rw(opt1)) && + (vfs_isopt_ro(opt2) || vfs_isopt_rw(opt2))) + return (1); + return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 18:16:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42E0C106566C; Wed, 23 Mar 2011 18:16:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1514C8FC08; Wed, 23 Mar 2011 18:16:31 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id AC07146B03; Wed, 23 Mar 2011 14:16:30 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 461738A01B; Wed, 23 Mar 2011 14:16:30 -0400 (EDT) From: John Baldwin To: Doug Barton Date: Wed, 23 Mar 2011 14:16:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201103231310.p2NDAGi5095211@svn.freebsd.org> <4D8A2BD7.2000005@FreeBSD.org> In-Reply-To: <4D8A2BD7.2000005@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201103231416.29691.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Mar 2011 14:16:30 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r219902 - in head/sys: dev/ae dev/age dev/agp dev/aic7xxx dev/alc dev/ale dev/bce dev/bge dev/bwn dev/bxe dev/cxgb dev/drm dev/e1000 dev/et dev/fxp dev/iwn dev/ixgbe dev/jme dev/malo de... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 18:16:31 -0000 On Wednesday, March 23, 2011 1:20:23 pm Doug Barton wrote: > On 03/23/2011 06:10, John Baldwin wrote: > > Log: > > Do a sweep of the tree replacing calls to pci_find_extcap() with cal= ls to > > pci_find_cap() instead. >=20 > I'm not questioning this change, just curious about why. =46rom an earlier commit: Author: jhb Date: Tue Mar 22 12:05:49 2011 New Revision: 219865 URL: http://svn.freebsd.org/changeset/base/219865 Log: Rename pci_find_extcap() to pci_find_cap(). PCI now uses the term "extended capabilities" to refer to the new set of capability structures starting at offset 0x100 in config space for PCI-express devices. For now both function names will still work. I will merge this to older branches to ease driver portability, but 9.0 will ship with a new pci_find_extcap() function that locates extended capabilities instead. =20 Reviewed by: imp MFC after: 1 week =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 18:18:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E64CC106564A; Wed, 23 Mar 2011 18:18:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-146-214.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 2897614F149; Wed, 23 Mar 2011 18:18:59 +0000 (UTC) Message-ID: <4D8A3992.10404@FreeBSD.org> Date: Wed, 23 Mar 2011 11:18:58 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110319 Thunderbird/3.1.9 MIME-Version: 1.0 To: John Baldwin References: <201103231310.p2NDAGi5095211@svn.freebsd.org> <4D8A2BD7.2000005@FreeBSD.org> <201103231416.29691.jhb@freebsd.org> In-Reply-To: <201103231416.29691.jhb@freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r219902 - in head/sys: dev/ae dev/age dev/agp dev/aic7xxx dev/alc dev/ale dev/bce dev/bge dev/bwn dev/bxe dev/cxgb dev/drm dev/e1000 dev/et dev/fxp dev/iwn dev/ixgbe dev/jme dev/malo de... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 18:19:00 -0000 On 03/23/2011 11:16, John Baldwin wrote: > From an earlier commit: ... Thanks. :) -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 19:41:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18BF01065672; Wed, 23 Mar 2011 19:41:45 +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 07CA78FC0C; Wed, 23 Mar 2011 19:41:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NJfixR005142; Wed, 23 Mar 2011 19:41:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NJfi6E005140; Wed, 23 Mar 2011 19:41:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201103231941.p2NJfi6E005140@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 23 Mar 2011 19:41: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: r219930 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 19:41:45 -0000 Author: hselasky Date: Wed Mar 23 19:41:44 2011 New Revision: 219930 URL: http://svn.freebsd.org/changeset/base/219930 Log: Comply with style(9). Reported by: gavin MFC after: 14 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Wed Mar 23 19:30:47 2011 (r219929) +++ head/sys/dev/usb/controller/ehci.c Wed Mar 23 19:41:44 2011 (r219930) @@ -1183,18 +1183,18 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ static void ehci_data_toggle_update(struct usb_xfer *xfer, uint16_t actlen, uint16_t xlen) { - uint8_t full = (actlen == xlen); + uint16_t rem; uint8_t dt; /* count number of full packets */ dt = (actlen / xfer->max_packet_size) & 1; /* cumpute remainder */ - actlen = actlen % xfer->max_packet_size; + rem = actlen % xfer->max_packet_size; - if (actlen > 0) + if (rem > 0) dt ^= 1; /* short packet at the end */ - else if (!full) + else if (actlen != xlen) dt ^= 1; /* zero length packet at the end */ xfer->endpoint->toggle_next ^= dt; From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 20:55:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DCED106566B; Wed, 23 Mar 2011 20:55:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C56A8FC13; Wed, 23 Mar 2011 20:55:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NKtTcJ006816; Wed, 23 Mar 2011 20:55:29 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NKtTik006812; Wed, 23 Mar 2011 20:55:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232055.p2NKtTik006812@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 20:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219931 - stable/8/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 20:55:29 -0000 Author: marius Date: Wed Mar 23 20:55:29 2011 New Revision: 219931 URL: http://svn.freebsd.org/changeset/base/219931 Log: MFC: r219335 - Allocate the DMA memory shared between the host and the controller as coherent. - Add some missing bus_dmamap_sync() calls. This includes putting such calls before calling reply handlers instead of calling bus_dmamap_sync() for the request queue from individual reply handlers as these handlers generally read back updates by the controller. Tested on amd64 and sparc64. Modified: stable/8/sys/dev/mpt/mpt.c stable/8/sys/dev/mpt/mpt_cam.c stable/8/sys/dev/mpt/mpt_user.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/mpt/mpt.c ============================================================================== --- stable/8/sys/dev/mpt/mpt.c Wed Mar 23 19:41:44 2011 (r219930) +++ stable/8/sys/dev/mpt/mpt.c Wed Mar 23 20:55:29 2011 (r219931) @@ -718,15 +718,16 @@ mpt_intr(void *arg) uint32_t ctxt_idx; u_int cb_index; u_int req_index; + u_int offset; int free_rf; req = NULL; reply_frame = NULL; reply_baddr = 0; + offset = 0; if ((reply_desc & MPI_ADDRESS_REPLY_A_BIT) != 0) { - u_int offset; /* - * Insure that the reply frame is coherent. + * Ensure that the reply frame is coherent. */ reply_baddr = MPT_REPLY_BADDR(reply_desc); offset = reply_baddr - (mpt->reply_phys & 0xFFFFFFFF); @@ -808,10 +809,15 @@ mpt_intr(void *arg) " 0x%x)\n", req_index, reply_desc); } + bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); free_rf = mpt_reply_handlers[cb_index](mpt, req, reply_desc, reply_frame); if (reply_frame != NULL && free_rf) { + bus_dmamap_sync_range(mpt->reply_dmat, + mpt->reply_dmap, offset, MPT_REPLY_SIZE, + BUS_DMASYNC_PREREAD); mpt_free_reply(mpt, reply_baddr); } @@ -844,6 +850,8 @@ mpt_complete_request_chain(struct mpt_so MSG_REQUEST_HEADER *msg_hdr; u_int cb_index; + bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); msg_hdr = (MSG_REQUEST_HEADER *)req->req_vbuf; ioc_status_frame.Function = msg_hdr->Function; ioc_status_frame.MsgContext = msg_hdr->MsgContext; @@ -1167,7 +1175,7 @@ mpt_free_request(struct mpt_softc *mpt, { request_t *nxt; struct mpt_evtf_record *record; - uint32_t reply_baddr; + uint32_t offset, reply_baddr; if (req == NULL || req != &mpt->request_pool[req->index]) { panic("mpt_free_request bad req ptr\n"); @@ -1216,8 +1224,10 @@ mpt_free_request(struct mpt_softc *mpt, req->state = REQ_STATE_ALLOCATED; mpt_assign_serno(mpt, req); mpt_send_event_ack(mpt, req, &record->reply, record->context); - reply_baddr = (uint32_t)((uint8_t *)record - mpt->reply) - + (mpt->reply_phys & 0xFFFFFFFF); + offset = (uint32_t)((uint8_t *)record - mpt->reply); + reply_baddr = offset + (mpt->reply_phys & 0xFFFFFFFF); + bus_dmamap_sync_range(mpt->reply_dmat, mpt->reply_dmap, offset, + MPT_REPLY_SIZE, BUS_DMASYNC_PREREAD); mpt_free_reply(mpt, reply_baddr); } @@ -1257,7 +1267,7 @@ mpt_send_cmd(struct mpt_softc *mpt, requ mpt_dump_request(mpt, req); } bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); req->state |= REQ_STATE_QUEUED; KASSERT(mpt_req_on_free_list(mpt, req) == 0, ("req %p:%u func %x on freelist list in mpt_send_cmd", @@ -1696,8 +1706,6 @@ mpt_read_extcfg_page(struct mpt_softc *m mpt_free_request(mpt, req); return (-1); } - bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, - BUS_DMASYNC_POSTREAD); memcpy(buf, ((uint8_t *)req->req_vbuf)+MPT_RQSL(mpt), len); mpt_free_request(mpt, req); return (0); @@ -1795,8 +1803,6 @@ mpt_read_cfg_page(struct mpt_softc *mpt, mpt_free_request(mpt, req); return (-1); } - bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, - BUS_DMASYNC_POSTREAD); memcpy(hdr, ((uint8_t *)req->req_vbuf)+MPT_RQSL(mpt), len); mpt_free_request(mpt, req); return (0); @@ -2383,10 +2389,12 @@ mpt_upload_fw(struct mpt_softc *mpt) flags <<= MPI_SGE_FLAGS_SHIFT; sge->FlagsLength = htole32(flags | mpt->fw_image_size); sge->Address = htole32(mpt->fw_phys); + bus_dmamap_sync(mpt->fw_dmat, mpt->fw_dmap, BUS_DMASYNC_PREREAD); error = mpt_send_handshake_cmd(mpt, sizeof(fw_req_buf), &fw_req_buf); if (error) return(error); error = mpt_recv_handshake_reply(mpt, sizeof(fw_reply), &fw_reply); + bus_dmamap_sync(mpt->fw_dmat, mpt->fw_dmap, BUS_DMASYNC_POSTREAD); return (error); } @@ -2431,8 +2439,10 @@ mpt_download_fw(struct mpt_softc *mpt) MPI_DIAG_RW_ENABLE|MPI_DIAG_DISABLE_ARM); fw_hdr = (MpiFwHeader_t *)mpt->fw_image; + bus_dmamap_sync(mpt->fw_dmat, mpt->fw_dmap, BUS_DMASYNC_PREWRITE); mpt_diag_outsl(mpt, fw_hdr->LoadStartAddress, (uint32_t*)fw_hdr, fw_hdr->ImageSize); + bus_dmamap_sync(mpt->fw_dmat, mpt->fw_dmap, BUS_DMASYNC_POSTWRITE); ext_offset = fw_hdr->NextImageHeaderOffset; while (ext_offset != 0) { @@ -2440,9 +2450,12 @@ mpt_download_fw(struct mpt_softc *mpt) ext = (MpiExtImageHeader_t *)((uintptr_t)fw_hdr + ext_offset); ext_offset = ext->NextImageHeaderOffset; - + bus_dmamap_sync(mpt->fw_dmat, mpt->fw_dmap, + BUS_DMASYNC_PREWRITE); mpt_diag_outsl(mpt, ext->LoadStartAddress, (uint32_t*)ext, ext->ImageSize); + bus_dmamap_sync(mpt->fw_dmat, mpt->fw_dmap, + BUS_DMASYNC_POSTWRITE); } if (mpt->is_sas) { @@ -2506,7 +2519,7 @@ mpt_dma_buf_alloc(struct mpt_softc *mpt) /* Allocate some DMA accessable memory for requests */ if (bus_dmamem_alloc(mpt->request_dmat, (void **)&mpt->request, - BUS_DMA_NOWAIT, &mpt->request_dmap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &mpt->request_dmap) != 0) { mpt_prt(mpt, "cannot allocate %d bytes of request memory\n", MPT_REQ_MEM_SIZE(mpt)); return (1); @@ -2714,11 +2727,12 @@ mpt_configure_ioc(struct mpt_softc *mpt, mpt->fw_image_size, 1, mpt->fw_image_size, 0, &mpt->fw_dmat); if (error != 0) { - mpt_prt(mpt, "cannot create firmwarew dma tag\n"); + mpt_prt(mpt, "cannot create firmware dma tag\n"); return (ENOMEM); } error = bus_dmamem_alloc(mpt->fw_dmat, - (void **)&mpt->fw_image, BUS_DMA_NOWAIT, &mpt->fw_dmap); + (void **)&mpt->fw_image, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT, &mpt->fw_dmap); if (error != 0) { mpt_prt(mpt, "cannot allocate firmware memory\n"); bus_dma_tag_destroy(mpt->fw_dmat); Modified: stable/8/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_cam.c Wed Mar 23 19:41:44 2011 (r219930) +++ stable/8/sys/dev/mpt/mpt_cam.c Wed Mar 23 20:55:29 2011 (r219931) @@ -5023,15 +5023,6 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, uint8_t *cdbp; /* - * First, DMA sync the received command- - * which is in the *request* * phys area. - * - * XXX: We could optimize this for a range - */ - bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, - BUS_DMASYNC_POSTREAD); - - /* * Stash info for the current command where we can get at it later. */ vbuf = req->req_vbuf; Modified: stable/8/sys/dev/mpt/mpt_user.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_user.c Wed Mar 23 19:41:44 2011 (r219930) +++ stable/8/sys/dev/mpt/mpt_user.c Wed Mar 23 20:55:29 2011 (r219931) @@ -204,7 +204,7 @@ mpt_alloc_buffer(struct mpt_softc *mpt, if (error) return (error); error = bus_dmamem_alloc(page_mem->tag, &page_mem->vaddr, - BUS_DMA_NOWAIT, &page_mem->map); + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &page_mem->map); if (error) { bus_dma_tag_destroy(page_mem->tag); return (error); @@ -302,6 +302,8 @@ mpt_user_read_cfg_page(struct mpt_softc params.PageNumber = hdr->PageNumber; params.PageType = hdr->PageType & MPI_CONFIG_PAGETYPE_MASK; params.PageAddress = le32toh(page_req->page_address); + bus_dmamap_sync(mpt_page->tag, mpt_page->map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, le32toh(page_req->len), TRUE, 5000); if (error != 0) { @@ -312,7 +314,7 @@ mpt_user_read_cfg_page(struct mpt_softc page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); mpt_free_request(mpt, req); return (0); } @@ -390,6 +392,8 @@ mpt_user_read_extcfg_page(struct mpt_sof params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = hdr->ExtPageType; params.ExtPageLength = hdr->ExtPageLength; + bus_dmamap_sync(mpt_page->tag, mpt_page->map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, le32toh(ext_page_req->len), TRUE, 5000); if (error != 0) { @@ -400,7 +404,7 @@ mpt_user_read_extcfg_page(struct mpt_sof ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); mpt_free_request(mpt, req); return (0); } @@ -435,7 +439,8 @@ mpt_user_write_cfg_page(struct mpt_softc if (req == NULL) return (ENOMEM); - bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_PREREAD | + BUS_DMASYNC_PREWRITE); /* * There isn't any point in restoring stripped out attributes @@ -462,6 +467,8 @@ mpt_user_write_cfg_page(struct mpt_softc } page_req->ioc_status = htole16(req->IOCStatus); + bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD | + BUS_DMASYNC_POSTWRITE); mpt_free_request(mpt, req); return (0); } @@ -477,8 +484,6 @@ mpt_user_reply_handler(struct mpt_softc return (TRUE); if (reply_frame != NULL) { - bus_dmamap_sync(mpt->request_dmat, mpt->request_dmap, - BUS_DMASYNC_POSTREAD); reply = (MSG_RAID_ACTION_REPLY *)reply_frame; req->IOCStatus = le16toh(reply->IOCStatus); res = (struct mpt_user_raid_action_result *) @@ -535,7 +540,7 @@ mpt_user_raid_action(struct mpt_softc *m se = (SGE_SIMPLE32 *)&rap->ActionDataSGE; if (mpt_page->vaddr != NULL && raid_act->len != 0) { bus_dmamap_sync(mpt_page->tag, mpt_page->map, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); se->Address = htole32(mpt_page->paddr); MPI_pSGE_SET_LENGTH(se, le32toh(raid_act->len)); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | @@ -574,7 +579,7 @@ mpt_user_raid_action(struct mpt_softc *m sizeof(res->action_data)); if (mpt_page->vaddr != NULL) bus_dmamap_sync(mpt_page->tag, mpt_page->map, - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); mpt_free_request(mpt, req); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 20:56:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7DE61065670; Wed, 23 Mar 2011 20:56:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7AD78FC15; Wed, 23 Mar 2011 20:56:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NKuuNv006897; Wed, 23 Mar 2011 20:56:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NKuu1i006895; Wed, 23 Mar 2011 20:56:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232056.p2NKuu1i006895@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 20:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219932 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 20:56:56 -0000 Author: marius Date: Wed Mar 23 20:56:56 2011 New Revision: 219932 URL: http://svn.freebsd.org/changeset/base/219932 Log: MFC: r219336 - Allocate the DMA memory used for the work area as coherent as at least the ataahci(4) and atamarvell(4) drivers share it between the host and the controller. - Spell some zeros as BUS_DMA_WAITOK when used as bus_dmamem_alloc() flags. Modified: stable/8/sys/dev/ata/ata-dma.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ata/ata-dma.c ============================================================================== --- stable/8/sys/dev/ata/ata-dma.c Wed Mar 23 20:55:29 2011 (r219931) +++ stable/8/sys/dev/ata/ata-dma.c Wed Mar 23 20:56:56 2011 (r219932) @@ -104,7 +104,8 @@ ata_dmainit(device_t dev) 0, NULL, NULL, &ch->dma.work_tag)) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, 0, + if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_WAITOK | BUS_DMA_COHERENT, &ch->dma.work_map)) goto error; @@ -173,8 +174,8 @@ ata_dmaalloc(device_t dev) goto error; } - if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, - 0, &slot->sg_map)) { + if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, BUS_DMA_WAITOK, + &slot->sg_map)) { device_printf(ch->dev, "FAILURE - alloc sg_map\n"); goto error; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 20:58:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43FC106564A; Wed, 23 Mar 2011 20:58:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 996A48FC08; Wed, 23 Mar 2011 20:58:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NKwCn9006976; Wed, 23 Mar 2011 20:58:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NKwC5K006974; Wed, 23 Mar 2011 20:58:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232058.p2NKwC5K006974@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 20:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219933 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 20:58:12 -0000 Author: marius Date: Wed Mar 23 20:58:12 2011 New Revision: 219933 URL: http://svn.freebsd.org/changeset/base/219933 Log: MFC: r219337 Add missing bus_dmamap_sync() calls for the work DMA map. Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ahci.c Wed Mar 23 20:56:56 2011 (r219932) +++ stable/8/sys/dev/ata/chipsets/ata-ahci.c Wed Mar 23 20:58:12 2011 (r219933) @@ -320,7 +320,11 @@ ata_ahci_ch_attach(device_t dev) static int ata_ahci_ch_detach(device_t dev) { - + struct ata_channel *ch = device_get_softc(dev); + + if (ch->dma.work_tag && ch->dma.work_map) + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); ata_ahci_ch_suspend(dev); ata_dmafini(dev); return (0); @@ -495,6 +499,9 @@ ata_ahci_begin_transaction(struct ata_re ATA_INL(ctlr->r_res2, ATA_AHCI_P_CMD + offset) & ~ATA_AHCI_P_CMD_ATAPI); + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + /* issue command to controller */ ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CI + offset, 1); @@ -537,6 +544,9 @@ ata_ahci_end_transaction(struct ata_requ /* kill the timeout */ callout_stop(&request->callout); + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* get status */ tf_data = ATA_INL(ctlr->r_res2, ATA_AHCI_P_TFD + offset); request->status = tf_data; @@ -590,6 +600,9 @@ ata_ahci_issue_cmd(device_t dev, u_int16 clp->bytecount = 0; clp->cmd_table_phys = htole64(ch->dma.work_bus + ATA_AHCI_CT_OFFSET); + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + /* issue command to controller */ ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CI + offset, 1); @@ -600,6 +613,9 @@ ata_ahci_issue_cmd(device_t dev, u_int16 break; } + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* clear interrupts */ ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_IS + offset, ATA_INL(ctlr->r_res2, ATA_AHCI_P_IS + offset)); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 20:59:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DF381065670; Wed, 23 Mar 2011 20:59:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 032808FC16; Wed, 23 Mar 2011 20:59:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NKxKc6007053; Wed, 23 Mar 2011 20:59:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NKxKpX007051; Wed, 23 Mar 2011 20:59:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232059.p2NKxKpX007051@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 20:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219934 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 20:59:21 -0000 Author: marius Date: Wed Mar 23 20:59:20 2011 New Revision: 219934 URL: http://svn.freebsd.org/changeset/base/219934 Log: MFC: r219338 Add missing bus_dmamap_sync() calls for the work DMA map. Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Wed Mar 23 20:58:12 2011 (r219933) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Wed Mar 23 20:59:20 2011 (r219934) @@ -494,7 +494,11 @@ ata_siiprb_ch_attach(device_t dev) static int ata_siiprb_ch_detach(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ch->dma.work_tag && ch->dma.work_map) + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, + BUS_DMASYNC_POSTWRITE); ata_dmafini(dev); return 0; } @@ -576,6 +580,8 @@ ata_siiprb_begin_transaction(struct ata_ } } + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREWRITE); + /* activate the prb */ prb_bus = ch->dma.work_bus; ATA_OUTL(ctlr->r_res2, 0x1c00 + offset, prb_bus); @@ -598,7 +604,9 @@ ata_siiprb_end_transaction(struct ata_re /* kill the timeout */ callout_stop(&request->callout); - + + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); + prb = (struct ata_siiprb_command *) ((u_int8_t *)rman_get_virtual(ctlr->r_res2) + offset); @@ -671,6 +679,8 @@ ata_siiprb_issue_cmd(device_t dev) int offset = ch->unit * 0x2000; int timeout; + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_PREWRITE); + /* issue command to chip */ ATA_OUTL(ctlr->r_res2, 0x1c00 + offset, prb_bus); ATA_OUTL(ctlr->r_res2, 0x1c04 + offset, prb_bus >> 32); @@ -681,6 +691,9 @@ ata_siiprb_issue_cmd(device_t dev) if ((status = ATA_INL(ctlr->r_res2, 0x1008 + offset)) & 0x00010000) break; } + + bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, BUS_DMASYNC_POSTWRITE); + // SOS XXX ATA_OUTL(ctlr->r_res2, 0x1008 + offset, 0x00010000); ATA_OUTL(ctlr->r_res2, 0x1008 + offset, 0x08ff08ff); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 21:04:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CCD4106564A; Wed, 23 Mar 2011 21:04:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18E598FC16; Wed, 23 Mar 2011 21:04:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NL4vdI007261; Wed, 23 Mar 2011 21:04:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NL4uHQ007231; Wed, 23 Mar 2011 21:04:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232104.p2NL4uHQ007231@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 21:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219935 - in stable/8/sys: sparc64/ebus sparc64/include sparc64/isa sparc64/pci sparc64/sbus sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 21:04:57 -0000 Author: marius Date: Wed Mar 23 21:04:56 2011 New Revision: 219935 URL: http://svn.freebsd.org/changeset/base/219935 Log: MFC: r219567 Sync licenses and the corresponding RCS IDs with NetBSD, mainly switching the licenses of Matthew R. Green and the TNF to 2-clause. Obtained from: NetBSD Modified: stable/8/sys/sparc64/ebus/ebus.c stable/8/sys/sparc64/ebus/ebusreg.h stable/8/sys/sparc64/include/_inttypes.h stable/8/sys/sparc64/include/_stdint.h stable/8/sys/sparc64/include/bus.h stable/8/sys/sparc64/include/bus_dma.h stable/8/sys/sparc64/include/iommuvar.h stable/8/sys/sparc64/include/ofw_nexus.h stable/8/sys/sparc64/isa/ofw_isa.c stable/8/sys/sparc64/isa/ofw_isa.h stable/8/sys/sparc64/pci/ofw_pci.h stable/8/sys/sparc64/pci/psychoreg.h stable/8/sys/sparc64/pci/psychovar.h stable/8/sys/sparc64/sbus/dma_sbus.c stable/8/sys/sparc64/sbus/lsi64854.c stable/8/sys/sparc64/sbus/lsi64854reg.h stable/8/sys/sparc64/sbus/lsi64854var.h stable/8/sys/sparc64/sbus/ofw_sbus.h stable/8/sys/sparc64/sbus/sbus.c stable/8/sys/sparc64/sbus/sbusvar.h stable/8/sys/sparc64/sparc64/bus_machdep.c stable/8/sys/sparc64/sparc64/iommu.c stable/8/sys/sun4v/include/_inttypes.h stable/8/sys/sun4v/include/_stdint.h stable/8/sys/sun4v/include/bus.h stable/8/sys/sun4v/include/bus_dma.h stable/8/sys/sun4v/include/ofw_nexus.h stable/8/sys/sun4v/sun4v/bus_machdep.c stable/8/sys/sun4v/sun4v/hviommu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/ebus/ebus.c ============================================================================== --- stable/8/sys/sparc64/ebus/ebus.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/ebus/ebus.c Wed Mar 23 21:04:56 2011 (r219935) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green - * Copyright (c) 2001 Thomas Moestl * Copyright (c) 2009 by Marius Strobl * All rights reserved. * @@ -27,7 +26,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: ebus.c,v 1.26 2001/09/10 16:27:53 eeh Exp + * from: NetBSD: ebus.c,v 1.52 2008/05/29 14:51:26 mrg Exp + */ +/*- + * Copyright (c) 2001 Thomas Moestl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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 Modified: stable/8/sys/sparc64/ebus/ebusreg.h ============================================================================== --- stable/8/sys/sparc64/ebus/ebusreg.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/ebus/ebusreg.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /* $OpenBSD: ebusreg.h,v 1.4 2001/10/01 18:08:04 jason Exp $ */ -/* $NetBSD: ebusreg.h,v 1.1 1999/06/04 13:29:13 mrg Exp $ */ +/* $NetBSD: ebusreg.h,v 1.8 2008/05/29 14:51:27 mrg Exp $ */ /*- * Copyright (c) 1999 Matthew R. Green @@ -14,8 +14,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sys/sparc64/include/_inttypes.h ============================================================================== --- stable/8/sys/sparc64/include/_inttypes.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/include/_inttypes.h Wed Mar 23 21:04:56 2011 (r219935) @@ -26,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ + * From: $NetBSD: int_fmtio.h,v 1.4 2008/04/28 20:23:36 martin Exp $ * $FreeBSD$ */ Modified: stable/8/sys/sparc64/include/_stdint.h ============================================================================== --- stable/8/sys/sparc64/include/_stdint.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/include/_stdint.h Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 Modified: stable/8/sys/sparc64/include/bus.h ============================================================================== --- stable/8/sys/sparc64/include/bus.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/include/bus.h Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 @@ -65,7 +58,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: bus.h,v 1.28 2001/07/19 15:32:19 thorpej Exp + * from: NetBSD: bus.h,v 1.58 2008/04/28 20:23:36 martin Exp * and * from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09 * Modified: stable/8/sys/sparc64/include/bus_dma.h ============================================================================== --- stable/8/sys/sparc64/include/bus_dma.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/include/bus_dma.h Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 @@ -65,7 +58,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: bus.h,v 1.28 2001/07/19 15:32:19 thorpej Exp + * from: NetBSD: bus.h,v 1.58 2008/04/28 20:23:36 martin Exp * and * from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09 * Modified: stable/8/sys/sparc64/include/iommuvar.h ============================================================================== --- stable/8/sys/sparc64/include/iommuvar.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/include/iommuvar.h Wed Mar 23 21:04:56 2011 (r219935) @@ -10,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -25,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: iommuvar.h,v 1.9 2001/07/20 00:07:13 eeh Exp + * from: NetBSD: iommuvar.h,v 1.6 2008/05/29 14:51:26 mrg Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/include/ofw_nexus.h ============================================================================== --- stable/8/sys/sparc64/include/ofw_nexus.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/include/ofw_nexus.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,5 +1,4 @@ /*- - * Copyright (c) 1998, 1999 Eduardo E. Horvath * Copyright (c) 1999 Matthew R. Green * All rights reserved. * @@ -11,6 +10,32 @@ * 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. + */ + +/*- + * Copyright (c) 1998, 1999 Eduardo E. Horvath + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * @@ -26,7 +51,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp + * from: NetBSD: psychoreg.h,v 1.14 2008/05/30 02:29:37 mrg Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/isa/ofw_isa.c ============================================================================== --- stable/8/sys/sparc64/isa/ofw_isa.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/isa/ofw_isa.c Wed Mar 23 21:04:56 2011 (r219935) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green - * Copyright (c) 2001, 2003 Thomas Moestl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,7 +25,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: ebus.c,v 1.26 2001/09/10 16:27:53 eeh Exp + * from: NetBSD: ebus.c,v 1.52 2008/05/29 14:51:26 mrg Exp + */ +/*- + * Copyright (c) 2001, 2003 Thomas Moestl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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 Modified: stable/8/sys/sparc64/isa/ofw_isa.h ============================================================================== --- stable/8/sys/sparc64/isa/ofw_isa.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/isa/ofw_isa.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green - * Copyright (c) 2001 Thomas Moestl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,7 +25,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: ebus.c,v 1.26 2001/09/10 16:27:53 eeh Exp + * from: NetBSD: ebus.c,v 1.52 2008/05/29 14:51:26 mrg Exp + */ +/*- + * Copyright (c) 2001 Thomas Moestl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/pci/ofw_pci.h ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pci.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/pci/ofw_pci.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,5 +1,33 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. + */ + +/*- + * Copyright (c) 1998, 1999 Eduardo E. Horvath * Copyright (c) 2001, 2003 by Thomas Moestl * All rights reserved. * @@ -26,7 +54,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp + * from: NetBSD: psychoreg.h,v 1.14 2008/05/30 02:29:37 mrg Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/pci/psychoreg.h ============================================================================== --- stable/8/sys/sparc64/pci/psychoreg.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/pci/psychoreg.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,5 +1,4 @@ /*- - * Copyright (c) 1998, 1999 Eduardo E. Horvath * Copyright (c) 1999 Matthew R. Green * All rights reserved. * @@ -25,8 +24,36 @@ * 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. + */ + +/*- + * Copyright (c) 1998, 1999 Eduardo E. Horvath + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. * - * from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp + * from: NetBSD: psychoreg.h,v 1.14 2008/05/30 02:29:37 mrg Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/pci/psychovar.h ============================================================================== --- stable/8/sys/sparc64/pci/psychovar.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/pci/psychovar.h Wed Mar 23 21:04:56 2011 (r219935) @@ -10,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -25,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: psychovar.h,v 1.6 2001/07/20 00:07:13 eeh Exp + * from: NetBSD: psychovar.h,v 1.15 2008/05/29 14:51:26 mrg Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/sbus/dma_sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/dma_sbus.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/dma_sbus.c Wed Mar 23 21:04:56 2011 (r219935) @@ -1,5 +1,5 @@ -/* $OpenBSD: dma_sbus.c,v 1.12 2005/03/03 01:41:45 miod Exp $ */ -/* $NetBSD: dma_sbus.c,v 1.5 2000/07/09 20:57:42 pk Exp $ */ +/* $OpenBSD: dma_sbus.c,v 1.16 2008/06/26 05:42:18 ray Exp $ */ +/* $NetBSD: dma_sbus.c,v 1.32 2008/04/28 20:23:57 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -16,13 +16,6 @@ * 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 Modified: stable/8/sys/sparc64/sbus/lsi64854.c ============================================================================== --- stable/8/sys/sparc64/sbus/lsi64854.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/lsi64854.c Wed Mar 23 21:04:56 2011 (r219935) @@ -25,7 +25,7 @@ * */ -/* $NetBSD: lsi64854.c,v 1.25 2005/02/27 00:27:02 perry Exp $ */ +/* $NetBSD: lsi64854.c,v 1.33 2008/04/28 20:23:50 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,13 +42,6 @@ * 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 Modified: stable/8/sys/sparc64/sbus/lsi64854reg.h ============================================================================== --- stable/8/sys/sparc64/sbus/lsi64854reg.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/lsi64854reg.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,4 +1,4 @@ -/* $NetBSD: lsi64854reg.h,v 1.5 2001/03/29 02:58:39 petrov Exp $ */ +/* $NetBSD: lsi64854reg.h,v 1.6 2008/04/28 20:23:50 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. Modified: stable/8/sys/sparc64/sbus/lsi64854var.h ============================================================================== --- stable/8/sys/sparc64/sbus/lsi64854var.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/lsi64854var.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,4 +1,4 @@ -/* $NetBSD: lsi64854var.h,v 1.6 2005/02/04 02:10:36 perry Exp $ */ +/* $NetBSD: lsi64854var.h,v 1.12 2008/04/28 20:23:50 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. Modified: stable/8/sys/sparc64/sbus/ofw_sbus.h ============================================================================== --- stable/8/sys/sparc64/sbus/ofw_sbus.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/ofw_sbus.h Wed Mar 23 21:04:56 2011 (r219935) @@ -26,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: sbusvar.h,v 1.12 2001/09/24 23:49:34 eeh Exp + * from: NetBSD: sbusvar.h,v 1.15 2008/04/28 20:23:36 martin Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/sbus.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/sbus.c Wed Mar 23 21:04:56 2011 (r219935) @@ -1,51 +1,7 @@ /*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. + * Copyright (c) 1999-2002 Eduardo Horvath * All rights reserved. * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. 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 - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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. - */ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Lawrence Berkeley Laboratory. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -54,24 +10,24 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 + * 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. + * + * from: NetBSD: sbus.c,v 1.50 2002/06/20 18:26:24 eeh Exp */ /*- - * Copyright (c) 1999 Eduardo Horvath * Copyright (c) 2002 by Thomas Moestl . * Copyright (c) 2005 Marius Strobl * All rights reserved. @@ -93,9 +49,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * from: @(#)sbus.c 8.1 (Berkeley) 6/11/93 - * from: NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp */ #include Modified: stable/8/sys/sparc64/sbus/sbusvar.h ============================================================================== --- stable/8/sys/sparc64/sbus/sbusvar.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sbus/sbusvar.h Wed Mar 23 21:04:56 2011 (r219935) @@ -13,13 +13,6 @@ * 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 @@ -71,7 +64,7 @@ * SUCH DAMAGE. * * from: @(#)sbusvar.h 8.1 (Berkeley) 6/11/93 - * from: NetBSD: sbusvar.h,v 1.7 1999/06/05 05:30:43 mrg Exp + * from: NetBSD: sbusvar.h,v 1.15 2008/04/28 20:23:36 martin Exp * * $FreeBSD$ */ Modified: stable/8/sys/sparc64/sparc64/bus_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/bus_machdep.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sparc64/bus_machdep.c Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 @@ -93,7 +86,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 8.6 (Berkeley) 1/14/94 - * from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp + * from: NetBSD: machdep.c,v 1.221 2008/04/28 20:23:37 martin Exp * and * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 */ Modified: stable/8/sys/sparc64/sparc64/iommu.c ============================================================================== --- stable/8/sys/sparc64/sparc64/iommu.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sparc64/sparc64/iommu.c Wed Mar 23 21:04:56 2011 (r219935) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green - * Copyright (c) 2001-2003 Thomas Moestl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -25,49 +22,13 @@ * 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. - */ -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. 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 - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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. + * from: NetBSD: iommu.c,v 1.82 2008/05/30 02:29:37 mrg Exp */ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. + * Copyright (c) 1999-2002 Eduardo Horvath + * Copyright (c) 2001-2003 Thomas Moestl + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -77,25 +38,22 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 + * 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. * - * from: NetBSD: sbus.c,v 1.13 1999/05/23 07:24:02 mrg Exp - * from: @(#)sbus.c 8.1 (Berkeley) 6/11/93 - * from: NetBSD: iommu.c,v 1.42 2001/08/06 22:02:58 eeh Exp + * from: NetBSD: sbus.c,v 1.50 2002/06/20 18:26:24 eeh Exp */ #include Modified: stable/8/sys/sun4v/include/_inttypes.h ============================================================================== --- stable/8/sys/sun4v/include/_inttypes.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/include/_inttypes.h Wed Mar 23 21:04:56 2011 (r219935) @@ -26,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ + * From: $NetBSD: int_fmtio.h,v 1.4 2008/04/28 20:23:36 martin Exp $ * $FreeBSD$ */ Modified: stable/8/sys/sun4v/include/_stdint.h ============================================================================== --- stable/8/sys/sun4v/include/_stdint.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/include/_stdint.h Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 Modified: stable/8/sys/sun4v/include/bus.h ============================================================================== --- stable/8/sys/sun4v/include/bus.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/include/bus.h Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 @@ -65,7 +58,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: bus.h,v 1.28 2001/07/19 15:32:19 thorpej Exp + * from: NetBSD: bus.h,v 1.58 2008/04/28 20:23:36 martin Exp * and * from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09 * Modified: stable/8/sys/sun4v/include/bus_dma.h ============================================================================== --- stable/8/sys/sun4v/include/bus_dma.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/include/bus_dma.h Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 @@ -65,7 +58,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: bus.h,v 1.28 2001/07/19 15:32:19 thorpej Exp + * from: NetBSD: bus.h,v 1.58 2008/04/28 20:23:36 martin Exp * and * from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09 * Modified: stable/8/sys/sun4v/include/ofw_nexus.h ============================================================================== --- stable/8/sys/sun4v/include/ofw_nexus.h Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/include/ofw_nexus.h Wed Mar 23 21:04:56 2011 (r219935) @@ -1,5 +1,4 @@ /*- - * Copyright (c) 1998, 1999 Eduardo E. Horvath * Copyright (c) 1999 Matthew R. Green * All rights reserved. * @@ -11,6 +10,32 @@ * 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. + */ + +/*- + * Copyright (c) 1998, 1999 Eduardo E. Horvath + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * @@ -26,7 +51,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: NetBSD: psychoreg.h,v 1.8 2001/09/10 16:17:06 eeh Exp + * from: NetBSD: psychoreg.h,v 1.14 2008/05/30 02:29:37 mrg Exp * * $FreeBSD$ */ Modified: stable/8/sys/sun4v/sun4v/bus_machdep.c ============================================================================== --- stable/8/sys/sun4v/sun4v/bus_machdep.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/sun4v/bus_machdep.c Wed Mar 23 21:04:56 2011 (r219935) @@ -14,13 +14,6 @@ * 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 @@ -93,7 +86,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 8.6 (Berkeley) 1/14/94 - * from: NetBSD: machdep.c,v 1.111 2001/09/15 07:13:40 eeh Exp + * from: NetBSD: machdep.c,v 1.221 2008/04/28 20:23:37 martin Exp * and * from: FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.24 2001/08/15 */ Modified: stable/8/sys/sun4v/sun4v/hviommu.c ============================================================================== --- stable/8/sys/sun4v/sun4v/hviommu.c Wed Mar 23 20:59:20 2011 (r219934) +++ stable/8/sys/sun4v/sun4v/hviommu.c Wed Mar 23 21:04:56 2011 (r219935) @@ -1,6 +1,5 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green - * Copyright (c) 2001-2003 Thomas Moestl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -25,49 +22,13 @@ * 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. - */ -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. 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 - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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. + * from: NetBSD: iommu.c,v 1.82 2008/05/30 02:29:37 mrg Exp */ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. + * Copyright (c) 1999-2002 Eduardo Horvath + * Copyright (c) 2001-2003 Thomas Moestl + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -77,25 +38,22 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 + * 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; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 21:06:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCECC106567D; Wed, 23 Mar 2011 21:06:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 949688FC2B; Wed, 23 Mar 2011 21:06:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NL6Jqx007339; Wed, 23 Mar 2011 21:06:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NL6J6f007337; Wed, 23 Mar 2011 21:06:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232106.p2NL6J6f007337@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 21:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219936 - stable/8/sys/dev/fxp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 21:06:19 -0000 Author: marius Date: Wed Mar 23 21:06:19 2011 New Revision: 219936 URL: http://svn.freebsd.org/changeset/base/219936 Log: MFC: r219060 - Allocate the DMA memory shared between the host and the controller as coherent. - Update a comment to no longer reference Alpha. Modified: stable/8/sys/dev/fxp/if_fxp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/8/sys/dev/fxp/if_fxp.c Wed Mar 23 21:04:56 2011 (r219935) +++ stable/8/sys/dev/fxp/if_fxp.c Wed Mar 23 21:06:19 2011 (r219936) @@ -87,7 +87,7 @@ MODULE_DEPEND(fxp, miibus, 1, 1, 1); #include "miibus_if.h" /* - * NOTE! On the Alpha, we have an alignment constraint. The + * NOTE! On !x86 we typically have an alignment constraint. The * card DMAs the packet immediately following the RFA. However, * the first thing in the packet is a 14-byte Ethernet header. * This means that the packet is misaligned. To compensate, @@ -675,7 +675,7 @@ fxp_attach(device_t dev) } error = bus_dmamem_alloc(sc->fxp_stag, (void **)&sc->fxp_stats, - BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->fxp_smap); + BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->fxp_smap); if (error) { device_printf(dev, "could not allocate stats DMA memory\n"); goto fail; @@ -697,7 +697,7 @@ fxp_attach(device_t dev) } error = bus_dmamem_alloc(sc->cbl_tag, (void **)&sc->fxp_desc.cbl_list, - BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->cbl_map); + BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->cbl_map); if (error) { device_printf(dev, "could not allocate TxCB DMA memory\n"); goto fail; @@ -722,7 +722,7 @@ fxp_attach(device_t dev) } error = bus_dmamem_alloc(sc->mcs_tag, (void **)&sc->mcsp, - BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->mcs_map); + BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->mcs_map); if (error) { device_printf(dev, "could not allocate multicast setup DMA memory\n"); From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 21:22:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 899941065741; Wed, 23 Mar 2011 21:22:03 +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 7884D8FC19; Wed, 23 Mar 2011 21:22:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NLM3YS007770; Wed, 23 Mar 2011 21:22:03 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NLM38N007759; Wed, 23 Mar 2011 21:22:03 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201103232122.p2NLM38N007759@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 23 Mar 2011 21:22: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: r219937 - in head/usr.bin/calendar/calendars: . pt_BR.ISO8859-1 pt_BR.UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 21:22:03 -0000 Author: edwin Date: Wed Mar 23 21:22:03 2011 New Revision: 219937 URL: http://svn.freebsd.org/changeset/base/219937 Log: Please welcome the Brazilian calendar in the FreeBSD base. For now, calendar.brazilian points to pt_BR.ISO8859-1 Submitted by: Renato Tambellini MFC after: 1 week Added: head/usr.bin/calendar/calendars/calendar.brazilian (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.all (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.commemorative (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.holidays (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.mcommemorative (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.UTF-8/ head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.all (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.commemorative (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.holidays (contents, props changed) head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.mcommemorative (contents, props changed) Modified: head/usr.bin/calendar/calendars/calendar.all Modified: head/usr.bin/calendar/calendars/calendar.all ============================================================================== --- head/usr.bin/calendar/calendars/calendar.all Wed Mar 23 21:06:19 2011 (r219936) +++ head/usr.bin/calendar/calendars/calendar.all Wed Mar 23 21:22:03 2011 (r219937) @@ -9,6 +9,7 @@ #include #include +#include #include #include #include Added: head/usr.bin/calendar/calendars/calendar.brazilian ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/calendar.brazilian Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,13 @@ +/* + * $FreeBSD$ + * + * Brazilian calendar file(s), originally submitted by + * Renato Tambellini + */ + +#ifndef _calendar_brazilian_ +#define _calendar_brazilian_ + +#include + +#endif Added: head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.all ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.all Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,15 @@ +/* + * $FreeBSD$ + * + * Brazilian calendar originally submitted by + * Renato Tambellini + */ + +#ifndef _pt_BR_ISO8859_1_all_ +#define _pt_BR_ISO8859_1_all_ + +#include +#include +#include + +#endif /* !_pt_BR.ISO8859_1_all_ */ Added: head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.commemorative ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.commemorative Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,191 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian commemorative days + * + * http://www.ibge.gov.br/ibgeteen/datas/home.html + */ + +#ifndef _pt_BR_ISO8859_1_commemorative_ +#define _pt_BR_ISO8859_1_commemorative_ + +LANG=pt_BR.ISO8859-1 + +01/06 Dia nacional do fotógrafo +01/06 Dia da gratidão +01/07 Dia da liberdade de culto +01/09 Dia do Fico +01/12 Aniversário de Belém +01/20 Dia do farmacêutico +01/20 Dia nacional do fusca +01/21 Dia mundial da religião +01/24 Dia da Previdência Social +01/25 Dia do carteiro +01/25 Aniversário da cidade de São Paulo +01/28 Aniversário da abertura dos portos no Brasil, em 1808 +01/30 Dia da saudade +02/01 Dia do publicitário +02/04 Aniversário de Macapá +02/07 Dia do gráfico +02/16 Dia do repórter +02/19 Dia do esportista +03/01 Aniversário da cidade do Rio de Janeiro +03/02 Dia do turismo +03/05 Dia do filatelista brasileiro +03/07 Dia do fuzileiro naval +03/08 Dia internacional da mulher +03/10 Dia do telefone +03/12 Aniversário de Recife +03/12 Dia do bibliotecário +03/14 Dia nacional da poesia +03/15 Dia da escola +03/15 Dia mundial do consumidor +03/17 Aniversário de Aracaju +03/21 Dia da eliminação da discriminação racial +03/22 Dia mundial da água +03/23 Aniversário de Florianópolis +03/23 Dia do meteorologista +03/26 Aniversário de Porto Alegre +03/27 Dia do circo +03/27 Dia do teatro +03/28 Dia do revisor e do diagramador +03/29 Aniversário de Curitiba +03/31 Aniversário do golpe militar +04/01 Dia da mentira +04/02 Dia internacional do livro para crianças +04/07 Dia mundial da saúde +04/07 Dia do jornalismo +04/08 Dia mundial de combate ao câncer +04/08 Dia da natação +04/08 Aniversário de Cuiabá +04/12 Aniversário de Fortaleza +04/13 Dia dos jovens +04/14 Dia internacional do café +04/15 Dia mundial do desenhista +04/15 Dia da conservação do solo +04/19 Dia do índio +04/20 Dia do diplomata +04/21 Aniversário de Brasília +04/21 Dia do metalúrgico +04/22 Dia do descobrimento do Brasil +04/22 Dia do planeta Terra +04/22 Dia da Força Aérea Brasileira +04/23 Dia mundial do escoteiro +04/25 Dia do contabilista +04/27 Dia da empregada doméstica +04/28 Dia da educação +04/30 Dia do ferroviário +05/05 Dia do cartógrafo +05/08 Dia do artista plástico +05/08 Dia internacional da Cruz Vermelha +05/12 Dia mundial do enfermeiro +05/13 Dia da abolição da escravatura +05/13 Dia do automóvel +05/15 Dia do assistente social +05/16 Dia do gari +05/17 Dia internacional das telecomunicações +05/18 Dia mundial dos museus +05/20 Aniversário de Palmas +05/21 Dia da Língua Nacional +05/22 Dia do apicultor +05/24 Dia do vestibulando +05/25 Dia da indústria +05/27 Dia do profissional liberal +05/29 Dia do estatístico +05/29 Dia do geógrafo +05/30 Dia do geólogo +06/01 Dia da imprensa +06/04 Dia internacional das crianças vítimas de agressão +06/05 Dia mundial do meio ambiente e da ecologia +06/09 Dia do porteiro +06/10 Dia da Língua Portuguesa +06/11 Dia da Marinha do Brasil +06/12 Dia dos namorados +06/15 Dia do paleontólogo +06/18 Dia do químico +06/19 Dia do migrante +06/21 Dia da música +06/22 Dia do aeroviário +06/25 Dia do imigrante +06/26 Dia internacional do combate às drogas +06/26 Dia do metrologista +06/29 Dia da telefonista +06/29 Dia do pescador +07/01 Dia da vacina BCG +07/02 Dia do bombeiro +07/09 Aniversário de Boa Vista +07/11 Dia mundial da população +07/12 Dia do engenheiro florestal +07/13 Dia mundial do rock +07/17 Dia de proteção às florestas +07/19 Dia do futebol +07/20 Chegada do homem à Lua +07/20 Dia da amizade +07/25 Dia do escritor +07/27 Dia nacional da prevenção de acidentes de trabalho +07/28 Dia do agricultor +08/11 Dia do advogado +08/11 Dia da televisão +08/13 Dia do economista +08/15 Dia da informática +08/16 Aniversário de Teresina +08/21 Dia da habitação +08/22 Dia do folclore +08/25 Dia do soldado +08/26 Aniversário de Campo Grande +08/27 Dia do psicólogo +08/31 Dia do nutricionista +09/03 Dia do biólogo +09/08 Dia mundial da alfabetização +09/08 Aniversário de Vitória +09/08 Aniversário de São Luís +09/09 Dia do administrador +09/09 Dia do médico veterinário +09/16 Dia internacional para preservação da camada de ozônio +09/18 Dia dos símbolos nacionais +09/21 Dia do idoso +09/21 Dia da árvore +09/25 Dia do rádio +09/25 Dia nacional do trânsito +09/30 Dia da secretária +10/04 Dia dos animais +10/05 Dia da promulgação da atual Constituição brasileira +10/11 Dia nacional da pessoa portadora de deficiência física +10/12 Dia da criança +10/12 Dia do descobrimento da América +10/12 Dia do agrônomo +10/13 Dia do fisioterapeuta +10/14 Dia da pecuária +10/15 Dia do professor +10/16 Dia mundial da alimentação +10/18 Dia do médico +10/23 Dia do aviador +10/24 Dia da ONU +10/25 Dia da democracia +10/25 Dia do dentista +10/28 Dia do funcionário público +10/29 Dia nacional do livro +10/30 Dia do comércio +10/31 Dia das bruxas +11/05 Dia do cinema brasileiro +11/19 Dia da bandeira +11/20 Dia nacional da consciência negra +11/30 Dia do teólogo +11/30 Dia da reforma agrária +12/01 Dia mundial de luta contra a AIDS +12/02 Dia da astronomia +12/03 Dia internacional das pessoas portadoras de deficiência +12/04 Dia do orientador educacional +12/05 Aniversário de Maceió +12/05 Dia internacional do voluntário +12/08 Dia da família +12/09 Dia do fonoaudiólogo +12/10 Dia da declaração dos direitos do homem +12/11 Dia do engenheiro +12/11 Dia do arquiteto +12/12 Aniversário de Belo Horizonte +12/28 Aniversário de Rio Branco + +#endif Added: head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.holidays ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.holidays Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,25 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian holidays + * + * Federal laws 662/1949, 6.802/1980, 9.093/1995 and 10.607/2002. + */ + +#ifndef _pt_BR_ISO8859_1_holidays_ +#define _pt_BR_ISO8859_1_holidays_ + +LANG=pt_BR.ISO8859-1 + +01/01 Dia da confraternização universal e da paz +04/21 Dia do Tiradentes +05/01 Dia do trabalho +09/07 Dia da independência do Brasil +10/12 Dia da Nossa Senhora Aparecida +11/02 Dia de Finados +11/15 Dia da proclamação da República +12/25 Natal + +#endif Added: head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.mcommemorative ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/calendar.mcommemorative Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,22 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian mobile commemorative days + * + * http://www.novomilenio.inf.br/porto/mapas/nmcalenp.htm + */ + +#ifndef _pt_BR_ISO8859_1_mcommemorative_ +#define _pt_BR_ISO8859_1_mcommemorative_ + +LANG=pt_BR.ISO8859-1 + +Easter-47 Carnaval +Easter-7 Domingo de Ramos +Easter-2 Sexta-feira Santa +Easter Páscoa +Easter+60 Corpus Christi + +#endif Added: head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.all ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.all Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,16 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian calendar + */ + +#ifndef _pt_BR_UTF_8_all_ +#define _pt_BR_UTF_8_all_ + +#include +#include +#include + +#endif /* !_pt_BR.UTF_8_all_ */ Added: head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.commemorative ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.commemorative Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,191 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian commemorative days + * + * http://www.ibge.gov.br/ibgeteen/datas/home.html + */ + +#ifndef _pt_BR_UTF_8_commemorative_ +#define _pt_BR_UTF_8_commemorative_ + +LANG=pt_BR.UTF-8 + +01/06 Dia nacional do fotógrafo +01/06 Dia da gratidão +01/07 Dia da liberdade de culto +01/09 Dia do Fico +01/12 Aniversário de Belém +01/20 Dia do farmacêutico +01/20 Dia nacional do fusca +01/21 Dia mundial da religião +01/24 Dia da Previdência Social +01/25 Dia do carteiro +01/25 Aniversário da cidade de São Paulo +01/28 Aniversário da abertura dos portos no Brasil, em 1808 +01/30 Dia da saudade +02/01 Dia do publicitário +02/04 Aniversário de Macapá +02/07 Dia do gráfico +02/16 Dia do repórter +02/19 Dia do esportista +03/01 Aniversário da cidade do Rio de Janeiro +03/02 Dia do turismo +03/05 Dia do filatelista brasileiro +03/07 Dia do fuzileiro naval +03/08 Dia internacional da mulher +03/10 Dia do telefone +03/12 Aniversário de Recife +03/12 Dia do bibliotecário +03/14 Dia nacional da poesia +03/15 Dia da escola +03/15 Dia mundial do consumidor +03/17 Aniversário de Aracaju +03/21 Dia da eliminação da discriminação racial +03/22 Dia mundial da água +03/23 Aniversário de Florianópolis +03/23 Dia do meteorologista +03/26 Aniversário de Porto Alegre +03/27 Dia do circo +03/27 Dia do teatro +03/28 Dia do revisor e do diagramador +03/29 Aniversário de Curitiba +03/31 Aniversário do golpe militar +04/01 Dia da mentira +04/02 Dia internacional do livro para crianças +04/07 Dia mundial da saúde +04/07 Dia do jornalismo +04/08 Dia mundial de combate ao câncer +04/08 Dia da natação +04/08 Aniversário de Cuiabá +04/12 Aniversário de Fortaleza +04/13 Dia dos jovens +04/14 Dia internacional do café +04/15 Dia mundial do desenhista +04/15 Dia da conservação do solo +04/19 Dia do índio +04/20 Dia do diplomata +04/21 Aniversário de Brasília +04/21 Dia do metalúrgico +04/22 Dia do descobrimento do Brasil +04/22 Dia do planeta Terra +04/22 Dia da Força Aérea Brasileira +04/23 Dia mundial do escoteiro +04/25 Dia do contabilista +04/27 Dia da empregada doméstica +04/28 Dia da educação +04/30 Dia do ferroviário +05/05 Dia do cartógrafo +05/08 Dia do artista plástico +05/08 Dia internacional da Cruz Vermelha +05/12 Dia mundial do enfermeiro +05/13 Dia da abolição da escravatura +05/13 Dia do automóvel +05/15 Dia do assistente social +05/16 Dia do gari +05/17 Dia internacional das telecomunicações +05/18 Dia mundial dos museus +05/20 Aniversário de Palmas +05/21 Dia da Língua Nacional +05/22 Dia do apicultor +05/24 Dia do vestibulando +05/25 Dia da indústria +05/27 Dia do profissional liberal +05/29 Dia do estatístico +05/29 Dia do geógrafo +05/30 Dia do geólogo +06/01 Dia da imprensa +06/04 Dia internacional das crianças vítimas de agressão +06/05 Dia mundial do meio ambiente e da ecologia +06/09 Dia do porteiro +06/10 Dia da Língua Portuguesa +06/11 Dia da Marinha do Brasil +06/12 Dia dos namorados +06/15 Dia do paleontólogo +06/18 Dia do químico +06/19 Dia do migrante +06/21 Dia da música +06/22 Dia do aeroviário +06/25 Dia do imigrante +06/26 Dia internacional do combate às drogas +06/26 Dia do metrologista +06/29 Dia da telefonista +06/29 Dia do pescador +07/01 Dia da vacina BCG +07/02 Dia do bombeiro +07/09 Aniversário de Boa Vista +07/11 Dia mundial da população +07/12 Dia do engenheiro florestal +07/13 Dia mundial do rock +07/17 Dia de proteção às florestas +07/19 Dia do futebol +07/20 Chegada do homem à Lua +07/20 Dia da amizade +07/25 Dia do escritor +07/27 Dia nacional da prevenção de acidentes de trabalho +07/28 Dia do agricultor +08/11 Dia do advogado +08/11 Dia da televisão +08/13 Dia do economista +08/15 Dia da informática +08/16 Aniversário de Teresina +08/21 Dia da habitação +08/22 Dia do folclore +08/25 Dia do soldado +08/26 Aniversário de Campo Grande +08/27 Dia do psicólogo +08/31 Dia do nutricionista +09/03 Dia do biólogo +09/08 Dia mundial da alfabetização +09/08 Aniversário de Vitória +09/08 Aniversário de São Luís +09/09 Dia do administrador +09/09 Dia do médico veterinário +09/16 Dia internacional para preservação da camada de ozônio +09/18 Dia dos símbolos nacionais +09/21 Dia do idoso +09/21 Dia da árvore +09/25 Dia do rádio +09/25 Dia nacional do trânsito +09/30 Dia da secretária +10/04 Dia dos animais +10/05 Dia da promulgação da atual Constituição brasileira +10/11 Dia nacional da pessoa portadora de deficiência física +10/12 Dia da criança +10/12 Dia do descobrimento da América +10/12 Dia do agrônomo +10/13 Dia do fisioterapeuta +10/14 Dia da pecuária +10/15 Dia do professor +10/16 Dia mundial da alimentação +10/18 Dia do médico +10/23 Dia do aviador +10/24 Dia da ONU +10/25 Dia da democracia +10/25 Dia do dentista +10/28 Dia do funcionário público +10/29 Dia nacional do livro +10/30 Dia do comércio +10/31 Dia das bruxas +11/05 Dia do cinema brasileiro +11/19 Dia da bandeira +11/20 Dia nacional da consciência negra +11/30 Dia do teólogo +11/30 Dia da reforma agrária +12/01 Dia mundial de luta contra a AIDS +12/02 Dia da astronomia +12/03 Dia internacional das pessoas portadoras de deficiência +12/04 Dia do orientador educacional +12/05 Aniversário de Maceió +12/05 Dia internacional do voluntário +12/08 Dia da família +12/09 Dia do fonoaudiólogo +12/10 Dia da declaração dos direitos do homem +12/11 Dia do engenheiro +12/11 Dia do arquiteto +12/12 Aniversário de Belo Horizonte +12/28 Aniversário de Rio Branco + +#endif Added: head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.holidays ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.holidays Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,25 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian holidays + * + * Federal laws 662/1949, 6.802/1980, 9.093/1995 and 10.607/2002. + */ + +#ifndef _pt_BR_UTF_8_holidays_ +#define _pt_BR_UTF_8_holidays_ + +LANG=pt_BR.UTF-8 + +01/01 Dia da confraternização universal e da paz +04/21 Dia do Tiradentes +05/01 Dia do trabalho +09/07 Dia da independência do Brasil +10/12 Dia da Nossa Senhora Aparecida +11/02 Dia de Finados +11/15 Dia da proclamação da República +12/25 Natal + +#endif Added: head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.mcommemorative ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendars/pt_BR.UTF-8/calendar.mcommemorative Wed Mar 23 21:22:03 2011 (r219937) @@ -0,0 +1,22 @@ +/* + * $FreeBSD$ + * + * Originally submitted by Renato Tambellini + * + * Brazilian mobile commemorative days + * + * http://www.novomilenio.inf.br/porto/mapas/nmcalenp.htm + */ + +#ifndef _pt_BR_UTF_8_mcommemorative_ +#define _pt_BR_UTF_8_mcommemorative_ + +LANG=pt_BR.UTF-8 + +Easter-47 Carnaval +Easter-7 Domingo de Ramos +Easter-2 Sexta-feira Santa +Easter Páscoa +Easter+60 Corpus Christi + +#endif From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 22:06:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F9A61065677; Wed, 23 Mar 2011 22:06:10 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10D7C8FC1F; Wed, 23 Mar 2011 22:06:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NM69k7008735; Wed, 23 Mar 2011 22:06:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NM697x008733; Wed, 23 Mar 2011 22:06:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103232206.p2NM697x008733@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 23 Mar 2011 22:06: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: r219938 - head/sys/dev/vte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 22:06:10 -0000 Author: yongari Date: Wed Mar 23 22:06:09 2011 New Revision: 219938 URL: http://svn.freebsd.org/changeset/base/219938 Log: Remove unused DMA map/tag in softc. Modified: head/sys/dev/vte/if_vtevar.h Modified: head/sys/dev/vte/if_vtevar.h ============================================================================== --- head/sys/dev/vte/if_vtevar.h Wed Mar 23 21:22:03 2011 (r219937) +++ head/sys/dev/vte/if_vtevar.h Wed Mar 23 22:06:09 2011 (r219938) @@ -80,13 +80,7 @@ struct vte_chain_data { bus_dmamap_t vte_tx_ring_map; bus_dma_tag_t vte_rx_ring_tag; bus_dmamap_t vte_rx_ring_map; - bus_dma_tag_t vte_rr_ring_tag; - bus_dmamap_t vte_rr_ring_map; bus_dmamap_t vte_rx_sparemap; - bus_dma_tag_t vte_cmb_tag; - bus_dmamap_t vte_cmb_map; - bus_dma_tag_t vte_smb_tag; - bus_dmamap_t vte_smb_map; struct vte_tx_desc *vte_tx_ring; bus_addr_t vte_tx_ring_paddr; struct vte_rx_desc *vte_rx_ring; From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 22:08:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF2C6106564A; Wed, 23 Mar 2011 22:08:01 +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 B023A8FC13; Wed, 23 Mar 2011 22:08:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NM81Su008807; Wed, 23 Mar 2011 22:08:01 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NM818d008805; Wed, 23 Mar 2011 22:08:01 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201103232208.p2NM818d008805@svn.freebsd.org> From: Xin LI Date: Wed, 23 Mar 2011 22:08: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: r219939 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 22:08:01 -0000 Author: delphij Date: Wed Mar 23 22:08:01 2011 New Revision: 219939 URL: http://svn.freebsd.org/changeset/base/219939 Log: humanize_number(3) multiply the input number by 100, which could cause an integer overflow when the input is very large (for example, 100 Pi would become about 10 Ei which exceeded signed int64_t). Solve this issue by splitting the division into two parts and avoid the multiplication. PR: bin/146205 Reviewed by: arundel MFC after: 1 month Modified: head/lib/libutil/humanize_number.c Modified: head/lib/libutil/humanize_number.c ============================================================================== --- head/lib/libutil/humanize_number.c Wed Mar 23 22:06:09 2011 (r219938) +++ head/lib/libutil/humanize_number.c Wed Mar 23 22:08:01 2011 (r219939) @@ -43,11 +43,11 @@ __FBSDID("$FreeBSD$"); #include int -humanize_number(char *buf, size_t len, int64_t bytes, +humanize_number(char *buf, size_t len, int64_t quotient, const char *suffix, int scale, int flags) { const char *prefixes, *sep; - int b, i, r, maxscale, s1, s2, sign; + int i, r, remainder, maxscale, s1, s2, sign; int64_t divisor, max; size_t baselen; @@ -55,6 +55,8 @@ humanize_number(char *buf, size_t len, i assert(suffix != NULL); assert(scale >= 0); + remainder = 0; + if (flags & HN_DIVISOR_1000) { /* SI for decimal multiplies */ divisor = 1000; @@ -86,13 +88,12 @@ humanize_number(char *buf, size_t len, i if (len > 0) buf[0] = '\0'; - if (bytes < 0) { + if (quotient < 0) { sign = -1; - bytes *= -100; + quotient = -quotient; baselen = 3; /* sign, digit, prefix */ } else { sign = 1; - bytes *= 100; baselen = 2; /* digit, prefix */ } if (flags & HN_NOSPACE) @@ -109,7 +110,7 @@ humanize_number(char *buf, size_t len, i if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { /* See if there is additional columns can be used. */ - for (max = 100, i = len - baselen; i-- > 0;) + for (max = 1, i = len - baselen; i-- > 0;) max *= 10; /* @@ -117,30 +118,37 @@ humanize_number(char *buf, size_t len, i * If there will be an overflow by the rounding below, * divide once more. */ - for (i = 0; bytes >= max - 50 && i < maxscale; i++) - bytes /= divisor; + for (i = 0; + (quotient >= max || (quotient == max - 1 && remainder >= 950)) && + i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } if (scale & HN_GETSCALE) return (i); - } else - for (i = 0; i < scale && i < maxscale; i++) - bytes /= divisor; + } else { + for (i = 0; i < scale && i < maxscale; i++) { + remainder = quotient % divisor; + quotient /= divisor; + } + } /* If a value <= 9.9 after rounding and ... */ - if (bytes < 995 && i > 0 && flags & HN_DECIMAL) { + if (quotient <= 9 && remainder < 950 && i > 0 && flags & HN_DECIMAL) { /* baselen + \0 + .N */ if (len < baselen + 1 + 2) return (-1); - b = ((int)bytes + 5) / 10; - s1 = b / 10; - s2 = b % 10; + s1 = (int)quotient + ((remainder + 50) / 1000); + s2 = ((remainder + 50) / 100) % 10; r = snprintf(buf, len, "%d%s%d%s%s%s", sign * s1, localeconv()->decimal_point, s2, sep, SCALE2PREFIX(i), suffix); } else r = snprintf(buf, len, "%" PRId64 "%s%s%s", - sign * ((bytes + 50) / 100), + sign * (quotient + (remainder + 50) / 1000), sep, SCALE2PREFIX(i), suffix); return (r); } + From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 22:33:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F1DF106564A; Wed, 23 Mar 2011 22:33:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DB0F8FC1E; Wed, 23 Mar 2011 22:33:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NMXUpp009367; Wed, 23 Mar 2011 22:33:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NMXUIp009364; Wed, 23 Mar 2011 22:33:30 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232233.p2NMXUIp009364@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 22:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219940 - in stable/8: libexec/rtld-elf/sparc64 sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 22:33:30 -0000 Author: marius Date: Wed Mar 23 22:33:29 2011 New Revision: 219940 URL: http://svn.freebsd.org/changeset/base/219940 Log: MFC: r219339, r219532 - Remove clause 3 and 4 from TNF licenses. [1] - Add the _RF_X committed in r212998 (merged to stable/8 in r213478) also to the tables in the sparc64 reloc.c in order reduce differences between the kernel and the userland source. This results in no functional change though. - Consistently abbreviate the names of the relocations. - End sentences with dots. - Fix whitespace. Obtained from: NetBSD [1] Modified: stable/8/libexec/rtld-elf/sparc64/reloc.c stable/8/sys/sparc64/sparc64/elf_machdep.c Directory Properties: stable/8/libexec/rtld-elf/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- stable/8/libexec/rtld-elf/sparc64/reloc.c Wed Mar 23 22:08:01 2011 (r219939) +++ stable/8/libexec/rtld-elf/sparc64/reloc.c Wed Mar 23 22:33:29 2011 (r219940) @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.5 2001/04/25 12:24:51 kleink Exp $ */ +/* $NetBSD: mdreloc.c,v 1.42 2008/04/28 20:23:04 martin Exp $ */ /*- * Copyright (c) 2000 Eduardo Horvath. @@ -16,13 +16,6 @@ * 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 @@ -66,28 +59,29 @@ __FBSDID("$FreeBSD$"); * * the relocation is relative to the load address * */ -#define _RF_S 0x80000000 /* Resolve symbol */ -#define _RF_A 0x40000000 /* Use addend */ -#define _RF_P 0x20000000 /* Location relative */ -#define _RF_G 0x10000000 /* GOT offset */ -#define _RF_B 0x08000000 /* Load address relative */ -#define _RF_U 0x04000000 /* Unaligned */ -#define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ -#define _RF_RS(s) ( (s) & 0xff) /* right shift */ +#define _RF_S 0x80000000 /* Resolve symbol */ +#define _RF_A 0x40000000 /* Use addend */ +#define _RF_P 0x20000000 /* Location relative */ +#define _RF_G 0x10000000 /* GOT offset */ +#define _RF_B 0x08000000 /* Load address relative */ +#define _RF_U 0x04000000 /* Unaligned */ +#define _RF_X 0x02000000 /* Bare symbols, needs proc */ +#define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ +#define _RF_RS(s) ( (s) & 0xff) /* right shift */ static const int reloc_target_flags[] = { 0, /* NONE */ - _RF_S|_RF_A| _RF_SZ(8) | _RF_RS(0), /* RELOC_8 */ - _RF_S|_RF_A| _RF_SZ(16) | _RF_RS(0), /* RELOC_16 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* RELOC_32 */ + _RF_S|_RF_A| _RF_SZ(8) | _RF_RS(0), /* 8 */ + _RF_S|_RF_A| _RF_SZ(16) | _RF_RS(0), /* 16 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 32 */ _RF_S|_RF_A|_RF_P| _RF_SZ(8) | _RF_RS(0), /* DISP_8 */ _RF_S|_RF_A|_RF_P| _RF_SZ(16) | _RF_RS(0), /* DISP_16 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* DISP_32 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP_30 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP_22 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* HI22 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 22 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 13 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* LO10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(10), /* HI22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 13 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* LO10 */ _RF_G| _RF_SZ(32) | _RF_RS(0), /* GOT10 */ _RF_G| _RF_SZ(32) | _RF_RS(0), /* GOT13 */ _RF_G| _RF_SZ(32) | _RF_RS(10), /* GOT22 */ @@ -106,90 +100,88 @@ static const int reloc_target_flags[] = _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* PCPLT32 */ _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(10), /* PCPLT22 */ _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* PCPLT10 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 10 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 11 */ - _RF_S|_RF_A| _RF_SZ(64) | _RF_RS(0), /* 64 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 11 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(64) | _RF_RS(0), /* 64 */ _RF_S|_RF_A|/*extra*/ _RF_SZ(32) | _RF_RS(0), /* OLO10 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(42), /* HH22 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(32), /* HM10 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* LM22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(42), /* HH22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(32), /* HM10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(10), /* LM22 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(42), /* PC_HH22 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(32), /* PC_HM10 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(10), /* PC_LM22 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP16 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* WDISP19 */ _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* GLOB_JMP */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 7 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 5 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 6 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 7 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 5 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* 6 */ _RF_S|_RF_A|_RF_P| _RF_SZ(64) | _RF_RS(0), /* DISP64 */ _RF_A| _RF_SZ(64) | _RF_RS(0), /* PLT64 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* HIX22 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* LOX10 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(22), /* H44 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(12), /* M44 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* L44 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(10), /* HIX22 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* LOX10 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(22), /* H44 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(12), /* M44 */ + _RF_S|_RF_A|_RF_X| _RF_SZ(32) | _RF_RS(0), /* L44 */ _RF_S|_RF_A| _RF_SZ(64) | _RF_RS(0), /* REGISTER */ _RF_S|_RF_A| _RF_U| _RF_SZ(64) | _RF_RS(0), /* UA64 */ _RF_S|_RF_A| _RF_U| _RF_SZ(16) | _RF_RS(0), /* UA16 */ }; #if 0 -static const char *reloc_names[] = { - "NONE", "RELOC_8", "RELOC_16", "RELOC_32", "DISP_8", - "DISP_16", "DISP_32", "WDISP_30", "WDISP_22", "HI22", - "22", "13", "LO10", "GOT10", "GOT13", - "GOT22", "PC10", "PC22", "WPLT30", "COPY", - "GLOB_DAT", "JMP_SLOT", "RELATIVE", "UA_32", "PLT32", - "HIPLT22", "LOPLT10", "LOPLT10", "PCPLT22", "PCPLT32", - "10", "11", "64", "OLO10", "HH22", - "HM10", "LM22", "PC_HH22", "PC_HM10", "PC_LM22", - "WDISP16", "WDISP19", "GLOB_JMP", "7", "5", "6", - "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44", +static const char *const reloc_names[] = { + "NONE", "8", "16", "32", "DISP_8", "DISP_16", "DISP_32", "WDISP_30", + "WDISP_22", "HI22", "22", "13", "LO10", "GOT10", "GOT13", "GOT22", + "PC10", "PC22", "WPLT30", "COPY", "GLOB_DAT", "JMP_SLOT", "RELATIVE", + "UA_32", "PLT32", "HIPLT22", "LOPLT10", "LOPLT10", "PCPLT22", + "PCPLT32", "10", "11", "64", "OLO10", "HH22", "HM10", "LM22", + "PC_HH22", "PC_HM10", "PC_LM22", "WDISP16", "WDISP19", "GLOB_JMP", + "7", "5", "6", "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44", "L44", "REGISTER", "UA64", "UA16" }; #endif -#define RELOC_RESOLVE_SYMBOL(t) ((reloc_target_flags[t] & _RF_S) != 0) -#define RELOC_PC_RELATIVE(t) ((reloc_target_flags[t] & _RF_P) != 0) -#define RELOC_BASE_RELATIVE(t) ((reloc_target_flags[t] & _RF_B) != 0) -#define RELOC_UNALIGNED(t) ((reloc_target_flags[t] & _RF_U) != 0) -#define RELOC_USE_ADDEND(t) ((reloc_target_flags[t] & _RF_A) != 0) -#define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff) -#define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) +#define RELOC_RESOLVE_SYMBOL(t) ((reloc_target_flags[t] & _RF_S) != 0) +#define RELOC_PC_RELATIVE(t) ((reloc_target_flags[t] & _RF_P) != 0) +#define RELOC_BASE_RELATIVE(t) ((reloc_target_flags[t] & _RF_B) != 0) +#define RELOC_UNALIGNED(t) ((reloc_target_flags[t] & _RF_U) != 0) +#define RELOC_USE_ADDEND(t) ((reloc_target_flags[t] & _RF_A) != 0) +#define RELOC_BARE_SYMBOL(t) ((reloc_target_flags[t] & _RF_X) != 0) +#define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff) +#define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) static const long reloc_target_bitmask[] = { -#define _BM(x) (~(-(1ULL << (x)))) +#define _BM(x) (~(-(1ULL << (x)))) 0, /* NONE */ - _BM(8), _BM(16), _BM(32), /* RELOC_8, _16, _32 */ + _BM(8), _BM(16), _BM(32), /* 8, 16, 32 */ _BM(8), _BM(16), _BM(32), /* DISP8, DISP16, DISP32 */ _BM(30), _BM(22), /* WDISP30, WDISP22 */ - _BM(22), _BM(22), /* HI22, _22 */ - _BM(13), _BM(10), /* RELOC_13, _LO10 */ + _BM(22), _BM(22), /* HI22, 22 */ + _BM(13), _BM(10), /* 13, LO10 */ _BM(10), _BM(13), _BM(22), /* GOT10, GOT13, GOT22 */ - _BM(10), _BM(22), /* _PC10, _PC22 */ - _BM(30), 0, /* _WPLT30, _COPY */ - _BM(32), _BM(32), _BM(32), /* _GLOB_DAT, JMP_SLOT, _RELATIVE */ - _BM(32), _BM(32), /* _UA32, PLT32 */ - _BM(22), _BM(10), /* _HIPLT22, LOPLT10 */ - _BM(32), _BM(22), _BM(10), /* _PCPLT32, _PCPLT22, _PCPLT10 */ - _BM(10), _BM(11), -1, /* _10, _11, _64 */ - _BM(13), _BM(22), /* _OLO10, _HH22 */ - _BM(10), _BM(22), /* _HM10, _LM22 */ - _BM(22), _BM(10), _BM(22), /* _PC_HH22, _PC_HM10, _PC_LM22 */ - _BM(16), _BM(19), /* _WDISP16, _WDISP19 */ + _BM(10), _BM(22), /* PC10, PC22 */ + _BM(30), 0, /* WPLT30, COPY */ + _BM(32), _BM(32), _BM(32), /* GLOB_DAT, JMP_SLOT, RELATIVE */ + _BM(32), _BM(32), /* UA32, PLT32 */ + _BM(22), _BM(10), /* HIPLT22, LOPLT10 */ + _BM(32), _BM(22), _BM(10), /* PCPLT32, PCPLT22, PCPLT10 */ + _BM(10), _BM(11), -1, /* 10, 11, 64 */ + _BM(13), _BM(22), /* OLO10, HH22 */ + _BM(10), _BM(22), /* HM10, LM22 */ + _BM(22), _BM(10), _BM(22), /* PC_HH22, PC_HM10, PC_LM22 */ + _BM(16), _BM(19), /* WDISP16, WDISP19 */ -1, /* GLOB_JMP */ - _BM(7), _BM(5), _BM(6), /* _7, _5, _6 */ + _BM(7), _BM(5), _BM(6), /* 7, 5, 6 */ -1, -1, /* DISP64, PLT64 */ _BM(22), _BM(13), /* HIX22, LOX10 */ _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ #undef _BM }; -#define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t]) +#define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t]) #undef flush -#define flush(va, offs) \ +#define flush(va, offs) \ __asm __volatile("flush %0 + %1" : : "r" (va), "I" (offs)); static int reloc_nonplt_object(Obj_Entry *obj, const Elf_Rela *rela, @@ -301,11 +293,11 @@ reloc_nonplt_object(Obj_Entry *obj, cons if (type == R_SPARC_NONE) return (0); - /* We do JMP_SLOTs below */ + /* We do JMP_SLOTs below. */ if (type == R_SPARC_JMP_SLOT) return (0); - /* COPY relocs are also handled elsewhere */ + /* COPY relocs are also handled elsewhere. */ if (type == R_SPARC_COPY) return (0); @@ -319,11 +311,11 @@ reloc_nonplt_object(Obj_Entry *obj, cons value = rela->r_addend; /* - * Handle relative relocs here, because we might not - * be able to access globals yet. + * Handle relative relocs here, because we might not be able to access + * globals yet. */ if (type == R_SPARC_RELATIVE) { - /* XXXX -- apparently we ignore the preexisting value */ + /* XXXX -- apparently we ignore the preexisting value. */ *where = (Elf_Addr)(obj->relocbase + value); return (0); } @@ -333,14 +325,13 @@ reloc_nonplt_object(Obj_Entry *obj, cons * a non-local variable is accessed. */ if (RELOC_RESOLVE_SYMBOL(type)) { - - /* Find the symbol */ + /* Find the symbol. */ def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, false, cache); if (def == NULL) return (-1); - /* Add in the symbol's absolute address */ + /* Add in the symbol's absolute address. */ value += (Elf_Addr)(defobj->relocbase + def->st_value); } @@ -354,12 +345,12 @@ reloc_nonplt_object(Obj_Entry *obj, cons /* * Note that even though sparcs use `Elf_rela' exclusively * we still need the implicit memory addend in relocations - * referring to GOT entries. Undoubtedly, someone f*cked + * referring to GOT entries. Undoubtedly, someone f*cked * this up in the distant past, and now we're stuck with - * it in the name of compatibility for all eternity.. + * it in the name of compatibility for all eternity ... * * In any case, the implicit and explicit should be mutually - * exclusive. We provide a check for that here. + * exclusive. We provide a check for that here. */ /* XXXX -- apparently we ignore the preexisting value */ value += (Elf_Addr)(obj->relocbase); @@ -443,10 +434,9 @@ reloc_plt(Obj_Entry *obj) #define SETHIG5 0x0b000000 /* sethi %hi(0), %g5 */ #define ORG5 0x82804005 /* or %g1, %g5, %g1 */ - /* %hi(v) with variable shift */ #define HIVAL(v, s) (((v) >> (s)) & 0x003fffff) -#define LOVAL(v) ((v) & 0x000003ff) +#define LOVAL(v) ((v) & 0x000003ff) int reloc_jmpslots(Obj_Entry *obj) @@ -475,7 +465,7 @@ reloc_jmpslots(Obj_Entry *obj) Elf_Addr reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj, - const Obj_Entry *refobj, const Elf_Rel *rel) + const Obj_Entry *refobj, const Elf_Rel *rel) { const Elf_Rela *rela = (const Elf_Rela *)rel; Elf_Addr offset; @@ -511,7 +501,8 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr offset = ((Elf_Addr)where) - target; if (offset <= (1L<<20) && offset >= -(1L<<20)) { /* - * We're within 1MB -- we can use a direct branch insn. + * We're within 1MB -- we can use a direct branch + * instruction. * * We can generate this pattern: * @@ -594,7 +585,8 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr flush(where, 4); } else if (offset >= 0 && offset < (1L<<44)) { /* - * We're withing 44 bits. We can generate this pattern: + * We're withing 44 bits. We can generate this + * pattern: * * The resulting code in the jump slot is: * @@ -618,7 +610,8 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr flush(where, 4); } else if (offset < 0 && offset > -(1L<<44)) { /* - * We're withing 44 bits. We can generate this pattern: + * We're withing 44 bits. We can generate this + * pattern: * * The resulting code in the jump slot is: * @@ -673,7 +666,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr /* * This is a high PLT slot; the relocation offset specifies a * pointer that needs to be frobbed; no actual code needs to - * be modified. The pointer to be calculated needs the addend + * be modified. The pointer to be calculated needs the addend * added and the reference object relocation base subtraced. */ *wherep = target + rela->r_addend - @@ -732,21 +725,21 @@ install_plt(Elf_Word *pltgot, Elf_Addr p void allocate_initial_tls(Obj_Entry *objs) { - Elf_Addr* tpval; + Elf_Addr* tpval; - /* - * Fix the size of the static TLS block by using the maximum - * offset allocated so far and adding a bit for dynamic modules to - * use. - */ - tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA; - tpval = allocate_tls(objs, NULL, 3*sizeof(Elf_Addr), sizeof(Elf_Addr)); - __asm __volatile("mov %0, %%g7" : : "r" (tpval)); + /* + * Fix the size of the static TLS block by using the maximum offset + * allocated so far and adding a bit for dynamic modules to use. + */ + tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA; + tpval = allocate_tls(objs, NULL, 3 * sizeof(Elf_Addr), + sizeof(Elf_Addr)); + __asm __volatile("mov %0, %%g7" : : "r" (tpval)); } void *__tls_get_addr(tls_index *ti) { - register Elf_Addr** tp __asm__("%g7"); + register Elf_Addr** tp __asm__("%g7"); - return tls_get_addr_common(tp, ti->ti_module, ti->ti_offset); + return (tls_get_addr_common(tp, ti->ti_module, ti->ti_offset)); } Modified: stable/8/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/elf_machdep.c Wed Mar 23 22:08:01 2011 (r219939) +++ stable/8/sys/sparc64/sparc64/elf_machdep.c Wed Mar 23 22:33:29 2011 (r219940) @@ -15,13 +15,6 @@ * 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 @@ -35,7 +28,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * from: NetBSD: mdreloc.c,v 1.5 2001/04/25 12:24:51 kleink Exp + * from: NetBSD: mdreloc.c,v 1.42 2008/04/28 20:23:04 martin Exp */ #include @@ -149,20 +142,20 @@ elf64_dump_thread(struct thread *td __un * * the relocation is relative to the load address * */ -#define _RF_S 0x80000000 /* Resolve symbol */ -#define _RF_A 0x40000000 /* Use addend */ -#define _RF_P 0x20000000 /* Location relative */ -#define _RF_G 0x10000000 /* GOT offset */ -#define _RF_B 0x08000000 /* Load address relative */ -#define _RF_U 0x04000000 /* Unaligned */ +#define _RF_S 0x80000000 /* Resolve symbol */ +#define _RF_A 0x40000000 /* Use addend */ +#define _RF_P 0x20000000 /* Location relative */ +#define _RF_G 0x10000000 /* GOT offset */ +#define _RF_B 0x08000000 /* Load address relative */ +#define _RF_U 0x04000000 /* Unaligned */ #define _RF_X 0x02000000 /* Bare symbols, needs proc */ -#define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ -#define _RF_RS(s) ( (s) & 0xff) /* right shift */ +#define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ +#define _RF_RS(s) ( (s) & 0xff) /* right shift */ static const int reloc_target_flags[] = { 0, /* NONE */ - _RF_S|_RF_A| _RF_SZ(8) | _RF_RS(0), /* RELOC_8 */ - _RF_S|_RF_A| _RF_SZ(16) | _RF_RS(0), /* RELOC_16 */ - _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* RELOC_32 */ + _RF_S|_RF_A| _RF_SZ(8) | _RF_RS(0), /* 8 */ + _RF_S|_RF_A| _RF_SZ(16) | _RF_RS(0), /* 16 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* 32 */ _RF_S|_RF_A|_RF_P| _RF_SZ(8) | _RF_RS(0), /* DISP_8 */ _RF_S|_RF_A|_RF_P| _RF_SZ(16) | _RF_RS(0), /* DISP_16 */ _RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* DISP_32 */ @@ -220,58 +213,55 @@ static const int reloc_target_flags[] = #if 0 static const char *const reloc_names[] = { - "NONE", "RELOC_8", "RELOC_16", "RELOC_32", "DISP_8", - "DISP_16", "DISP_32", "WDISP_30", "WDISP_22", "HI22", - "22", "13", "LO10", "GOT10", "GOT13", - "GOT22", "PC10", "PC22", "WPLT30", "COPY", - "GLOB_DAT", "JMP_SLOT", "RELATIVE", "UA_32", "PLT32", - "HIPLT22", "LOPLT10", "LOPLT10", "PCPLT22", "PCPLT32", - "10", "11", "64", "OLO10", "HH22", - "HM10", "LM22", "PC_HH22", "PC_HM10", "PC_LM22", - "WDISP16", "WDISP19", "GLOB_JMP", "7", "5", "6", - "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44", + "NONE", "8", "16", "32", "DISP_8", "DISP_16", "DISP_32", "WDISP_30", + "WDISP_22", "HI22", "22", "13", "LO10", "GOT10", "GOT13", "GOT22", + "PC10", "PC22", "WPLT30", "COPY", "GLOB_DAT", "JMP_SLOT", "RELATIVE", + "UA_32", "PLT32", "HIPLT22", "LOPLT10", "LOPLT10", "PCPLT22", + "PCPLT32", "10", "11", "64", "OLO10", "HH22", "HM10", "LM22", + "PC_HH22", "PC_HM10", "PC_LM22", "WDISP16", "WDISP19", "GLOB_JMP", + "7", "5", "6", "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44", "L44", "REGISTER", "UA64", "UA16" }; #endif -#define RELOC_RESOLVE_SYMBOL(t) ((reloc_target_flags[t] & _RF_S) != 0) -#define RELOC_PC_RELATIVE(t) ((reloc_target_flags[t] & _RF_P) != 0) -#define RELOC_BASE_RELATIVE(t) ((reloc_target_flags[t] & _RF_B) != 0) -#define RELOC_UNALIGNED(t) ((reloc_target_flags[t] & _RF_U) != 0) -#define RELOC_USE_ADDEND(t) ((reloc_target_flags[t] & _RF_A) != 0) +#define RELOC_RESOLVE_SYMBOL(t) ((reloc_target_flags[t] & _RF_S) != 0) +#define RELOC_PC_RELATIVE(t) ((reloc_target_flags[t] & _RF_P) != 0) +#define RELOC_BASE_RELATIVE(t) ((reloc_target_flags[t] & _RF_B) != 0) +#define RELOC_UNALIGNED(t) ((reloc_target_flags[t] & _RF_U) != 0) +#define RELOC_USE_ADDEND(t) ((reloc_target_flags[t] & _RF_A) != 0) #define RELOC_BARE_SYMBOL(t) ((reloc_target_flags[t] & _RF_X) != 0) -#define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff) -#define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) +#define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff) +#define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) static const long reloc_target_bitmask[] = { -#define _BM(x) (~(-(1ULL << (x)))) +#define _BM(x) (~(-(1ULL << (x)))) 0, /* NONE */ - _BM(8), _BM(16), _BM(32), /* RELOC_8, _16, _32 */ + _BM(8), _BM(16), _BM(32), /* 8, 16, 32 */ _BM(8), _BM(16), _BM(32), /* DISP8, DISP16, DISP32 */ _BM(30), _BM(22), /* WDISP30, WDISP22 */ - _BM(22), _BM(22), /* HI22, _22 */ - _BM(13), _BM(10), /* RELOC_13, _LO10 */ + _BM(22), _BM(22), /* HI22, 22 */ + _BM(13), _BM(10), /* 13, LO10 */ _BM(10), _BM(13), _BM(22), /* GOT10, GOT13, GOT22 */ - _BM(10), _BM(22), /* _PC10, _PC22 */ - _BM(30), 0, /* _WPLT30, _COPY */ - _BM(32), _BM(32), _BM(32), /* _GLOB_DAT, JMP_SLOT, _RELATIVE */ - _BM(32), _BM(32), /* _UA32, PLT32 */ - _BM(22), _BM(10), /* _HIPLT22, LOPLT10 */ - _BM(32), _BM(22), _BM(10), /* _PCPLT32, _PCPLT22, _PCPLT10 */ - _BM(10), _BM(11), -1, /* _10, _11, _64 */ - _BM(13), _BM(22), /* _OLO10, _HH22 */ - _BM(10), _BM(22), /* _HM10, _LM22 */ - _BM(22), _BM(10), _BM(22), /* _PC_HH22, _PC_HM10, _PC_LM22 */ - _BM(16), _BM(19), /* _WDISP16, _WDISP19 */ + _BM(10), _BM(22), /* PC10, PC22 */ + _BM(30), 0, /* WPLT30, COPY */ + _BM(32), _BM(32), _BM(32), /* GLOB_DAT, JMP_SLOT, RELATIVE */ + _BM(32), _BM(32), /* UA32, PLT32 */ + _BM(22), _BM(10), /* HIPLT22, LOPLT10 */ + _BM(32), _BM(22), _BM(10), /* PCPLT32, PCPLT22, PCPLT10 */ + _BM(10), _BM(11), -1, /* 10, 11, 64 */ + _BM(13), _BM(22), /* OLO10, HH22 */ + _BM(10), _BM(22), /* HM10, LM22 */ + _BM(22), _BM(10), _BM(22), /* PC_HH22, PC_HM10, PC_LM22 */ + _BM(16), _BM(19), /* WDISP16, WDISP19 */ -1, /* GLOB_JMP */ - _BM(7), _BM(5), _BM(6) /* _7, _5, _6 */ + _BM(7), _BM(5), _BM(6), /* 7, 5, 6 */ -1, -1, /* DISP64, PLT64 */ _BM(22), _BM(13), /* HIX22, LOX10 */ _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ #undef _BM }; -#define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t]) +#define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t]) int elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 22:35:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A8D106567A; Wed, 23 Mar 2011 22:35:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14C8C8FC1B; Wed, 23 Mar 2011 22:35:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NMZICB009459; Wed, 23 Mar 2011 22:35:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NMZIGp009449; Wed, 23 Mar 2011 22:35:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103232235.p2NMZIGp009449@svn.freebsd.org> From: Marius Strobl Date: Wed, 23 Mar 2011 22:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219941 - in stable/8/sys: sparc64/include sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 22:35:19 -0000 Author: marius Date: Wed Mar 23 22:35:18 2011 New Revision: 219941 URL: http://svn.freebsd.org/changeset/base/219941 Log: MFC: r219608 Remove the advertising clause from the UCB license according to the July 22, 1999 addendum. Modified: stable/8/sys/sparc64/include/varargs.h stable/8/sys/sparc64/include/vmparam.h stable/8/sys/sparc64/sparc64/pmap.c stable/8/sys/sparc64/sparc64/trap.c stable/8/sys/sparc64/sparc64/vm_machdep.c stable/8/sys/sun4v/include/varargs.h stable/8/sys/sun4v/include/vmparam.h stable/8/sys/sun4v/sun4v/trap.c stable/8/sys/sun4v/sun4v/vm_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/include/varargs.h ============================================================================== --- stable/8/sys/sparc64/include/varargs.h Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sparc64/include/varargs.h Wed Mar 23 22:35:18 2011 (r219941) @@ -25,10 +25,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sparc64/include/vmparam.h ============================================================================== --- stable/8/sys/sparc64/include/vmparam.h Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sparc64/include/vmparam.h Wed Mar 23 22:35:18 2011 (r219941) @@ -15,10 +15,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sparc64/sparc64/pmap.c Wed Mar 23 22:35:18 2011 (r219941) @@ -18,10 +18,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/trap.c Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sparc64/sparc64/trap.c Wed Mar 23 22:35:18 2011 (r219941) @@ -15,10 +15,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/vm_machdep.c Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sparc64/sparc64/vm_machdep.c Wed Mar 23 22:35:18 2011 (r219941) @@ -17,10 +17,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sun4v/include/varargs.h ============================================================================== --- stable/8/sys/sun4v/include/varargs.h Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sun4v/include/varargs.h Wed Mar 23 22:35:18 2011 (r219941) @@ -25,10 +25,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sun4v/include/vmparam.h ============================================================================== --- stable/8/sys/sun4v/include/vmparam.h Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sun4v/include/vmparam.h Wed Mar 23 22:35:18 2011 (r219941) @@ -15,10 +15,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sun4v/sun4v/trap.c ============================================================================== --- stable/8/sys/sun4v/sun4v/trap.c Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sun4v/sun4v/trap.c Wed Mar 23 22:35:18 2011 (r219941) @@ -15,10 +15,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. Modified: stable/8/sys/sun4v/sun4v/vm_machdep.c ============================================================================== --- stable/8/sys/sun4v/sun4v/vm_machdep.c Wed Mar 23 22:33:29 2011 (r219940) +++ stable/8/sys/sun4v/sun4v/vm_machdep.c Wed Mar 23 22:35:18 2011 (r219941) @@ -17,10 +17,6 @@ * 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 University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 23:48:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D2F8106566B; Wed, 23 Mar 2011 23:48:45 +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 E66718FC16; Wed, 23 Mar 2011 23:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NNmip4011004; Wed, 23 Mar 2011 23:48:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NNmi0P011000; Wed, 23 Mar 2011 23:48:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103232348.p2NNmi0P011000@svn.freebsd.org> From: Adrian Chadd Date: Wed, 23 Mar 2011 23:48: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: r219942 - in head/sys/dev/ath: . ath_hal ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 23:48:45 -0000 Author: adrian Date: Wed Mar 23 23:48:44 2011 New Revision: 219942 URL: http://svn.freebsd.org/changeset/base/219942 Log: Make the ar2133ForceBias() call controllable at runtime. At least one AR5416 user has reported measurable throughput drops with this option. For now, disable it and make it a run-time twiddle. It won't take affect until the next radio programming trip though (eg channel scan, channel change.) Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar2133.c Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Wed Mar 23 22:35:18 2011 (r219941) +++ head/sys/dev/ath/ah_osdep.c Wed Mar 23 23:48:44 2011 (r219942) @@ -85,6 +85,11 @@ SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); #endif /* AH_DEBUG */ +int ath_hal_ar5416_biasadj = 0; +SYSCTL_INT(_hw_ath_hal, OID_AUTO, ar5416_biasadj, CTLFLAG_RW, + &ath_hal_debug, 0, "Enable 2ghz AR5416 direction sensitivity" + " bias adjust"); + /* NB: these are deprecated; they exist for now for compatibility */ int ath_hal_dma_beacon_response_time = 2; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, dma_brt, CTLFLAG_RW, Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed Mar 23 22:35:18 2011 (r219941) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed Mar 23 23:48:44 2011 (r219942) @@ -476,6 +476,7 @@ isBigEndian(void) extern int ath_hal_dma_beacon_response_time; /* in TU's */ extern int ath_hal_sw_beacon_response_time; /* in TU's */ extern int ath_hal_additional_swba_backoff; /* in TU's */ +extern int ath_hal_ar5416_biasadj; /* 1 or 0 */ /* wait for the register contents to have the specified value */ extern HAL_BOOL ath_hal_wait(struct ath_hal *, u_int reg, Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar2133.c Wed Mar 23 22:35:18 2011 (r219941) +++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c Wed Mar 23 23:48:44 2011 (r219942) @@ -185,7 +185,7 @@ ar2133SetChannel(struct ath_hal *ah, con } /* Workaround for hw bug - AR5416 specific */ - if (AR_SREV_OWL(ah)) + if (AR_SREV_OWL(ah) && ath_hal_ar5416_biasadj) ar2133ForceBias(ah, freq); reg32 = (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) | From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 00:29:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id DED85106567D; Thu, 24 Mar 2011 00:29:55 +0000 (UTC) Date: Thu, 24 Mar 2011 00:29:55 +0000 From: Alexander Best To: Xin LI Message-ID: <20110324002955.GA25594@freebsd.org> References: <201103232208.p2NM818d008805@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <201103232208.p2NM818d008805@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r219939 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 00:29:56 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed Mar 23 11, Xin LI wrote: > Author: delphij > Date: Wed Mar 23 22:08:01 2011 > New Revision: 219939 > URL: http://svn.freebsd.org/changeset/base/219939 > > Log: > humanize_number(3) multiply the input number by 100, which could cause an > integer overflow when the input is very large (for example, 100 Pi would > become about 10 Ei which exceeded signed int64_t). i think we should also change the humanize_number(3) manual page accordingly. here's a rough draft (date not bumped, yet). > > Solve this issue by splitting the division into two parts and avoid the > multiplication. > > PR: bin/146205 > Reviewed by: arundel > MFC after: 1 month > > Modified: > head/lib/libutil/humanize_number.c > > Modified: head/lib/libutil/humanize_number.c > ============================================================================== > --- head/lib/libutil/humanize_number.c Wed Mar 23 22:06:09 2011 (r219938) > +++ head/lib/libutil/humanize_number.c Wed Mar 23 22:08:01 2011 (r219939) > @@ -43,11 +43,11 @@ __FBSDID("$FreeBSD$"); > #include > > int > -humanize_number(char *buf, size_t len, int64_t bytes, > +humanize_number(char *buf, size_t len, int64_t quotient, > const char *suffix, int scale, int flags) > { > const char *prefixes, *sep; > - int b, i, r, maxscale, s1, s2, sign; > + int i, r, remainder, maxscale, s1, s2, sign; > int64_t divisor, max; > size_t baselen; > > @@ -55,6 +55,8 @@ humanize_number(char *buf, size_t len, i > assert(suffix != NULL); > assert(scale >= 0); > > + remainder = 0; > + > if (flags & HN_DIVISOR_1000) { > /* SI for decimal multiplies */ > divisor = 1000; > @@ -86,13 +88,12 @@ humanize_number(char *buf, size_t len, i > > if (len > 0) > buf[0] = '\0'; > - if (bytes < 0) { > + if (quotient < 0) { > sign = -1; > - bytes *= -100; > + quotient = -quotient; > baselen = 3; /* sign, digit, prefix */ > } else { > sign = 1; > - bytes *= 100; > baselen = 2; /* digit, prefix */ > } > if (flags & HN_NOSPACE) > @@ -109,7 +110,7 @@ humanize_number(char *buf, size_t len, i > > if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { > /* See if there is additional columns can be used. */ > - for (max = 100, i = len - baselen; i-- > 0;) > + for (max = 1, i = len - baselen; i-- > 0;) > max *= 10; > > /* > @@ -117,30 +118,37 @@ humanize_number(char *buf, size_t len, i > * If there will be an overflow by the rounding below, > * divide once more. > */ > - for (i = 0; bytes >= max - 50 && i < maxscale; i++) > - bytes /= divisor; > + for (i = 0; > + (quotient >= max || (quotient == max - 1 && remainder >= 950)) && > + i < maxscale; i++) { > + remainder = quotient % divisor; > + quotient /= divisor; > + } > > if (scale & HN_GETSCALE) > return (i); > - } else > - for (i = 0; i < scale && i < maxscale; i++) > - bytes /= divisor; > + } else { > + for (i = 0; i < scale && i < maxscale; i++) { > + remainder = quotient % divisor; > + quotient /= divisor; > + } > + } > > /* If a value <= 9.9 after rounding and ... */ > - if (bytes < 995 && i > 0 && flags & HN_DECIMAL) { > + if (quotient <= 9 && remainder < 950 && i > 0 && flags & HN_DECIMAL) { > /* baselen + \0 + .N */ > if (len < baselen + 1 + 2) > return (-1); > - b = ((int)bytes + 5) / 10; > - s1 = b / 10; > - s2 = b % 10; > + s1 = (int)quotient + ((remainder + 50) / 1000); > + s2 = ((remainder + 50) / 100) % 10; > r = snprintf(buf, len, "%d%s%d%s%s%s", > sign * s1, localeconv()->decimal_point, s2, > sep, SCALE2PREFIX(i), suffix); > } else > r = snprintf(buf, len, "%" PRId64 "%s%s%s", > - sign * ((bytes + 50) / 100), > + sign * (quotient + (remainder + 50) / 1000), > sep, SCALE2PREFIX(i), suffix); > > return (r); > } > + -- a13x --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="humanize_number.3.diff" diff --git a/lib/libutil/humanize_number.3 b/lib/libutil/humanize_number.3 index 82925ba..8741e23 100644 --- a/lib/libutil/humanize_number.3 +++ b/lib/libutil/humanize_number.3 @@ -40,14 +40,14 @@ .In libutil.h .Ft int .Fo humanize_number -.Fa "char *buf" "size_t len" "int64_t number" "const char *suffix" +.Fa "char *buf" "size_t len" "int64_t quotient" "const char *suffix" .Fa "int scale" "int flags" .Fc .Sh DESCRIPTION The .Fn humanize_number function formats the signed 64-bit quantity given in -.Fa number +.Fa quotient into .Fa buf . A space and then @@ -64,7 +64,7 @@ If the formatted number (including would be too long to fit into .Fa buf , then divide -.Fa number +.Fa quotient by 1024 until it will. In this case, prefix .Fa suffix @@ -106,7 +106,7 @@ The following flags may be passed in Format the buffer using the lowest multiplier possible. .It Dv HN_GETSCALE Return the prefix index number (the number of times -.Fa number +.Fa quotient must be divided to fit) instead of formatting it to the buffer. .El .Pp @@ -117,7 +117,7 @@ The following flags may be passed in If the final result is less than 10, display it using one digit. .It Dv HN_NOSPACE Do not put a space between -.Fa number +.Fa quotient and the prefix. .It Dv HN_B Use @@ -125,7 +125,7 @@ Use (bytes) as prefix if the original result does not have a prefix. .It Dv HN_DIVISOR_1000 Divide -.Fa number +.Fa quotient with 1000 instead of 1024. .El .Sh RETURN VALUES @@ -148,3 +148,7 @@ function first appeared in .Nx 2.0 and then in .Fx 5.3 . +.Sh CAVEATS +A +.Fa quotient +argument greater than or equal to 16 Exabyte cannot be humanized. --HlL+5n6rz5pIUxbD-- From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 00:42:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB64106566C; Thu, 24 Mar 2011 00:42:07 +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 5C1468FC12; Thu, 24 Mar 2011 00:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O0g7CF012116; Thu, 24 Mar 2011 00:42:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O0g713012111; Thu, 24 Mar 2011 00:42:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103240042.p2O0g713012111@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 24 Mar 2011 00:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219943 - stable/8/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 00:42:07 -0000 Author: kib Date: Thu Mar 24 00:42:07 2011 New Revision: 219943 URL: http://svn.freebsd.org/changeset/base/219943 Log: MFC r219713: Implement the usertime and systime keywords for ps, printing the corresponding times reported by getrusage(). Modified: stable/8/bin/ps/extern.h stable/8/bin/ps/keyword.c stable/8/bin/ps/print.c stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/extern.h ============================================================================== --- stable/8/bin/ps/extern.h Wed Mar 23 23:48:44 2011 (r219942) +++ stable/8/bin/ps/extern.h Thu Mar 24 00:42:07 2011 (r219943) @@ -79,12 +79,14 @@ int s_uname(KINFO *); void showkey(void); void started(KINFO *, VARENT *); void state(KINFO *, VARENT *); +void systime(KINFO *, VARENT *); void tdev(KINFO *, VARENT *); void tdnam(KINFO *, VARENT *); void tname(KINFO *, VARENT *); void ucomm(KINFO *, VARENT *); void uname(KINFO *, VARENT *); void upr(KINFO *, VARENT *); +void usertime(KINFO *, VARENT *); void vsize(KINFO *, VARENT *); void wchan(KINFO *, VARENT *); __END_DECLS Modified: stable/8/bin/ps/keyword.c ============================================================================== --- stable/8/bin/ps/keyword.c Wed Mar 23 23:48:44 2011 (r219942) +++ stable/8/bin/ps/keyword.c Thu Mar 24 00:42:07 2011 (r219943) @@ -186,6 +186,7 @@ static VAR var[] = { UINT, UIDFMT, 0}, {"svuid", "SVUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svuid), UINT, UIDFMT, 0}, + {"systime", "SYSTIME", NULL, USER, systime, NULL, 9, 0, CHAR, NULL, 0}, {"tdaddr", "TDADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2, KOFF(ki_tdaddr), KPTR, "lx", 0}, {"tdev", "TDEV", NULL, 0, tdev, NULL, 5, 0, CHAR, NULL, 0}, @@ -207,6 +208,8 @@ static VAR var[] = { KOFF(ki_paddr), KPTR, "lx", 0}, {"user", "USER", NULL, LJUST|DSIZ, uname, s_uname, USERLEN, 0, CHAR, NULL, 0}, + {"usertime", "USERTIME", NULL, USER, usertime, NULL, 9, 0, CHAR, NULL, + 0}, {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"vsize", "", "vsz", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"vsz", "VSZ", NULL, 0, vsize, NULL, 5, 0, CHAR, NULL, 0}, Modified: stable/8/bin/ps/print.c ============================================================================== --- stable/8/bin/ps/print.c Wed Mar 23 23:48:44 2011 (r219942) +++ stable/8/bin/ps/print.c Thu Mar 24 00:42:07 2011 (r219943) @@ -548,12 +548,11 @@ vsize(KINFO *k, VARENT *ve) (void)printf("%*lu", v->width, (u_long)(k->ki_p->ki_size / 1024)); } -void -cputime(KINFO *k, VARENT *ve) +static void +printtime(KINFO *k, VARENT *ve, long secs, long psecs) +/* psecs is "parts" of a second. first micro, then centi */ { VAR *v; - long secs; - long psecs; /* "parts" of a second. first micro, then centi */ char obuff[128]; static char decimal_point; @@ -564,20 +563,7 @@ cputime(KINFO *k, VARENT *ve) secs = 0; psecs = 0; } else { - /* - * This counts time spent handling interrupts. We could - * fix this, but it is not 100% trivial (and interrupt - * time fractions only work on the sparc anyway). XXX - */ - secs = k->ki_p->ki_runtime / 1000000; - psecs = k->ki_p->ki_runtime % 1000000; - if (sumrusage) { - secs += k->ki_p->ki_childtime.tv_sec; - psecs += k->ki_p->ki_childtime.tv_usec; - } - /* - * round and scale to 100's - */ + /* round and scale to 100's */ psecs = (psecs + 5000) / 10000; secs += psecs / 100; psecs = psecs % 100; @@ -588,6 +574,53 @@ cputime(KINFO *k, VARENT *ve) } void +cputime(KINFO *k, VARENT *ve) +{ + long secs, psecs; + + /* + * This counts time spent handling interrupts. We could + * fix this, but it is not 100% trivial (and interrupt + * time fractions only work on the sparc anyway). XXX + */ + secs = k->ki_p->ki_runtime / 1000000; + psecs = k->ki_p->ki_runtime % 1000000; + if (sumrusage) { + secs += k->ki_p->ki_childtime.tv_sec; + psecs += k->ki_p->ki_childtime.tv_usec; + } + printtime(k, ve, secs, psecs); +} + +void +systime(KINFO *k, VARENT *ve) +{ + long secs, psecs; + + secs = k->ki_p->ki_rusage.ru_stime.tv_sec; + psecs = k->ki_p->ki_rusage.ru_stime.tv_usec; + if (sumrusage) { + secs += k->ki_p->ki_childstime.tv_sec; + psecs += k->ki_p->ki_childstime.tv_usec; + } + printtime(k, ve, secs, psecs); +} + +void +usertime(KINFO *k, VARENT *ve) +{ + long secs, psecs; + + secs = k->ki_p->ki_rusage.ru_utime.tv_sec; + psecs = k->ki_p->ki_rusage.ru_utime.tv_usec; + if (sumrusage) { + secs += k->ki_p->ki_childutime.tv_sec; + psecs += k->ki_p->ki_childutime.tv_usec; + } + printtime(k, ve, secs, psecs); +} + +void elapsed(KINFO *k, VARENT *ve) { VAR *v; Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Wed Mar 23 23:48:44 2011 (r219942) +++ stable/8/bin/ps/ps.1 Thu Mar 24 00:42:07 2011 (r219943) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 24, 2010 +.Dd March 16, 2011 .Dt PS 1 .Os .Sh NAME @@ -205,8 +205,8 @@ Display information about processes whic Sort by current CPU usage, instead of the combination of controlling terminal and process ID. .It Fl S -Change the way the process time is calculated by summing all exited -children to their parent process. +Change the way the process times, namely cputime, systime, and usertime, +are calculated by summing all exited children to their parent process. .It Fl T Display information about processes attached to the device associated with the standard input. @@ -587,6 +587,8 @@ symbolic process state (alias saved gid from a setgid executable .It Cm svuid saved UID from a setuid executable +.It Cm systime +accumulated system CPU time .It Cm tdaddr thread address .It Cm tdev @@ -617,6 +619,8 @@ scheduling priority on return from syste .Cm usrpri ) .It Cm user user name (from UID) +.It Cm usertime +accumulated user CPU time .It Cm vsz virtual size in Kbytes (alias .Cm vsize ) From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 01:03:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D421F1065673; Thu, 24 Mar 2011 01:03:01 +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 C3FE68FC18; Thu, 24 Mar 2011 01:03:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O131DG012686; Thu, 24 Mar 2011 01:03:01 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O131C9012682; Thu, 24 Mar 2011 01:03:01 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103240103.p2O131C9012682@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 24 Mar 2011 01:03: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: r219944 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 01:03:01 -0000 Author: np Date: Thu Mar 24 01:03:01 2011 New Revision: 219944 URL: http://svn.freebsd.org/changeset/base/219944 Log: Do not over-allocate MSI interrupts for the case where each ingress queue has its own interrupt. If the exact number that we need is not a power of 2 and we're using MSI, then switch to interrupt multiplexing. While here, replace the magic numbers with something more readable. MFC after: 3 days Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Mar 24 00:42:07 2011 (r219943) +++ head/sys/dev/cxgbe/adapter.h Thu Mar 24 01:03:01 2011 (r219944) @@ -128,6 +128,13 @@ enum { }; enum { + /* adapter intr_type */ + INTR_INTX = (1 << 0), + INTR_MSI = (1 << 1), + INTR_MSIX = (1 << 2) +}; + +enum { /* adapter flags */ FULL_INIT_DONE = (1 << 0), FW_OK = (1 << 1), Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Mar 24 00:42:07 2011 (r219943) +++ head/sys/dev/cxgbe/t4_main.c Thu Mar 24 01:03:01 2011 (r219944) @@ -205,7 +205,7 @@ SYSCTL_UINT(_hw_cxgbe, OID_AUTO, qsize_r /* * Interrupt types allowed. */ -static int intr_types = 7; +static int intr_types = INTR_MSIX | INTR_MSI | INTR_INTX; TUNABLE_INT("hw.cxgbe.interrupt_types", &intr_types); SYSCTL_UINT(_hw_cxgbe, OID_AUTO, interrupt_types, CTLFLAG_RDTUN, &intr_types, 0, "interrupt types allowed (bits 0, 1, 2 = INTx, MSI, MSI-X respectively)"); @@ -219,7 +219,7 @@ SYSCTL_UINT(_hw_cxgbe, OID_AUTO, interru &intr_fwd, 0, "always use forwarded interrupts"); struct intrs_and_queues { - int intr_type; /* 1, 2, or 4 for INTx, MSI, or MSI-X */ + int intr_type; /* INTx, MSI, or MSI-X */ int nirq; /* Number of vectors */ int intr_fwd; /* Interrupts forwarded */ int ntxq10g; /* # of NIC txq's for each 10G port */ @@ -639,7 +639,7 @@ t4_detach(device_t dev) if (sc->flags & FW_OK) t4_fw_bye(sc, sc->mbox); - if (sc->intr_type == 2 || sc->intr_type == 4) + if (sc->intr_type == INTR_MSI || sc->intr_type == INTR_MSIX) pci_release_msi(dev); if (sc->regs_res) @@ -1152,14 +1152,14 @@ cfg_itype_and_nqueues(struct adapter *sc bzero(iaq, sizeof(*iaq)); nc = mp_ncpus; /* our snapshot of the number of CPUs */ - for (itype = 4; itype; itype >>= 1) { + for (itype = INTR_MSIX; itype; itype >>= 1) { if ((itype & intr_types) == 0) continue; /* not allowed */ - if (itype == 4) + if (itype == INTR_MSIX) navail = pci_msix_count(sc->dev); - else if (itype == 2) + else if (itype == INTR_MSI) navail = pci_msi_count(sc->dev); else navail = 1; @@ -1179,44 +1179,50 @@ cfg_itype_and_nqueues(struct adapter *sc iaq->nirq = n10g * nrxq10g + n1g * nrxq1g + 2; if (iaq->nirq <= navail && intr_fwd == 0) { + if (itype == INTR_MSI && !powerof2(iaq->nirq)) + goto fwd; + /* One for err, one for fwq, and one for each rxq */ iaq->intr_fwd = 0; iaq->nrxq10g = nrxq10g; iaq->nrxq1g = nrxq1g; - if (itype == 2) { - /* # of vectors requested must be power of 2 */ - while (!powerof2(iaq->nirq)) - iaq->nirq++; - KASSERT(iaq->nirq <= navail, - ("%s: bad MSI calculation", __func__)); - } + } else { fwd: iaq->intr_fwd = 1; - iaq->nirq = navail; + + if (navail > nc) { + if (itype == INTR_MSIX) + navail = nc + 1; + + /* navail is and must remain a pow2 for MSI */ + if (itype == INTR_MSI) { + KASSERT(powerof2(navail), + ("%d not power of 2", navail)); + + while (navail / 2 > nc) + navail /= 2; + } + } + iaq->nirq = navail; /* total # of interrupts */ /* * If we have multiple vectors available reserve one * exclusively for errors. The rest will be shared by * the fwq and data. */ - if (navail > 1) { + if (navail > 1) navail--; - - if (navail > nc && itype == 4) - iaq->nirq = nc + 1; - } - iaq->nrxq10g = min(nrxq10g, navail); iaq->nrxq1g = min(nrxq1g, navail); } navail = iaq->nirq; rc = 0; - if (itype == 4) + if (itype == INTR_MSIX) rc = pci_alloc_msix(sc->dev, &navail); - else if (itype == 2) + else if (itype == INTR_MSI) rc = pci_alloc_msi(sc->dev, &navail); if (rc == 0) { @@ -1481,10 +1487,10 @@ t4_set_desc(struct adapter *sc) struct adapter_params *p = &sc->params; snprintf(buf, sizeof(buf), - "Chelsio %s (rev %d) %d port %sNIC PCIe-x%d %s, S/N:%s, E/C:%s", + "Chelsio %s (rev %d) %d port %sNIC PCIe-x%d %d %s, S/N:%s, E/C:%s", p->vpd.id, p->rev, p->nports, is_offload(sc) ? "R" : "", - p->pci.width, (sc->intr_type == 4 ) ? "MSI-X" : - (sc->intr_type == 2) ? "MSI" : "INTx", p->vpd.sn, p->vpd.ec); + p->pci.width, sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : + (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), p->vpd.sn, p->vpd.ec); device_set_desc_copy(sc->dev, buf); } Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Mar 24 00:42:07 2011 (r219943) +++ head/sys/dev/cxgbe/t4_sge.c Thu Mar 24 01:03:01 2011 (r219944) @@ -468,7 +468,7 @@ t4_intr_err(void *arg) { struct adapter *sc = arg; - if (sc->intr_type == 1) + if (sc->intr_type == INTR_INTX) t4_write_reg(sc, MYPF_REG(A_PCIE_PF_CLI), 0); t4_slow_intr_handler(sc); From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 01:13:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 888C71065670; Thu, 24 Mar 2011 01:13:28 +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 785078FC19; Thu, 24 Mar 2011 01:13:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O1DSbY012918; Thu, 24 Mar 2011 01:13:28 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O1DSX9012916; Thu, 24 Mar 2011 01:13:28 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103240113.p2O1DSX9012916@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 24 Mar 2011 01:13: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: r219945 - head/sys/dev/cxgb/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 01:13:28 -0000 Author: np Date: Thu Mar 24 01:13:28 2011 New Revision: 219945 URL: http://svn.freebsd.org/changeset/base/219945 Log: T3C initialization should setup the parity fence too. MFC after: 1 week Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Thu Mar 24 01:03:01 2011 (r219944) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Thu Mar 24 01:13:28 2011 (r219945) @@ -1750,6 +1750,7 @@ static int t3_handle_intr_status(adapter fatal++; CH_ALERT(adapter, "%s (0x%x)\n", acts->msg, status & acts->mask); + status &= ~acts->mask; } else if (acts->msg) CH_WARN(adapter, "%s (0x%x)\n", acts->msg, status & acts->mask); @@ -2189,11 +2190,10 @@ static int mac_intr_handler(adapter_t *a t3_os_link_intr(pi); } - t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause); - if (cause & XGM_INTR_FATAL) t3_fatal_err(adap); + t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause); return cause != 0; } @@ -4189,6 +4189,7 @@ int t3_init_hw(adapter_t *adapter, u32 f t3_write_reg(adapter, A_PM1_TX_MODE, 0); chan_init_hw(adapter, adapter->params.chan_map); t3_sge_init(adapter, &adapter->params.sge); + t3_set_reg_field(adapter, A_PL_RST, 0, F_FATALPERREN); t3_write_reg(adapter, A_T3DBG_GPIO_ACT_LOW, calc_gpio_intr(adapter)); From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 01:16:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214C2106564A; Thu, 24 Mar 2011 01:16:49 +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 EAF668FC17; Thu, 24 Mar 2011 01:16:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O1Gme1013027; Thu, 24 Mar 2011 01:16:48 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O1Gm2V013023; Thu, 24 Mar 2011 01:16:48 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103240116.p2O1Gm2V013023@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 24 Mar 2011 01:16: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: r219946 - head/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 01:16:49 -0000 Author: np Date: Thu Mar 24 01:16:48 2011 New Revision: 219946 URL: http://svn.freebsd.org/changeset/base/219946 Log: t3_free_sge_resources should be given the number of qsets it needs to free. MFC after: 1 week Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Thu Mar 24 01:13:28 2011 (r219945) +++ head/sys/dev/cxgb/cxgb_adapter.h Thu Mar 24 01:16:48 2011 (r219946) @@ -510,7 +510,7 @@ int t3_sge_alloc(struct adapter *); int t3_sge_free(struct adapter *); int t3_sge_alloc_qset(adapter_t *, uint32_t, int, int, const struct qset_params *, int, struct port_info *); -void t3_free_sge_resources(adapter_t *); +void t3_free_sge_resources(adapter_t *, int); void t3_sge_start(adapter_t *); void t3_sge_stop(adapter_t *); void t3b_intr(void *data); Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Thu Mar 24 01:13:28 2011 (r219945) +++ head/sys/dev/cxgb/cxgb_main.c Thu Mar 24 01:16:48 2011 (r219946) @@ -717,7 +717,7 @@ cxgb_controller_detach(device_t dev) static void cxgb_free(struct adapter *sc) { - int i; + int i, nqsets = 0; ADAPTER_LOCK(sc); sc->flags |= CXGB_SHUTDOWN; @@ -731,6 +731,7 @@ cxgb_free(struct adapter *sc) if (sc->portdev[i] && device_delete_child(sc->dev, sc->portdev[i]) != 0) device_printf(sc->dev, "failed to delete child port\n"); + nqsets += sc->port[i].nqsets; } /* @@ -756,7 +757,7 @@ cxgb_free(struct adapter *sc) * sysctls are cleaned up by the kernel linker. */ if (sc->flags & FULL_INIT_DONE) { - t3_free_sge_resources(sc); + t3_free_sge_resources(sc, nqsets); sc->flags &= ~FULL_INIT_DONE; } @@ -842,9 +843,9 @@ setup_sge_qsets(adapter_t *sc) (sc->flags & USING_MSIX) ? qset_idx + 1 : irq_idx, &sc->params.sge.qset[qset_idx], ntxq, pi); if (err) { - t3_free_sge_resources(sc); - device_printf(sc->dev, "t3_sge_alloc_qset failed with %d\n", - err); + t3_free_sge_resources(sc, qset_idx); + device_printf(sc->dev, + "t3_sge_alloc_qset failed with %d\n", err); return (err); } } Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Thu Mar 24 01:13:28 2011 (r219945) +++ head/sys/dev/cxgb/cxgb_sge.c Thu Mar 24 01:16:48 2011 (r219946) @@ -2092,18 +2092,14 @@ t3_free_qset(adapter_t *sc, struct sge_q * Frees resources used by the SGE queue sets. */ void -t3_free_sge_resources(adapter_t *sc) +t3_free_sge_resources(adapter_t *sc, int nqsets) { - int i, nqsets; - - for (nqsets = i = 0; i < (sc)->params.nports; i++) - nqsets += sc->port[i].nqsets; + int i; for (i = 0; i < nqsets; ++i) { TXQ_LOCK(&sc->sge.qs[i]); t3_free_qset(sc, &sc->sge.qs[i]); } - } /** From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 01:32:04 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2416106564A; Thu, 24 Mar 2011 01:32:04 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 33AF48FC13; Thu, 24 Mar 2011 01:32:04 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id C8BE1A800CE; Thu, 24 Mar 2011 09:32:02 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id mGGDQDItiEFE; Thu, 24 Mar 2011 09:31:52 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 44A5BA800C1; Thu, 24 Mar 2011 09:31:49 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=TVyYm+ZUX5MSB6rSFCvkpcYMxj8VByK/LfIh9lFqcC9jP63gSLyM6iNco9Xr7uVnh X66Mod35QMD5NNjRBC/5A== Message-ID: <4D8A9F02.6000408@delphij.net> Date: Wed, 23 Mar 2011 18:31:46 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: Alexander Best References: <201103232208.p2NM818d008805@svn.freebsd.org> <20110324002955.GA25594@freebsd.org> In-Reply-To: <20110324002955.GA25594@freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.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, Xin LI Subject: Re: svn commit: r219939 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 01:32:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, On 03/23/11 17:29, Alexander Best wrote: > On Wed Mar 23 11, Xin LI wrote: >> Author: delphij >> Date: Wed Mar 23 22:08:01 2011 >> New Revision: 219939 >> URL: http://svn.freebsd.org/changeset/base/219939 >> >> Log: >> humanize_number(3) multiply the input number by 100, which could cause an >> integer overflow when the input is very large (for example, 100 Pi would >> become about 10 Ei which exceeded signed int64_t). > > i think we should also change the humanize_number(3) manual page accordingly. > here's a rough draft (date not bumped, yet). I think matching the variables within source code would not be necessary - -- I think it's much more clear to the reader of the manual page when the parameter called "number" and not "quotient" when the function is called "humanize_number". I am not sure about the CAVEATS part though, to me, it's kinda obvious since a parameter of signed int64_t can represent only a maximum number of INT64_MAX and a minimum number of INT64_MIN, and I think we don't document these explicitly for other manual pages. Personally I am inclined not to document this as limitation at all but would not object doing so. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJNip8CAAoJEATO+BI/yjfBz3YH/3YDlfvf8Bty6NeBnk3CyxjE skeaowGWIG5/gQ73zXfc1KTBEr5CobNLZWxuvGnXGCfMdATypRQR+5yQt366tQNK oDvd60tMofztH6rtrBt9b/td2mIoQAfX9Mc0X9ri69LgkExXVQBxqAcxkYxVadGm r+nAkhZjpaHdz20eDXbQg7wDXd3iGEBYx1wagMIBLtVeJL0GFKABXIHiZfbcBU9S tZNlXpeF3SXqOIql9KEeJ9+Zq8neU2sE7J1y3Jph4j8kkN39CABzNNKUHH7KLl7/ mD9mPKxILulDMkropntEU3G7uE2Y1Ax9o7PcjMbd509/bpzZK2SP4t28VSQg1/8= =ODAn -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 04:57:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F2701065676; Thu, 24 Mar 2011 04:57:35 +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 6DF0C8FC12; Thu, 24 Mar 2011 04:57:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O4vZlg017966; Thu, 24 Mar 2011 04:57:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O4vZlf017964; Thu, 24 Mar 2011 04:57:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103240457.p2O4vZlf017964@svn.freebsd.org> From: Adrian Chadd Date: Thu, 24 Mar 2011 04:57: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: r219948 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 04:57:35 -0000 Author: adrian Date: Thu Mar 24 04:57:35 2011 New Revision: 219948 URL: http://svn.freebsd.org/changeset/base/219948 Log: Fix a completely wrong variable reference. Modified: head/sys/dev/ath/ah_osdep.c Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Thu Mar 24 01:24:35 2011 (r219947) +++ head/sys/dev/ath/ah_osdep.c Thu Mar 24 04:57:35 2011 (r219948) @@ -87,7 +87,7 @@ TUNABLE_INT("hw.ath.hal.debug", &ath_hal int ath_hal_ar5416_biasadj = 0; SYSCTL_INT(_hw_ath_hal, OID_AUTO, ar5416_biasadj, CTLFLAG_RW, - &ath_hal_debug, 0, "Enable 2ghz AR5416 direction sensitivity" + &ath_hal_ar5416_biasadj, 0, "Enable 2ghz AR5416 direction sensitivity" " bias adjust"); /* NB: these are deprecated; they exist for now for compatibility */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 06:40:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41704106566B; Thu, 24 Mar 2011 06:40:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 10B3C8FC1B; Thu, 24 Mar 2011 06:40:46 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p2O6ei3I082122 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 23 Mar 2011 23:40:45 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4D8AE77D.9030005@freebsd.org> Date: Wed, 23 Mar 2011 23:41:01 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: John Baldwin References: <201103180647.p2I6lNCB051745@svn.freebsd.org> <4D831A82.7070308@freebsd.org> <201103230945.37726.jhb@freebsd.org> In-Reply-To: <201103230945.37726.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r219727 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 06:40:47 -0000 On 3/23/11 6:45 AM, John Baldwin wrote: > On Friday, March 18, 2011 4:40:34 am Julian Elischer wrote: >> > Err, no, that has never been true. The reason it has to go on the list > immediately is to reserve the PID against concurrent fork()s. > I'm petty sure it was true at one stage. probably around the time I added threads, (2001?) because I distinctly remember having to get everything set up and THEN putting in into the list. Pid allocation was done some other way than having the process in the list but I forget the details. From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 07:59:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133E710656E4; Thu, 24 Mar 2011 07:59:22 +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 0526A8FC16; Thu, 24 Mar 2011 07:59:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O7xLKx021660; Thu, 24 Mar 2011 07:59:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O7xLHw021658; Thu, 24 Mar 2011 07:59:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201103240759.p2O7xLHw021658@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 24 Mar 2011 07:59: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: r219949 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 07:59:22 -0000 Author: hselasky Date: Thu Mar 24 07:59:21 2011 New Revision: 219949 URL: http://svn.freebsd.org/changeset/base/219949 Log: Fix typo. Reported by: Garrett Cooper MFC after: 14 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Thu Mar 24 04:57:35 2011 (r219948) +++ head/sys/dev/usb/controller/ehci.c Thu Mar 24 07:59:21 2011 (r219949) @@ -1189,7 +1189,7 @@ ehci_data_toggle_update(struct usb_xfer /* count number of full packets */ dt = (actlen / xfer->max_packet_size) & 1; - /* cumpute remainder */ + /* compute remainder */ rem = actlen % xfer->max_packet_size; if (rem > 0) From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 08:37:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE575106566C; Thu, 24 Mar 2011 08:37:48 +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 D4EB58FC16; Thu, 24 Mar 2011 08:37:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O8bmXZ022670; Thu, 24 Mar 2011 08:37:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O8bmKh022666; Thu, 24 Mar 2011 08:37:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201103240837.p2O8bmKh022666@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Mar 2011 08:37: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: r219950 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 08:37:49 -0000 Author: mav Date: Thu Mar 24 08:37:48 2011 New Revision: 219950 URL: http://svn.freebsd.org/changeset/base/219950 Log: MFgraid/head r217827: Change BIO_GETATTR("GEOM::kerneldump") API to make set_dumper() called by consumer (geom_dev) instead of provider (geom_disk). This allows any geom insert it's code into the dump call chain, implementing more sophisticated functionality then just disk partitioning. Modified: head/sys/geom/geom.h head/sys/geom/geom_dev.c head/sys/geom/geom_disk.c Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Thu Mar 24 07:59:21 2011 (r219949) +++ head/sys/geom/geom.h Thu Mar 24 08:37:48 2011 (r219950) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -303,6 +304,7 @@ extern struct sx topology_lock; struct g_kerneldump { off_t offset; off_t length; + struct dumperinfo di; }; MALLOC_DECLARE(M_GEOM); Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Mar 24 07:59:21 2011 (r219949) +++ head/sys/geom/geom_dev.c Thu Mar 24 08:37:48 2011 (r219950) @@ -289,8 +289,11 @@ g_dev_ioctl(struct cdev *dev, u_long cmd kd.length = OFF_MAX; i = sizeof kd; error = g_io_getattr("GEOM::kerneldump", cp, &i, &kd); - if (!error) - dev->si_flags |= SI_DUMPDEV; + if (!error) { + error = set_dumper(&kd.di); + if (!error) + dev->si_flags |= SI_DUMPDEV; + } break; case DIOCGFLUSH: error = g_io_flush(cp); Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Thu Mar 24 07:59:21 2011 (r219949) +++ head/sys/geom/geom_disk.c Thu Mar 24 08:37:48 2011 (r219950) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -163,10 +162,8 @@ g_disk_access(struct g_provider *pp, int static void g_disk_kerneldump(struct bio *bp, struct disk *dp) -{ - int error; +{ struct g_kerneldump *gkd; - struct dumperinfo di; struct g_geom *gp; gkd = (struct g_kerneldump*)bp->bio_data; @@ -177,16 +174,15 @@ g_disk_kerneldump(struct bio *bp, struct g_io_deliver(bp, ENODEV); return; } - di.dumper = dp->d_dump; - di.priv = dp; - di.blocksize = dp->d_sectorsize; - di.maxiosize = dp->d_maxsize; - di.mediaoffset = gkd->offset; + gkd->di.dumper = dp->d_dump; + gkd->di.priv = dp; + gkd->di.blocksize = dp->d_sectorsize; + gkd->di.maxiosize = dp->d_maxsize; + gkd->di.mediaoffset = gkd->offset; if ((gkd->offset + gkd->length) > dp->d_mediasize) gkd->length = dp->d_mediasize - gkd->offset; - di.mediasize = gkd->length; - error = set_dumper(&di); - g_io_deliver(bp, error); + gkd->di.mediasize = gkd->length; + g_io_deliver(bp, 0); } static void From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 08:47:19 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 1233) id 804981065679; Thu, 24 Mar 2011 08:47:19 +0000 (UTC) Date: Thu, 24 Mar 2011 08:47:19 +0000 From: Alexander Best To: d@delphij.net Message-ID: <20110324084719.GA79493@freebsd.org> References: <201103232208.p2NM818d008805@svn.freebsd.org> <20110324002955.GA25594@freebsd.org> <4D8A9F02.6000408@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D8A9F02.6000408@delphij.net> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r219939 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 08:47:19 -0000 On Wed Mar 23 11, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Hi, > > On 03/23/11 17:29, Alexander Best wrote: > > On Wed Mar 23 11, Xin LI wrote: > >> Author: delphij > >> Date: Wed Mar 23 22:08:01 2011 > >> New Revision: 219939 > >> URL: http://svn.freebsd.org/changeset/base/219939 > >> > >> Log: > >> humanize_number(3) multiply the input number by 100, which could cause an > >> integer overflow when the input is very large (for example, 100 Pi would > >> become about 10 Ei which exceeded signed int64_t). > > > > i think we should also change the humanize_number(3) manual page accordingly. > > here's a rough draft (date not bumped, yet). > > I think matching the variables within source code would not be necessary > - -- I think it's much more clear to the reader of the manual page when > the parameter called "number" and not "quotient" when the function is > called "humanize_number". > > I am not sure about the CAVEATS part though, to me, it's kinda obvious > since a parameter of signed int64_t can represent only a maximum number > of INT64_MAX and a minimum number of INT64_MIN, and I think we don't > document these explicitly for other manual pages. Personally I am > inclined not to document this as limitation at all but would not object > doing so. those are very good arguments. you have me convinced. let's keep the manual the way it is. more so i think both your assumptions are very well suited to become a style(9) entry. i've also thought about the difference between the base 2 and base 10 values. according to the official docs we should refer to base 2 values as Ki, Mi, etc. however i don't hink this is implementable, since too much code would need to be changed. the actual problem i see is that from the output of df(1) e.g. one cannot know if base 2 or base 10 is implied. cheers. alex > > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.17 (FreeBSD) > > iQEcBAEBCAAGBQJNip8CAAoJEATO+BI/yjfBz3YH/3YDlfvf8Bty6NeBnk3CyxjE > skeaowGWIG5/gQ73zXfc1KTBEr5CobNLZWxuvGnXGCfMdATypRQR+5yQt366tQNK > oDvd60tMofztH6rtrBt9b/td2mIoQAfX9Mc0X9ri69LgkExXVQBxqAcxkYxVadGm > r+nAkhZjpaHdz20eDXbQg7wDXd3iGEBYx1wagMIBLtVeJL0GFKABXIHiZfbcBU9S > tZNlXpeF3SXqOIql9KEeJ9+Zq8neU2sE7J1y3Jph4j8kkN39CABzNNKUHH7KLl7/ > mD9mPKxILulDMkropntEU3G7uE2Y1Ax9o7PcjMbd509/bpzZK2SP4t28VSQg1/8= > =ODAn > -----END PGP SIGNATURE----- -- a13x From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 08:56:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3356106564A; Thu, 24 Mar 2011 08:56:12 +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 D49CC8FC08; Thu, 24 Mar 2011 08:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2O8uC8h023116; Thu, 24 Mar 2011 08:56:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2O8uC8L023113; Thu, 24 Mar 2011 08:56:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201103240856.p2O8uC8L023113@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Mar 2011 08:56: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: r219951 - head/sys/dev/led X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 08:56:13 -0000 Author: mav Date: Thu Mar 24 08:56:12 2011 New Revision: 219951 URL: http://svn.freebsd.org/changeset/base/219951 Log: MFgraid/head r218174: Add simple in-kernel API for controlling leds. Modified: head/sys/dev/led/led.c head/sys/dev/led/led.h Modified: head/sys/dev/led/led.c ============================================================================== --- head/sys/dev/led/led.c Thu Mar 24 08:37:48 2011 (r219950) +++ head/sys/dev/led/led.c Thu Mar 24 08:56:12 2011 (r219951) @@ -26,6 +26,7 @@ __FBSDID("$FreeBSD$"); struct ledsc { LIST_ENTRY(ledsc) list; + char *name; void *private; int unit; led_t *func; @@ -83,71 +84,43 @@ led_timeout(void *p) } static int -led_state(struct cdev *dev, struct sbuf *sb, int state) +led_state(struct ledsc *sc, struct sbuf **sb, int state) { struct sbuf *sb2 = NULL; - struct ledsc *sc; - mtx_lock(&led_mtx); - sc = dev->si_drv1; - if (sc != NULL) { - sb2 = sc->spec; - sc->spec = sb; - if (sb != NULL) { - sc->str = sbuf_data(sb); - sc->ptr = sc->str; - } else { - sc->str = NULL; - sc->ptr = NULL; - sc->func(sc->private, state); - } - sc->count = 0; + sb2 = sc->spec; + sc->spec = *sb; + if (*sb != NULL) { + sc->str = sbuf_data(*sb); + sc->ptr = sc->str; + } else { + sc->str = NULL; + sc->ptr = NULL; + sc->func(sc->private, state); } - mtx_unlock(&led_mtx); - if (sb2 != NULL) - sbuf_delete(sb2); - if (sc == NULL) - return (ENXIO); + sc->count = 0; + *sb = sb2; return(0); } static int -led_write(struct cdev *dev, struct uio *uio, int ioflag) +led_parse(const char *s, struct sbuf **sb, int *state) { - int error; - char *s, *s2; - struct sbuf *sb = NULL; - int i; - - if (dev->si_drv1 == NULL) - return (ENXIO); - - if (uio->uio_resid > 512) - return (EINVAL); - s2 = s = malloc(uio->uio_resid + 1, M_DEVBUF, M_WAITOK); - s[uio->uio_resid] = '\0'; - error = uiomove(s, uio->uio_resid, uio); - if (error) { - free(s2, M_DEVBUF); - return (error); - } + int i, error; /* * Handle "on" and "off" immediately so people can flash really * fast from userland if they want to */ if (*s == '0' || *s == '1') { - error = led_state(dev, NULL, *s & 1); - free(s2, M_DEVBUF); - return(error); + *state = *s & 1; + return (0); } - sb = sbuf_new_auto(); - if (sb == NULL) { - free(s2, M_DEVBUF); + *state = 0; + *sb = sbuf_new_auto(); + if (*sb == NULL) return (ENOMEM); - } - switch(s[0]) { /* * Flash, default is 100msec/100msec. @@ -158,7 +131,7 @@ led_write(struct cdev *dev, struct uio * i = s[1] - '1'; else i = 0; - sbuf_printf(sb, "%c%c", 'A' + i, 'a' + i); + sbuf_printf(*sb, "%c%c", 'A' + i, 'a' + i); break; /* * Digits, flashes out numbers. @@ -172,10 +145,10 @@ led_write(struct cdev *dev, struct uio * if (i == 0) i = 10; for (; i > 1; i--) - sbuf_cat(sb, "Aa"); - sbuf_cat(sb, "Aj"); + sbuf_cat(*sb, "Aa"); + sbuf_cat(*sb, "Aj"); } - sbuf_cat(sb, "jj"); + sbuf_cat(*sb, "jj"); break; /* * String, roll your own. @@ -190,7 +163,7 @@ led_write(struct cdev *dev, struct uio * (*s >= 'A' && *s <= 'J') || *s == 'U' || *s <= 'u' || *s == '.') - sbuf_bcat(sb, s, 1); + sbuf_bcat(*sb, s, 1); } break; /* @@ -205,29 +178,82 @@ led_write(struct cdev *dev, struct uio * case 'm': for(s++; *s; s++) { if (*s == '.') - sbuf_cat(sb, "aA"); + sbuf_cat(*sb, "aA"); else if (*s == '-') - sbuf_cat(sb, "aC"); + sbuf_cat(*sb, "aC"); else if (*s == ' ') - sbuf_cat(sb, "b"); + sbuf_cat(*sb, "b"); else if (*s == '\n') - sbuf_cat(sb, "d"); + sbuf_cat(*sb, "d"); } - sbuf_cat(sb, "j"); + sbuf_cat(*sb, "j"); break; default: - sbuf_delete(sb); - free(s2, M_DEVBUF); + sbuf_delete(*sb); return (EINVAL); } - error = sbuf_finish(sb); - free(s2, M_DEVBUF); - if (error != 0 || sbuf_len(sb) == 0) { - sbuf_delete(sb); + error = sbuf_finish(*sb); + if (error != 0 || sbuf_len(*sb) == 0) { + *sb = NULL; + return (error); + } + return (0); +} + +static int +led_write(struct cdev *dev, struct uio *uio, int ioflag) +{ + struct ledsc *sc; + char *s; + struct sbuf *sb = NULL; + int error, state = 0; + + if (uio->uio_resid > 512) + return (EINVAL); + s = malloc(uio->uio_resid + 1, M_DEVBUF, M_WAITOK); + s[uio->uio_resid] = '\0'; + error = uiomove(s, uio->uio_resid, uio); + if (error) { + free(s, M_DEVBUF); return (error); } + error = led_parse(s, &sb, &state); + free(s, M_DEVBUF); + if (error) + return (error); + mtx_lock(&led_mtx); + sc = dev->si_drv1; + if (sc != NULL) + error = led_state(sc, &sb, state); + mtx_unlock(&led_mtx); + if (sb != NULL) + sbuf_delete(sb); + return (error); +} - return (led_state(dev, sb, 0)); +int +led_set(char const *name, char const *cmd) +{ + struct ledsc *sc; + struct sbuf *sb = NULL; + int error, state = 0; + + error = led_parse(cmd, &sb, &state); + if (error) + return (error); + mtx_lock(&led_mtx); + LIST_FOREACH(sc, &led_list, list) { + if (strcmp(sc->name, name) == 0) + break; + } + if (sc != NULL) + error = led_state(sc, &sb, state); + else + error = ENOENT; + mtx_unlock(&led_mtx); + if (sb != NULL) + sbuf_delete(sb); + return (0); } static struct cdevsw led_cdevsw = { @@ -250,6 +276,7 @@ led_create_state(led_t *func, void *priv sc = malloc(sizeof *sc, M_LED, M_WAITOK | M_ZERO); sx_xlock(&led_sx); + sc->name = strdup(name, M_LED); sc->unit = alloc_unr(led_unit); sc->private = priv; sc->func = func; @@ -287,6 +314,7 @@ led_destroy(struct cdev *dev) destroy_dev(dev); if (sc->spec != NULL) sbuf_delete(sc->spec); + free(sc->name, M_LED); free(sc, M_LED); sx_xunlock(&led_sx); } Modified: head/sys/dev/led/led.h ============================================================================== --- head/sys/dev/led/led.h Thu Mar 24 08:37:48 2011 (r219950) +++ head/sys/dev/led/led.h Thu Mar 24 08:56:12 2011 (r219951) @@ -18,4 +18,6 @@ struct cdev *led_create_state(led_t *, v struct cdev *led_create(led_t *, void *, char const *); void led_destroy(struct cdev *); +int led_set(char const *, char const *); + #endif From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 12:04:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C0BD106566C; Thu, 24 Mar 2011 12:04:43 +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 3BF3B8FC12; Thu, 24 Mar 2011 12:04:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OC4hid032366; Thu, 24 Mar 2011 12:04:43 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OC4haT032364; Thu, 24 Mar 2011 12:04:43 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201103241204.p2OC4haT032364@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 24 Mar 2011 12:04: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: r219954 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 12:04:43 -0000 Author: bapt (ports committer) Date: Thu Mar 24 12:04:42 2011 New Revision: 219954 URL: http://svn.freebsd.org/changeset/base/219954 Log: Fix confusion between a-characters and d-characters Submitted by: avg Approved by: cognet Modified: head/usr.sbin/makefs/cd9660/cd9660_strings.c Modified: head/usr.sbin/makefs/cd9660/cd9660_strings.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_strings.c Thu Mar 24 09:12:54 2011 (r219953) +++ head/usr.sbin/makefs/cd9660/cd9660_strings.c Thu Mar 24 12:04:42 2011 (r219954) @@ -59,7 +59,7 @@ cd9660_is_a_char(char c) { return (isupper((unsigned char)c) || c == '_' - || (c >= '0' && c <= '?')); + || (c >= '0' && c <= '9')); } static inline int @@ -67,7 +67,7 @@ cd9660_is_d_char(char c) { return (isupper((unsigned char)c) || c == '_' - || (c >= '%' && c <= '9') + || (c >= '%' && c <= '?') || (c >= ' ' && c <= '\"')); } From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 12:35:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497D01065670; Thu, 24 Mar 2011 12:35:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 398388FC16; Thu, 24 Mar 2011 12:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OCZAJw033150; Thu, 24 Mar 2011 12:35:10 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OCZAFk033147; Thu, 24 Mar 2011 12:35:10 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201103241235.p2OCZAFk033147@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 24 Mar 2011 12:35: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: r219955 - head/sbin/umount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 12:35:10 -0000 Author: ru Date: Thu Mar 24 12:35:09 2011 New Revision: 219955 URL: http://svn.freebsd.org/changeset/base/219955 Log: It's possible to unmount multiple items at once, make it clear. Modified: head/sbin/umount/umount.8 head/sbin/umount/umount.c Modified: head/sbin/umount/umount.8 ============================================================================== --- head/sbin/umount/umount.8 Thu Mar 24 12:04:42 2011 (r219954) +++ head/sbin/umount/umount.8 Thu Mar 24 12:35:09 2011 (r219955) @@ -37,7 +37,7 @@ .Sh SYNOPSIS .Nm .Op Fl fv -.Ar special | node | fsid +.Ar special ... | node ... | fsid ... .Nm .Fl a | A .Op Fl F Ar fstab Modified: head/sbin/umount/umount.c ============================================================================== --- head/sbin/umount/umount.c Thu Mar 24 12:04:42 2011 (r219954) +++ head/sbin/umount/umount.c Thu Mar 24 12:35:09 2011 (r219955) @@ -599,7 +599,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: umount [-fv] special | node | fsid", + "usage: umount [-fv] special ... | node ... | fsid ...", " umount -a | -A [-F fstab] [-fv] [-h host] [-t type]"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 12:35:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44E2106566B; Thu, 24 Mar 2011 12:35:59 +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 942528FC1E; Thu, 24 Mar 2011 12:35:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OCZxva033199; Thu, 24 Mar 2011 12:35:59 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OCZxEe033197; Thu, 24 Mar 2011 12:35:59 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201103241235.p2OCZxEe033197@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 24 Mar 2011 12:35: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: r219956 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 12:35:59 -0000 Author: bapt (ports committer) Date: Thu Mar 24 12:35:59 2011 New Revision: 219956 URL: http://svn.freebsd.org/changeset/base/219956 Log: Really fix the confusion, sorry for noise Submitted by: avg Approved by: cognet Modified: head/usr.sbin/makefs/cd9660/cd9660_strings.c Modified: head/usr.sbin/makefs/cd9660/cd9660_strings.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_strings.c Thu Mar 24 12:35:09 2011 (r219955) +++ head/usr.sbin/makefs/cd9660/cd9660_strings.c Thu Mar 24 12:35:59 2011 (r219956) @@ -55,7 +55,7 @@ cd9660_uppercase_characters(char *str, i } static inline int -cd9660_is_a_char(char c) +cd9660_is_d_char(char c) { return (isupper((unsigned char)c) || c == '_' @@ -63,7 +63,7 @@ cd9660_is_a_char(char c) } static inline int -cd9660_is_d_char(char c) +cd9660_is_a_char(char c) { return (isupper((unsigned char)c) || c == '_' From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 13:18:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42EDF106566B; Thu, 24 Mar 2011 13:18:10 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31CEF8FC21; Thu, 24 Mar 2011 13:18:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2ODIA4r034132; Thu, 24 Mar 2011 13:18:10 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2ODIAr4034130; Thu, 24 Mar 2011 13:18:10 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201103241318.p2ODIAr4034130@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 24 Mar 2011 13:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219957 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 13:18:10 -0000 Author: pluknet Date: Thu Mar 24 13:18:09 2011 New Revision: 219957 URL: http://svn.freebsd.org/changeset/base/219957 Log: MFC r218741: Bump dummynet module version to meet dummynet schedulers' requirements, and thus unbreak loading dummynet.ko via /boot/loader.conf. Approved by: luigi Modified: stable/8/sys/netinet/ipfw/ip_dummynet.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dummynet.c Thu Mar 24 12:35:59 2011 (r219956) +++ stable/8/sys/netinet/ipfw/ip_dummynet.c Thu Mar 24 13:18:09 2011 (r219957) @@ -2291,5 +2291,5 @@ static moduledata_t dummynet_mod = { DECLARE_MODULE(dummynet, dummynet_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY-1); MODULE_DEPEND(dummynet, ipfw, 2, 2, 2); -MODULE_VERSION(dummynet, 1); +MODULE_VERSION(dummynet, 3); /* end of file */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 13:53:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29220106566B; Thu, 24 Mar 2011 13:53:00 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 191AB8FC08; Thu, 24 Mar 2011 13:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2ODqxJP034868; Thu, 24 Mar 2011 13:52:59 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2ODqxcG034866; Thu, 24 Mar 2011 13:52:59 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201103241352.p2ODqxcG034866@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 24 Mar 2011 13:52: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: r219958 - head/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 13:53:00 -0000 Author: ru Date: Thu Mar 24 13:52:59 2011 New Revision: 219958 URL: http://svn.freebsd.org/changeset/base/219958 Log: Discourage from using "cp -r". Modified: head/usr.bin/xargs/xargs.1 Modified: head/usr.bin/xargs/xargs.1 ============================================================================== --- head/usr.bin/xargs/xargs.1 Thu Mar 24 13:18:09 2011 (r219957) +++ head/usr.bin/xargs/xargs.1 Thu Mar 24 13:52:59 2011 (r219958) @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" $xMach: xargs.1,v 1.2 2002/02/23 05:23:37 tim Exp $ .\" -.Dd January 26, 2008 +.Dd March 24, 2011 .Dt XARGS 1 .Os .Sh NAME @@ -163,7 +163,7 @@ directories which start with an uppercas directory to .Pa destdir : .Pp -.Dl /bin/ls -1d [A-Z]* | xargs -J % cp -rp % destdir +.Dl /bin/ls -1d [A-Z]* | xargs -J % cp -Rp % destdir .Pp .It Fl L Ar number Call From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 13:58:34 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DE88106564A; Thu, 24 Mar 2011 13:58:34 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id 47AB58FC0C; Thu, 24 Mar 2011 13:58:32 +0000 (UTC) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 24 Mar 2011 13:58:31 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=maths.tcd.ie) by walton.maths.tcd.ie with SMTP id ; 24 Mar 2011 13:58:31 +0000 (GMT) To: Bruce Evans In-reply-to: Your message of "Tue, 22 Mar 2011 05:49:49 +1100." <20110322054501.J3574@besplex.bde.org> X-Request-Do: Date: Thu, 24 Mar 2011 13:58:30 +0000 From: David Malone Message-ID: <201103241358.aa30354@walton.maths.tcd.ie> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Jung-uk Kim Subject: Re: svn commit: r219676 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 13:58:34 -0000 > No new ones. Just the old ones of updating the frequency and all related > variables without races. Is something simple, line an atomic write, an option for this? I guess we don't have 64-bit atomic writes on all platforms, but we could support it on some platforms. David. From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 14:12:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BFF81065672; Thu, 24 Mar 2011 14:12:42 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B32D8FC0A; Thu, 24 Mar 2011 14:12:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OECgLl035299; Thu, 24 Mar 2011 14:12:42 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OECgux035297; Thu, 24 Mar 2011 14:12:42 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103241412.p2OECgux035297@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 24 Mar 2011 14:12: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: r219959 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 14:12:42 -0000 Author: pjd Date: Thu Mar 24 14:12:41 2011 New Revision: 219959 URL: http://svn.freebsd.org/changeset/base/219959 Log: Properly print characters larger than 127. Submitted by: noordsij Reviewed by: Eric Schrock MFC after: 1 month Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Thu Mar 24 13:52:59 2011 (r219958) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Thu Mar 24 14:12:41 2011 (r219959) @@ -138,8 +138,10 @@ stream_bytes(FILE *fp, const char *strin while (*string) { if (*string > ' ' && *string != '\\' && *string < '\177') (void) fprintf(fp, "%c", *string++); - else - (void) fprintf(fp, "\\%03o", *string++); + else { + (void) fprintf(fp, "\\%03hho", + (unsigned char)*string++); + } } } From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 14:30:08 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 41E2F106564A; Thu, 24 Mar 2011 14:30:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: David Malone Date: Thu, 24 Mar 2011 10:29:46 -0400 User-Agent: KMail/1.6.2 References: <201103241358.aa30354@walton.maths.tcd.ie> In-Reply-To: <201103241358.aa30354@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103241029.57358.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Bruce Evans Subject: Re: svn commit: r219676 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 14:30:08 -0000 On Thursday 24 March 2011 09:58 am, David Malone wrote: > > No new ones. Just the old ones of updating the frequency and all > > related variables without races. > > Is something simple, line an atomic write, an option for this? I > guess we don't have 64-bit atomic writes on all platforms, but we > could support it on some platforms. If atomic 64-bit read/write is possible and it is absolutely necessary, it has to be set via machdep.foo_freq, not kern.timecounter.foo.frequency. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 15:03:46 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F537106566C; Thu, 24 Mar 2011 15:03:46 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id AD5F68FC0A; Thu, 24 Mar 2011 15:03:44 +0000 (UTC) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 24 Mar 2011 15:03:43 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=maths.tcd.ie) by walton.maths.tcd.ie with SMTP id ; 24 Mar 2011 15:03:42 +0000 (GMT) To: Jung-uk Kim In-reply-to: Your message of "Thu, 24 Mar 2011 10:29:46 -0400." <201103241029.57358.jkim@FreeBSD.org> X-Request-Do: Date: Thu, 24 Mar 2011 15:03:42 +0000 From: David Malone Message-ID: <201103241503.aa30875@walton.maths.tcd.ie> Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, dwmalone@maths.tcd.ie, Bruce Evans , svn-src-head@FreeBSD.org Subject: Re: svn commit: r219676 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 15:03:46 -0000 > If atomic 64-bit read/write is possible and it is absolutely > necessary, it has to be set via machdep.foo_freq, not > kern.timecounter.foo.frequency. A number of people have asked me about adjusting the frequency of other time counters - it would seem to make sense to allow this at the timecounter layer. It also seems possible that people might want the timecounters view of the frequency to be different from other uses of a counter. David. From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 15:09:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55919106566C; Thu, 24 Mar 2011 15:09:37 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ABD78FC19; Thu, 24 Mar 2011 15:09:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OF9bSo042124; Thu, 24 Mar 2011 15:09:37 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OF9bDv042122; Thu, 24 Mar 2011 15:09:37 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201103241509.p2OF9bDv042122@svn.freebsd.org> From: Takahashi Yoshihiro Date: Thu, 24 Mar 2011 15:09: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: r219960 - head/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 15:09:37 -0000 Author: nyan Date: Thu Mar 24 15:09:36 2011 New Revision: 219960 URL: http://svn.freebsd.org/changeset/base/219960 Log: MFi386: the part of 219452 - bunch of variables are turned into uint8_t. - the setting and reading of "fmt" in load() is removed. - buf in printf() is made static to save space. Modified: head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Thu Mar 24 14:12:41 2011 (r219959) +++ head/sys/boot/pc98/boot2/boot2.c Thu Mar 24 15:09:36 2011 (r219960) @@ -137,7 +137,7 @@ static const char *kname = NULL; static uint32_t opts; static int comspeed = SIOSPD; static struct bootinfo bootinfo; -static unsigned ioctrl = IO_KEYBOARD; +static uint8_t ioctrl = IO_KEYBOARD; void exit(int); static void load(void); @@ -445,9 +445,8 @@ load(void) static Elf32_Shdr es[2]; caddr_t p; ino_t ino; - uint32_t addr, x; + uint32_t addr; int i, j; - uint8_t fmt; if (!(ino = lookup(kname))) { if (!ls) @@ -456,15 +455,8 @@ load(void) } if (xfsread(ino, &hdr, sizeof(hdr))) return; - if (N_GETMAGIC(hdr.ex) == ZMAGIC) - fmt = 0; - else if (IS_ELF(hdr.eh)) - fmt = 1; - else { - printf("Invalid %s\n", "format"); - return; - } - if (fmt == 0) { + + if (N_GETMAGIC(hdr.ex) == ZMAGIC) { addr = hdr.ex.a_entry & 0xffffff; p = PTOV(addr); fs_off = PAGE_SIZE; @@ -473,7 +465,7 @@ load(void) p += roundup2(hdr.ex.a_text, PAGE_SIZE); if (xfsread(ino, p, hdr.ex.a_data)) return; - } else { + } else if (IS_ELF(hdr.eh)) { fs_off = hdr.eh.e_phoff; for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) { if (xfsread(ino, ep + j, sizeof(ep[0]))) @@ -505,7 +497,11 @@ load(void) } addr = hdr.eh.e_entry & 0xffffff; bootinfo.bi_esymtab = VTOP(p); + } else { + printf("Invalid %s\n", "format"); + return; } + bootinfo.bi_kernelname = VTOP(kname); bootinfo.bi_bios_dev = dsk.daua; __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), @@ -672,7 +668,7 @@ static void printf(const char *fmt,...) { va_list ap; - char buf[10]; + static char buf[10]; char *s; unsigned u; int c; From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 15:27:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37051106566B; Thu, 24 Mar 2011 15:27:16 +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 14C758FC12; Thu, 24 Mar 2011 15:27:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OFRFsQ047167; Thu, 24 Mar 2011 15:27:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OFRF63047165; Thu, 24 Mar 2011 15:27:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103241527.p2OFRF63047165@svn.freebsd.org> From: Adrian Chadd Date: Thu, 24 Mar 2011 15:27: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: r219961 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 15:27:16 -0000 Author: adrian Date: Thu Mar 24 15:27:15 2011 New Revision: 219961 URL: http://svn.freebsd.org/changeset/base/219961 Log: Fix a WME corner case found by the FreeBSD 802.11n testing crew. The symptom: sometimes 11n (and non-11n) throughput is great. Sometimes it isn't. Much teeth gnashing occured, and much kernel bisecting happened, until someone figured out it was the order of which things were rebooted, not the kernel versions. (Which was great news to me, it meant that I hadn't broken if_ath.) What we found was that sometimes the WME parameters for the best-effort queue had a burst window ("txop") in which the station would be allowed to TX as many packets as it could fit inside that particular burst window. This improved throughput. After initially thinking it was a bug - the WME parameters for the best-effort queue -should- have a txop of 0, Bernard and I discovered "aggressive mode" in net80211 - where the WME BE queue parameters are changed if there's not a lot of high priority traffic going on. The WME parameters announced in the association response and beacon frames just "change" based on what the current traffic levels are. So in fact yes, the STA was acutally supposed to be doing this higher throughput stuff as it's just meant to be configuring things based on the WME parameters - but it wasn't. What was eventually happening was this: * at startup, the wme qosinfo count field would be 0; * it'd be parsed in ieee80211_parse_wmeparams(); * and it would be bumped (to say 10); * .. and the WME queue parameters would be correctly parsed and set. But then, when you restarted the assocation (eg hostap goes away and comes back with the same qosinfo count field of 10, or if you destroy the sta VIF and re-create it), the WME qosinfo count field - which is associated not to the VIF, but to the main interface - wouldn't be cleared, so the queue default parameters would be used (which include no burst setting for the BE queue) and would remain that way until the hostap qosinfo count field changed, or the STA was actually rebooted. This fix simply cleares the wme capability field (which has the count field) to 0, forcing it to be reset by the next received beacon. Thanks go to Milu for finding it and helping me track down what was going on, and Bernard Schmidt for working through the net80211 and WME specific magic. Modified: head/sys/net80211/ieee80211_proto.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Thu Mar 24 15:09:36 2011 (r219960) +++ head/sys/net80211/ieee80211_proto.c Thu Mar 24 15:27:15 2011 (r219961) @@ -896,6 +896,15 @@ ieee80211_wme_initparams_locked(struct i return; /* + * Clear the wme cap_info field so a qoscount from a previous + * vap doesn't confuse later code which only parses the beacon + * field and updates hardware when said field changes. + * Otherwise the hardware is programmed with defaults, not what + * the beacon actually announces. + */ + wme->wme_wmeChanParams.cap_info = 0; + + /* * Select mode; we can be called early in which case we * always use auto mode. We know we'll be called when * entering the RUN state with bsschan setup properly From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 16:06:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20E6D106564A; Thu, 24 Mar 2011 16:06:55 +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 112948FC16; Thu, 24 Mar 2011 16:06:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OG6sxr050639; Thu, 24 Mar 2011 16:06:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OG6sv9050637; Thu, 24 Mar 2011 16:06:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103241606.p2OG6sv9050637@svn.freebsd.org> From: Adrian Chadd Date: Thu, 24 Mar 2011 16:06: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: r219962 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 16:06:55 -0000 Author: adrian Date: Thu Mar 24 16:06:54 2011 New Revision: 219962 URL: http://svn.freebsd.org/changeset/base/219962 Log: Flip back HT/40 and Short-GI (for 40mhz operation). These are now verified to work. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Thu Mar 24 15:27:15 2011 (r219961) +++ head/sys/dev/ath/if_ath_tx_ht.c Thu Mar 24 16:06:54 2011 (r219962) @@ -129,7 +129,6 @@ ath_rateseries_setup(struct ath_softc *s if (flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) series[i].RateFlags |= HAL_RATESERIES_RTS_CTS; -#if 0 if (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) series[i].RateFlags |= HAL_RATESERIES_2040; @@ -140,7 +139,6 @@ ath_rateseries_setup(struct ath_softc *s */ if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) series[i].RateFlags |= HAL_RATESERIES_HALFGI; -#endif series[i].Rate = rt->info[rix[i]].rateCode; From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 16:06:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95B6F106566B; Thu, 24 Mar 2011 16:06:57 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85AEA8FC12; Thu, 24 Mar 2011 16:06:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OG6vs1050674; Thu, 24 Mar 2011 16:06:57 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OG6vNG050672; Thu, 24 Mar 2011 16:06:57 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201103241606.p2OG6vNG050672@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 24 Mar 2011 16: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: r219963 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 16:06:57 -0000 Author: pluknet Date: Thu Mar 24 16:06:57 2011 New Revision: 219963 URL: http://svn.freebsd.org/changeset/base/219963 Log: Add missing resource limits: - RLIMIT_NPTS - RLIMIT_SWAP MFC after: 1 week Modified: head/lib/libutil/login_class.3 Modified: head/lib/libutil/login_class.3 ============================================================================== --- head/lib/libutil/login_class.3 Thu Mar 24 16:06:54 2011 (r219962) +++ head/lib/libutil/login_class.3 Thu Mar 24 16:06:57 2011 (r219963) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 6, 2011 +.Dd March 24, 2011 .Dt LOGIN_CLASS 3 .Os .Sh NAME @@ -105,17 +105,19 @@ Class capability tags used, with and wit or -max (hard limit) suffixes and the corresponding resource setting: .Bd -literal -cputime RLIMIT_CPU -filesize RLIMIT_FSIZE -datasize RLIMIT_DATA -stacksize RLIMIT_STACK -coredumpsize RLIMIT_CORE -memoryuse RLIMIT_RSS -memorylocked RLIMIT_MEMLOCK -maxproc RLIMIT_NPROC -openfiles RLIMIT_NOFILE -sbsize RLIMIT_SBSIZE -vmemoryuse RLIMIT_VMEM +cputime RLIMIT_CPU +filesize RLIMIT_FSIZE +datasize RLIMIT_DATA +stacksize RLIMIT_STACK +coredumpsize RLIMIT_CORE +memoryuse RLIMIT_RSS +memorylocked RLIMIT_MEMLOCK +maxproc RLIMIT_NPROC +openfiles RLIMIT_NOFILE +sbsize RLIMIT_SBSIZE +vmemoryuse RLIMIT_VMEM +pseudoterminals RLIMIT_NPTS +swapuse RLIMIT_SWAP .Ed .It LOGIN_SETPRIORITY Set the scheduling priority for the current process based on the From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 16:56:07 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C14BE1065670; Thu, 24 Mar 2011 16:56:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 484C48FC08; Thu, 24 Mar 2011 16:56:06 +0000 (UTC) Received: from c122-107-125-80.carlnfd1.nsw.optusnet.com.au (c122-107-125-80.carlnfd1.nsw.optusnet.com.au [122.107.125.80]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2OGu29Y021511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Mar 2011 03:56:04 +1100 Date: Fri, 25 Mar 2011 03:56:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Malone In-Reply-To: <201103241503.aa30875@walton.maths.tcd.ie> Message-ID: <20110325020734.P1958@besplex.bde.org> References: <201103241503.aa30875@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, Bruce Evans , svn-src-head@FreeBSD.org, Jung-uk Kim Subject: Re: svn commit: r219676 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 16:56:07 -0000 On Thu, 24 Mar 2011, David Malone wrote: >> If atomic 64-bit read/write is possible and it is absolutely >> necessary, it has to be set via machdep.foo_freq, not >> kern.timecounter.foo.frequency. Not really. The i386 TSC frequency variable can be 32 bits. That works in almost all cases now, and you can easily scale the variable so that a 32-bit frequency works for CPUs up to 8GHz, which should be enough until i386 mode goes away. amd64 already has sufficiently atomic 64-bit read/write for this, perhaps even without an explicit atomic op. OTOH, kern.timecounter.foo.frequency is also 64 bits, and needs this and atomic accesses more that the i386 TSC variable, since it is MI and there are more divisions by it. Explicit atomic ops are never used for timecounter variables, but I think some is needed in the following places: - switching of timehands. Atomic ops are supposed to be avoided by writing to an inactive timehands and than switching to it using a single atomic write, but the write for this is not explicitly atomic. Without an atomic write with certain acquire/release semantics whose details I can never remember, the writes before the switch may go out after the one for the switch. - switching of more global things. These include the switch from one timecounter to another, and changing the frequency within a timecounter, and stepping the time. Something like timecounter generations could be used to reduced to reduce the locking requirements for this, but currently the locking for this is null. For stepping the time, the missing locking is even documented by an XXX comment: % /* % * Step our concept of UTC. This is done by modifying our estimate of % * when we booted. % * XXX: not locked. % */ % void % tc_setclock(struct timespec *ts) % { % struct timespec tbef, taft; % struct bintime bt, bt2; % % cpu_tick_calibrate(1); This only has a tiny race. cpu_tick_calibrate() is normally called only every 16 seconds on 1 designated CPU. This spacing out of calls to it gives it significant "time-domain locking". And passing 1 to it mostly preserves this locking, by telling it to not do any calibration on this call, but to reset on this call and wait for another call or 2 to let things stabilize. But it must write a global variable for the reset, and the access for this is not atomic. I think it should do slightly more, and arrange for recalibration as soon as possible, after >= 1 but <= 2 seconds. Now the recalibration might not be delayed at all (due to the race), or might be delayed by only 1 cycle, or may be 16 seconds away. % nanotime(&tbef); Safe to call at any time, modulo other timecounter bugs. This depends on the update of the generation count being sufficiently atomic, and on read accesses to boottime being atomic, which they clearly aren't. % timespec2bintime(ts, &bt); Utility function operating on local variables, so safe. % binuptime(&bt2); % bintime_sub(&bt, &bt2); Like the previous 2 calls, but safer since boottime is not accessed. % bintime_add(&bt2, &boottimebin); Unsafe read access to boottimebin. % boottimebin = bt; Unsafer write access to boottimebin. This is the main write access to it. Changing it at all is what makes the read accesses to it unsafe. Changing it at all after setting it initially is also wrong. The boot time is a time so it cannot actually be changed by any later event, but it is changed here as a hack to make the current time come out right, even when this makes the boot time come out wrong. The boot time needs to be fixed if it is initially wrong, but should not change after that. This wouldn't simplify the locking here, since an adjustment would still be needed. When this is called from settime(), Giant is held. This prevents concurrent calls to here from userland. Concurrent calls may still be possible, since this is also called from resume methods. I don't know if resume methods are locked by Giant or anything. % bintime2timeval(&bt, &boottime); Unsafe write access to boottime. Like the one to boottimebin. % % /* XXX fiddle all the little crinkly bits around the fiords... */ % tc_windup(); tc_windup() is normally called only every tc_tick ticks on a not-so- designated CPU, and we break the time-domain locking from that as above. tc_windup() begins by operating on the "next" generation of timehands, so it has obvious races if it is called concurrently. It depends on the time-domain locking to prevent this, but here we don't even try to wait for things to stablize like we do for the much less important cpu_tock_calibrate() call. Calling tc_windup() a lot from here also risks cycling through the timehands too rapidly even if the calls don't overlap. Userland can exercise this bug easily at securelevel <= 1 by calling settimeofday() in a loop. securelevel > 1 gives (IMO bogus) restrictions and a kernel printf service rate-limited to only once per second. OTOH, if tc_windup() were safe to call at any time, calling it here would be the right thing to do. Note that updates of the TSC timecounter frequency variable are propagated from the TSC machdep sysctl to the timecounter layer in a less racy manner. The machdep sysctl just copies the machdep variable to the timecounter variable and depends on the tc_windup() call propagating it later. This avoids concurrent calls and only has a tiny race window which is neverthless easy to hit by calling the machdep sysctl in a loop. tc_windup() used to be called (via tc_ticktock()) only from hardclock() on the BSP. Now tc_ticktock() is also called from hardclock_anycpu(). tc_ticktock() is now passed an arg which should prevent too-rapid cycling of the timehands, but I don't see anything to limit the calls to the BSP or to prevent calls very close together. This is unlike the new call to cpu_tick_calibrate() from hardclock_anycpu(). That is limited to the designated CPU. % nanotime(&taft); Back to only races for only read accesses. % if (timestepwarnings) { % log(LOG_INFO, % "Time stepped from %jd.%09ld to %jd.%09ld (%jd.%09ld)\n", % (intmax_t)tbef.tv_sec, tbef.tv_nsec, % (intmax_t)taft.tv_sec, taft.tv_nsec, % (intmax_t)ts->tv_sec, ts->tv_nsec); % } % cpu_tick_calibrate(1); Like the call at the start. % } > A number of people have asked me about adjusting the frequency of > other time counters - it would seem to make sense to allow this at > the timecounter layer. It also seems possible that people might > want the timecounters view of the frequency to be different from > other uses of a counter. I can't see any reason for the frequencies to be different, except transiently to keep changes to them smooth. Anyway, it should be possible to change them all to the same frequency, and having a single operation for this is good for minimizing transients, races and complexity. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 17:09:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 232BE1065670; Thu, 24 Mar 2011 17:09:25 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1D08FC13; Thu, 24 Mar 2011 17:09:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OH9OYM052012; Thu, 24 Mar 2011 17:09:24 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OH9OpT052010; Thu, 24 Mar 2011 17:09:24 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201103241709.p2OH9OpT052010@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 24 Mar 2011 17:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219965 - stable/8/contrib/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 17:09:25 -0000 Author: uqs Date: Thu Mar 24 17:09:24 2011 New Revision: 219965 URL: http://svn.freebsd.org/changeset/base/219965 Log: MFH r219209: Unbreak .Aq for non-ASCII output like -Tps or -Tutf8. PR: gnu/154822 Submitted by: Dominic Fandrey Modified: stable/8/contrib/groff/tmac/doc.tmac Directory Properties: stable/8/contrib/groff/ (props changed) Modified: stable/8/contrib/groff/tmac/doc.tmac ============================================================================== --- stable/8/contrib/groff/tmac/doc.tmac Thu Mar 24 16:56:33 2011 (r219964) +++ stable/8/contrib/groff/tmac/doc.tmac Thu Mar 24 17:09:24 2011 (r219965) @@ -1197,8 +1197,8 @@ . if !\n[doc-arg-limit] \ . ds doc-macro-name Aq . -. ds doc-quote-left \[la] -. ds doc-quote-right \[ra] +. ds doc-quote-left < +. ds doc-quote-right > . . doc-enclose-string \$@ .. From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 17:09:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0B931065672; Thu, 24 Mar 2011 17:09:37 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3078FC12; Thu, 24 Mar 2011 17:09:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OH9bQ0052051; Thu, 24 Mar 2011 17:09:37 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OH9bMm052049; Thu, 24 Mar 2011 17:09:37 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201103241709.p2OH9bMm052049@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 24 Mar 2011 17:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219966 - stable/7/contrib/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 17:09:38 -0000 Author: uqs Date: Thu Mar 24 17:09:37 2011 New Revision: 219966 URL: http://svn.freebsd.org/changeset/base/219966 Log: MFH r219209: Unbreak .Aq for non-ASCII output like -Tps or -Tutf8. PR: gnu/154822 Submitted by: Dominic Fandrey Modified: stable/7/contrib/groff/tmac/doc.tmac Directory Properties: stable/7/contrib/groff/ (props changed) Modified: stable/7/contrib/groff/tmac/doc.tmac ============================================================================== --- stable/7/contrib/groff/tmac/doc.tmac Thu Mar 24 17:09:24 2011 (r219965) +++ stable/7/contrib/groff/tmac/doc.tmac Thu Mar 24 17:09:37 2011 (r219966) @@ -1197,8 +1197,8 @@ . if !\n[doc-arg-limit] \ . ds doc-macro-name Aq . -. ds doc-quote-left \[la] -. ds doc-quote-right \[ra] +. ds doc-quote-left < +. ds doc-quote-right > . . doc-enclose-string \$@ .. From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 17:20:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A3411065672; Thu, 24 Mar 2011 17:20:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BA678FC0A; Thu, 24 Mar 2011 17:20:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OHKOGM052310; Thu, 24 Mar 2011 17:20:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OHKOUd052306; Thu, 24 Mar 2011 17:20:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201103241720.p2OHKOUd052306@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 24 Mar 2011 17: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: r219967 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 17:20:24 -0000 Author: trasz Date: Thu Mar 24 17:20:24 2011 New Revision: 219967 URL: http://svn.freebsd.org/changeset/base/219967 Log: Make "LOGIN" and "CLASS" columns width scale properly instead of wasting space. Modified: head/bin/ps/extern.h head/bin/ps/keyword.c head/bin/ps/print.c Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Thu Mar 24 17:09:37 2011 (r219966) +++ head/bin/ps/extern.h Thu Mar 24 17:20:24 2011 (r219967) @@ -75,6 +75,8 @@ void runame(KINFO *, VARENT *); void rvar(KINFO *, VARENT *); int s_comm(KINFO *); int s_label(KINFO *); +int s_loginclass(KINFO *); +int s_logname(KINFO *); int s_rgroupname(KINFO *); int s_runame(KINFO *); int s_uname(KINFO *); Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Thu Mar 24 17:09:37 2011 (r219966) +++ head/bin/ps/keyword.c Thu Mar 24 17:20:24 2011 (r219967) @@ -79,8 +79,8 @@ static VAR var[] = { CHAR, NULL, 0}, {"blocked", "", "sigmask", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"caught", "", "sigcatch", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"class", "CLASS", NULL, LJUST, loginclass, NULL, MAXLOGNAME-1, 0, - CHAR, NULL, 0}, + {"class", "CLASS", NULL, LJUST|DSIZ, loginclass, s_loginclass, + MAXLOGNAME-1, 0, CHAR, NULL, 0}, {"comm", "COMMAND", NULL, LJUST|DSIZ, ucomm, s_comm, COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0, @@ -108,8 +108,8 @@ static VAR var[] = { {"lim", "LIM", NULL, 0, maxrss, NULL, 5, 0, CHAR, NULL, 0}, {"lockname", "LOCK", NULL, LJUST, lockname, NULL, 6, 0, CHAR, NULL, 0}, - {"login", "LOGIN", NULL, LJUST, logname, NULL, MAXLOGNAME-1, 0, CHAR, - NULL, 0}, + {"login", "LOGIN", NULL, LJUST|DSIZ, logname, s_logname, MAXLOGNAME-1, + 0, CHAR, NULL, 0}, {"logname", "", "login", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"lstart", "STARTED", NULL, LJUST|USER, lstarted, NULL, 28, 0, CHAR, NULL, 0}, Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Thu Mar 24 17:09:37 2011 (r219966) +++ head/bin/ps/print.c Thu Mar 24 17:20:24 2011 (r219967) @@ -908,7 +908,7 @@ loginclass(KINFO *k, VARENT *ve) * and limits don't apply to system processes. */ if (k->ki_p->ki_flag & P_SYSTEM) { - (void)printf("%-*s", v->width, " -"); + (void)printf("%-*s", v->width, "-"); return; } s = k->ki_p->ki_loginclass; @@ -948,3 +948,30 @@ s_label(KINFO *k) mac_free(proclabel); return (size); } + +int +s_loginclass(KINFO *k) +{ + char *s; + + if (k->ki_p->ki_flag & P_SYSTEM) + return (1); + + s = k->ki_p->ki_loginclass; + if (s == NULL) + return (1); + + return (strlen(s)); +} + +int +s_logname(KINFO *k) +{ + char *s; + + s = k->ki_p->ki_login; + if (s == NULL) + return (1); + + return (strlen(s)); +} From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 18:40:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C594E106564A; Thu, 24 Mar 2011 18:40:11 +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 B3BDF8FC12; Thu, 24 Mar 2011 18:40:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OIeBC5053908; Thu, 24 Mar 2011 18:40:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OIeBDs053896; Thu, 24 Mar 2011 18:40:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201103241840.p2OIeBDs053896@svn.freebsd.org> From: John Baldwin Date: Thu, 24 Mar 2011 18:40: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: r219968 - in head/sys: compat/linprocfs fs/nfsclient kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 18:40:11 -0000 Author: jhb Date: Thu Mar 24 18:40:11 2011 New Revision: 219968 URL: http://svn.freebsd.org/changeset/base/219968 Log: Fix some locking nits with the p_state field of struct proc: - Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL in fork to honor the locking requirements. While here, expand the scope of the PROC_LOCK() on the new process (p2) to avoid some LORs. Previously the code was locking the new child process (p2) after it had locked the parent process (p1). However, when locking two processes, the safe order is to lock the child first, then the parent. - Fix various places that were checking p_state against PRS_NEW without having the process locked to use PROC_LOCK(). Every place was already locking the process, just after the PRS_NEW check. - Remove or reduce the use of PROC_SLOCK() for places that were checking p_state against PRS_NEW. The PROC_LOCK() alone is sufficient for reading the current state. - Reorder fill_kinfo_proc() slightly so it only acquires PROC_SLOCK() once. MFC after: 1 week Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/nfsclient/nfs_clport.c head/sys/kern/kern_descrip.c head/sys/kern/kern_fork.c head/sys/kern/kern_proc.c head/sys/kern/kern_resource.c head/sys/kern/kern_thread.c head/sys/vm/vm_meter.c head/sys/vm/vm_pageout.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/compat/linprocfs/linprocfs.c Thu Mar 24 18:40:11 2011 (r219968) @@ -740,7 +740,6 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) if (P_SHOULDSTOP(p)) { state = "T (stopped)"; } else { - PROC_SLOCK(p); switch(p->p_state) { case PRS_NEW: state = "I (idle)"; @@ -770,7 +769,6 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) state = "? (unknown)"; break; } - PROC_SUNLOCK(p); } fill_kinfo_proc(p, &kp); Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Mar 24 18:40:11 2011 (r219968) @@ -1102,11 +1102,11 @@ pfind_locked(pid_t pid) LIST_FOREACH(p, PIDHASH(pid), p_hash) if (p->p_pid == pid) { + PROC_LOCK(p); if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); p = NULL; - break; } - PROC_LOCK(p); break; } return (p); Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/kern/kern_descrip.c Thu Mar 24 18:40:11 2011 (r219968) @@ -2634,9 +2634,11 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) xf.xf_size = sizeof(xf); sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_state == PRS_NEW) - continue; PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); + continue; + } if (p_cansee(req->td, p) != 0) { PROC_UNLOCK(p); continue; Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/kern/kern_fork.c Thu Mar 24 18:40:11 2011 (r219968) @@ -630,12 +630,13 @@ do_fork(struct thread *td, int flags, st /* * Set the child start time and mark the process as being complete. */ + PROC_LOCK(p2); + PROC_LOCK(p1); microuptime(&p2->p_stats->p_start); PROC_SLOCK(p2); p2->p_state = PRS_NORMAL; PROC_SUNLOCK(p2); - PROC_LOCK(p1); #ifdef KDTRACE_HOOKS /* * Tell the DTrace fasttrap provider about the new process @@ -643,11 +644,8 @@ do_fork(struct thread *td, int flags, st * p_state is PRS_NORMAL since the fasttrap module will use pfind() * later on. */ - if (dtrace_fasttrap_fork) { - PROC_LOCK(p2); + if (dtrace_fasttrap_fork) dtrace_fasttrap_fork(p1, p2); - PROC_UNLOCK(p2); - } #endif if ((p1->p_flag & (P_TRACED | P_FOLLOWFORK)) == (P_TRACED | P_FOLLOWFORK)) { @@ -660,12 +658,11 @@ do_fork(struct thread *td, int flags, st */ td->td_dbgflags |= TDB_FORK; td->td_dbg_forked = p2->p_pid; - PROC_LOCK(p2); td2->td_dbgflags |= TDB_STOPATFORK; _PHOLD(p2); p2_held = 1; - PROC_UNLOCK(p2); } + PROC_UNLOCK(p2); if ((flags & RFSTOPPED) == 0) { /* * If RFSTOPPED not requested, make child runnable and Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/kern/kern_proc.c Thu Mar 24 18:40:11 2011 (r219968) @@ -291,11 +291,11 @@ pfind(pid) sx_slock(&allproc_lock); LIST_FOREACH(p, PIDHASH(pid), p_hash) if (p->p_pid == pid) { + PROC_LOCK(p); if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); p = NULL; - break; } - PROC_LOCK(p); break; } sx_sunlock(&allproc_lock); @@ -756,7 +756,6 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_sigcatch = ps->ps_sigcatch; mtx_unlock(&ps->ps_mtx); } - PROC_SLOCK(p); if (p->p_state != PRS_NEW && p->p_state != PRS_ZOMBIE && p->p_vmspace != NULL) { @@ -782,12 +781,11 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_swtime = (ticks - p->p_swtick) / hz; kp->ki_pid = p->p_pid; kp->ki_nice = p->p_nice; - rufetch(p, &kp->ki_rusage); - kp->ki_runtime = cputick2usec(p->p_rux.rux_runtime); - PROC_SUNLOCK(p); kp->ki_start = p->p_stats->p_start; timevaladd(&kp->ki_start, &boottime); PROC_SLOCK(p); + rufetch(p, &kp->ki_rusage); + kp->ki_runtime = cputick2usec(p->p_rux.rux_runtime); calcru(p, &kp->ki_rusage.ru_utime, &kp->ki_rusage.ru_stime); PROC_SUNLOCK(p); calccru(p, &kp->ki_childutime, &kp->ki_childstime); @@ -1213,13 +1211,11 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) /* * Skip embryonic processes. */ - PROC_SLOCK(p); + PROC_LOCK(p); if (p->p_state == PRS_NEW) { - PROC_SUNLOCK(p); + PROC_UNLOCK(p); continue; } - PROC_SUNLOCK(p); - PROC_LOCK(p); KASSERT(p->p_ucred != NULL, ("process credential is NULL for non-NEW proc")); /* Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/kern/kern_resource.c Thu Mar 24 18:40:11 2011 (r219968) @@ -142,11 +142,9 @@ getpriority(td, uap) uap->who = td->td_ucred->cr_uid; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - /* Do not bother to check PRS_NEW processes */ - if (p->p_state == PRS_NEW) - continue; PROC_LOCK(p); - if (p_cansee(td, p) == 0 && + if (p->p_state == PRS_NORMAL && + p_cansee(td, p) == 0 && p->p_ucred->cr_uid == uap->who) { if (p->p_nice < low) low = p->p_nice; Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/kern/kern_thread.c Thu Mar 24 18:40:11 2011 (r219968) @@ -981,7 +981,9 @@ tdfind(lwpid_t tid, pid_t pid) td = NULL; break; } + PROC_LOCK(td->td_proc); if (td->td_proc->p_state == PRS_NEW) { + PROC_UNLOCK(td->td_proc); td = NULL; break; } @@ -990,12 +992,10 @@ tdfind(lwpid_t tid, pid_t pid) LIST_REMOVE(td, td_hash); LIST_INSERT_HEAD(TIDHASH(td->td_tid), td, td_hash); - PROC_LOCK(td->td_proc); rw_wunlock(&tidhash_lock); return (td); } } - PROC_LOCK(td->td_proc); break; } run++; Modified: head/sys/vm/vm_meter.c ============================================================================== --- head/sys/vm/vm_meter.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/vm/vm_meter.c Thu Mar 24 18:40:11 2011 (r219968) @@ -130,15 +130,12 @@ vmtotal(SYSCTL_HANDLER_ARGS) if (p->p_flag & P_SYSTEM) continue; PROC_LOCK(p); - PROC_SLOCK(p); switch (p->p_state) { case PRS_NEW: - PROC_SUNLOCK(p); PROC_UNLOCK(p); continue; break; default: - PROC_SUNLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); switch (td->td_state) { Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Mar 24 17:20:24 2011 (r219967) +++ head/sys/vm/vm_pageout.c Thu Mar 24 18:40:11 2011 (r219968) @@ -1281,14 +1281,13 @@ vm_pageout_oom(int shortage) FOREACH_PROC_IN_SYSTEM(p) { int breakout; - if (p->p_state != PRS_NORMAL) - continue; if (PROC_TRYLOCK(p) == 0) continue; /* * If this is a system, protected or killed process, skip it. */ - if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || + if (p->p_state != PRS_NORMAL || + (p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || (p->p_pid == 1) || P_KILLED(p) || ((p->p_pid < 48) && (swap_pager_avail != 0))) { PROC_UNLOCK(p); @@ -1651,14 +1650,13 @@ vm_daemon() FOREACH_PROC_IN_SYSTEM(p) { vm_pindex_t limit, size; - if (p->p_state != PRS_NORMAL) - continue; /* * if this is a system process or if we have already * looked at this process, skip it. */ PROC_LOCK(p); - if (p->p_flag & (P_INEXEC | P_SYSTEM | P_WEXIT)) { + if (p->p_state != PRS_NORMAL || + p->p_flag & (P_INEXEC | P_SYSTEM | P_WEXIT)) { PROC_UNLOCK(p); continue; } From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 19:11:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71E3F106566B; Thu, 24 Mar 2011 19:11:05 +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 5FCB88FC16; Thu, 24 Mar 2011 19:11:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OJB5cB054691; Thu, 24 Mar 2011 19:11:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OJB5h8054688; Thu, 24 Mar 2011 19:11:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201103241911.p2OJB5h8054688@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Mar 2011 19:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219969 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 19:11:05 -0000 Author: mav Date: Thu Mar 24 19:11:05 2011 New Revision: 219969 URL: http://svn.freebsd.org/changeset/base/219969 Log: MFgraid/head r217014: Make `geom XXX list` and `geom XXX status` outputs more consistent: Add -a options to print all geoms, not only ones with providers. Add -g option for `status` to report geom's names, not provider's. Make `status` by default report provider's status (if present), not geom's. Make `status` report consumer's statuses, not only "synchronized" field. Modified: head/sbin/geom/core/geom.8 head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.8 ============================================================================== --- head/sbin/geom/core/geom.8 Thu Mar 24 18:40:11 2011 (r219968) +++ head/sbin/geom/core/geom.8 Thu Mar 24 19:11:05 2011 (r219969) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2010 +.Dd January 5, 2011 .Dt GEOM 8 .Os .Sh NAME @@ -37,11 +37,12 @@ .Nm .Ar class .Cm list +.Op Fl a .Op Ar name ... .Nm .Ar class .Cm status -.Op Fl s +.Op Fl ags .Op Ar name ... .Nm .Ar class @@ -69,6 +70,11 @@ List all available commands for the give Print detailed information (within the given class) about all geoms (if no additional arguments were specified) or the given geoms. This command is only available if the given class exists in the kernel. +Additional options include: +.Bl -tag -width ".Fl a" +.It Fl a +Print information for geoms without providers. +.El .It Cm status Print general information (within the given class) about all geoms (if no additional arguments were specified) or the given geoms. @@ -76,6 +82,10 @@ This command is only available if the gi .Pp Additional options include: .Bl -tag -width ".Fl s" +.It Fl a +When used with -g, print status for geoms without providers. +.It Fl g +Report statuses for geoms instead of providers. .It Fl s Produce script-friendly output. .El @@ -128,6 +138,8 @@ NOP .It PART .It +RAID +.It RAID3 .It SCHED Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Thu Mar 24 18:40:11 2011 (r219968) +++ head/sbin/geom/core/geom.c Thu Mar 24 19:11:05 2011 (r219969) @@ -76,15 +76,21 @@ static void std_unload(struct gctl_req * struct g_command std_commands[] = { { "help", 0, std_help, G_NULL_OPTS, NULL }, - { "list", 0, std_list, G_NULL_OPTS, - "[name ...]" + { "list", 0, std_list, + { + { 'a', "all", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + "[-a] [name ...]" }, { "status", 0, std_status, { + { 'a', "all", NULL, G_TYPE_BOOL }, + { 'g', "geoms", NULL, G_TYPE_BOOL }, { 's', "script", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-s] [name ...]" + "[-ags] [name ...]" }, { "load", G_FLAG_VERBOSE | G_FLAG_LOADKLD, std_load, G_NULL_OPTS, NULL }, @@ -786,7 +792,7 @@ std_list(struct gctl_req *req, unsigned struct gclass *classp; struct ggeom *gp; const char *name; - int error, i, nargs; + int all, error, i, nargs; error = geom_gettree(&mesh); if (error != 0) @@ -797,18 +803,18 @@ std_list(struct gctl_req *req, unsigned errx(EXIT_FAILURE, "Class %s not found.", gclass_name); } nargs = gctl_get_int(req, "nargs"); + all = gctl_get_int(req, "all"); if (nargs > 0) { for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); gp = find_geom(classp, name); - if (gp != NULL) - list_one_geom(gp); - else + if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", name); + list_one_geom(gp); } } else { LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (LIST_EMPTY(&gp->lg_provider)) + if (LIST_EMPTY(&gp->lg_provider) && !all) continue; list_one_geom(gp); } @@ -827,7 +833,6 @@ std_status_available(void) static void status_update_len(struct ggeom *gp, int *name_len, int *status_len) { - struct gprovider *pp; struct gconfig *conf; int len; @@ -835,11 +840,7 @@ status_update_len(struct ggeom *gp, int assert(name_len != NULL); assert(status_len != NULL); - pp = LIST_FIRST(&gp->lg_provider); - if (pp != NULL) - len = strlen(pp->lg_name); - else - len = strlen(gp->lg_name); + len = strlen(gp->lg_name); if (*name_len < len) *name_len = len; LIST_FOREACH(conf, &gp->lg_config, lg_config) { @@ -851,25 +852,67 @@ status_update_len(struct ggeom *gp, int } } +static void +status_update_len_prs(struct ggeom *gp, int *name_len, int *status_len) +{ + struct gprovider *pp; + struct gconfig *conf; + int len, glen; + + assert(gp != NULL); + assert(name_len != NULL); + assert(status_len != NULL); + + glen = 0; + LIST_FOREACH(conf, &gp->lg_config, lg_config) { + if (strcasecmp(conf->lg_name, "state") == 0) { + glen = strlen(conf->lg_val); + break; + } + } + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + len = strlen(pp->lg_name); + if (*name_len < len) + *name_len = len; + len = glen; + LIST_FOREACH(conf, &pp->lg_config, lg_config) { + if (strcasecmp(conf->lg_name, "state") == 0) { + len = strlen(conf->lg_val); + break; + } + } + if (*status_len < len) + *status_len = len; + } +} + static char * status_one_consumer(struct gconsumer *cp) { static char buf[256]; struct gprovider *pp; struct gconfig *conf; + const char *state, *syncr; pp = cp->lg_provider; if (pp == NULL) return (NULL); + state = NULL; + syncr = NULL; LIST_FOREACH(conf, &cp->lg_config, lg_config) { + if (strcasecmp(conf->lg_name, "state") == 0) + state = conf->lg_val; if (strcasecmp(conf->lg_name, "synchronized") == 0) - break; + syncr = conf->lg_val; } - if (conf == NULL) + if (state == NULL && syncr == NULL) snprintf(buf, sizeof(buf), "%s", pp->lg_name); - else { + else if (state != NULL && syncr != NULL) { + snprintf(buf, sizeof(buf), "%s (%s, %s)", pp->lg_name, + state, syncr); + } else { snprintf(buf, sizeof(buf), "%s (%s)", pp->lg_name, - conf->lg_val); + state ? state : syncr); } return (buf); } @@ -877,25 +920,19 @@ status_one_consumer(struct gconsumer *cp static void status_one_geom(struct ggeom *gp, int script, int name_len, int status_len) { - struct gprovider *pp; struct gconsumer *cp; struct gconfig *conf; const char *name, *status, *component; int gotone; - pp = LIST_FIRST(&gp->lg_provider); - if (pp != NULL) - name = pp->lg_name; - else - name = gp->lg_name; + name = gp->lg_name; + status = "N/A"; LIST_FOREACH(conf, &gp->lg_config, lg_config) { - if (strcasecmp(conf->lg_name, "state") == 0) + if (strcasecmp(conf->lg_name, "state") == 0) { + status = conf->lg_val; break; + } } - if (conf == NULL) - status = "N/A"; - else - status = conf->lg_val; gotone = 0; LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { component = status_one_consumer(cp); @@ -914,6 +951,48 @@ status_one_geom(struct ggeom *gp, int sc } static void +status_one_geom_prs(struct ggeom *gp, int script, int name_len, int status_len) +{ + struct gprovider *pp; + struct gconsumer *cp; + struct gconfig *conf; + const char *name, *status, *component; + int gotone; + + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + name = pp->lg_name; + status = "N/A"; + LIST_FOREACH(conf, &gp->lg_config, lg_config) { + if (strcasecmp(conf->lg_name, "state") == 0) { + status = conf->lg_val; + break; + } + } + LIST_FOREACH(conf, &pp->lg_config, lg_config) { + if (strcasecmp(conf->lg_name, "state") == 0) { + status = conf->lg_val; + break; + } + } + gotone = 0; + LIST_FOREACH(cp, &gp->lg_consumer, lg_consumer) { + component = status_one_consumer(cp); + if (component == NULL) + continue; + gotone = 1; + printf("%*s %*s %s\n", name_len, name, + status_len, status, component); + if (!script) + name = status = ""; + } + if (!gotone) { + printf("%*s %*s %s\n", name_len, name, + status_len, status, "N/A"); + } + } +} + +static void std_status(struct gctl_req *req, unsigned flags __unused) { struct gmesh mesh; @@ -921,7 +1000,7 @@ std_status(struct gctl_req *req, unsigne struct ggeom *gp; const char *name; int name_len, status_len; - int error, i, n, nargs, script; + int all, error, geoms, i, n, nargs, script; error = geom_gettree(&mesh); if (error != 0) @@ -930,28 +1009,45 @@ std_status(struct gctl_req *req, unsigne if (classp == NULL) errx(EXIT_FAILURE, "Class %s not found.", gclass_name); nargs = gctl_get_int(req, "nargs"); + all = gctl_get_int(req, "all"); + geoms = gctl_get_int(req, "geoms"); script = gctl_get_int(req, "script"); - name_len = strlen("Name"); - status_len = strlen("Status"); + if (script) { + name_len = 0; + status_len = 0; + } else { + name_len = strlen("Name"); + status_len = strlen("Status"); + } if (nargs > 0) { for (i = 0, n = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); gp = find_geom(classp, name); if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", name); - else { - status_update_len(gp, &name_len, &status_len); - n++; + if (geoms) { + status_update_len(gp, + &name_len, &status_len); + } else { + status_update_len_prs(gp, + &name_len, &status_len); } + n++; } if (n == 0) goto end; } else { n = 0; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (LIST_EMPTY(&gp->lg_provider)) + if (LIST_EMPTY(&gp->lg_provider) && !all) continue; - status_update_len(gp, &name_len, &status_len); + if (geoms) { + status_update_len(gp, + &name_len, &status_len); + } else { + status_update_len_prs(gp, + &name_len, &status_len); + } n++; } if (n == 0) @@ -965,16 +1061,27 @@ std_status(struct gctl_req *req, unsigne for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); gp = find_geom(classp, name); - if (gp != NULL) { + if (gp == NULL) + continue; + if (geoms) { status_one_geom(gp, script, name_len, status_len); + } else { + status_one_geom_prs(gp, script, name_len, + status_len); } } } else { LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (LIST_EMPTY(&gp->lg_provider)) + if (LIST_EMPTY(&gp->lg_provider) && !all) continue; - status_one_geom(gp, script, name_len, status_len); + if (geoms) { + status_one_geom(gp, script, name_len, + status_len); + } else { + status_one_geom_prs(gp, script, name_len, + status_len); + } } } end: From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 19:23:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9325D106566C; Thu, 24 Mar 2011 19:23:42 +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 8214D8FC0A; Thu, 24 Mar 2011 19:23:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OJNgrI055035; Thu, 24 Mar 2011 19:23:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OJNg3Z055032; Thu, 24 Mar 2011 19:23:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201103241923.p2OJNg3Z055032@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Mar 2011 19:23: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: r219970 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 19:23:42 -0000 Author: mav Date: Thu Mar 24 19:23:42 2011 New Revision: 219970 URL: http://svn.freebsd.org/changeset/base/219970 Log: MFgraid/head r218212, r218257: Introduce new type of BIO_GETATTR -- GEOM::setstate, used to inform lower GEOM about state of it's providers from the point of upper layers. Make geom_disk use led(4) subsystem to illuminate states in such fashion: FAILED - "1" (on), REBUILD - "f5" (slow blink), RESYNC - "f1" (fast blink), ACTIVE - "0" (off). LED name should be set for each disk via kern.geom.disk.%s.led sysctl. Later disk API could be extended to allow disk driver to report this info in custom way via it's own facilities. Modified: head/sys/geom/geom.h head/sys/geom/geom_disk.c Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Thu Mar 24 19:11:05 2011 (r219969) +++ head/sys/geom/geom.h Thu Mar 24 19:23:42 2011 (r219970) @@ -208,6 +208,12 @@ struct g_classifier_hook { void *arg; }; +/* BIO_GETATTR("GEOM::setstate") argument values. */ +#define G_STATE_FAILED 0 +#define G_STATE_REBUILD 1 +#define G_STATE_RESYNC 2 +#define G_STATE_ACTIVE 3 + /* geom_dev.c */ struct cdev; void g_dev_print(void); Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Thu Mar 24 19:11:05 2011 (r219969) +++ head/sys/geom/geom_disk.c Thu Mar 24 19:23:42 2011 (r219970) @@ -56,6 +56,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +struct g_disk_softc { + struct disk *dp; + struct sysctl_ctx_list sysctl_ctx; + struct sysctl_oid *sysctl_tree; + char led[64]; + uint32_t state; +}; + static struct mtx g_disk_done_mtx; static g_access_t g_disk_access; @@ -76,6 +86,9 @@ static struct g_class g_disk_class = { .dumpconf = g_disk_dumpconf, }; +SYSCTL_DECL(_kern_geom); +SYSCTL_NODE(_kern_geom, OID_AUTO, disk, CTLFLAG_RW, 0, "GEOM_DISK stuff"); + static void g_disk_init(struct g_class *mp __unused) { @@ -110,13 +123,14 @@ static int g_disk_access(struct g_provider *pp, int r, int w, int e) { struct disk *dp; + struct g_disk_softc *sc; int error; g_trace(G_T_ACCESS, "g_disk_access(%s, %d, %d, %d)", pp->name, r, w, e); g_topology_assert(); - dp = pp->geom->softc; - if (dp == NULL || dp->d_destroyed) { + sc = pp->geom->softc; + if (sc == NULL || (dp = sc->dp) == NULL || dp->d_destroyed) { /* * Allow decreasing access count even if disk is not * avaliable anymore. @@ -155,6 +169,9 @@ g_disk_access(struct g_provider *pp, int pp->name, error); g_disk_unlock_giant(dp); } + sc->state = G_STATE_ACTIVE; + if (sc->led[0] != 0) + led_set(sc->led, "0"); dp->d_flags &= ~DISKFLAG_OPEN; } return (error); @@ -186,10 +203,37 @@ g_disk_kerneldump(struct bio *bp, struct } static void +g_disk_setstate(struct bio *bp, struct g_disk_softc *sc) +{ + const char *cmd; + + memcpy(&sc->state, bp->bio_data, sizeof(sc->state)); + if (sc->led[0] != 0) { + switch (sc->state) { + case G_STATE_FAILED: + cmd = "1"; + break; + case G_STATE_REBUILD: + cmd = "f5"; + break; + case G_STATE_RESYNC: + cmd = "f1"; + break; + default: + cmd = "0"; + break; + } + led_set(sc->led, cmd); + } + g_io_deliver(bp, 0); +} + +static void g_disk_done(struct bio *bp) { struct bio *bp2; struct disk *dp; + struct g_disk_softc *sc; /* See "notes" for why we need a mutex here */ /* XXX: will witness accept a mix of Giant/unGiant drivers here ? */ @@ -201,7 +245,8 @@ g_disk_done(struct bio *bp) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) && - (dp = bp2->bio_to->geom->softc)) { + (sc = bp2->bio_to->geom->softc) && + (dp = sc->dp)) { devstat_end_transaction_bio(dp->d_devstat, bp); } g_destroy_bio(bp); @@ -218,10 +263,12 @@ g_disk_ioctl(struct g_provider *pp, u_lo { struct g_geom *gp; struct disk *dp; + struct g_disk_softc *sc; int error; gp = pp->geom; - dp = gp->softc; + sc = gp->softc; + dp = sc->dp; if (dp->d_ioctl == NULL) return (ENOIOCTL); @@ -236,11 +283,12 @@ g_disk_start(struct bio *bp) { struct bio *bp2, *bp3; struct disk *dp; + struct g_disk_softc *sc; int error; off_t off; - dp = bp->bio_to->geom->softc; - if (dp == NULL || dp->d_destroyed) { + sc = bp->bio_to->geom->softc; + if (sc == NULL || (dp = sc->dp) == NULL || dp->d_destroyed) { g_io_deliver(bp, ENXIO); return; } @@ -319,6 +367,8 @@ g_disk_start(struct bio *bp) break; else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) g_disk_kerneldump(bp, dp); + else if (!strcmp(bp->bio_attribute, "GEOM::setstate")) + g_disk_setstate(bp, sc); else error = ENOIOCTL; break; @@ -353,9 +403,10 @@ static void g_disk_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp) { struct disk *dp; + struct g_disk_softc *sc; - dp = gp->softc; - if (dp == NULL) + sc = gp->softc; + if (sc == NULL || (dp = sc->dp) == NULL) return; if (indent == NULL) { sbuf_printf(sb, " hd %u", dp->d_fwheads); @@ -378,13 +429,17 @@ g_disk_create(void *arg, int flag) struct g_geom *gp; struct g_provider *pp; struct disk *dp; + struct g_disk_softc *sc; + char tmpstr[80]; if (flag == EV_CANCEL) return; g_topology_assert(); dp = arg; + sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); + sc->dp = dp; gp = g_new_geomf(&g_disk_class, "%s%d", dp->d_name, dp->d_unit); - gp->softc = dp; + gp->softc = sc; pp = g_new_providerf(gp, "%s", gp->name); pp->mediasize = dp->d_mediasize; pp->sectorsize = dp->d_sectorsize; @@ -394,6 +449,21 @@ g_disk_create(void *arg, int flag) pp->stripesize = dp->d_stripesize; if (bootverbose) printf("GEOM: new disk %s\n", gp->name); + sysctl_ctx_init(&sc->sysctl_ctx); + snprintf(tmpstr, sizeof(tmpstr), "GEOM disk %s", gp->name); + sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, + SYSCTL_STATIC_CHILDREN(_kern_geom_disk), OID_AUTO, gp->name, + CTLFLAG_RD, 0, tmpstr); + if (sc->sysctl_tree != NULL) { + snprintf(tmpstr, sizeof(tmpstr), + "kern.geom.disk.%s.led", gp->name); + TUNABLE_STR_FETCH(tmpstr, sc->led, sizeof(sc->led)); + SYSCTL_ADD_STRING(&sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "led", + CTLFLAG_RW | CTLFLAG_TUN, sc->led, sizeof(sc->led), + "LED name"); + } + pp->private = sc; dp->d_geom = gp; g_error_provider(pp, 0); } @@ -403,11 +473,22 @@ g_disk_destroy(void *ptr, int flag) { struct disk *dp; struct g_geom *gp; + struct g_disk_softc *sc; g_topology_assert(); dp = ptr; gp = dp->d_geom; if (gp != NULL) { + sc = gp->softc; + if (sc->sysctl_tree != NULL) { + sysctl_ctx_free(&sc->sysctl_ctx); + sc->sysctl_tree = NULL; + } + if (sc->led[0] != 0) { + led_set(sc->led, "0"); + sc->led[0] = 0; + } + g_free(sc); gp->softc = NULL; g_wither_geom(gp, ENXIO); } From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 20:15:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEFC1106566B; Thu, 24 Mar 2011 20:15:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDFE98FC15; Thu, 24 Mar 2011 20:15:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OKFgbJ056212; Thu, 24 Mar 2011 20:15:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OKFgjL056208; Thu, 24 Mar 2011 20:15:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201103242015.p2OKFgjL056208@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 24 Mar 2011 20:15: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: r219972 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 20:15:43 -0000 Author: trasz Date: Thu Mar 24 20:15:42 2011 New Revision: 219972 URL: http://svn.freebsd.org/changeset/base/219972 Log: Add proper width calculation for time fields (time, cputime and usertime). This fixes the ugly overflow in "ps aux" output for "[idle]". Modified: head/bin/ps/extern.h head/bin/ps/keyword.c head/bin/ps/print.c Modified: head/bin/ps/extern.h ============================================================================== --- head/bin/ps/extern.h Thu Mar 24 19:50:34 2011 (r219971) +++ head/bin/ps/extern.h Thu Mar 24 20:15:42 2011 (r219972) @@ -74,12 +74,15 @@ void rgroupname(KINFO *, VARENT *); void runame(KINFO *, VARENT *); void rvar(KINFO *, VARENT *); int s_comm(KINFO *); +int s_cputime(KINFO *); int s_label(KINFO *); int s_loginclass(KINFO *); int s_logname(KINFO *); int s_rgroupname(KINFO *); int s_runame(KINFO *); +int s_systime(KINFO *); int s_uname(KINFO *); +int s_usertime(KINFO *); void showkey(void); void started(KINFO *, VARENT *); void state(KINFO *, VARENT *); Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Thu Mar 24 19:50:34 2011 (r219971) +++ head/bin/ps/keyword.c Thu Mar 24 20:15:42 2011 (r219972) @@ -189,12 +189,14 @@ static VAR var[] = { UINT, UIDFMT, 0}, {"svuid", "SVUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svuid), UINT, UIDFMT, 0}, - {"systime", "SYSTIME", NULL, USER, systime, NULL, 9, 0, CHAR, NULL, 0}, + {"systime", "SYSTIME", NULL, USER|DSIZ, systime, s_systime, 15, 0, CHAR, + NULL, 0}, {"tdaddr", "TDADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2, KOFF(ki_tdaddr), KPTR, "lx", 0}, {"tdev", "TDEV", NULL, 0, tdev, NULL, 5, 0, CHAR, NULL, 0}, {"tdnam", "TDNAM", NULL, LJUST, tdnam, NULL, COMMLEN, 0, CHAR, NULL, 0}, - {"time", "TIME", NULL, USER, cputime, NULL, 9, 0, CHAR, NULL, 0}, + {"time", "TIME", NULL, USER|DSIZ, cputime, s_cputime, 15, 0, CHAR, + NULL, 0}, {"tpgid", "TPGID", NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT, PIDFMT, 0}, {"tsid", "TSID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_tsid), UINT, @@ -211,8 +213,8 @@ static VAR var[] = { KOFF(ki_paddr), KPTR, "lx", 0}, {"user", "USER", NULL, LJUST|DSIZ, uname, s_uname, USERLEN, 0, CHAR, NULL, 0}, - {"usertime", "USERTIME", NULL, USER, usertime, NULL, 9, 0, CHAR, NULL, - 0}, + {"usertime", "USERTIME", NULL, USER|DSIZ, usertime, s_usertime, 15, 0, + CHAR, NULL, 0}, {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"vsize", "", "vsz", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"vsz", "VSZ", NULL, 0, vsize, NULL, 6, 0, CHAR, NULL, 0}, Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Thu Mar 24 19:50:34 2011 (r219971) +++ head/bin/ps/print.c Thu Mar 24 20:15:42 2011 (r219972) @@ -570,11 +570,20 @@ printtime(KINFO *k, VARENT *ve, long sec secs += psecs / 100; psecs = psecs % 100; } - (void)snprintf(obuff, sizeof(obuff), "%3ld:%02ld%c%02ld", + (void)snprintf(obuff, sizeof(obuff), "%ld:%02ld%c%02ld", secs / 60, secs % 60, decimal_point, psecs); (void)printf("%*s", v->width, obuff); } +static int +sizetime(long secs) +{ + + if (secs < 60) + return (7); + return (log10(secs / 60) + 7); +} + void cputime(KINFO *k, VARENT *ve) { @@ -930,6 +939,17 @@ s_comm(KINFO *k) } int +s_cputime(KINFO *k) +{ + long secs; + + secs = k->ki_p->ki_runtime / 1000000; + if (sumrusage) + secs += k->ki_p->ki_childtime.tv_sec; + return (sizetime(secs)); +} + +int s_label(KINFO *k) { char *string = NULL; @@ -975,3 +995,25 @@ s_logname(KINFO *k) return (strlen(s)); } + +int +s_systime(KINFO *k) +{ + long secs; + + secs = k->ki_p->ki_rusage.ru_stime.tv_sec; + if (sumrusage) + secs += k->ki_p->ki_childstime.tv_sec; + return (sizetime(secs)); +} + +int +s_usertime(KINFO *k) +{ + long secs; + + secs = k->ki_p->ki_rusage.ru_utime.tv_sec; + if (sumrusage) + secs += k->ki_p->ki_childutime.tv_sec; + return (sizetime(secs)); +} From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 20:27:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 9709A1065689; Thu, 24 Mar 2011 20:27:35 +0000 (UTC) Date: Thu, 24 Mar 2011 20:27:35 +0000 From: Alexander Best To: Edward Tomasz Napierala Message-ID: <20110324202735.GA79089@freebsd.org> References: <201103242015.p2OKFgjL056208@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201103242015.p2OKFgjL056208@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r219972 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 20:27:35 -0000 On Thu Mar 24 11, Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Mar 24 20:15:42 2011 > New Revision: 219972 > URL: http://svn.freebsd.org/changeset/base/219972 > > Log: > Add proper width calculation for time fields (time, cputime and usertime). > This fixes the ugly overflow in "ps aux" output for "[idle]". nice. maybe you could also take a look at these cases: 1) ps -wlu is not honouring -w 2) ps -lud is not honouring -d 3) ps(1) doesn't mention that -X is the default cheers. alex > > Modified: > head/bin/ps/extern.h > head/bin/ps/keyword.c > head/bin/ps/print.c > > Modified: head/bin/ps/extern.h > ============================================================================== > --- head/bin/ps/extern.h Thu Mar 24 19:50:34 2011 (r219971) > +++ head/bin/ps/extern.h Thu Mar 24 20:15:42 2011 (r219972) > @@ -74,12 +74,15 @@ void rgroupname(KINFO *, VARENT *); > void runame(KINFO *, VARENT *); > void rvar(KINFO *, VARENT *); > int s_comm(KINFO *); > +int s_cputime(KINFO *); > int s_label(KINFO *); > int s_loginclass(KINFO *); > int s_logname(KINFO *); > int s_rgroupname(KINFO *); > int s_runame(KINFO *); > +int s_systime(KINFO *); > int s_uname(KINFO *); > +int s_usertime(KINFO *); > void showkey(void); > void started(KINFO *, VARENT *); > void state(KINFO *, VARENT *); > > Modified: head/bin/ps/keyword.c > ============================================================================== > --- head/bin/ps/keyword.c Thu Mar 24 19:50:34 2011 (r219971) > +++ head/bin/ps/keyword.c Thu Mar 24 20:15:42 2011 (r219972) > @@ -189,12 +189,14 @@ static VAR var[] = { > UINT, UIDFMT, 0}, > {"svuid", "SVUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svuid), > UINT, UIDFMT, 0}, > - {"systime", "SYSTIME", NULL, USER, systime, NULL, 9, 0, CHAR, NULL, 0}, > + {"systime", "SYSTIME", NULL, USER|DSIZ, systime, s_systime, 15, 0, CHAR, > + NULL, 0}, > {"tdaddr", "TDADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2, > KOFF(ki_tdaddr), KPTR, "lx", 0}, > {"tdev", "TDEV", NULL, 0, tdev, NULL, 5, 0, CHAR, NULL, 0}, > {"tdnam", "TDNAM", NULL, LJUST, tdnam, NULL, COMMLEN, 0, CHAR, NULL, 0}, > - {"time", "TIME", NULL, USER, cputime, NULL, 9, 0, CHAR, NULL, 0}, > + {"time", "TIME", NULL, USER|DSIZ, cputime, s_cputime, 15, 0, CHAR, > + NULL, 0}, > {"tpgid", "TPGID", NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT, > PIDFMT, 0}, > {"tsid", "TSID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_tsid), UINT, > @@ -211,8 +213,8 @@ static VAR var[] = { > KOFF(ki_paddr), KPTR, "lx", 0}, > {"user", "USER", NULL, LJUST|DSIZ, uname, s_uname, USERLEN, 0, CHAR, > NULL, 0}, > - {"usertime", "USERTIME", NULL, USER, usertime, NULL, 9, 0, CHAR, NULL, > - 0}, > + {"usertime", "USERTIME", NULL, USER|DSIZ, usertime, s_usertime, 15, 0, > + CHAR, NULL, 0}, > {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, > {"vsize", "", "vsz", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, > {"vsz", "VSZ", NULL, 0, vsize, NULL, 6, 0, CHAR, NULL, 0}, > > Modified: head/bin/ps/print.c > ============================================================================== > --- head/bin/ps/print.c Thu Mar 24 19:50:34 2011 (r219971) > +++ head/bin/ps/print.c Thu Mar 24 20:15:42 2011 (r219972) > @@ -570,11 +570,20 @@ printtime(KINFO *k, VARENT *ve, long sec > secs += psecs / 100; > psecs = psecs % 100; > } > - (void)snprintf(obuff, sizeof(obuff), "%3ld:%02ld%c%02ld", > + (void)snprintf(obuff, sizeof(obuff), "%ld:%02ld%c%02ld", > secs / 60, secs % 60, decimal_point, psecs); > (void)printf("%*s", v->width, obuff); > } > > +static int > +sizetime(long secs) > +{ > + > + if (secs < 60) > + return (7); > + return (log10(secs / 60) + 7); > +} > + > void > cputime(KINFO *k, VARENT *ve) > { > @@ -930,6 +939,17 @@ s_comm(KINFO *k) > } > > int > +s_cputime(KINFO *k) > +{ > + long secs; > + > + secs = k->ki_p->ki_runtime / 1000000; > + if (sumrusage) > + secs += k->ki_p->ki_childtime.tv_sec; > + return (sizetime(secs)); > +} > + > +int > s_label(KINFO *k) > { > char *string = NULL; > @@ -975,3 +995,25 @@ s_logname(KINFO *k) > > return (strlen(s)); > } > + > +int > +s_systime(KINFO *k) > +{ > + long secs; > + > + secs = k->ki_p->ki_rusage.ru_stime.tv_sec; > + if (sumrusage) > + secs += k->ki_p->ki_childstime.tv_sec; > + return (sizetime(secs)); > +} > + > +int > +s_usertime(KINFO *k) > +{ > + long secs; > + > + secs = k->ki_p->ki_rusage.ru_utime.tv_sec; > + if (sumrusage) > + secs += k->ki_p->ki_childutime.tv_sec; > + return (sizetime(secs)); > +} -- a13x From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 20:28:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B479E10656D0; Thu, 24 Mar 2011 20:28:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3C5D8FC1E; Thu, 24 Mar 2011 20:28:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OKS9Gi056578; Thu, 24 Mar 2011 20:28:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OKS98H056576; Thu, 24 Mar 2011 20:28:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103242028.p2OKS98H056576@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 24 Mar 2011 20:28: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: r219973 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 20:28:09 -0000 Author: pjd Date: Thu Mar 24 20:28:09 2011 New Revision: 219973 URL: http://svn.freebsd.org/changeset/base/219973 Log: Checking file access on size change is bogus. The checks are done earlier by VFS where we know if this is truncate(2) or ftruncate(2). If this is the latter we should depend on the mode the file was opened and not on the current permission. PR: standards/154873 Reported by: Mark Martinec Discussed with: Eric Schrock Discussed with: Mark Maybee MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 24 20:15:42 2011 (r219972) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Mar 24 20:28:09 2011 (r219973) @@ -2962,11 +2962,6 @@ top: */ if (mask & AT_SIZE) { - err = zfs_zaccess(zp, ACE_WRITE_DATA, 0, skipaclchk, cr); - if (err) { - ZFS_EXIT(zfsvfs); - return (err); - } /* * XXX - Note, we are not providing any open * mode flags here (like FNDELAY), so we may From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 21:31:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DAA0106564A; Thu, 24 Mar 2011 21:31:33 +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 0A2768FC18; Thu, 24 Mar 2011 21:31:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2OLVXoE058135; Thu, 24 Mar 2011 21:31:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2OLVWxS058123; Thu, 24 Mar 2011 21:31:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201103242131.p2OLVWxS058123@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Mar 2011 21:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219974 - in head: etc/mtree include sbin/geom/class sbin/geom/class/raid sys/conf sys/geom/raid sys/modules/geom sys/modules/geom/geom_raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 21:31:33 -0000 Author: mav Date: Thu Mar 24 21:31:32 2011 New Revision: 219974 URL: http://svn.freebsd.org/changeset/base/219974 Log: MFgraid/head: Add new RAID GEOM class, that is going to replace ataraid(4) in supporting various BIOS-based software RAIDs. Unlike ataraid(4) this implementation does not depend on legacy ata(4) subsystem and can be used with any disk drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4) with `options ATA_CAM`). To make code more readable and extensible, this implementation follows modular design, including core part and two sets of modules, implementing support for different metadata formats and RAID levels. Support for such popular metadata formats is now implemented: Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage. Such RAID levels are now supported: RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. For any all of these RAID levels and metadata formats this class supports full cycle of volume operations: reading, writing, creation, deletion, disk removal and insertion, rebuilding, dirty shutdown detection and resynchronization, bad sector recovery, faulty disks tracking, hot-spare disks. For Intel and Promise formats there is support multiple volumes per disk set. Look graid(8) manual page for additional details. Co-authored by: imp Sponsored by: Cisco Systems, Inc. and iXsystems, Inc. Added: head/sbin/geom/class/raid/ head/sbin/geom/class/raid/Makefile (contents, props changed) head/sbin/geom/class/raid/geom_raid.c (contents, props changed) head/sbin/geom/class/raid/graid.8 (contents, props changed) head/sys/geom/raid/ head/sys/geom/raid/g_raid.c (contents, props changed) head/sys/geom/raid/g_raid.h (contents, props changed) head/sys/geom/raid/g_raid_ctl.c (contents, props changed) head/sys/geom/raid/g_raid_md_if.m (contents, props changed) head/sys/geom/raid/g_raid_tr_if.m (contents, props changed) head/sys/geom/raid/md_intel.c (contents, props changed) head/sys/geom/raid/md_jmicron.c (contents, props changed) head/sys/geom/raid/md_nvidia.c (contents, props changed) head/sys/geom/raid/md_promise.c (contents, props changed) head/sys/geom/raid/md_sii.c (contents, props changed) head/sys/geom/raid/tr_concat.c (contents, props changed) head/sys/geom/raid/tr_raid0.c (contents, props changed) head/sys/geom/raid/tr_raid1.c (contents, props changed) head/sys/geom/raid/tr_raid1e.c (contents, props changed) head/sys/modules/geom/geom_raid/ head/sys/modules/geom/geom_raid/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/sbin/geom/class/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/modules/geom/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Thu Mar 24 20:28:09 2011 (r219973) +++ head/etc/mtree/BSD.include.dist Thu Mar 24 21:31:32 2011 (r219974) @@ -190,6 +190,8 @@ .. nop .. + raid + .. raid3 .. shsec Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Thu Mar 24 20:28:09 2011 (r219973) +++ head/include/Makefile Thu Mar 24 21:31:32 2011 (r219974) @@ -47,7 +47,7 @@ LSUBDIRS= cam/ata cam/scsi \ ${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ geom/mirror geom/mountver geom/multipath geom/nop \ - geom/raid3 geom/shsec geom/stripe geom/virstor \ + geom/raid geom/raid3 geom/shsec geom/stripe geom/virstor \ netgraph/atm netgraph/netflow \ security/audit \ security/mac_biba security/mac_bsdextended security/mac_lomac \ Modified: head/sbin/geom/class/Makefile ============================================================================== --- head/sbin/geom/class/Makefile Thu Mar 24 20:28:09 2011 (r219973) +++ head/sbin/geom/class/Makefile Thu Mar 24 21:31:32 2011 (r219974) @@ -14,6 +14,7 @@ SUBDIR+=mountver SUBDIR+=multipath SUBDIR+=nop SUBDIR+=part +SUBDIR+=raid SUBDIR+=raid3 SUBDIR+=sched SUBDIR+=shsec Added: head/sbin/geom/class/raid/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/raid/Makefile Thu Mar 24 21:31:32 2011 (r219974) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../misc + +GEOM_CLASS= raid + +DPADD= ${LIBMD} +LDADD= -lmd + +.include Added: head/sbin/geom/class/raid/geom_raid.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/raid/geom_raid.c Thu Mar 24 21:31:32 2011 (r219974) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 2010 Alexander Motin + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +uint32_t lib_version = G_LIB_VERSION; +uint32_t version = G_RAID_VERSION; + +struct g_command class_commands[] = { + { "label", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + { 'S', "size", G_VAL_OPTIONAL, G_TYPE_NUMBER }, + { 's', "strip", G_VAL_OPTIONAL, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + "[-fv] [-S size] [-s stripsize] format label level prov ..." + }, + { "add", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + { 'S', "size", G_VAL_OPTIONAL, G_TYPE_NUMBER }, + { 's', "strip", G_VAL_OPTIONAL, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + "[-fv] [-S size] [-s stripsize] name label level" + }, + { "delete", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + "[-fv] name [label|num]" + }, + { "insert", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + "[-v] name prov ..." + }, + { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + "[-v] name prov ..." + }, + { "fail", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, + "[-v] name prov ..." + }, + { "stop", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_BOOL }, + G_OPT_SENTINEL + }, + "[-fv] name" + }, + G_CMD_SENTINEL +}; + Added: head/sbin/geom/class/raid/graid.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/raid/graid.8 Thu Mar 24 21:31:32 2011 (r219974) @@ -0,0 +1,266 @@ +.\" Copyright (c) 2010 Alexander Motin +.\" 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$ +.\" +.Dd March 22, 2011 +.Dt GRAID 8 +.Os +.Sh NAME +.Nm graid +.Nd "control utility for software RAID devices" +.Sh SYNOPSIS +.Nm +.Cm label +.Op Fl f +.Op Fl S Ar size +.Op Fl s Ar strip +.Ar format +.Ar label +.Ar level +.Ar prov ... +.Nm +.Cm add +.Op Fl f +.Op Fl S Ar size +.Op Fl s Ar strip +.Ar name +.Ar label +.Ar level +.Nm +.Cm delete +.Op Fl f +.Ar name +.Op Ar label | Ar num +.Nm +.Cm insert +.Ar name +.Ar prov ... +.Nm +.Cm remove +.Ar name +.Ar prov ... +.Nm +.Cm fail +.Ar name +.Ar prov ... +.Nm +.Cm stop +.Op Fl fv +.Ar name ... +.Nm +.Cm list +.Nm +.Cm status +.Nm +.Cm load +.Nm +.Cm unload +.Sh DESCRIPTION +The +.Nm +utility is used to manage software RAID configurations, supported by the +GEOM RAID class. +GEOM RAID class uses on-disk metadata to provide access to software-RAID +volumes defined by different RAID BIOSes. +Depending on RAID BIOS type and it's metadata format, different subsets of +configurations and features are supported. +To allow booting from RAID volume, the metadata format should match the +RAID BIOS type and its capabilities. +To guarantee that these match, it is recommended to create volumes via the +RAID BIOS interface, while experienced users are free to do it using this +utility. +.Pp +The first argument to +.Nm +indicates an action to be performed: +.Bl -tag -width ".Cm destroy" +.It Cm label +Create an array with single volume. +The +.Ar format +argument specifies the on-disk metadata format to use for this array, +such as "Intel". +The +.Ar label +argument specifies the label of the created volume. +The +.Ar level +argument specifies the RAID level of the created volume, such as: +"RAID0", "RAID1", etc. +The subsequent list enumerates providers to use as array components. +The special name "NONE" can be used to reserve space for absent disks. +The order of components can be important, depending on specific RAID level +and metadata format. +.Pp +Additional options include: +.Bl -tag -width ".Fl s Ar strip" +.It Fl f +Enforce specified configuration creation if it is officially unsupported, +but technically can be created. +.It Fl S Ar size +Use +.Ar size +bytes on each component for this volume. +Should be used if several volumes per array are planned, or if smaller +components going to be inserted later. +Defaults to size of the smallest component. +.It Fl s Ar strip +Specifies strip size in bytes. +Defaults to 131072. +.El +.It Cm add +Create another volume on the existing array. +The +.Ar name +argument is the name of the existing array, reported by label command. +The rest of arguments are the same as for the label command. +.It Cm delete +Delete volume(s) from the existing array. +When the last volume is deleted, the array is also deleted and its metadata +erased. +The +.Ar name +argument is the name of existing array. +Optional +.Ar label +or +.Ar num +arguments allow specifying volume for deletion. +.Pp +Additional options include: +.Bl -tag -width ".Fl f" +.It Fl f +Delete volume(s) even if it is still open. +.El +.It Cm insert +Insert specified provider(s) into specified array instead of the first missing +or failed components. +If there are no such components, mark disk(s) as spare. +.It Cm remove +Remove the specified provider(s) from the specified array and erase metadata. +If there are spare disks present, the removed disk(s) will be replaced by +spares. +.It Cm fail +Mark the given disks(s) as failed, removing from active use unless absolutely +necessary due to exhausted redundancy. +If there are spare disks present - failed disk(s) will be replaced with one +of them. +.It Cm stop +Stop the given array. +The metadata will not be erased. +.Pp +Additional options include: +.Bl -tag -width ".Fl f" +.It Fl f +Stop the given array even if some of its volumes are opened. +.El +.It Cm list +See +.Xr geom 8 . +.It Cm status +See +.Xr geom 8 . +.It Cm load +See +.Xr geom 8 . +.It Cm unload +See +.Xr geom 8 . +.El +.Pp +Additional options include: +.Bl -tag -width ".Fl v" +.It Fl v +Be more verbose. +.El +.Sh SUPPORTED METADATA FORMATS +The GEOM RAID class follows a modular design, allowing different metadata +formats to be used. +Support is currently implemented for the following formats: +.Bl -tag -width "Intel" +.It Intel +The format used by Intel RAID BIOS. +Supports up to two volumes per array. +Supports configurations: RAID0 (2+ disks), RAID1 (2 disks), +RAID5 (3+ disks), RAID10 (4 disks). +Configurations not supported by Intel RAID BIOS, but enforceable on your own +risk: RAID1 (3+ disks), RAID1E (3+ disks), RAID10 (6+ disks). +.It JMicron +The format used by JMicron RAID BIOS. +Supports one volume per array. +Supports configurations: RAID0 (2+ disks), RAID1 (2 disks), +RAID10 (4 disks), CONCAT (2+ disks). +Configurations not supported by JMicron RAID BIOS, but enforceable on your own +risk: RAID1 (3+ disks), RAID1E (3+ disks), RAID10 (6+ disks), RAID5 (3+ disks). +.It NVIDIA +The format used by NVIDIA MediaShield RAID BIOS. +Supports one volume per array. +Supports configurations: RAID0 (2+ disks), RAID1 (2 disks), +RAID5 (3+ disks), RAID10 (4+ disks), SINGLE (1 disk), CONCAT (2+ disks). +Configurations not supported by NVIDIA MediaShield RAID BIOS, but enforceable +on your own risk: RAID1 (3+ disks). +.It Promise +The format used by Promise and AMD/ATI RAID BIOSes and FreeBSD ataraid(4) +driver. +Supports multiple volumes per array. +Each disk can be split to be used by up to two arbitrary volumes. +Supports configurations: RAID0 (2+ disks), RAID1 (2 disks), +RAID5 (3+ disks), RAID10 (4 disks), SINGLE (1 disk), CONCAT (2+ disks). +Configurations not supported by RAID BIOSes, but enforceable on your +own risk: RAID1 (3+ disks), RAID10 (6+ disks). +.It SiI +The format used by SiliconImage RAID BIOS. +Supports one volume per array. +Supports configurations: RAID0 (2+ disks), RAID1 (2 disks), +RAID5 (3+ disks), RAID10 (4 disks), SINGLE (1 disk), CONCAT (2+ disks). +Configurations not supported by SiliconImage RAID BIOS, but enforceable on your +own risk: RAID1 (3+ disks), RAID10 (6+ disks). +.El +.Sh SUPPORTED RAID LEVELS +The GEOM RAID class follows a modular design, allowing different RAID levels +to be used. +Support for the following RAID levels is currently implemented: RAID0, RAID1, +RAID1E, RAID10, SINGLE, CONCAT. +.Sh RAID LEVEL MIGRATION +The GEOM RAID class has no support for RAID level migration, allowed by some +metadata formats. +If you started migration using BIOS or in some other way, make sure to +complete it there. +Do not run GEOM RAID class on migrating volumes under pain of possible data +corruption! +.Sh EXIT STATUS +Exit status is 0 on success, and non-zero if the command fails. +.Sh SEE ALSO +.Xr geom 4 , +.Xr geom 8 , +.Xr vinum 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 9.0 . +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org +.An M. Warner Losh Aq imp@FreeBSD.org Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Mar 24 20:28:09 2011 (r219973) +++ head/sys/conf/NOTES Thu Mar 24 21:31:32 2011 (r219974) @@ -163,6 +163,7 @@ options GEOM_PART_MBR # MBR partitioni options GEOM_PART_PC98 # PC-9800 disk partitioning options GEOM_PART_VTOC8 # SMI VTOC8 disk label options GEOM_PC98 # NEC PC9800 partitioning +options GEOM_RAID # Soft RAID functionality. options GEOM_RAID3 # RAID3 functionality. options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Mar 24 20:28:09 2011 (r219973) +++ head/sys/conf/files Thu Mar 24 21:31:32 2011 (r219974) @@ -2115,6 +2115,19 @@ geom/part/g_part_gpt.c optional geom_pa geom/part/g_part_mbr.c optional geom_part_mbr geom/part/g_part_pc98.c optional geom_part_pc98 geom/part/g_part_vtoc8.c optional geom_part_vtoc8 +geom/raid/g_raid.c optional geom_raid +geom/raid/g_raid_ctl.c optional geom_raid +geom/raid/g_raid_md_if.m optional geom_raid +geom/raid/g_raid_tr_if.m optional geom_raid +geom/raid/md_intel.c optional geom_raid +geom/raid/md_jmicron.c optional geom_raid +geom/raid/md_nvidia.c optional geom_raid +geom/raid/md_promise.c optional geom_raid +geom/raid/md_sii.c optional geom_raid +geom/raid/tr_concat.c optional geom_raid +geom/raid/tr_raid0.c optional geom_raid +geom/raid/tr_raid1.c optional geom_raid +geom/raid/tr_raid1e.c optional geom_raid geom/raid3/g_raid3.c optional geom_raid3 geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Mar 24 20:28:09 2011 (r219973) +++ head/sys/conf/options Thu Mar 24 21:31:32 2011 (r219974) @@ -102,6 +102,7 @@ GEOM_PART_MBR opt_geom.h GEOM_PART_PC98 opt_geom.h GEOM_PART_VTOC8 opt_geom.h GEOM_PC98 opt_geom.h +GEOM_RAID opt_geom.h GEOM_RAID3 opt_geom.h GEOM_SHSEC opt_geom.h GEOM_STRIPE opt_geom.h Added: head/sys/geom/raid/g_raid.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/raid/g_raid.c Thu Mar 24 21:31:32 2011 (r219974) @@ -0,0 +1,2340 @@ +/*- + * Copyright (c) 2010 Alexander Motin + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "g_raid_md_if.h" +#include "g_raid_tr_if.h" + +static MALLOC_DEFINE(M_RAID, "raid_data", "GEOM_RAID Data"); + +SYSCTL_DECL(_kern_geom); +SYSCTL_NODE(_kern_geom, OID_AUTO, raid, CTLFLAG_RW, 0, "GEOM_RAID stuff"); +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, + &g_raid_aggressive_spare, 0, "Use disks without metadata as spare"); +u_int g_raid_debug = 2; +TUNABLE_INT("kern.geom.raid.debug", &g_raid_debug); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, debug, CTLFLAG_RW, &g_raid_debug, 0, + "Debug level"); +int g_raid_read_err_thresh = 10; +TUNABLE_INT("kern.geom.raid.read_err_thresh", &g_raid_read_err_thresh); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, read_err_thresh, CTLFLAG_RW, + &g_raid_read_err_thresh, 0, + "Number of read errors equated to disk failure"); +u_int g_raid_start_timeout = 30; +TUNABLE_INT("kern.geom.raid.start_timeout", &g_raid_start_timeout); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, start_timeout, CTLFLAG_RW, + &g_raid_start_timeout, 0, + "Time to wait for all array components"); +static u_int g_raid_clean_time = 5; +TUNABLE_INT("kern.geom.raid.clean_time", &g_raid_clean_time); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, clean_time, CTLFLAG_RW, + &g_raid_clean_time, 0, "Mark volume as clean when idling"); +static u_int g_raid_disconnect_on_failure = 1; +TUNABLE_INT("kern.geom.raid.disconnect_on_failure", + &g_raid_disconnect_on_failure); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, disconnect_on_failure, CTLFLAG_RW, + &g_raid_disconnect_on_failure, 0, "Disconnect component on I/O failure."); +static u_int g_raid_name_format = 0; +TUNABLE_INT("kern.geom.raid.name_format", &g_raid_name_format); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, name_format, CTLFLAG_RW, + &g_raid_name_format, 0, "Providers name format."); +static u_int g_raid_idle_threshold = 1000000; +TUNABLE_INT("kern.geom.raid.idle_threshold", &g_raid_idle_threshold); +SYSCTL_UINT(_kern_geom_raid, OID_AUTO, idle_threshold, CTLFLAG_RW, + &g_raid_idle_threshold, 1000000, + "Time in microseconds to consider a volume idle."); + +#define MSLEEP(rv, ident, mtx, priority, wmesg, timeout) do { \ + G_RAID_DEBUG(4, "%s: Sleeping %p.", __func__, (ident)); \ + rv = msleep((ident), (mtx), (priority), (wmesg), (timeout)); \ + G_RAID_DEBUG(4, "%s: Woken up %p.", __func__, (ident)); \ +} while (0) + +LIST_HEAD(, g_raid_md_class) g_raid_md_classes = + LIST_HEAD_INITIALIZER(g_raid_md_classes); + +LIST_HEAD(, g_raid_tr_class) g_raid_tr_classes = + LIST_HEAD_INITIALIZER(g_raid_tr_classes); + +LIST_HEAD(, g_raid_volume) g_raid_volumes = + LIST_HEAD_INITIALIZER(g_raid_volumes); + +static eventhandler_tag g_raid_pre_sync = NULL; +static int g_raid_started = 0; + +static int g_raid_destroy_geom(struct gctl_req *req, struct g_class *mp, + struct g_geom *gp); +static g_taste_t g_raid_taste; +static void g_raid_init(struct g_class *mp); +static void g_raid_fini(struct g_class *mp); + +struct g_class g_raid_class = { + .name = G_RAID_CLASS_NAME, + .version = G_VERSION, + .ctlreq = g_raid_ctl, + .taste = g_raid_taste, + .destroy_geom = g_raid_destroy_geom, + .init = g_raid_init, + .fini = g_raid_fini +}; + +static void g_raid_destroy_provider(struct g_raid_volume *vol); +static int g_raid_update_disk(struct g_raid_disk *disk, u_int event); +static int g_raid_update_subdisk(struct g_raid_subdisk *subdisk, u_int event); +static int g_raid_update_volume(struct g_raid_volume *vol, u_int event); +static int g_raid_update_node(struct g_raid_softc *sc, u_int event); +static void g_raid_dumpconf(struct sbuf *sb, const char *indent, + struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); +static void g_raid_start(struct bio *bp); +static void g_raid_start_request(struct bio *bp); +static void g_raid_disk_done(struct bio *bp); +static void g_raid_poll(struct g_raid_softc *sc); + +static const char * +g_raid_node_event2str(int event) +{ + + switch (event) { + case G_RAID_NODE_E_WAKE: + return ("WAKE"); + case G_RAID_NODE_E_START: + return ("START"); + default: + return ("INVALID"); + } +} + +const char * +g_raid_disk_state2str(int state) +{ + + switch (state) { + case G_RAID_DISK_S_NONE: + return ("NONE"); + case G_RAID_DISK_S_OFFLINE: + return ("OFFLINE"); + case G_RAID_DISK_S_FAILED: + return ("FAILED"); + case G_RAID_DISK_S_STALE_FAILED: + return ("STALE_FAILED"); + case G_RAID_DISK_S_SPARE: + return ("SPARE"); + case G_RAID_DISK_S_STALE: + return ("STALE"); + case G_RAID_DISK_S_ACTIVE: + return ("ACTIVE"); + default: + return ("INVALID"); + } +} + +static const char * +g_raid_disk_event2str(int event) +{ + + switch (event) { + case G_RAID_DISK_E_DISCONNECTED: + return ("DISCONNECTED"); + default: + return ("INVALID"); + } +} + +const char * +g_raid_subdisk_state2str(int state) +{ + + switch (state) { + case G_RAID_SUBDISK_S_NONE: + return ("NONE"); + case G_RAID_SUBDISK_S_FAILED: + return ("FAILED"); + case G_RAID_SUBDISK_S_NEW: + return ("NEW"); + case G_RAID_SUBDISK_S_REBUILD: + return ("REBUILD"); + case G_RAID_SUBDISK_S_UNINITIALIZED: + return ("UNINITIALIZED"); + case G_RAID_SUBDISK_S_STALE: + return ("STALE"); + case G_RAID_SUBDISK_S_RESYNC: + return ("RESYNC"); + case G_RAID_SUBDISK_S_ACTIVE: + return ("ACTIVE"); + default: + return ("INVALID"); + } +} + +static const char * +g_raid_subdisk_event2str(int event) +{ + + switch (event) { + case G_RAID_SUBDISK_E_NEW: + return ("NEW"); + case G_RAID_SUBDISK_E_DISCONNECTED: + return ("DISCONNECTED"); + default: + return ("INVALID"); + } +} + +const char * +g_raid_volume_state2str(int state) +{ + + switch (state) { + case G_RAID_VOLUME_S_STARTING: + return ("STARTING"); + case G_RAID_VOLUME_S_BROKEN: + return ("BROKEN"); + case G_RAID_VOLUME_S_DEGRADED: + return ("DEGRADED"); + case G_RAID_VOLUME_S_SUBOPTIMAL: + return ("SUBOPTIMAL"); + case G_RAID_VOLUME_S_OPTIMAL: + return ("OPTIMAL"); + case G_RAID_VOLUME_S_UNSUPPORTED: + return ("UNSUPPORTED"); + case G_RAID_VOLUME_S_STOPPED: + return ("STOPPED"); + default: + return ("INVALID"); + } +} + +static const char * +g_raid_volume_event2str(int event) +{ + + switch (event) { + case G_RAID_VOLUME_E_UP: + return ("UP"); + case G_RAID_VOLUME_E_DOWN: + return ("DOWN"); + case G_RAID_VOLUME_E_START: + return ("START"); + case G_RAID_VOLUME_E_STARTMD: + return ("STARTMD"); + default: + return ("INVALID"); + } +} + +const char * +g_raid_volume_level2str(int level, int qual) +{ + + switch (level) { + case G_RAID_VOLUME_RL_RAID0: + return ("RAID0"); + case G_RAID_VOLUME_RL_RAID1: + return ("RAID1"); + case G_RAID_VOLUME_RL_RAID3: + return ("RAID3"); + case G_RAID_VOLUME_RL_RAID4: + return ("RAID4"); + case G_RAID_VOLUME_RL_RAID5: + return ("RAID5"); + case G_RAID_VOLUME_RL_RAID6: + return ("RAID6"); + case G_RAID_VOLUME_RL_RAID1E: + return ("RAID1E"); + case G_RAID_VOLUME_RL_SINGLE: + return ("SINGLE"); + case G_RAID_VOLUME_RL_CONCAT: + return ("CONCAT"); + case G_RAID_VOLUME_RL_RAID5E: + return ("RAID5E"); + case G_RAID_VOLUME_RL_RAID5EE: + return ("RAID5EE"); + default: + return ("UNKNOWN"); + } +} + +int +g_raid_volume_str2level(const char *str, int *level, int *qual) +{ + + *level = G_RAID_VOLUME_RL_UNKNOWN; + *qual = G_RAID_VOLUME_RLQ_NONE; + if (strcasecmp(str, "RAID0") == 0) + *level = G_RAID_VOLUME_RL_RAID0; + else if (strcasecmp(str, "RAID1") == 0) + *level = G_RAID_VOLUME_RL_RAID1; + else if (strcasecmp(str, "RAID3") == 0) + *level = G_RAID_VOLUME_RL_RAID3; + else if (strcasecmp(str, "RAID4") == 0) + *level = G_RAID_VOLUME_RL_RAID4; + else if (strcasecmp(str, "RAID5") == 0) + *level = G_RAID_VOLUME_RL_RAID5; + else if (strcasecmp(str, "RAID6") == 0) + *level = G_RAID_VOLUME_RL_RAID6; + else if (strcasecmp(str, "RAID10") == 0 || + strcasecmp(str, "RAID1E") == 0) + *level = G_RAID_VOLUME_RL_RAID1E; + else if (strcasecmp(str, "SINGLE") == 0) + *level = G_RAID_VOLUME_RL_SINGLE; + else if (strcasecmp(str, "CONCAT") == 0) + *level = G_RAID_VOLUME_RL_CONCAT; + else if (strcasecmp(str, "RAID5E") == 0) + *level = G_RAID_VOLUME_RL_RAID5E; + else if (strcasecmp(str, "RAID5EE") == 0) + *level = G_RAID_VOLUME_RL_RAID5EE; + else + return (-1); + return (0); +} + +const char * +g_raid_get_diskname(struct g_raid_disk *disk) +{ + + if (disk->d_consumer == NULL || disk->d_consumer->provider == NULL) + return ("[unknown]"); + return (disk->d_consumer->provider->name); +} + +void +g_raid_report_disk_state(struct g_raid_disk *disk) +{ + struct g_raid_subdisk *sd; + int len, state; + uint32_t s; + + if (disk->d_consumer == NULL) + return; + if (disk->d_state == G_RAID_DISK_S_FAILED || + disk->d_state == G_RAID_DISK_S_STALE_FAILED) { + s = G_STATE_FAILED; + } else { + state = G_RAID_SUBDISK_S_ACTIVE; + TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) { + if (sd->sd_state < state) + state = sd->sd_state; + } + if (state == G_RAID_SUBDISK_S_FAILED) + s = G_STATE_FAILED; + else if (state == G_RAID_SUBDISK_S_NEW || + state == G_RAID_SUBDISK_S_REBUILD) + s = G_STATE_REBUILD; + else if (state == G_RAID_SUBDISK_S_STALE || + state == G_RAID_SUBDISK_S_RESYNC) + s = G_STATE_RESYNC; + else + s = G_STATE_ACTIVE; + } + len = sizeof(s); + g_io_getattr("GEOM::setstate", disk->d_consumer, &len, &s); + G_RAID_DEBUG1(2, disk->d_softc, "Disk %s state reported as %d.", + g_raid_get_diskname(disk), s); +} + +void +g_raid_change_disk_state(struct g_raid_disk *disk, int state) +{ + + G_RAID_DEBUG1(0, disk->d_softc, "Disk %s state changed from %s to %s.", + g_raid_get_diskname(disk), + g_raid_disk_state2str(disk->d_state), + g_raid_disk_state2str(state)); + disk->d_state = state; + g_raid_report_disk_state(disk); +} + +void +g_raid_change_subdisk_state(struct g_raid_subdisk *sd, int state) +{ + + G_RAID_DEBUG1(0, sd->sd_softc, + "Subdisk %s:%d-%s state changed from %s to %s.", + sd->sd_volume->v_name, sd->sd_pos, + sd->sd_disk ? g_raid_get_diskname(sd->sd_disk) : "[none]", + g_raid_subdisk_state2str(sd->sd_state), + g_raid_subdisk_state2str(state)); + sd->sd_state = state; + if (sd->sd_disk) + g_raid_report_disk_state(sd->sd_disk); +} + +void +g_raid_change_volume_state(struct g_raid_volume *vol, int state) +{ + + G_RAID_DEBUG1(0, vol->v_softc, + "Volume %s state changed from %s to %s.", + vol->v_name, + g_raid_volume_state2str(vol->v_state), + g_raid_volume_state2str(state)); + vol->v_state = state; +} + +/* + * --- Events handling functions --- + * Events in geom_raid are used to maintain subdisks and volumes status + * from one thread to simplify locking. + */ +static void +g_raid_event_free(struct g_raid_event *ep) +{ + + free(ep, M_RAID); +} + +int +g_raid_event_send(void *arg, int event, int flags) +{ + struct g_raid_softc *sc; + struct g_raid_event *ep; + int error; + + if ((flags & G_RAID_EVENT_VOLUME) != 0) { + sc = ((struct g_raid_volume *)arg)->v_softc; + } else if ((flags & G_RAID_EVENT_DISK) != 0) { + sc = ((struct g_raid_disk *)arg)->d_softc; + } else if ((flags & G_RAID_EVENT_SUBDISK) != 0) { + sc = ((struct g_raid_subdisk *)arg)->sd_softc; + } else { + sc = arg; + } + ep = malloc(sizeof(*ep), M_RAID, + sx_xlocked(&sc->sc_lock) ? M_WAITOK : M_NOWAIT); + if (ep == NULL) + return (ENOMEM); + ep->e_tgt = arg; + ep->e_event = event; + ep->e_flags = flags; + ep->e_error = 0; + G_RAID_DEBUG1(4, sc, "Sending event %p. Waking up %p.", ep, sc); + mtx_lock(&sc->sc_queue_mtx); + TAILQ_INSERT_TAIL(&sc->sc_events, ep, e_next); + mtx_unlock(&sc->sc_queue_mtx); + wakeup(sc); + + if ((flags & G_RAID_EVENT_WAIT) == 0) + return (0); + + sx_assert(&sc->sc_lock, SX_XLOCKED); + G_RAID_DEBUG1(4, sc, "Sleeping on %p.", ep); + sx_xunlock(&sc->sc_lock); + while ((ep->e_flags & G_RAID_EVENT_DONE) == 0) { + mtx_lock(&sc->sc_queue_mtx); + MSLEEP(error, ep, &sc->sc_queue_mtx, PRIBIO | PDROP, "m:event", + hz * 5); + } + error = ep->e_error; + g_raid_event_free(ep); + sx_xlock(&sc->sc_lock); + return (error); +} + +static void +g_raid_event_cancel(struct g_raid_softc *sc, void *tgt) +{ + struct g_raid_event *ep, *tmpep; + + sx_assert(&sc->sc_lock, SX_XLOCKED); + + mtx_lock(&sc->sc_queue_mtx); + TAILQ_FOREACH_SAFE(ep, &sc->sc_events, e_next, tmpep) { + if (ep->e_tgt != tgt) + continue; + TAILQ_REMOVE(&sc->sc_events, ep, e_next); + if ((ep->e_flags & G_RAID_EVENT_WAIT) == 0) + g_raid_event_free(ep); + else { + ep->e_error = ECANCELED; + wakeup(ep); + } + } + mtx_unlock(&sc->sc_queue_mtx); +} + +static int +g_raid_event_check(struct g_raid_softc *sc, void *tgt) +{ + struct g_raid_event *ep; + int res = 0; + + sx_assert(&sc->sc_lock, SX_XLOCKED); + + mtx_lock(&sc->sc_queue_mtx); + TAILQ_FOREACH(ep, &sc->sc_events, e_next) { + if (ep->e_tgt != tgt) + continue; + res = 1; + break; + } + mtx_unlock(&sc->sc_queue_mtx); + return (res); +} + +/* + * Return the number of disks in given state. + * If state is equal to -1, count all connected disks. + */ +u_int +g_raid_ndisks(struct g_raid_softc *sc, int state) +{ + struct g_raid_disk *disk; + u_int n; + + sx_assert(&sc->sc_lock, SX_LOCKED); + + n = 0; + TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { + if (disk->d_state == state || state == -1) + n++; + } + return (n); +} + +/* + * Return the number of subdisks in given state. + * If state is equal to -1, count all connected disks. + */ +u_int +g_raid_nsubdisks(struct g_raid_volume *vol, int state) +{ + struct g_raid_subdisk *subdisk; + struct g_raid_softc *sc; + u_int i, n ; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Mar 24 23:26:15 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E3651065687; Thu, 24 Mar 2011 23:26:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F17EE8FC15; Thu, 24 Mar 2011 23:26:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id p2ONJSf4035381; Thu, 24 Mar 2011 17:19:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Message-ID: <4D8BD180.1060600@bsdimp.com> Date: Thu, 24 Mar 2011 17:19:28 -0600 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <201103161644.p2GGi8ug098283@svn.freebsd.org> <20110317200156.GB65858@server.vk2pj.dyndns.org> <201103171706.12993.jkim@FreeBSD.org> <201103230834.19151.jhb@freebsd.org> In-Reply-To: <201103230834.19151.jhb@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, Peter Jeremy , Jung-uk Kim Subject: Re: svn commit: r219700 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 23:26:15 -0000 On 03/23/2011 06:34, John Baldwin wrote: > On Thursday, March 17, 2011 5:06:09 pm Jung-uk Kim wrote: >> On Thursday 17 March 2011 04:01 pm, Peter Jeremy wrote: >>> On 2011-Mar-16 16:44:08 +0000, Jung-uk Kim wrote: >>>> Log: >>>> Revert r219676. >>> Thanks also. For extra kudos, how about adding a similar function >>> to allow the HPET frequency to be over-ridden. That is currently >>> the only timecounter that does not allow the user to compensate for >>> incorrect hardware frequencies. >> I really hate the idea of adjusting timecounter frequency from >> userland. I guess "use ntpd(8)" is not a good answer for some >> people. :-( > Actually, that doesn't work well if your timecounter frequency is off by a > lot. Having the timecounter frequency accurate improves the accuracy of > things like ntpd and ptpd. ntpd requires that the time counter be within 128ppm of true. If the time counter guess is off by more than that, you lose: ntpd won't work. Warner From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:03:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 658BF1065670; Fri, 25 Mar 2011 00:03:22 +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 3A8E88FC08; Fri, 25 Mar 2011 00:03:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P03MYJ061353; Fri, 25 Mar 2011 00:03:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P03Mh5061350; Fri, 25 Mar 2011 00:03:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250003.p2P03Mh5061350@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219975 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 00:03:22 -0000 Author: adrian Date: Fri Mar 25 00:03:21 2011 New Revision: 219975 URL: http://svn.freebsd.org/changeset/base/219975 Log: Bring over interrupt mitigation changes from ath9k. * The existing interrupt mitigation code didn't mitigate anything - the per-packet TX/RX interrupts are still occuring. It's possible this worked for the AR5416 but not any later chipsets; I'll investigate and update as needed. * Set both the RX and TX threshold registers whilst I'm at it. This is verified to work on the AR9220 and AR9160. I'm leaving it off by default in case it's truely broken, but I need to have it enabled when doing 11n testing or interrupt loads exceed 10,000 interrupts/sec. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Mar 24 21:31:32 2011 (r219974) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Fri Mar 25 00:03:21 2011 (r219975) @@ -194,6 +194,23 @@ ar5416SetInterrupts(struct ath_hal *ah, mask = ints & HAL_INT_COMMON; mask2 = 0; +#ifdef AR5416_INT_MITIGATION + /* + * Overwrite default mask if Interrupt mitigation + * is specified for AR5416 + */ + mask = ints & HAL_INT_COMMON; + if (ints & HAL_INT_TX) + mask |= AR_IMR_TXMINTR | AR_IMR_TXINTM; + if (ints & HAL_INT_RX) + mask |= AR_IMR_RXERR | AR_IMR_RXMINTR | AR_IMR_RXINTM; + if (ints & HAL_INT_TX) { + if (ahp->ah_txErrInterruptMask) + mask |= AR_IMR_TXERR; + if (ahp->ah_txEolInterruptMask) + mask |= AR_IMR_TXEOL; + } +#else if (ints & HAL_INT_TX) { if (ahp->ah_txOkInterruptMask) mask |= AR_IMR_TXOK; @@ -206,16 +223,6 @@ ar5416SetInterrupts(struct ath_hal *ah, } if (ints & HAL_INT_RX) mask |= AR_IMR_RXOK | AR_IMR_RXERR | AR_IMR_RXDESC; -#ifdef AR5416_INT_MITIGATION - /* - * Overwrite default mask if Interrupt mitigation - * is specified for AR5416 - */ - mask = ints & HAL_INT_COMMON; - if (ints & HAL_INT_TX) - mask |= AR_IMR_TXMINTR | AR_IMR_TXINTM; - if (ints & HAL_INT_RX) - mask |= AR_IMR_RXERR | AR_IMR_RXMINTR | AR_IMR_RXINTM; #endif if (ints & (HAL_INT_BMISC)) { mask |= AR_IMR_BCNMISC; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu Mar 24 21:31:32 2011 (r219974) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Mar 25 00:03:21 2011 (r219975) @@ -307,8 +307,11 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO #ifdef AR5416_INT_MITIGATION OS_REG_WRITE(ah, AR_MIRT, 0); + OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500); OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000); + OS_REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_LAST, 300); + OS_REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_FIRST, 750); #endif ar5416InitBB(ah, chan); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:05:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E4F1065670; Fri, 25 Mar 2011 00:05:26 +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 539728FC08; Fri, 25 Mar 2011 00:05:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P05QE4061438; Fri, 25 Mar 2011 00:05:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P05QIw061436; Fri, 25 Mar 2011 00:05:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250005.p2P05QIw061436@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:05: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: r219976 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 00:05:26 -0000 Author: adrian Date: Fri Mar 25 00:05:26 2011 New Revision: 219976 URL: http://svn.freebsd.org/changeset/base/219976 Log: Add some more AR_PCU_MISC_MODE2 register settings - these are SOWL or later. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Mar 25 00:03:21 2011 (r219975) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Mar 25 00:05:26 2011 (r219976) @@ -24,6 +24,7 @@ #include "ah_eeprom_v14.h" /* for CAL_TARGET_POWER_* */ #define AR5416_MAGIC 0x20065416 +#define AR5416_INT_MITIGATION 1 enum { HAL_RESET_POWER_ON, From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:06:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0951F1065673; Fri, 25 Mar 2011 00:06:20 +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 ED2448FC1B; Fri, 25 Mar 2011 00:06:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P06JeJ061495; Fri, 25 Mar 2011 00:06:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P06J9u061493; Fri, 25 Mar 2011 00:06:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250006.p2P06J9u061493@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:06: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: r219977 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 00:06:20 -0000 Author: adrian Date: Fri Mar 25 00:06:19 2011 New Revision: 219977 URL: http://svn.freebsd.org/changeset/base/219977 Log: oops, commited the wrong file change. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Mar 25 00:05:26 2011 (r219976) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Mar 25 00:06:19 2011 (r219977) @@ -24,7 +24,6 @@ #include "ah_eeprom_v14.h" /* for CAL_TARGET_POWER_* */ #define AR5416_MAGIC 0x20065416 -#define AR5416_INT_MITIGATION 1 enum { HAL_RESET_POWER_ON, From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:06:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A52D4106567C; Fri, 25 Mar 2011 00:06:58 +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 94D898FC1B; Fri, 25 Mar 2011 00:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P06w7r061541; Fri, 25 Mar 2011 00:06:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P06wgt061539; Fri, 25 Mar 2011 00:06:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250006.p2P06wgt061539@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:06: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: r219978 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 00:06:58 -0000 Author: adrian Date: Fri Mar 25 00:06:58 2011 New Revision: 219978 URL: http://svn.freebsd.org/changeset/base/219978 Log: The right commit - add a couple more AR_PCU_MISC_MODE2 register bits - SOWL specific. 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 Fri Mar 25 00:06:19 2011 (r219977) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Mar 25 00:06:58 2011 (r219978) @@ -504,6 +504,8 @@ #define AR_PCU_CLEAR_VMF 0x01000000 /* clear vmf mode (fast cc)*/ #define AR_PCU_CLEAR_BA_VALID 0x04000000 /* clear ba state */ +#define AR_PCU_MISC_MODE2_MGMT_CRYPTO_ENABLE 0x00000002 +#define AR_PCU_MISC_MODE2_NO_CRYPTO_FOR_NON_DATA_PKT 0x00000004 #define AR_PCU_MISC_MODE2_HWWAR1 0x00100000 #define AR_PCU_MISC_MODE2_HWWAR2 0x02000000 From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:40:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B3331065673; Fri, 25 Mar 2011 00:40:09 +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 DE7168FC18; Fri, 25 Mar 2011 00:40:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P0e8Z3062327; Fri, 25 Mar 2011 00:40:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P0e86u062324; Fri, 25 Mar 2011 00:40:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250040.p2P0e86u062324@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:40: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: r219979 - in head/sys/dev/ath/ath_hal: ar5416 ar9001 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 00:40:09 -0000 Author: adrian Date: Fri Mar 25 00:40:08 2011 New Revision: 219979 URL: http://svn.freebsd.org/changeset/base/219979 Log: Flip ANI on for the AR5416 and later chips. I haven't verified it on the AR9285 so I'll leave it off for that. Ath9k sources indiciate that one of the ANI modes interferes with RIFS detection, so match ath9k and disable that. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Mar 25 00:06:58 2011 (r219978) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Mar 25 00:40:08 2011 (r219979) @@ -57,8 +57,9 @@ ar5416AniSetup(struct ath_hal *ah) .rssiThrLow = 7, .period = 100, }; - /* NB: ANI is not enabled yet */ - ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE); + /* NB: disable ANI noise immmunity for reliable RIFS rx */ + AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } /* Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Fri Mar 25 00:06:58 2011 (r219978) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Fri Mar 25 00:40:08 2011 (r219979) @@ -80,8 +80,10 @@ ar9160AniSetup(struct ath_hal *ah) .rssiThrLow = 7, .period = 100, }; - /* NB: ANI is not enabled yet */ - ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE); + + /* NB: disable ANI noise immmunity for reliable RIFS rx */ + AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } /* Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Fri Mar 25 00:06:58 2011 (r219978) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Fri Mar 25 00:40:08 2011 (r219979) @@ -96,7 +96,7 @@ ar9280AniSetup(struct ath_hal *ah) AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; /* NB: ANI is not enabled yet */ - ar5416AniAttach(ah, &aniparams, &aniparams, AH_FALSE); + ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } /* From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:45:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F033106566C; Fri, 25 Mar 2011 00:45:25 +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 4465B8FC0A; Fri, 25 Mar 2011 00:45:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P0jPDt062546; Fri, 25 Mar 2011 00:45:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P0jPIA062544; Fri, 25 Mar 2011 00:45:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250045.p2P0jPIA062544@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:45: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: r219980 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 00:45:25 -0000 Author: adrian Date: Fri Mar 25 00:45:24 2011 New Revision: 219980 URL: http://svn.freebsd.org/changeset/base/219980 Log: After discussion with Felix Fietkau (nbd) about the ath9k Merlin LNA bit settings, it seems that our defines are backwards and don't match what is in the EEPROM documentation or internal driver. The ath9k code used to have a bitfield here, rather than a uint8_t, and there were #defines used to swap the order based on the endian of the platform - this wasn't because of nybble or bit ordering of the underlying host but because of what the compiler was doing. This may be the reason for the backwards field numbers, as ath9k had similar issues. Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Mar 25 00:40:08 2011 (r219979) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Mar 25 00:45:24 2011 (r219980) @@ -217,14 +217,14 @@ typedef struct ModalEepHeader { uint8_t ob_ch1; // 1 -> ob and db become chain specific from AR9280 uint8_t db_ch1; // 1 uint8_t flagBits; // 1 -#define AR5416_EEP_FLAG_USEANT1 0x01 /* +1 configured antenna */ -#define AR5416_EEP_FLAG_FORCEXPAON 0x02 /* force XPA bit for 5G */ -#define AR5416_EEP_FLAG_LOCALBIAS 0x04 /* enable local bias */ -#define AR5416_EEP_FLAG_FEMBANDSELECT 0x08 /* FEM band select used */ -#define AR5416_EEP_FLAG_XLNABUFIN 0x10 -#define AR5416_EEP_FLAG_XLNAISEL 0x60 -#define AR5416_EEP_FLAG_XLNAISEL_S 5 -#define AR5416_EEP_FLAG_XLNABUFMODE 0x80 +#define AR5416_EEP_FLAG_USEANT1 0x80 /* +1 configured antenna */ +#define AR5416_EEP_FLAG_FORCEXPAON 0x40 /* force XPA bit for 5G */ +#define AR5416_EEP_FLAG_LOCALBIAS 0x20 /* enable local bias */ +#define AR5416_EEP_FLAG_FEMBANDSELECT 0x10 /* FEM band select used */ +#define AR5416_EEP_FLAG_XLNABUFIN 0x08 +#define AR5416_EEP_FLAG_XLNAISEL1 0x04 +#define AR5416_EEP_FLAG_XLNAISEL2 0x02 +#define AR5416_EEP_FLAG_XLNABUFMODE 0x01 uint8_t miscBits; // [0..1]: bb_tx_dac_scale_cck uint16_t xpaBiasLvlFreq[3]; // 3 uint8_t futureModal[6]; // 6 From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 04:15:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EDF106566C; Fri, 25 Mar 2011 04:15:31 +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 360EF8FC0A; Fri, 25 Mar 2011 04:15:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P4FV9Z067082; Fri, 25 Mar 2011 04:15:31 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P4FVJY067080; Fri, 25 Mar 2011 04:15:31 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250415.p2P4FVJY067080@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 04:15: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: r219981 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 04:15:31 -0000 Author: adrian Date: Fri Mar 25 04:15:30 2011 New Revision: 219981 URL: http://svn.freebsd.org/changeset/base/219981 Log: Re-disable the setting of 2040/shortgi bits for now. This seems to work fine for STA but not HT/20 AP mode. Further discussion with net80211 people will need to take place to ensure that the right flags are set based on the negotiated capabilities of the remote peer, rather than whatever the local parameters are. Sending short-gi frames in 20mhz may work on some chips but it certainly isn't supported on anything currently supported by the HAL; and sending HT40 frames in HT20 mode just plain won't work. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Fri Mar 25 00:45:24 2011 (r219980) +++ head/sys/dev/ath/if_ath_tx_ht.c Fri Mar 25 04:15:30 2011 (r219981) @@ -129,9 +129,9 @@ ath_rateseries_setup(struct ath_softc *s if (flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) series[i].RateFlags |= HAL_RATESERIES_RTS_CTS; +#if 0 if (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) series[i].RateFlags |= HAL_RATESERIES_2040; - /* * The hardware only supports short-gi in 40mhz mode - * if later hardware supports it in 20mhz mode, be sure @@ -139,6 +139,7 @@ ath_rateseries_setup(struct ath_softc *s */ if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) series[i].RateFlags |= HAL_RATESERIES_HALFGI; +#endif series[i].Rate = rt->info[rix[i]].rateCode; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 05:01:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33C02106564A; Fri, 25 Mar 2011 05:01:14 +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 23F6C8FC16; Fri, 25 Mar 2011 05:01:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2P51EkX068069; Fri, 25 Mar 2011 05:01:14 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P51EUd068067; Fri, 25 Mar 2011 05:01:14 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201103250501.p2P51EUd068067@svn.freebsd.org> From: Kevin Lo Date: Fri, 25 Mar 2011 05:01: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: r219982 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 05:01:14 -0000 Author: kevlo Date: Fri Mar 25 05:01:13 2011 New Revision: 219982 URL: http://svn.freebsd.org/changeset/base/219982 Log: Fix panic while associating access point. While here, add the SMC SMCWUSB-G Modified: head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Fri Mar 25 04:15:30 2011 (r219981) +++ head/sys/dev/usb/wlan/if_zyd.c Fri Mar 25 05:01:13 2011 (r219982) @@ -229,6 +229,7 @@ static const struct usb_device_id zyd_de ZYD_ZD1211_DEV(ZYXEL, ZYAIRG220), ZYD_ZD1211_DEV(ZYXEL, G200V2), /* ZYD_ZD1211B */ + ZYD_ZD1211B_DEV(ACCTON, SMCWUSBG_NF), ZYD_ZD1211B_DEV(ACCTON, SMCWUSBG), ZYD_ZD1211B_DEV(ACCTON, ZD1211B), ZYD_ZD1211B_DEV(ASUS, A9T_WIFI), @@ -510,9 +511,6 @@ zyd_tx_free(struct zyd_tx_data *data, in m_freem(data->m); data->m = NULL; - if (txerr == 0) - ieee80211_ratectl_tx_complete(data->ni->ni_vap, - data->ni, IEEE80211_RATECTL_TX_SUCCESS, NULL, NULL); ieee80211_free_node(data->ni); data->ni = NULL; } From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 10:02:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90D3F1065674; Fri, 25 Mar 2011 10:02:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0DE8FC12; Fri, 25 Mar 2011 10:02:17 +0000 (UTC) Received: from c122-107-125-80.carlnfd1.nsw.optusnet.com.au (c122-107-125-80.carlnfd1.nsw.optusnet.com.au [122.107.125.80]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2PA23o7011734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Mar 2011 21:02:05 +1100 Date: Fri, 25 Mar 2011 21:02:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh In-Reply-To: <4D8BD180.1060600@bsdimp.com> Message-ID: <20110325203713.K956@besplex.bde.org> References: <201103161644.p2GGi8ug098283@svn.freebsd.org> <20110317200156.GB65858@server.vk2pj.dyndns.org> <201103171706.12993.jkim@FreeBSD.org> <201103230834.19151.jhb@freebsd.org> <4D8BD180.1060600@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, John Baldwin , Peter Jeremy , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r219700 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 10:02:18 -0000 On Thu, 24 Mar 2011, Warner Losh wrote: > On 03/23/2011 06:34, John Baldwin wrote: >> On Thursday, March 17, 2011 5:06:09 pm Jung-uk Kim wrote: >>> I really hate the idea of adjusting timecounter frequency from >>> userland. I guess "use ntpd(8)" is not a good answer for some >>> people. :-( >> Actually, that doesn't work well if your timecounter frequency is off by a >> lot. Having the timecounter frequency accurate improves the accuracy of >> things like ntpd and ptpd. > > ntpd requires that the time counter be within 128ppm of true. If the time > counter guess is off by more than that, you lose: ntpd won't work. Is ntpd really that broken? What does it do if the drift file has the correct compensation to within 128 ppm? I use an old version of ntpd in which I've observed a positive feedback loop when -x is used to prevent steps and the slew wants to be more than 128 ppm due to a transient. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 10:11:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E53171065686; Fri, 25 Mar 2011 10:11:21 +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 D3C4B8FC15; Fri, 25 Mar 2011 10:11:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PABLqY075034; Fri, 25 Mar 2011 10:11:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PABLY0075032; Fri, 25 Mar 2011 10:11:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201103251011.p2PABLY0075032@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 25 Mar 2011 10:11: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: r219983 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 10:11:22 -0000 Author: hselasky Date: Fri Mar 25 10:11:21 2011 New Revision: 219983 URL: http://svn.freebsd.org/changeset/base/219983 Log: Fix initialisation order with regard to debug prints. Reported by: Luiz Otavio O Souza MFC after: 14 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Fri Mar 25 05:01:13 2011 (r219982) +++ head/sys/dev/usb/controller/ehci.c Fri Mar 25 10:11:21 2011 (r219983) @@ -259,6 +259,8 @@ ehci_init(ehci_softc_t *sc) usb_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0); usb_callout_init_mtx(&sc->sc_tmo_poll, &sc->sc_bus.bus_mtx, 0); + sc->sc_offs = EHCI_CAPLENGTH(EREAD4(sc, EHCI_CAPLEN_HCIVERSION)); + #ifdef USB_DEBUG if (ehciiaadbug) sc->sc_flags |= EHCI_SCFLG_IAADBUG; @@ -269,8 +271,6 @@ ehci_init(ehci_softc_t *sc) } #endif - sc->sc_offs = EHCI_CAPLENGTH(EREAD4(sc, EHCI_CAPLEN_HCIVERSION)); - version = EHCI_HCIVERSION(EREAD4(sc, EHCI_CAPLEN_HCIVERSION)); device_printf(sc->sc_bus.bdev, "EHCI version %x.%x\n", version >> 8, version & 0xff); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 10:53:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA37106566C; Fri, 25 Mar 2011 10:53: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 0D4538FC16; Fri, 25 Mar 2011 10:53:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PArDTX075970; Fri, 25 Mar 2011 10:53:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PArDLv075968; Fri, 25 Mar 2011 10:53:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103251053.p2PArDLv075968@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 10:53: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: r219984 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 10:53:14 -0000 Author: adrian Date: Fri Mar 25 10:53:13 2011 New Revision: 219984 URL: http://svn.freebsd.org/changeset/base/219984 Log: I broke periodic adc calibrations - so restore them to working order. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Mar 25 10:11:21 2011 (r219983) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Mar 25 10:53:13 2011 (r219984) @@ -73,11 +73,11 @@ ar5416IsCalSupp(struct ath_hal *ah, cons case ADC_GAIN_CAL: case ADC_DC_CAL: /* Run ADC Gain Cal for either 5ghz any or 2ghz HT40 */ - if (IEEE80211_IS_CHAN_2GHZ(chan)) - return AH_FALSE; - if (IEEE80211_IS_CHAN_HT20(chan)) - return AH_FALSE; - return AH_TRUE; + if (IEEE80211_IS_CHAN_5GHZ(chan)) + return AH_TRUE; + if (IEEE80211_IS_CHAN_HT40(chan)) + return AH_TRUE; + return AH_FALSE; } return AH_FALSE; } From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 10:55:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 965421065672; Fri, 25 Mar 2011 10:55:25 +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 6A27E8FC17; Fri, 25 Mar 2011 10:55:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PAtPU1076069; Fri, 25 Mar 2011 10:55:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PAtPCr076066; Fri, 25 Mar 2011 10:55:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103251055.p2PAtPCr076066@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 10:55: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: r219985 - in head/sys/dev/ath: . ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 10:55:25 -0000 Author: adrian Date: Fri Mar 25 10:55:25 2011 New Revision: 219985 URL: http://svn.freebsd.org/changeset/base/219985 Log: After discussing with Bernhard, the "right" way in net80211 to check the channel width is ni->ni_chw, which is set to the negotiated channel width. ni->ni_htflags is the capability, rather than the negotiated value. Teach both the TX path and the sample rate module about this. Modified: head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Fri Mar 25 10:53:13 2011 (r219984) +++ head/sys/dev/ath/ath_rate/sample/sample.c Fri Mar 25 10:55:25 2011 (r219985) @@ -484,7 +484,7 @@ update_stats(struct ath_softc *sc, struc const int size_bin = size_to_bin(frame_size); const int size = bin_to_size(size_bin); int tt, tries_so_far; - int is_ht40 = (an->an_node.ni_htcap & IEEE80211_HTCAP_CHWIDTH40); + int is_ht40 = (an->an_node.ni_chw == 40); if (!IS_RATE_DEFINED(sn, rix0)) return; @@ -799,7 +799,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, continue; printf(" %d %s/%d", dot11rate(rt, rix), dot11rate_label(rt, rix), calc_usecs_unicast_packet(sc, 1600, rix, 0,0, - (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40))); + (ni->ni_chw == 40))); } printf("\n"); } @@ -829,7 +829,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, sn->stats[y][rix].perfect_tx_time = calc_usecs_unicast_packet(sc, size, rix, 0, 0, - (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40)); + (ni->ni_chw == 40)); sn->stats[y][rix].average_tx_time = sn->stats[y][rix].perfect_tx_time; } Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Fri Mar 25 10:53:13 2011 (r219984) +++ head/sys/dev/ath/if_ath_tx_ht.c Fri Mar 25 10:55:25 2011 (r219985) @@ -129,9 +129,14 @@ ath_rateseries_setup(struct ath_softc *s if (flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) series[i].RateFlags |= HAL_RATESERIES_RTS_CTS; -#if 0 - if (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) + /* + * Transmit 40MHz frames only if the node has negotiated + * it rather than whether the node is capable of it or not. + * It's subtly different in the hostap case. + */ + if (ni->ni_chw == 40) series[i].RateFlags |= HAL_RATESERIES_2040; +#if 0 /* * The hardware only supports short-gi in 40mhz mode - * if later hardware supports it in 20mhz mode, be sure From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 10:57:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFC10106572F; Fri, 25 Mar 2011 10:57:57 +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 937218FC0C; Fri, 25 Mar 2011 10:57:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PAvvmw078932; Fri, 25 Mar 2011 10:57:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PAvvkL078930; Fri, 25 Mar 2011 10:57:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251057.p2PAvvkL078930@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 10:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219986 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 10:57:57 -0000 Author: kib Date: Fri Mar 25 10:57:57 2011 New Revision: 219986 URL: http://svn.freebsd.org/changeset/base/219986 Log: Fix file leakage in the freebsd32_ioctl routines. Code inspection shows freebsd32_ioctl calls fget for a fd and calls a subroutine to handle each specific ioctl. It is expected that the subroutine will call fdrop when done. However many of the subroutines will exit out early if copyin encounters an error resulting in fdrop never being called. Submitted by: John Wehle MFC after: 3 days Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 10:55:25 2011 (r219985) +++ head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 10:57:57 2011 (r219986) @@ -70,7 +70,6 @@ freebsd32_ioctl_md(struct thread *td, st panic("%s: where is my ioctl data??", __func__); if (uap->com & IOC_IN) { if ((error = copyin(uap->data, &md32, sizeof(md32)))) { - fdrop(fp, td); return (error); } CP(md32, mdv, md_version); @@ -121,7 +120,6 @@ freebsd32_ioctl_md(struct thread *td, st CP(mdv, md32, md_fwsectors); error = copyout(&md32, uap->data, sizeof(md32)); } - fdrop(fp, td); return error; } @@ -144,7 +142,6 @@ freebsd32_ioctl_ioc_toc_header(struct th CP(toch32, toch, ending_track); error = fo_ioctl(fp, CDIOREADTOCHEADER, (caddr_t)&toch, td->td_ucred, td); - fdrop(fp, td); return (error); } @@ -175,7 +172,6 @@ freebsd32_ioctl_ioc_read_toc(struct thre PTROUT_CP(toce, toce32, data); error = copyout(&toce32, uap->data, sizeof(toce32)); } - fdrop(fp, td); return error; } @@ -192,7 +188,6 @@ freebsd32_ioctl_fiodgname(struct thread CP(fgn32, fgn, len); PTRIN_CP(fgn32, fgn, buf); error = fo_ioctl(fp, FIODGNAME, (caddr_t)&fgn, td->td_ucred, td); - fdrop(fp, td); return (error); } @@ -219,16 +214,20 @@ freebsd32_ioctl(struct thread *td, struc case MDIOCDETACH_32: /* FALLTHROUGH */ case MDIOCQUERY_32: /* FALLTHROUGH */ case MDIOCLIST_32: - return freebsd32_ioctl_md(td, uap, fp); + error = freebsd32_ioctl_md(td, uap, fp); + break; case CDIOREADTOCENTRYS_32: - return freebsd32_ioctl_ioc_read_toc(td, uap, fp); + error = freebsd32_ioctl_ioc_read_toc(td, uap, fp); + break; case CDIOREADTOCHEADER_32: - return freebsd32_ioctl_ioc_toc_header(td, uap, fp); + error = freebsd32_ioctl_ioc_toc_header(td, uap, fp); + break; case FIODGNAME_32: - return freebsd32_ioctl_fiodgname(td, uap, fp); + error = freebsd32_ioctl_fiodgname(td, uap, fp); + break; default: fdrop(fp, td); @@ -237,4 +236,7 @@ freebsd32_ioctl(struct thread *td, struc PTRIN_CP(*uap, ap, data); return ioctl(td, &ap); } + + fdrop(fp, td); + return error; } From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 11:05:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 321E51065672; Fri, 25 Mar 2011 11:05:29 +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 20D4E8FC08; Fri, 25 Mar 2011 11:05:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PB5Tpm079118; Fri, 25 Mar 2011 11:05:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PB5T1r079116; Fri, 25 Mar 2011 11:05:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251105.p2PB5T1r079116@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 11:05: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: r219987 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 11:05:29 -0000 Author: kib Date: Fri Mar 25 11:05:28 2011 New Revision: 219987 URL: http://svn.freebsd.org/changeset/base/219987 Log: Remove unneccessary panics, that can be easily triggered by user. The copyin() function handles NULL as well as any other pointer. MFC after: 3 days Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 10:57:57 2011 (r219986) +++ head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 11:05:28 2011 (r219987) @@ -66,8 +66,6 @@ freebsd32_ioctl_md(struct thread *td, st u_long com = 0; int error; - if (uap->data == NULL) - panic("%s: where is my ioctl data??", __func__); if (uap->com & IOC_IN) { if ((error = copyin(uap->data, &md32, sizeof(md32)))) { return (error); @@ -132,9 +130,6 @@ freebsd32_ioctl_ioc_toc_header(struct th struct ioc_toc_header32 toch32; int error; - if (uap->data == NULL) - panic("%s: where is my ioctl data??", __func__); - if ((error = copyin(uap->data, &toch32, sizeof(toch32)))) return (error); CP(toch32, toch, len); @@ -154,9 +149,6 @@ freebsd32_ioctl_ioc_read_toc(struct thre struct ioc_read_toc_entry32 toce32; int error; - if (uap->data == NULL) - panic("%s: where is my ioctl data??", __func__); - if ((error = copyin(uap->data, &toce32, sizeof(toce32)))) return (error); CP(toce32, toce, address_format); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 11:36:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43BE31065778; Fri, 25 Mar 2011 11:36:58 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by mx1.freebsd.org (Postfix) with ESMTP id C3D7B8FC0A; Fri, 25 Mar 2011 11:36:57 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2PBaoTX011709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Mar 2011 22:36:51 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p2PBaoQ3088289; Fri, 25 Mar 2011 22:36:50 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p2PBaooT088288; Fri, 25 Mar 2011 22:36:50 +1100 (EST) (envelope-from peter) Date: Fri, 25 Mar 2011 22:36:49 +1100 From: Peter Jeremy To: Bruce Evans Message-ID: <20110325113649.GC55950@server.vk2pj.dyndns.org> References: <201103161644.p2GGi8ug098283@svn.freebsd.org> <20110317200156.GB65858@server.vk2pj.dyndns.org> <201103171706.12993.jkim@FreeBSD.org> <201103230834.19151.jhb@freebsd.org> <4D8BD180.1060600@bsdimp.com> <20110325203713.K956@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20110325203713.K956@besplex.bde.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Warner Losh , svn-src-head@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r219700 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 11:36:58 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Mar-25 21:02:03 +1100, Bruce Evans wrote: >On Thu, 24 Mar 2011, Warner Losh wrote: >> ntpd requires that the time counter be within 128ppm of true. If the ti= me=20 >> counter guess is off by more than that, you lose: ntpd won't work. I suspect Warner may be confusing the frequency tolerance with the time tolerance here. RFC5905 gives a lock range of +/-500ppm and +/-128msec and the FreeBSD ntpd implements those ranges. The actual timecounter needs to be well within the lock range to prevent the PLL saturating during transient events - I thought the timecounter limit was +/-300ppm but RFC1305 talks about a +/-100ppm limit in order to support an adjustment skew of +/-300ppm. >Is ntpd really that broken? What does it do if the drift file has the >correct compensation to within 128 ppm? RFC1305 includes a fairly detailed description of why the various limits were chosen in its appendices (though this wasn't transferred over to RFC5905). The drift file specifies the PLL frequency offset, capped at +/-500ppm. If the actual drift is outside that value then the PLL will remain stuck at the limit and ntpd will regularly step the time. >I use an old version of ntpd in which I've observed a positive feedback >loop when -x is used to prevent steps and the slew wants to be more than >128 ppm due to a transient. Some versions of ntpd appear to have a bug where, in an environment with significant jitter in peer/server time, the PLL can saturate at +/-500ppm and not recover. This is definitely true of the ntpd in Tru64 5.1 and (from memory) was true of ntpd in some versions of FreeBSD. --=20 Peter Jeremy --opJtzjQTFsWo+cga Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk2MflEACgkQ/opHv/APuIclWwCcD0/cRBOE1HyqgMn38fGzyLNy nUoAoL9qzVFfYvs7At6Rrju37eqgLlVv =C47F -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 11:43:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17FE41065678; Fri, 25 Mar 2011 11:43:50 +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 06AE68FC1E; Fri, 25 Mar 2011 11:43:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PBhnw2079943; Fri, 25 Mar 2011 11:43:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PBhnFO079941; Fri, 25 Mar 2011 11:43:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251143.p2PBhnFO079941@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 11:43: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: r219988 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 11:43:50 -0000 Author: kib Date: Fri Mar 25 11:43:49 2011 New Revision: 219988 URL: http://svn.freebsd.org/changeset/base/219988 Log: Fully emulate MDIOCLIST for compat32. MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 11:05:28 2011 (r219987) +++ head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 11:43:49 2011 (r219988) @@ -64,7 +64,7 @@ freebsd32_ioctl_md(struct thread *td, st struct md_ioctl mdv; struct md_ioctl32 md32; u_long com = 0; - int error; + int i, error; if (uap->com & IOC_IN) { if ((error = copyin(uap->data, &md32, sizeof(md32)))) { @@ -116,6 +116,14 @@ freebsd32_ioctl_md(struct thread *td, st CP(mdv, md32, md_base); CP(mdv, md32, md_fwheads); CP(mdv, md32, md_fwsectors); + if (com == MDIOCLIST) { + /* + * Use MDNPAD, and not MDNPAD32. Padding is + * allocated and used by compat32 ABI. + */ + for (i = 0; i < MDNPAD; i++) + CP(mdv, md32, md_pad[i]); + } error = copyout(&md32, uap->data, sizeof(md32)); } return error; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 11:52:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B400106564A; Fri, 25 Mar 2011 11:52:31 +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 49C238FC08; Fri, 25 Mar 2011 11:52:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PBqVhP080168; Fri, 25 Mar 2011 11:52:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PBqVAC080165; Fri, 25 Mar 2011 11:52:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251152.p2PBqVAC080165@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 11:52: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: r219989 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 11:52:31 -0000 Author: kib Date: Fri Mar 25 11:52:31 2011 New Revision: 219989 URL: http://svn.freebsd.org/changeset/base/219989 Log: Implement compat32 MEMRANGE_GET and MEMRANGE_SET. This is needed to run 32bit Xorg server with VESA driver. Submitted by: John Wehle MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c head/sys/compat/freebsd32/freebsd32_ioctl.h Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 11:43:49 2011 (r219988) +++ head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 11:52:31 2011 (r219989) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -55,6 +57,7 @@ __FBSDID("$FreeBSD$"); CTASSERT((sizeof(struct md_ioctl32)+4) == 436); CTASSERT(sizeof(struct ioc_read_toc_entry32) == 8); CTASSERT(sizeof(struct ioc_toc_header32) == 4); +CTASSERT(sizeof(struct mem_range_op32) == 12); static int @@ -191,6 +194,49 @@ freebsd32_ioctl_fiodgname(struct thread return (error); } +static int +freebsd32_ioctl_memrange(struct thread *td, + struct freebsd32_ioctl_args *uap, struct file *fp) +{ + struct mem_range_op mro; + struct mem_range_op32 mro32; + int error; + u_long com; + + if ((error = copyin(uap->data, &mro32, sizeof(mro32))) != 0) + return (error); + + PTRIN_CP(mro32, mro, mo_desc); + CP(mro32, mro, mo_arg[0]); + CP(mro32, mro, mo_arg[1]); + + com = 0; + switch (uap->com) { + case MEMRANGE_GET32: + com = MEMRANGE_GET; + break; + + case MEMRANGE_SET32: + com = MEMRANGE_SET; + break; + + default: + panic("%s: unknown MEMRANGE %#x", __func__, uap->com); + } + + if ((error = fo_ioctl(fp, com, (caddr_t)&mro, td->td_ucred, td)) != 0) + return (error); + + if ( (com & IOC_OUT) ) { + CP(mro, mro32, mo_arg[0]); + CP(mro, mro32, mo_arg[1]); + + error = copyout(&mro32, uap->data, sizeof(mro32)); + } + + return (error); +} + int freebsd32_ioctl(struct thread *td, struct freebsd32_ioctl_args *uap) { @@ -229,6 +275,11 @@ freebsd32_ioctl(struct thread *td, struc error = freebsd32_ioctl_fiodgname(td, uap, fp); break; + case MEMRANGE_GET32: /* FALLTHROUGH */ + case MEMRANGE_SET32: + error = freebsd32_ioctl_memrange(td, uap, fp); + break; + default: fdrop(fp, td); ap.fd = uap->fd; Modified: head/sys/compat/freebsd32/freebsd32_ioctl.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ioctl.h Fri Mar 25 11:43:49 2011 (r219988) +++ head/sys/compat/freebsd32/freebsd32_ioctl.h Fri Mar 25 11:52:31 2011 (r219989) @@ -67,6 +67,12 @@ struct fiodgname_arg32 { caddr_t32 buf; }; +struct mem_range_op32 +{ + caddr_t32 mo_desc; + int mo_arg[2]; +}; + #define CDIOREADTOCENTRYS_32 _IOWR('c', 5, struct ioc_read_toc_entry32) #define CDIOREADTOCHEADER_32 _IOR('c', 4, struct ioc_toc_header32) #define MDIOCATTACH_32 _IOC(IOC_INOUT, 'm', 0, sizeof(struct md_ioctl32) + 4) @@ -74,5 +80,7 @@ struct fiodgname_arg32 { #define MDIOCQUERY_32 _IOC(IOC_INOUT, 'm', 2, sizeof(struct md_ioctl32) + 4) #define MDIOCLIST_32 _IOC(IOC_INOUT, 'm', 3, sizeof(struct md_ioctl32) + 4) #define FIODGNAME_32 _IOW('f', 120, struct fiodgname_arg32) +#define MEMRANGE_GET32 _IOWR('m', 50, struct mem_range_op32) +#define MEMRANGE_SET32 _IOW('m', 51, struct mem_range_op32) #endif /* _COMPAT_FREEBSD32_IOCTL_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 12:46:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11CB7106564A; Fri, 25 Mar 2011 12:46:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D95078FC12; Fri, 25 Mar 2011 12:46:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PCk8pg081431; Fri, 25 Mar 2011 12:46:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PCk89T081428; Fri, 25 Mar 2011 12:46:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251246.p2PCk89T081428@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 12:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219990 - stable/8/sys/dev/firewire X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:46:09 -0000 Author: marius Date: Fri Mar 25 12:46:08 2011 New Revision: 219990 URL: http://svn.freebsd.org/changeset/base/219990 Log: MFC: r219543 Allocate the DMA memory shared between the host and the controller as coherent. Modified: stable/8/sys/dev/firewire/fwohci.c stable/8/sys/dev/firewire/sbp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/firewire/fwohci.c ============================================================================== --- stable/8/sys/dev/firewire/fwohci.c Fri Mar 25 11:52:31 2011 (r219989) +++ stable/8/sys/dev/firewire/fwohci.c Fri Mar 25 12:46:08 2011 (r219990) @@ -686,7 +686,7 @@ fwohci_init(struct fwohci_softc *sc, dev sc->fc.dev = dev; sc->fc.config_rom = fwdma_malloc(&sc->fc, CROMSIZE, CROMSIZE, - &sc->crom_dma, BUS_DMA_WAITOK); + &sc->crom_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT); if(sc->fc.config_rom == NULL){ device_printf(dev, "config_rom alloc failed."); return ENOMEM; @@ -708,7 +708,7 @@ fwohci_init(struct fwohci_softc *sc, dev /* SID recieve buffer must align 2^11 */ #define OHCI_SIDSIZE (1 << 11) sc->sid_buf = fwdma_malloc(&sc->fc, OHCI_SIDSIZE, OHCI_SIDSIZE, - &sc->sid_dma, BUS_DMA_WAITOK); + &sc->sid_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT); if (sc->sid_buf == NULL) { device_printf(dev, "sid_buf alloc failed."); return ENOMEM; Modified: stable/8/sys/dev/firewire/sbp.c ============================================================================== --- stable/8/sys/dev/firewire/sbp.c Fri Mar 25 11:52:31 2011 (r219989) +++ stable/8/sys/dev/firewire/sbp.c Fri Mar 25 12:46:08 2011 (r219990) @@ -562,7 +562,8 @@ END_DEBUG fwdma_malloc(sbp->fd.fc, /* alignment */ sizeof(uint32_t), - SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT); + SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT); if (sdev->dma.v_addr == NULL) { printf("%s: dma space allocation failed\n", __func__); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 12:47:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ADC11065670; Fri, 25 Mar 2011 12:47:02 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6588FC0C; Fri, 25 Mar 2011 12:47:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PCl1bt081496; Fri, 25 Mar 2011 12:47:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PCl1qo081494; Fri, 25 Mar 2011 12:47:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251247.p2PCl1qo081494@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 12:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219991 - stable/8/sys/dev/sk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:47:02 -0000 Author: marius Date: Fri Mar 25 12:47:01 2011 New Revision: 219991 URL: http://svn.freebsd.org/changeset/base/219991 Log: MFC: r219544 Allocate the DMA memory shared between the host and the controller as coherent. Modified: stable/8/sys/dev/sk/if_sk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/sk/if_sk.c ============================================================================== --- stable/8/sys/dev/sk/if_sk.c Fri Mar 25 12:46:08 2011 (r219990) +++ stable/8/sys/dev/sk/if_sk.c Fri Mar 25 12:47:01 2011 (r219991) @@ -2036,8 +2036,8 @@ sk_dma_alloc(sc_if) /* allocate DMA'able memory and load the DMA map for Tx ring */ error = bus_dmamem_alloc(sc_if->sk_cdata.sk_tx_ring_tag, - (void **)&sc_if->sk_rdata.sk_tx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - &sc_if->sk_cdata.sk_tx_ring_map); + (void **)&sc_if->sk_rdata.sk_tx_ring, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc_if->sk_cdata.sk_tx_ring_map); if (error != 0) { device_printf(sc_if->sk_if_dev, "failed to allocate DMA'able memory for Tx ring\n"); @@ -2057,8 +2057,8 @@ sk_dma_alloc(sc_if) /* allocate DMA'able memory and load the DMA map for Rx ring */ error = bus_dmamem_alloc(sc_if->sk_cdata.sk_rx_ring_tag, - (void **)&sc_if->sk_rdata.sk_rx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - &sc_if->sk_cdata.sk_rx_ring_map); + (void **)&sc_if->sk_rdata.sk_rx_ring, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc_if->sk_cdata.sk_rx_ring_map); if (error != 0) { device_printf(sc_if->sk_if_dev, "failed to allocate DMA'able memory for Rx ring\n"); @@ -2165,8 +2165,9 @@ sk_dma_jumbo_alloc(sc_if) /* allocate DMA'able memory and load the DMA map for jumbo Rx ring */ error = bus_dmamem_alloc(sc_if->sk_cdata.sk_jumbo_rx_ring_tag, - (void **)&sc_if->sk_rdata.sk_jumbo_rx_ring, - BUS_DMA_NOWAIT|BUS_DMA_ZERO, &sc_if->sk_cdata.sk_jumbo_rx_ring_map); + (void **)&sc_if->sk_rdata.sk_jumbo_rx_ring, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, + &sc_if->sk_cdata.sk_jumbo_rx_ring_map); if (error != 0) { device_printf(sc_if->sk_if_dev, "failed to allocate DMA'able memory for jumbo Rx ring\n"); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 12:48:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2A43106566B; Fri, 25 Mar 2011 12:48:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90B648FC24; Fri, 25 Mar 2011 12:48:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PCm6Uo081569; Fri, 25 Mar 2011 12:48:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PCm6Eu081567; Fri, 25 Mar 2011 12:48:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251248.p2PCm6Eu081567@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 12:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219992 - stable/8/sys/dev/stge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:48:06 -0000 Author: marius Date: Fri Mar 25 12:48:06 2011 New Revision: 219992 URL: http://svn.freebsd.org/changeset/base/219992 Log: MFC: r219545 Allocate the DMA memory shared between the host and the controller as coherent. Modified: stable/8/sys/dev/stge/if_stge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/stge/if_stge.c ============================================================================== --- stable/8/sys/dev/stge/if_stge.c Fri Mar 25 12:47:01 2011 (r219991) +++ stable/8/sys/dev/stge/if_stge.c Fri Mar 25 12:48:06 2011 (r219992) @@ -967,8 +967,8 @@ stge_dma_alloc(struct stge_softc *sc) /* allocate DMA'able memory and load the DMA map for Tx ring. */ error = bus_dmamem_alloc(sc->sc_cdata.stge_tx_ring_tag, - (void **)&sc->sc_rdata.stge_tx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - &sc->sc_cdata.stge_tx_ring_map); + (void **)&sc->sc_rdata.stge_tx_ring, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->sc_cdata.stge_tx_ring_map); if (error != 0) { device_printf(sc->sc_dev, "failed to allocate DMA'able memory for Tx ring\n"); @@ -988,8 +988,8 @@ stge_dma_alloc(struct stge_softc *sc) /* allocate DMA'able memory and load the DMA map for Rx ring. */ error = bus_dmamem_alloc(sc->sc_cdata.stge_rx_ring_tag, - (void **)&sc->sc_rdata.stge_rx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - &sc->sc_cdata.stge_rx_ring_map); + (void **)&sc->sc_rdata.stge_rx_ring, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->sc_cdata.stge_rx_ring_map); if (error != 0) { device_printf(sc->sc_dev, "failed to allocate DMA'able memory for Rx ring\n"); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 12:48:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2BD11065673; Fri, 25 Mar 2011 12:48:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0E418FC0A; Fri, 25 Mar 2011 12:48:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PCmuBu081630; Fri, 25 Mar 2011 12:48:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PCmutx081628; Fri, 25 Mar 2011 12:48:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251248.p2PCmutx081628@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 12:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219993 - stable/8/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:48:56 -0000 Author: marius Date: Fri Mar 25 12:48:56 2011 New Revision: 219993 URL: http://svn.freebsd.org/changeset/base/219993 Log: MFC: r219545 Allocate the DMA memory shared between the host and the controller as coherent. Modified: stable/8/sys/dev/xl/if_xl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/xl/if_xl.c ============================================================================== --- stable/8/sys/dev/xl/if_xl.c Fri Mar 25 12:48:06 2011 (r219992) +++ stable/8/sys/dev/xl/if_xl.c Fri Mar 25 12:48:56 2011 (r219993) @@ -1317,8 +1317,8 @@ xl_attach(device_t dev) } error = bus_dmamem_alloc(sc->xl_ldata.xl_rx_tag, - (void **)&sc->xl_ldata.xl_rx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - &sc->xl_ldata.xl_rx_dmamap); + (void **)&sc->xl_ldata.xl_rx_list, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->xl_ldata.xl_rx_dmamap); if (error) { device_printf(dev, "no memory for rx list buffers!\n"); bus_dma_tag_destroy(sc->xl_ldata.xl_rx_tag); @@ -1349,8 +1349,8 @@ xl_attach(device_t dev) } error = bus_dmamem_alloc(sc->xl_ldata.xl_tx_tag, - (void **)&sc->xl_ldata.xl_tx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - &sc->xl_ldata.xl_tx_dmamap); + (void **)&sc->xl_ldata.xl_tx_list, BUS_DMA_NOWAIT | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->xl_ldata.xl_tx_dmamap); if (error) { device_printf(dev, "no memory for list buffers!\n"); bus_dma_tag_destroy(sc->xl_ldata.xl_tx_tag); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 12:50:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6C43106566B; Fri, 25 Mar 2011 12:50:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7F68FC1F; Fri, 25 Mar 2011 12:50:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PCoo3t081738; Fri, 25 Mar 2011 12:50:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PCoohT081735; Fri, 25 Mar 2011 12:50:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251250.p2PCoohT081735@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 12:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219994 - stable/8/sys/dev/ti X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:50:50 -0000 Author: marius Date: Fri Mar 25 12:50:50 2011 New Revision: 219994 URL: http://svn.freebsd.org/changeset/base/219994 Log: MFC: r219547 - Allocate the DMA memory shared between the host and the controller as coherent. - Constify the ti_devs table. - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that. Modified: stable/8/sys/dev/ti/if_ti.c stable/8/sys/dev/ti/if_tireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ti/if_ti.c ============================================================================== --- stable/8/sys/dev/ti/if_ti.c Fri Mar 25 12:48:56 2011 (r219993) +++ stable/8/sys/dev/ti/if_ti.c Fri Mar 25 12:50:50 2011 (r219994) @@ -145,7 +145,7 @@ typedef enum { * Various supported device vendors/types and their names. */ -static struct ti_type ti_devs[] = { +static const struct ti_type const ti_devs[] = { { ALT_VENDORID, ALT_DEVICEID_ACENIC, "Alteon AceNIC 1000baseSX Gigabit Ethernet" }, { ALT_VENDORID, ALT_DEVICEID_ACENIC_COPPER, @@ -1118,7 +1118,8 @@ ti_alloc_jumbo_mem(sc) if (bus_dmamem_alloc(sc->ti_jumbo_dmat, (void**)&sc->ti_cdata.ti_jumbo_buf, - BUS_DMA_NOWAIT, &sc->ti_jumbo_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &sc->ti_jumbo_dmamap) != 0) { device_printf(sc->ti_dev, "Failed to allocate jumbo memory\n"); return (ENOBUFS); } @@ -2254,7 +2255,7 @@ static int ti_probe(dev) device_t dev; { - struct ti_type *t; + const struct ti_type *t; t = ti_devs; @@ -2390,7 +2391,8 @@ ti_attach(dev) } if (bus_dmamem_alloc(sc->ti_rdata_dmat, (void**)&sc->ti_rdata, - BUS_DMA_NOWAIT, &sc->ti_rdata_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &sc->ti_rdata_dmamap) != 0) { device_printf(dev, "Failed to allocate rdata memory\n"); error = ENOMEM; goto fail; @@ -2489,7 +2491,6 @@ ti_attach(dev) ifp->if_watchdog = ti_watchdog; ifp->if_init = ti_init; ifp->if_baudrate = 1000000000; - ifp->if_mtu = ETHERMTU; ifp->if_snd.ifq_maxlen = TI_TX_RING_CNT - 1; /* Set up ifmedia support. */ Modified: stable/8/sys/dev/ti/if_tireg.h ============================================================================== --- stable/8/sys/dev/ti/if_tireg.h Fri Mar 25 12:48:56 2011 (r219993) +++ stable/8/sys/dev/ti/if_tireg.h Fri Mar 25 12:50:50 2011 (r219994) @@ -967,7 +967,7 @@ struct ti_chain_data { struct ti_type { u_int16_t ti_vid; u_int16_t ti_did; - char *ti_name; + const char *ti_name; }; #define TI_HWREV_TIGON 0x01 From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 12:53:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C53D6106566B; Fri, 25 Mar 2011 12:53:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B34788FC20; Fri, 25 Mar 2011 12:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PCr9X4081881; Fri, 25 Mar 2011 12:53:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PCr9ZY081879; Fri, 25 Mar 2011 12:53:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251253.p2PCr9ZY081879@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 12:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219995 - stable/8/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 12:53:09 -0000 Author: marius Date: Fri Mar 25 12:53:09 2011 New Revision: 219995 URL: http://svn.freebsd.org/changeset/base/219995 Log: MFC: r219548 Allocate the sound buffer DMA memory coherent. While NetBSD typically also does this for sound drivers it's probably not necessary for all combinations of controllers and drivers. However, given that our sound drivers completely lack bus_dmamap_sync(9) calls this at least serves as a workaround when enabling use of the IOMMU streaming buffers on sparc64 and generally for arm and mips. Modified: stable/8/sys/dev/sound/pcm/buffer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/sound/pcm/buffer.c ============================================================================== --- stable/8/sys/dev/sound/pcm/buffer.c Fri Mar 25 12:50:50 2011 (r219994) +++ stable/8/sys/dev/sound/pcm/buffer.c Fri Mar 25 12:53:09 2011 (r219995) @@ -93,7 +93,7 @@ sndbuf_alloc(struct snd_dbuf *b, bus_dma int ret; b->dmatag = dmatag; - b->dmaflags = dmaflags | BUS_DMA_NOWAIT; + b->dmaflags = dmaflags | BUS_DMA_NOWAIT | BUS_DMA_COHERENT; b->maxsize = size; b->bufsize = b->maxsize; b->buf_addr = 0; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 13:03:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F4C106566C; Fri, 25 Mar 2011 13:03:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61CD68FC0C; Fri, 25 Mar 2011 13:03:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PD3D9r082216; Fri, 25 Mar 2011 13:03:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PD3D6a082213; Fri, 25 Mar 2011 13:03:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251303.p2PD3D6a082213@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 13:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219996 - in stable/8: libexec/rtld-elf/sparc64 sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 13:03:13 -0000 Author: marius Date: Fri Mar 25 13:03:13 2011 New Revision: 219996 URL: http://svn.freebsd.org/changeset/base/219996 Log: MFC: r219340, r219531, r219533 - Add support for TLS relocations. - Emitt an error when encountering an unsupported and in case of the kernel also for unaligned relocations. - Fix R_SPARC_HIX22 and R_SPARC_LOX10 relocations. Apparently these are hardly ever used. Modified: stable/8/libexec/rtld-elf/sparc64/reloc.c stable/8/sys/sparc64/sparc64/elf_machdep.c Directory Properties: stable/8/libexec/rtld-elf/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- stable/8/libexec/rtld-elf/sparc64/reloc.c Fri Mar 25 12:53:09 2011 (r219995) +++ stable/8/libexec/rtld-elf/sparc64/reloc.c Fri Mar 25 13:03:13 2011 (r219996) @@ -66,6 +66,9 @@ __FBSDID("$FreeBSD$"); #define _RF_B 0x08000000 /* Load address relative */ #define _RF_U 0x04000000 /* Unaligned */ #define _RF_X 0x02000000 /* Bare symbols, needs proc */ +#define _RF_D 0x01000000 /* Use dynamic TLS offset */ +#define _RF_O 0x00800000 /* Use static TLS offset */ +#define _RF_I 0x00400000 /* Use TLS object ID */ #define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ #define _RF_RS(s) ( (s) & 0xff) /* right shift */ static const int reloc_target_flags[] = { @@ -126,6 +129,32 @@ static const int reloc_target_flags[] = _RF_S|_RF_A| _RF_SZ(64) | _RF_RS(0), /* REGISTER */ _RF_S|_RF_A| _RF_U| _RF_SZ(64) | _RF_RS(0), /* UA64 */ _RF_S|_RF_A| _RF_U| _RF_SZ(16) | _RF_RS(0), /* UA16 */ + + /* TLS */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* GD_HI22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* GD_LO10 */ + 0, /* GD_ADD */ + _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* GD_CALL */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* LDM_HI22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* LDM_LO10 */ + 0, /* LDM_ADD */ + _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* LDM_CALL */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* LDO_HIX22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* LDO_LOX10 */ + 0, /* LDO_ADD */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* IE_HI22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* IE_LO10 */ + 0, /* IE_LD */ + 0, /* IE_LDX */ + 0, /* IE_ADD */ + _RF_S|_RF_A| _RF_O| _RF_SZ(32) | _RF_RS(10), /* LE_HIX22 */ + _RF_S|_RF_A| _RF_O| _RF_SZ(32) | _RF_RS(0), /* LE_LOX10 */ + _RF_S| _RF_I| _RF_SZ(32) | _RF_RS(0), /* DTPMOD32 */ + _RF_S| _RF_I| _RF_SZ(64) | _RF_RS(0), /* DTPMOD64 */ + _RF_S|_RF_A| _RF_D| _RF_SZ(32) | _RF_RS(0), /* DTPOFF32 */ + _RF_S|_RF_A| _RF_D| _RF_SZ(64) | _RF_RS(0), /* DTPOFF64 */ + _RF_S|_RF_A| _RF_O| _RF_SZ(32) | _RF_RS(0), /* TPOFF32 */ + _RF_S|_RF_A| _RF_O| _RF_SZ(64) | _RF_RS(0) /* TPOFF64 */ }; #if 0 @@ -137,7 +166,11 @@ static const char *const reloc_names[] = "PCPLT32", "10", "11", "64", "OLO10", "HH22", "HM10", "LM22", "PC_HH22", "PC_HM10", "PC_LM22", "WDISP16", "WDISP19", "GLOB_JMP", "7", "5", "6", "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44", - "L44", "REGISTER", "UA64", "UA16" + "L44", "REGISTER", "UA64", "UA16", "GD_HI22", "GD_LO10", "GD_ADD", + "GD_CALL", "LDM_HI22", "LDMO10", "LDM_ADD", "LDM_CALL", "LDO_HIX22", + "LDO_LOX10", "LDO_ADD", "IE_HI22", "IE_LO10", "IE_LD", "IE_LDX", + "IE_ADD", "LE_HIX22", "LE_LOX10", "DTPMOD32", "DTPMOD64", "DTPOFF32", + "DTPOFF64", "TPOFF32", "TPOFF64" }; #endif @@ -147,6 +180,9 @@ static const char *const reloc_names[] = #define RELOC_UNALIGNED(t) ((reloc_target_flags[t] & _RF_U) != 0) #define RELOC_USE_ADDEND(t) ((reloc_target_flags[t] & _RF_A) != 0) #define RELOC_BARE_SYMBOL(t) ((reloc_target_flags[t] & _RF_X) != 0) +#define RELOC_USE_TLS_DOFF(t) ((reloc_target_flags[t] & _RF_D) != 0) +#define RELOC_USE_TLS_OFF(t) ((reloc_target_flags[t] & _RF_O) != 0) +#define RELOC_USE_TLS_ID(t) ((reloc_target_flags[t] & _RF_I) != 0) #define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff) #define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) @@ -176,6 +212,16 @@ static const long reloc_target_bitmask[] _BM(22), _BM(13), /* HIX22, LOX10 */ _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ + _BM(22), _BM(10), 0, _BM(30), /* GD_HI22, GD_LO10, GD_ADD, GD_CALL */ + _BM(22), _BM(10), 0, /* LDM_HI22, LDMO10, LDM_ADD */ + _BM(30), /* LDM_CALL */ + _BM(22), _BM(10), 0, /* LDO_HIX22, LDO_LOX10, LDO_ADD */ + _BM(22), _BM(10), 0, 0, /* IE_HI22, IE_LO10, IE_LD, IE_LDX */ + 0, /* IE_ADD */ + _BM(22), _BM(13), /* LE_HIX22, LE_LOX10 */ + _BM(32), -1, /* DTPMOD32, DTPMOD64 */ + _BM(32), -1, /* DTPOFF32, DTPOFF64 */ + _BM(32), -1 /* TPOFF32, TPOFF64 */ #undef _BM }; #define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t]) @@ -301,12 +347,22 @@ reloc_nonplt_object(Obj_Entry *obj, cons if (type == R_SPARC_COPY) return (0); + /* Ignore ADD and CALL relocations for dynamic TLS references. */ + if (type == R_SPARC_TLS_GD_ADD || type == R_SPARC_TLS_GD_CALL || + type == R_SPARC_TLS_LDM_ADD || type == R_SPARC_TLS_LDM_CALL || + type == R_SPARC_TLS_LDO_ADD) + return (0); + /* - * Note: R_SPARC_UA16 must be numerically largest relocation type. + * Note: R_SPARC_TLS_TPOFF64 must be the numerically largest + * relocation type. */ if (type >= sizeof(reloc_target_bitmask) / - sizeof(*reloc_target_bitmask)) + sizeof(*reloc_target_bitmask)) { + _rtld_error("%s: Unsupported relocation type %d in non-PLT " + "object\n", obj->path, type); return (-1); + } value = rela->r_addend; @@ -331,13 +387,39 @@ reloc_nonplt_object(Obj_Entry *obj, cons if (def == NULL) return (-1); - /* Add in the symbol's absolute address. */ - value += (Elf_Addr)(defobj->relocbase + def->st_value); + if (RELOC_USE_TLS_ID(type)) + value = (Elf_Addr)defobj->tlsindex; + else if (RELOC_USE_TLS_DOFF(type)) + value += (Elf_Addr)def->st_value; + else if (RELOC_USE_TLS_OFF(type)) { + /* + * We lazily allocate offsets for static TLS as we + * see the first relocation that references the TLS + * block. This allows us to support (small amounts + * of) static TLS in dynamically loaded modules. If + * we run out of space, we generate an error. + */ + if (!defobj->tls_done && + !allocate_tls_offset((Obj_Entry*)defobj)) { + _rtld_error("%s: No space available for " + "static Thread Local Storage", obj->path); + return (-1); + } + value += (Elf_Addr)(def->st_value - + defobj->tlsoffset); + } else { + /* Add in the symbol's absolute address. */ + value += (Elf_Addr)(def->st_value + + defobj->relocbase); + } } if (type == R_SPARC_OLO10) value = (value & 0x3ff) + ELF64_R_TYPE_DATA(rela->r_info); + if (type == R_SPARC_HIX22 || type == R_SPARC_TLS_LE_HIX22) + value ^= 0xffffffffffffffff; + if (RELOC_PC_RELATIVE(type)) value -= (Elf_Addr)where; @@ -360,6 +442,9 @@ reloc_nonplt_object(Obj_Entry *obj, cons value >>= RELOC_VALUE_RIGHTSHIFT(type); value &= mask; + if (type == R_SPARC_LOX10 || type == R_SPARC_TLS_LE_LOX10) + value |= 0x1c00; + if (RELOC_UNALIGNED(type)) { /* Handle unaligned relocations. */ Elf_Addr tmp; Modified: stable/8/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/elf_machdep.c Fri Mar 25 12:53:09 2011 (r219995) +++ stable/8/sys/sparc64/sparc64/elf_machdep.c Fri Mar 25 13:03:13 2011 (r219996) @@ -101,8 +101,7 @@ static Elf64_Brandinfo freebsd_brand_inf }; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST, - (sysinit_cfunc_t) elf64_insert_brand_entry, - &freebsd_brand_info); + (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info); static Elf64_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, @@ -117,9 +116,7 @@ static Elf64_Brandinfo freebsd_brand_oin }; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf64_insert_brand_entry, - &freebsd_brand_oinfo); - + (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo); void elf64_dump_thread(struct thread *td __unused, void *dst __unused, @@ -149,6 +146,9 @@ elf64_dump_thread(struct thread *td __un #define _RF_B 0x08000000 /* Load address relative */ #define _RF_U 0x04000000 /* Unaligned */ #define _RF_X 0x02000000 /* Bare symbols, needs proc */ +#define _RF_D 0x01000000 /* Use dynamic TLS offset */ +#define _RF_O 0x00800000 /* Use static TLS offset */ +#define _RF_I 0x00400000 /* Use TLS object ID */ #define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ #define _RF_RS(s) ( (s) & 0xff) /* right shift */ static const int reloc_target_flags[] = { @@ -209,6 +209,34 @@ static const int reloc_target_flags[] = _RF_S|_RF_A| _RF_SZ(64) | _RF_RS(0), /* REGISTER */ _RF_S|_RF_A| _RF_U| _RF_SZ(64) | _RF_RS(0), /* UA64 */ _RF_S|_RF_A| _RF_U| _RF_SZ(16) | _RF_RS(0), /* UA16 */ + +#if 0 + /* TLS */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* GD_HI22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* GD_LO10 */ + 0, /* GD_ADD */ + _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* GD_CALL */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* LDM_HI22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* LDM_LO10 */ + 0, /* LDM_ADD */ + _RF_A|_RF_P| _RF_SZ(32) | _RF_RS(2), /* LDM_CALL */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* LDO_HIX22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* LDO_LOX10 */ + 0, /* LDO_ADD */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(10), /* IE_HI22 */ + _RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* IE_LO10 */ + 0, /* IE_LD */ + 0, /* IE_LDX */ + 0, /* IE_ADD */ + _RF_S|_RF_A| _RF_O| _RF_SZ(32) | _RF_RS(10), /* LE_HIX22 */ + _RF_S|_RF_A| _RF_O| _RF_SZ(32) | _RF_RS(0), /* LE_LOX10 */ + _RF_S| _RF_I| _RF_SZ(32) | _RF_RS(0), /* DTPMOD32 */ + _RF_S| _RF_I| _RF_SZ(64) | _RF_RS(0), /* DTPMOD64 */ + _RF_S|_RF_A| _RF_D| _RF_SZ(32) | _RF_RS(0), /* DTPOFF32 */ + _RF_S|_RF_A| _RF_D| _RF_SZ(64) | _RF_RS(0), /* DTPOFF64 */ + _RF_S|_RF_A| _RF_O| _RF_SZ(32) | _RF_RS(0), /* TPOFF32 */ + _RF_S|_RF_A| _RF_O| _RF_SZ(64) | _RF_RS(0) /* TPOFF64 */ +#endif }; #if 0 @@ -220,7 +248,11 @@ static const char *const reloc_names[] = "PCPLT32", "10", "11", "64", "OLO10", "HH22", "HM10", "LM22", "PC_HH22", "PC_HM10", "PC_LM22", "WDISP16", "WDISP19", "GLOB_JMP", "7", "5", "6", "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44", - "L44", "REGISTER", "UA64", "UA16" + "L44", "REGISTER", "UA64", "UA16", "GD_HI22", "GD_LO10", "GD_ADD", + "GD_CALL", "LDM_HI22", "LDMO10", "LDM_ADD", "LDM_CALL", "LDO_HIX22", + "LDO_LOX10", "LDO_ADD", "IE_HI22", "IE_LO10", "IE_LD", "IE_LDX", + "IE_ADD", "LE_HIX22", "LE_LOX10", "DTPMOD32", "DTPMOD64", "DTPOFF32", + "DTPOFF64", "TPOFF32", "TPOFF64" }; #endif @@ -230,6 +262,9 @@ static const char *const reloc_names[] = #define RELOC_UNALIGNED(t) ((reloc_target_flags[t] & _RF_U) != 0) #define RELOC_USE_ADDEND(t) ((reloc_target_flags[t] & _RF_A) != 0) #define RELOC_BARE_SYMBOL(t) ((reloc_target_flags[t] & _RF_X) != 0) +#define RELOC_USE_TLS_DOFF(t) ((reloc_target_flags[t] & _RF_D) != 0) +#define RELOC_USE_TLS_OFF(t) ((reloc_target_flags[t] & _RF_O) != 0) +#define RELOC_USE_TLS_ID(t) ((reloc_target_flags[t] & _RF_I) != 0) #define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff) #define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) @@ -259,6 +294,18 @@ static const long reloc_target_bitmask[] _BM(22), _BM(13), /* HIX22, LOX10 */ _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ +#if 0 + _BM(22), _BM(10), 0, _BM(30), /* GD_HI22, GD_LO10, GD_ADD, GD_CALL */ + _BM(22), _BM(10), 0, /* LDM_HI22, LDMO10, LDM_ADD */ + _BM(30), /* LDM_CALL */ + _BM(22), _BM(10), 0, /* LDO_HIX22, LDO_LOX10, LDO_ADD */ + _BM(22), _BM(10), 0, 0, /* IE_HI22, IE_LO10, IE_LD, IE_LDX */ + 0, /* IE_ADD */ + _BM(22), _BM(13), /* LE_HIX22, LE_LOX10 */ + _BM(32), -1, /* DTPMOD32, DTPMOD64 */ + _BM(32), -1, /* DTPOFF32, DTPOFF64 */ + _BM(32), -1 /* TPOFF32, TPOFF64 */ +#endif #undef _BM }; #define RELOC_VALUE_BITMASK(t) (reloc_target_bitmask[t]) @@ -310,11 +357,15 @@ elf_reloc(linker_file_t lf, Elf_Addr rel if (rtype == R_SPARC_JMP_SLOT || rtype == R_SPARC_COPY || rtype >= sizeof(reloc_target_bitmask) / - sizeof(*reloc_target_bitmask)) + sizeof(*reloc_target_bitmask)) { + printf("kldload: unexpected relocation type %ld\n", rtype); return (-1); + } - if (RELOC_UNALIGNED(rtype)) + if (RELOC_UNALIGNED(rtype)) { + printf("kldload: unaligned relocation type %ld\n", rtype); return (-1); + } value = rela->r_addend; @@ -330,6 +381,9 @@ elf_reloc(linker_file_t lf, Elf_Addr rel if (rtype == R_SPARC_OLO10) value = (value & 0x3ff) + ELF64_R_TYPE_DATA(rela->r_info); + if (rtype == R_SPARC_HIX22) + value ^= 0xffffffffffffffff; + if (RELOC_PC_RELATIVE(rtype)) value -= (Elf_Addr)where; @@ -340,6 +394,9 @@ elf_reloc(linker_file_t lf, Elf_Addr rel value >>= RELOC_VALUE_RIGHTSHIFT(rtype); value &= mask; + if (rtype == R_SPARC_LOX10) + value |= 0x1c00; + if (RELOC_TARGET_SIZE(rtype) > 32) { *where &= ~mask; *where |= value; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 13:08:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0441106564A; Fri, 25 Mar 2011 13:08:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE4398FC16; Fri, 25 Mar 2011 13:08:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PD8JRw082378; Fri, 25 Mar 2011 13:08:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PD8JtH082376; Fri, 25 Mar 2011 13:08:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251308.p2PD8JtH082376@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 13:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219997 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 13:08:19 -0000 Author: marius Date: Fri Mar 25 13:08:19 2011 New Revision: 219997 URL: http://svn.freebsd.org/changeset/base/219997 Log: MFC: r219780 In case reading PCIR_MINGNT fails don't use it for calculating the latency. This is more or less a theoretical problem though as it typically indicates way bigger problems. Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcibus.c Fri Mar 25 13:03:13 2011 (r219996) +++ stable/8/sys/sparc64/pci/ofw_pcibus.c Fri Mar 25 13:08:19 2011 (r219997) @@ -165,7 +165,7 @@ ofw_pcibus_setup_device(device_t bridge, CS_WRITE(PCIR_SECLAT_1, reg, 1); } else { reg = CS_READ(PCIR_MINGNT, 1); - if (reg != 0) { + if ((int)reg > 0) { switch (clock) { case 33000000: reg *= 8; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 13:09:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A53231065679; Fri, 25 Mar 2011 13:09:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 934F38FC17; Fri, 25 Mar 2011 13:09:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PD9vCF082452; Fri, 25 Mar 2011 13:09:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PD9v9l082450; Fri, 25 Mar 2011 13:09:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103251309.p2PD9v9l082450@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Mar 2011 13:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219998 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 13:09:57 -0000 Author: marius Date: Fri Mar 25 13:09:57 2011 New Revision: 219998 URL: http://svn.freebsd.org/changeset/base/219998 Log: MFC: r219782 On Serengeti-class machines the OFW root isn't the parent of the CPU nodes. Modified: stable/8/sys/sparc64/sparc64/tick.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/8/sys/sparc64/sparc64/tick.c Fri Mar 25 13:08:19 2011 (r219997) +++ stable/8/sys/sparc64/sparc64/tick.c Fri Mar 25 13:09:57 2011 (r219998) @@ -118,8 +118,8 @@ cpu_initclocks(void) sclock = 0; if (PCPU_GET(impl) == CPU_IMPL_SPARC64V || PCPU_GET(impl) >= CPU_IMPL_ULTRASPARCIII) { - if (OF_getprop(OF_parent(PCPU_GET(node)), "stick-frequency", - &sclock, sizeof(sclock)) == -1) { + if (OF_getprop(OF_peer(0), "stick-frequency", &sclock, + sizeof(sclock)) == -1) { panic("%s: could not determine STICK frequency", __func__); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 14:00:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEFF1065676; Fri, 25 Mar 2011 14:00:36 +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 596E78FC12; Fri, 25 Mar 2011 14:00:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PE0aK6083552; Fri, 25 Mar 2011 14:00:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PE0aZV083547; Fri, 25 Mar 2011 14:00:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251400.p2PE0aZV083547@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 14:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219999 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 14:00:36 -0000 Author: kib Date: Fri Mar 25 14:00:36 2011 New Revision: 219999 URL: http://svn.freebsd.org/changeset/base/219999 Log: Add O_CLOEXEC flag to open(2) and fhopen(2). The new function fallocf(9), that is renamed falloc(9) with added flag argument, is provided to facilitate the merge to stable branch. Reviewed by: jhb MFC after: 1 week Modified: head/sys/kern/kern_descrip.c head/sys/kern/vfs_syscalls.c head/sys/sys/fcntl.h head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Mar 25 13:09:57 2011 (r219998) +++ head/sys/kern/kern_descrip.c Fri Mar 25 14:00:36 2011 (r219999) @@ -1516,7 +1516,7 @@ fdavail(struct thread *td, int n) * release the FILEDESC lock. */ int -falloc(struct thread *td, struct file **resultfp, int *resultfd) +fallocf(struct thread *td, struct file **resultfp, int *resultfd, int flags) { struct proc *p = td->td_proc; struct file *fp; @@ -1559,6 +1559,8 @@ falloc(struct thread *td, struct file ** return (error); } p->p_fd->fd_ofiles[i] = fp; + if ((flags & O_CLOEXEC) != 0) + p->p_fd->fd_ofileflags[i] |= UF_EXCLOSE; FILEDESC_XUNLOCK(p->p_fd); if (resultfp) *resultfp = fp; @@ -1567,6 +1569,13 @@ falloc(struct thread *td, struct file ** return (0); } +int +falloc(struct thread *td, struct file **resultfp, int *resultfd) +{ + + return (fallocf(td, resultfp, resultfd, 0)); +} + /* * Build a new filedesc structure from another. * Copy the current, root, and jail root vnode references. Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Mar 25 13:09:57 2011 (r219998) +++ head/sys/kern/vfs_syscalls.c Fri Mar 25 14:00:36 2011 (r219999) @@ -1069,7 +1069,7 @@ kern_openat(struct thread *td, int fd, c else flags = FFLAGS(flags); - error = falloc(td, &nfp, &indx); + error = fallocf(td, &nfp, &indx, flags); if (error) return (error); /* An extra reference on `nfp' has been held for us by falloc(). */ @@ -4488,7 +4488,7 @@ fhopen(td, uap) * end of vn_open code */ - if ((error = falloc(td, &nfp, &indx)) != 0) { + if ((error = fallocf(td, &nfp, &indx, fmode)) != 0) { if (fmode & FWRITE) vp->v_writecount--; goto bad; Modified: head/sys/sys/fcntl.h ============================================================================== --- head/sys/sys/fcntl.h Fri Mar 25 13:09:57 2011 (r219998) +++ head/sys/sys/fcntl.h Fri Mar 25 14:00:36 2011 (r219999) @@ -123,9 +123,11 @@ typedef __pid_t pid_t; #define FEXEC O_EXEC #endif -/* Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. */ #if __POSIX_VISIBLE >= 200809 +/* Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. */ #define O_TTY_INIT 0x00080000 /* Restore default termios attributes */ + +#define O_CLOEXEC 0x00100000 #endif /* Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Fri Mar 25 13:09:57 2011 (r219998) +++ head/sys/sys/filedesc.h Fri Mar 25 14:00:36 2011 (r219999) @@ -112,6 +112,8 @@ int closef(struct file *fp, struct threa int dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd, int mode, int error); int falloc(struct thread *td, struct file **resultfp, int *resultfd); +int fallocf(struct thread *td, struct file **resultfp, int *resultfd, + int flags); int fdalloc(struct thread *td, int minfd, int *result); int fdavail(struct thread *td, int n); int fdcheckstd(struct thread *td); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 14:01:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF904106566B; Fri, 25 Mar 2011 14:01:18 +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 DEBC98FC1A; Fri, 25 Mar 2011 14:01:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PE1I5H083628; Fri, 25 Mar 2011 14:01:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PE1IRL083626; Fri, 25 Mar 2011 14:01:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251401.p2PE1IRL083626@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 14:01: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: r220000 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 14:01:19 -0000 Author: kib Date: Fri Mar 25 14:01:18 2011 New Revision: 220000 URL: http://svn.freebsd.org/changeset/base/220000 Log: Document O_CLOEXEC. Reviewed by: jhb MFC after: 1 week Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Fri Mar 25 14:00:36 2011 (r219999) +++ head/lib/libc/sys/open.2 Fri Mar 25 14:01:18 2011 (r220000) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd February 28, 2009 +.Dd March 25, 2011 .Dt OPEN 2 .Os .Sh NAME @@ -118,6 +118,7 @@ O_NOFOLLOW do not follow symlinks O_NOCTTY don't assign controlling terminal O_TTY_INIT restore default terminal attributes O_DIRECTORY error if file is not a directory +O_CLOEXEC set FD_CLOEXEC upon open .Ed .Pp Opening a file with @@ -231,6 +232,11 @@ from opening files which are even unsafe .Dv O_RDONLY , such as device nodes. .Pp +.Dv O_CLOEXEC +may be used to set +.Dv FD_CLOEXEC +flag for the newly returned file descriptor. +.Pp If successful, .Fn open returns a non-negative integer, termed a file descriptor. @@ -241,12 +247,18 @@ file is set to the beginning of the file When a new file is created it is given the group of the directory which contains it. .Pp -The new descriptor is set to remain open across +Unless +.Dv +O_CLOEXEC +flag was specified, +the new descriptor is set to remain open across .Xr execve 2 system calls; see -.Xr close 2 +.Xr close 2 , +.Xr fcntl 2 and -.Xr fcntl 2 . +.Dv O_CLOEXEC +description. .Pp The system imposes a limit on the number of file descriptors open simultaneously by one process. From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 16:38:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF3181065673; Fri, 25 Mar 2011 16:38:10 +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 BF6E58FC16; Fri, 25 Mar 2011 16:38:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PGcAEp087101; Fri, 25 Mar 2011 16:38:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PGcAWa087099; Fri, 25 Mar 2011 16:38:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103251638.p2PGcAWa087099@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 16:38: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: r220001 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 16:38:10 -0000 Author: kib Date: Fri Mar 25 16:38:10 2011 New Revision: 220001 URL: http://svn.freebsd.org/changeset/base/220001 Log: Handle the corner case in vm_fault_quick_hold_pages(). If supplied length is zero, and user address is invalid, function might return -1, due to the truncation and rounding of the address. The callers interpret the situation as EFAULT. Instead of handling the zero length in caller, filter it in vm_fault_quick_hold_pages(). Sponsored by: The FreeBSD Foundation Reviewed by: alc Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Mar 25 14:01:18 2011 (r220000) +++ head/sys/vm/vm_fault.c Fri Mar 25 16:38:10 2011 (r220001) @@ -1058,6 +1058,8 @@ vm_fault_quick_hold_pages(vm_map_t map, int count; boolean_t pmap_failed; + if (len == 0) + return (0); end = round_page(addr + len); addr = trunc_page(addr); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 18:16:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E5BC106566B; Fri, 25 Mar 2011 18:16:37 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CBD08FC21; Fri, 25 Mar 2011 18:16:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PIGbuC089443; Fri, 25 Mar 2011 18:16:37 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PIGaLB089437; Fri, 25 Mar 2011 18:16:36 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103251816.p2PIGaLB089437@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 18:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220002 - in stable/8/sys: ddb gdb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 18:16:37 -0000 Author: mdf Date: Fri Mar 25 18:16:36 2011 New Revision: 220002 URL: http://svn.freebsd.org/changeset/base/220002 Log: MFC r218825. [The implementation change to kdb_sysctl_available() cannot be MFC'd as it requires a non-MFCable change (adding drains to sbuf)]. Modify kdb_trap() so that it re-calls the dbbe_trap function as long as the debugger back-end has changed. This means that switching from ddb to gdb no longer requires a "step" which can be dangerous on an already-crashed kernel. Also add a capability to get from the gdb back-end back to ddb, by typing ^C in the console window. While here, simplify kdb_sysctl_available() by using sbuf_new_for_sysctl(), and use strlcpy() instead of strncpy() since the strlcpy semantic is desired. Modified: stable/8/sys/ddb/db_command.c stable/8/sys/gdb/gdb_main.c stable/8/sys/gdb/gdb_packet.c stable/8/sys/kern/subr_kdb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/ddb/db_command.c ============================================================================== --- stable/8/sys/ddb/db_command.c Fri Mar 25 16:38:10 2011 (r220001) +++ stable/8/sys/ddb/db_command.c Fri Mar 25 18:16:36 2011 (r220002) @@ -723,10 +723,16 @@ static void db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) { - if (kdb_dbbe_select("gdb") != 0) + if (kdb_dbbe_select("gdb") != 0) { db_printf("The remote GDB backend could not be selected.\n"); - else - db_printf("Step to enter the remote GDB backend.\n"); + return; + } + /* + * Mark that we are done in the debugger. kdb_trap() + * should re-enter with the new backend. + */ + db_cmd_loop_done = 1; + db_printf("(ctrl-c will return control to ddb)\n"); } static void Modified: stable/8/sys/gdb/gdb_main.c ============================================================================== --- stable/8/sys/gdb/gdb_main.c Fri Mar 25 16:38:10 2011 (r220001) +++ stable/8/sys/gdb/gdb_main.c Fri Mar 25 18:16:36 2011 (r220002) @@ -95,7 +95,17 @@ gdb_init(void) static int gdb_trap(int type, int code) { + jmp_buf jb; struct thread *thr_iter; + void *prev_jb; + + prev_jb = kdb_jmpbuf(jb); + if (setjmp(jb) != 0) { + printf("%s bailing, hopefully back to ddb!\n", __func__); + gdb_listening = 0; + (void)kdb_jmpbuf(prev_jb); + return (1); + } gdb_listening = 0; /* @@ -291,5 +301,6 @@ gdb_trap(int type, int code) break; } } + (void)kdb_jmpbuf(prev_jb); return (0); } Modified: stable/8/sys/gdb/gdb_packet.c ============================================================================== --- stable/8/sys/gdb/gdb_packet.c Fri Mar 25 16:38:10 2011 (r220001) +++ stable/8/sys/gdb/gdb_packet.c Fri Mar 25 18:16:36 2011 (r220002) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -60,6 +61,17 @@ gdb_getc(void) do c = gdb_cur->gdb_getc(); while (c == -1); + + if (c == CTRL('C')) { + printf("Received ^C; trying to switch back to ddb.\n"); + + if (kdb_dbbe_select("ddb") != 0) + printf("The ddb backend could not be selected.\n"); + else { + printf("using longjmp, hope it works!\n"); + kdb_reenter(); + } + } return (c); } Modified: stable/8/sys/kern/subr_kdb.c ============================================================================== --- stable/8/sys/kern/subr_kdb.c Fri Mar 25 16:38:10 2011 (r220001) +++ stable/8/sys/kern/subr_kdb.c Fri Mar 25 18:16:36 2011 (r220002) @@ -144,10 +144,9 @@ kdb_sysctl_current(SYSCTL_HANDLER_ARGS) char buf[16]; int error; - if (kdb_dbbe != NULL) { - strncpy(buf, kdb_dbbe->dbbe_name, sizeof(buf)); - buf[sizeof(buf) - 1] = '\0'; - } else + if (kdb_dbbe != NULL) + strlcpy(buf, kdb_dbbe->dbbe_name, sizeof(buf)); + else *buf = '\0'; error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) @@ -513,13 +512,15 @@ kdb_thr_select(struct thread *thr) int kdb_trap(int type, int code, struct trapframe *tf) { + struct kdb_dbbe *be; register_t intr; #ifdef SMP int did_stop_cpus; #endif int handled; - if (kdb_dbbe == NULL || kdb_dbbe->dbbe_trap == NULL) + be = kdb_dbbe; + if (be == NULL || be->dbbe_trap == NULL) return (0); /* We reenter the debugger through kdb_reenter(). */ @@ -543,7 +544,15 @@ kdb_trap(int type, int code, struct trap makectx(tf, &kdb_pcb); kdb_thr_select(curthread); - handled = kdb_dbbe->dbbe_trap(type, code); + for (;;) { + handled = be->dbbe_trap(type, code); + if (be == kdb_dbbe) + break; + be = kdb_dbbe; + if (be == NULL || be->dbbe_trap == NULL) + break; + printf("Switching to %s back-end\n", be->dbbe_name); + } kdb_active--; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 18:16:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B2051065679; Fri, 25 Mar 2011 18:16:50 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 398148FC15; Fri, 25 Mar 2011 18:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PIGoPS089485; Fri, 25 Mar 2011 18:16:50 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PIGo18089480; Fri, 25 Mar 2011 18:16:50 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103251816.p2PIGo18089480@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 18:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220003 - in stable/7/sys: ddb gdb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 18:16:50 -0000 Author: mdf Date: Fri Mar 25 18:16:49 2011 New Revision: 220003 URL: http://svn.freebsd.org/changeset/base/220003 Log: MFC r218825. [The implementation change to kdb_sysctl_available() cannot be MFC'd as it requires a non-MFCable change (adding drains to sbuf)]. Modify kdb_trap() so that it re-calls the dbbe_trap function as long as the debugger back-end has changed. This means that switching from ddb to gdb no longer requires a "step" which can be dangerous on an already-crashed kernel. Also add a capability to get from the gdb back-end back to ddb, by typing ^C in the console window. While here, simplify kdb_sysctl_available() by using sbuf_new_for_sysctl(), and use strlcpy() instead of strncpy() since the strlcpy semantic is desired. Modified: stable/7/sys/ddb/db_command.c stable/7/sys/gdb/gdb_main.c stable/7/sys/gdb/gdb_packet.c stable/7/sys/kern/subr_kdb.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/ddb/db_command.c ============================================================================== --- stable/7/sys/ddb/db_command.c Fri Mar 25 18:16:36 2011 (r220002) +++ stable/7/sys/ddb/db_command.c Fri Mar 25 18:16:49 2011 (r220003) @@ -662,10 +662,16 @@ static void db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) { - if (kdb_dbbe_select("gdb") != 0) + if (kdb_dbbe_select("gdb") != 0) { db_printf("The remote GDB backend could not be selected.\n"); - else - db_printf("Step to enter the remote GDB backend.\n"); + return; + } + /* + * Mark that we are done in the debugger. kdb_trap() + * should re-enter with the new backend. + */ + db_cmd_loop_done = 1; + db_printf("(ctrl-c will return control to ddb)\n"); } static void Modified: stable/7/sys/gdb/gdb_main.c ============================================================================== --- stable/7/sys/gdb/gdb_main.c Fri Mar 25 18:16:36 2011 (r220002) +++ stable/7/sys/gdb/gdb_main.c Fri Mar 25 18:16:49 2011 (r220003) @@ -95,7 +95,17 @@ gdb_init(void) static int gdb_trap(int type, int code) { + jmp_buf jb; struct thread *thr_iter; + void *prev_jb; + + prev_jb = kdb_jmpbuf(jb); + if (setjmp(jb) != 0) { + printf("%s bailing, hopefully back to ddb!\n", __func__); + gdb_listening = 0; + (void)kdb_jmpbuf(prev_jb); + return (1); + } gdb_listening = 0; /* @@ -291,5 +301,6 @@ gdb_trap(int type, int code) break; } } + (void)kdb_jmpbuf(prev_jb); return (0); } Modified: stable/7/sys/gdb/gdb_packet.c ============================================================================== --- stable/7/sys/gdb/gdb_packet.c Fri Mar 25 18:16:36 2011 (r220002) +++ stable/7/sys/gdb/gdb_packet.c Fri Mar 25 18:16:49 2011 (r220003) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -60,6 +61,17 @@ gdb_getc(void) do c = gdb_cur->gdb_getc(); while (c == -1); + + if (c == CTRL('C')) { + printf("Received ^C; trying to switch back to ddb.\n"); + + if (kdb_dbbe_select("ddb") != 0) + printf("The ddb backend could not be selected.\n"); + else { + printf("using longjmp, hope it works!\n"); + kdb_reenter(); + } + } return (c); } Modified: stable/7/sys/kern/subr_kdb.c ============================================================================== --- stable/7/sys/kern/subr_kdb.c Fri Mar 25 18:16:36 2011 (r220002) +++ stable/7/sys/kern/subr_kdb.c Fri Mar 25 18:16:49 2011 (r220003) @@ -141,10 +141,9 @@ kdb_sysctl_current(SYSCTL_HANDLER_ARGS) char buf[16]; int error; - if (kdb_dbbe != NULL) { - strncpy(buf, kdb_dbbe->dbbe_name, sizeof(buf)); - buf[sizeof(buf) - 1] = '\0'; - } else + if (kdb_dbbe != NULL) + strlcpy(buf, kdb_dbbe->dbbe_name, sizeof(buf)); + else *buf = '\0'; error = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (error != 0 || req->newptr == NULL) @@ -491,13 +490,15 @@ kdb_thr_select(struct thread *thr) int kdb_trap(int type, int code, struct trapframe *tf) { + struct kdb_dbbe *be; register_t intr; #ifdef SMP int did_stop_cpus; #endif int handled; - if (kdb_dbbe == NULL || kdb_dbbe->dbbe_trap == NULL) + be = kdb_dbbe; + if (be == NULL || be->dbbe_trap == NULL) return (0); /* We reenter the debugger through kdb_reenter(). */ @@ -521,7 +522,15 @@ kdb_trap(int type, int code, struct trap makectx(tf, &kdb_pcb); kdb_thr_select(curthread); - handled = kdb_dbbe->dbbe_trap(type, code); + for (;;) { + handled = be->dbbe_trap(type, code); + if (be == kdb_dbbe) + break; + be = kdb_dbbe; + if (be == NULL || be->dbbe_trap == NULL) + break; + printf("Switching to %s back-end\n", be->dbbe_name); + } kdb_active--; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 18:23:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A5DB106566B; Fri, 25 Mar 2011 18:23: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 1A2FB8FC0C; Fri, 25 Mar 2011 18:23:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PINASt089667; Fri, 25 Mar 2011 18:23:10 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PINA4j089665; Fri, 25 Mar 2011 18:23:10 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103251823.p2PINA4j089665@svn.freebsd.org> From: Andriy Gapon Date: Fri, 25 Mar 2011 18:23: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: r220004 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 18:23:11 -0000 Author: avg Date: Fri Mar 25 18:23:10 2011 New Revision: 220004 URL: http://svn.freebsd.org/changeset/base/220004 Log: rtld: eliminate double call to close(2) that may occur in load_object The second close(2) call resulted in heisenbugs in some multi-threaded applications where e.g. dlopen(3) call in one thread could close a file descriptor for a file having been opened in other thread concurrently. My litmus test for this issue was an openoffice.org build. Reviewed by: jhb MFC after: 2 weeks Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Fri Mar 25 18:16:49 2011 (r220003) +++ head/libexec/rtld-elf/rtld.c Fri Mar 25 18:23:10 2011 (r220004) @@ -1633,12 +1633,9 @@ load_object(const char *name, const Obj_ free(path); return NULL; } - for (obj = obj_list->next; obj != NULL; obj = obj->next) { - if (obj->ino == sb.st_ino && obj->dev == sb.st_dev) { - close(fd); + for (obj = obj_list->next; obj != NULL; obj = obj->next) + if (obj->ino == sb.st_ino && obj->dev == sb.st_dev) break; - } - } if (obj != NULL) { object_add_name(obj, name); free(path); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 20:13:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 953E5106564A; Fri, 25 Mar 2011 20:13:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84A0D8FC08; Fri, 25 Mar 2011 20:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PKDcaW092118; Fri, 25 Mar 2011 20:13:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PKDc7n092115; Fri, 25 Mar 2011 20:13:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103252013.p2PKDc7n092115@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 25 Mar 2011 20:13: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: r220005 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 20:13:38 -0000 Author: pjd Date: Fri Mar 25 20:13:38 2011 New Revision: 220005 URL: http://svn.freebsd.org/changeset/base/220005 Log: Use role2str() when setting process title. MFC after: 1 week Modified: head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Fri Mar 25 18:23:10 2011 (r220004) +++ head/sbin/hastd/primary.c Fri Mar 25 20:13:38 2011 (r220005) @@ -868,7 +868,7 @@ hastd_primary(struct hast_resource *res) pjdlog_init(mode); pjdlog_debug_set(debuglevel); pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role)); - setproctitle("%s (primary)", res->hr_name); + setproctitle("%s (%s)", res->hr_name, role2str(res->hr_role)); init_local(res); init_ggate(res); Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Fri Mar 25 18:23:10 2011 (r220004) +++ head/sbin/hastd/secondary.c Fri Mar 25 20:13:38 2011 (r220005) @@ -414,7 +414,7 @@ hastd_secondary(struct hast_resource *re pjdlog_init(mode); pjdlog_debug_set(debuglevel); pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role)); - setproctitle("%s (secondary)", res->hr_name); + setproctitle("%s (%s)", res->hr_name, role2str(res->hr_role)); PJDLOG_VERIFY(sigemptyset(&mask) == 0); PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 20:15:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A459106566C; Fri, 25 Mar 2011 20:15:17 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE1878FC18; Fri, 25 Mar 2011 20:15:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PKFGXL092192; Fri, 25 Mar 2011 20:15:16 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PKFGUk092190; Fri, 25 Mar 2011 20:15:16 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103252015.p2PKFGUk092190@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 25 Mar 2011 20:15: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: r220006 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 20:15:17 -0000 Author: pjd Date: Fri Mar 25 20:15:16 2011 New Revision: 220006 URL: http://svn.freebsd.org/changeset/base/220006 Log: Use timeout from configuration file not only when sending and receiving, but also when establishing connection. MFC after: 1 week Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Fri Mar 25 20:13:38 2011 (r220005) +++ head/sbin/hastd/primary.c Fri Mar 25 20:15:16 2011 (r220006) @@ -509,7 +509,7 @@ primary_connect(struct hast_resource *re primary_exit(EX_TEMPFAIL, "Unable to receive connection from parent"); } - if (proto_connect_wait(conn, HAST_TIMEOUT) < 0) { + if (proto_connect_wait(conn, res->hr_timeout) < 0) { pjdlog_errno(LOG_WARNING, "Unable to connect to %s", res->hr_remoteaddr); proto_close(conn); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 20:19:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACA30106566C; Fri, 25 Mar 2011 20:19:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B7068FC1C; Fri, 25 Mar 2011 20:19:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PKJFno092310; Fri, 25 Mar 2011 20:19:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PKJF6E092308; Fri, 25 Mar 2011 20:19:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103252019.p2PKJF6E092308@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 25 Mar 2011 20:19: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: r220007 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 20:19:15 -0000 Author: pjd Date: Fri Mar 25 20:19:15 2011 New Revision: 220007 URL: http://svn.freebsd.org/changeset/base/220007 Log: Add mapsize to the header just before sending the packet. Before it could change later and we were sending invalid mapsize. Some time ago I added optimization where when nodes are connected for the first time and there were no writes to them yet, there is no initial full synchronization. This bug prevented it from working. MFC after: 1 week Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Fri Mar 25 20:15:16 2011 (r220006) +++ head/sbin/hastd/secondary.c Fri Mar 25 20:19:15 2011 (r220007) @@ -201,7 +201,6 @@ init_remote(struct hast_resource *res, s "Unable to allocate memory (%zu bytes) for activemap.", mapsize); } - nv_add_uint32(nvout, (uint32_t)mapsize, "mapsize"); /* * When we work as primary and secondary is missing we will increase * localcnt in our metadata. When secondary is connected and synced @@ -339,6 +338,7 @@ init_remote(struct hast_resource *res, s (uintmax_t)res->hr_secondary_localcnt, (uintmax_t)res->hr_secondary_remotecnt); } + nv_add_uint32(nvout, (uint32_t)mapsize, "mapsize"); if (hast_proto_send(res, res->hr_remotein, nvout, map, mapsize) < 0) { pjdlog_exit(EX_TEMPFAIL, "Unable to send activemap to %s", res->hr_remoteaddr); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 20:51:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C858A106566C; Fri, 25 Mar 2011 20:51:20 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B48058FC16; Fri, 25 Mar 2011 20:51:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PKpKaJ093170; Fri, 25 Mar 2011 20:51:20 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PKpKmX093162; Fri, 25 Mar 2011 20:51:20 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103252051.p2PKpKmX093162@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 20:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220008 - in stable/7: share/man/man9 sys/conf sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 20:51:20 -0000 Author: mdf Date: Fri Mar 25 20:51:20 2011 New Revision: 220008 URL: http://svn.freebsd.org/changeset/base/220008 Log: MFC r192908 (introduced before the stable/8 split from CURRENT): fail(9) support: Add support for kernel fault injection using KFAIL_POINT_* macros and fail_point_* infrastructure. Add example fail point in vfs_bio.c to simulate VM buf pressure. MFC r192978: Fix style/grammar issues in fail(9) man page. MFC r216616: Move the fail_point_entry definition from fail.h to kern_fail.c, which allows putting the enumeration constants of fail point types with the text string that matches them. MFC r216620: Initialize fp_location for explicitly managed fail points, and push the parentheses around the location for simple fail points into the location string. This makes the print on fail point set more consistent between the two versions. Also fix up fail.h a little for style(9): only use one of sys/param.h and sys/types.h, and use the existing __XSTRING() macro instead of rolling our own. Also fix up a few tabs on changed and nearby lines. Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside this file, just eliminate the macros entirely. Added: stable/7/share/man/man9/fail.9 - copied, changed from r192908, head/share/man/man9/fail.9 stable/7/sys/kern/kern_fail.c - copied, changed from r192908, head/sys/kern/kern_fail.c stable/7/sys/sys/fail.h - copied, changed from r192908, head/sys/sys/fail.h Modified: stable/7/share/man/man9/Makefile stable/7/sys/conf/files stable/7/sys/kern/vfs_bio.c stable/7/sys/sys/queue.h Directory Properties: stable/7/share/man/man9/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/share/man/man9/Makefile ============================================================================== --- stable/7/share/man/man9/Makefile Fri Mar 25 20:19:15 2011 (r220007) +++ stable/7/share/man/man9/Makefile Fri Mar 25 20:51:20 2011 (r220008) @@ -97,6 +97,7 @@ MAN= accept_filter.9 \ DRIVER_MODULE.9 \ EVENTHANDLER.9 \ extattr.9 \ + fail.9 \ fetch.9 \ firmware.9 \ g_access.9 \ Copied and modified: stable/7/share/man/man9/fail.9 (from r192908, head/share/man/man9/fail.9) ============================================================================== --- head/share/man/man9/fail.9 Wed May 27 16:36:54 2009 (r192908, copy source) +++ stable/7/share/man/man9/fail.9 Fri Mar 25 20:51:20 2011 (r220008) @@ -48,9 +48,11 @@ .Fn KFAIL_POINT_GOTO "parent" "name" "error_var" "label" .Sh DESCRIPTION Fail points are used to add code points where errors may be injected -in a user controlled fashion. Fail points provide a convenient wrapper -around user provided error injection code, providing a -.Xr sysctl 9 MIB , and a parser for that MIB that describes how the error +in a user controlled fashion. +Fail points provide a convenient wrapper around user-provided error +injection code, providing a +.Xr sysctl 9 +MIB, and a parser for that MIB that describes how the error injection code should fire. .Pp The base fail point macro is @@ -64,16 +66,19 @@ their own fail point trees), and .Fa name is the name of the MIB in that tree, and .Fa code -is the error injection code. The +is the error injection code. +The .Fa code argument does not require braces, but it is considered good style to -use braces for any multi-line code arguments. Inside the +use braces for any multi-line code arguments. +Inside the .Fa code argument, the evaluation of .Sy RETURN_VALUE is derived from the .Fn return -value set in the sysctl MIB. See +value set in the sysctl MIB. +See .Sx SYSCTL SETTINGS below. .Pp @@ -99,14 +104,14 @@ is the equivalent of .Sh SYSCTL VARIABLES The .Fn KFAIL_POINT_* -macros add sysctl MIBs where specified. Many base kernel MIBs can be -found in the +macros add sysctl MIBs where specified. +Many base kernel MIBs can be found in the .Sy debug.fail_point tree (referenced in code by .Sy DEBUG_FP ). .Pp -The sysctl setting recognizes the following grammar: +The sysctl variable may be set using the following grammar: .Pp :: ( "->" )* @@ -135,27 +140,30 @@ Sleep the specified number of millisecon .It Sy panic Panic .It Sy break -Break into the debugger. +Break into the debugger, or trap if there is no debugger support .It Sy print Print that the fail point executed .El .Pp The % and * modifiers prior to control when - is executed. The % form (e.g. "1.2%") can be used to -specify a probability that will execute. The * form -(e.g. "5*") can be used to specify the number of times should -be executed before this is disabled. Only the last probability -and the last count are used if multiple are specified, i.e. "1.2%2%" -is the same as "2%". When both a probability and a count are -specified, the probability is evaluated before the count, i.e. "2%5*" -means "2% of the time, but only execute it 5 times total". -.Pp -The operator -> can be used to express cascading terms. If you specify -->, it means that if doesn't 'execute', -is evaluated. For the purpose of this operator, the return() and -print() operators are the only types that cascade. A return() term -only cascades if the code executes, and a print() term only cascades -when passed a non-zero argument. + is executed. +The % form (e.g. "1.2%") can be used to specify a +probability that will execute. +The * form (e.g. "5*") can be used to specify the number of +times should be executed before this is disabled. +Only the last probability and the last count are used if multiple +are specified, i.e. "1.2%2%" is the same as "2%". +When both a probability and a count are specified, the probability +is evaluated before the count, i.e. "2%5*" means "2% of the time, +but only 5 times total". +.Pp +The operator -> can be used to express cascading terms. +If you specify ->, it means that if doesn't +'execute', is evaluated. +For the purpose of this operator, the return() and print() operators +are the only types that cascade. +A return() term only cascades if the code executes, and a print() +term only cascades when passed a non-zero argument. .Pp .Sh EXAMPLES .Bl -tag @@ -164,29 +172,32 @@ when passed a non-zero argument. .Fa code with RETURN_VALUE set to 5. .It Sy sysctl debug.fail_point.foobar="2%return(5)->5%return(22)" -2/100th of the time, execute +2/100ths of the time, execute .Fa code -with RETURN_VALUE set to 5. If that doesn't happen, 5% of the time -execute +with RETURN_VALUE set to 5. +If that doesn't happen, 5% of the time execute .Fa code with RETURN_VALUE set to 22. .It Sy sysctl debug.fail_point.foobar="5*return(5)->0.1%return(22)" -For 5 times, return 5. After that, 1/1000ths of the time, return 22. +For 5 times, return 5. +After that, 1/1000th of the time, return 22. .It Sy sysctl debug.fail_point.foobar="0.1%5*return(5)" -Return 5 for 1 in 1000 executions, but only execute 5 times total. +Return 5 for 1 in 1000 executions, but only 5 times total. .It Sy sysctl debug.fail_point.foobar="1%*sleep(50)" -1/100ths of the time, sleep 50ms. +1/100th of the time, sleep 50ms. .El .Pp .Sh CAVEATS It's easy to shoot yourself in the foot by setting fail points too -aggressively or setting too many in combination. For example, forcing +aggressively or setting too many in combination. +For example, forcing .Fn malloc to fail consistently is potentially harmful to uptime. .Pp The .Fn sleep -sysctl setting may not be appropriate in all situations. Currently, +sysctl setting may not be appropriate in all situations. +Currently, .Fn fail_point_eval does not verify whether the context is appropriate for calling .Fn msleep . Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Fri Mar 25 20:19:15 2011 (r220007) +++ stable/7/sys/conf/files Fri Mar 25 20:51:20 2011 (r220008) @@ -1618,6 +1618,7 @@ kern/kern_environment.c standard kern/kern_event.c standard kern/kern_exec.c standard kern/kern_exit.c standard +kern/kern_fail.c standard kern/kern_fork.c standard kern/kern_idle.c standard kern/kern_intr.c standard Copied and modified: stable/7/sys/kern/kern_fail.c (from r192908, head/sys/kern/kern_fail.c) ============================================================================== --- head/sys/kern/kern_fail.c Wed May 27 16:36:54 2009 (r192908, copy source) +++ stable/7/sys/kern/kern_fail.c Fri Mar 25 20:51:20 2011 (r220008) @@ -76,6 +76,43 @@ MTX_SYSINIT(g_fp_mtx, &g_fp_mtx, "fail p #define FP_LOCK() mtx_lock(&g_fp_mtx) #define FP_UNLOCK() mtx_unlock(&g_fp_mtx) +/** + * Failpoint types. + * Don't change these without changing fail_type_strings in fail.c. + * @ingroup failpoint_private + */ +enum fail_point_t { + FAIL_POINT_OFF, /**< don't fail */ + FAIL_POINT_PANIC, /**< panic */ + FAIL_POINT_RETURN, /**< return an errorcode */ + FAIL_POINT_BREAK, /**< break into the debugger */ + FAIL_POINT_PRINT, /**< print a message */ + FAIL_POINT_SLEEP, /**< sleep for some msecs */ + FAIL_POINT_INVALID, /**< placeholder */ +}; + +static const char *fail_type_strings[] = { + "off", + "panic", + "return", + "break", + "print", + "sleep", +}; + +/** + * Internal structure tracking a single term of a complete failpoint. + * @ingroup failpoint_private + */ +struct fail_point_entry { + enum fail_point_t fe_type; /**< type of entry */ + int fe_arg; /**< argument to type (e.g. return value) */ + int fe_prob; /**< likelihood of firing in millionths */ + int fe_count; /**< number of times to fire, 0 means always */ + + TAILQ_ENTRY(fail_point_entry) fe_entries; /**< next entry in fail point */ +}; + static inline void fail_point_sleep(struct fail_point *fp, struct fail_point_entry *ent, int msecs, enum fail_point_return_code *pret) @@ -102,15 +139,6 @@ enum { PROB_DIGITS = 6, /* number of zero's in above number */ }; -static const char *fail_type_strings[] = { - "off", - "panic", - "return", - "break", - "print", - "sleep", -}; - static char *parse_fail_point(struct fail_point_entries *, char *); static char *parse_term(struct fail_point_entries *, char *); static char *parse_number(int *out_units, int *out_decimal, char *); @@ -149,6 +177,7 @@ fail_point_init(struct fail_point *fp, c va_end(ap); } fp->fp_name = name; + fp->fp_location = ""; fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME; fp->fp_sleep_fn = NULL; fp->fp_sleep_arg = NULL; @@ -344,10 +373,10 @@ fail_point_set(struct fail_point *fp, ch end: #ifdef IWARNING if (error) - IWARNING("Failed to set %s (%s) to %s", + IWARNING("Failed to set %s %s to %s", fp->fp_name, fp->fp_location, buf); else - INOTICE("Set %s (%s) to %s", + INOTICE("Set %s %s to %s", fp->fp_name, fp->fp_location, buf); #endif /* IWARNING */ Modified: stable/7/sys/kern/vfs_bio.c ============================================================================== --- stable/7/sys/kern/vfs_bio.c Fri Mar 25 20:19:15 2011 (r220007) +++ stable/7/sys/kern/vfs_bio.c Fri Mar 25 20:51:20 2011 (r220008) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1180,6 +1181,15 @@ buf_dirty_count_severe(void) return(numdirtybuffers >= hidirtybuffers); } +static __noinline int +buf_vm_page_count_severe(void) +{ + + KFAIL_POINT_CODE(DEBUG_FP, buf_pressure, return 1); + + return vm_page_count_severe(); +} + /* * brelse: * @@ -1252,7 +1262,7 @@ brelse(struct buf *bp) */ if (bp->b_flags & B_DELWRI) bp->b_flags &= ~B_RELBUF; - else if (vm_page_count_severe()) { + else if (buf_vm_page_count_severe()) { /* * XXX This lock may not be necessary since BKGRDINPROG * cannot be set while we hold the buf lock, it can only be @@ -1522,7 +1532,7 @@ bqrelse(struct buf *bp) * cleared if it is already pending. */ BO_LOCK(bp->b_bufobj); - if (!vm_page_count_severe() || bp->b_vflags & BV_BKGRDINPROG) { + if (!buf_vm_page_count_severe() || bp->b_vflags & BV_BKGRDINPROG) { BO_UNLOCK(bp->b_bufobj); bp->b_qindex = QUEUE_CLEAN; TAILQ_INSERT_TAIL(&bufqueues[QUEUE_CLEAN], bp, @@ -1593,7 +1603,7 @@ vfs_vmio_release(struct buf *bp) vm_page_free(m); } else if (bp->b_flags & B_DIRECT) { vm_page_try_to_free(m); - } else if (vm_page_count_severe()) { + } else if (buf_vm_page_count_severe()) { vm_page_try_to_cache(m); } } Copied and modified: stable/7/sys/sys/fail.h (from r192908, head/sys/sys/fail.h) ============================================================================== --- head/sys/sys/fail.h Wed May 27 16:36:54 2009 (r192908, copy source) +++ stable/7/sys/sys/fail.h Fri Mar 25 20:51:20 2011 (r220008) @@ -32,29 +32,12 @@ #ifndef _SYS_FAIL_H_ #define _SYS_FAIL_H_ -#include - -#include #include +#include +#include #include #include - -/** - * Failpoint types. - * Don't change these without changing fail_type_strings in fail.c. - * @ingroup failpoint_private - */ -enum fail_point_t { - FAIL_POINT_OFF, /**< don't fail */ - FAIL_POINT_PANIC, /**< panic */ - FAIL_POINT_RETURN, /**< return an errorcode */ - FAIL_POINT_BREAK, /**< break into the debugger */ - FAIL_POINT_PRINT, /**< print a message */ - FAIL_POINT_SLEEP, /**< sleep for some msecs */ - FAIL_POINT_INVALID, /**< placeholder */ -}; - /** * Failpoint return codes, used internally. * @ingroup failpoint_private @@ -65,6 +48,7 @@ enum fail_point_return_code { FAIL_POINT_RC_QUEUED, /**< sleep_fn will be called */ }; +struct fail_point_entry; TAILQ_HEAD(fail_point_entries, fail_point_entry); /** * Internal failpoint structure, tracking all the current details of the @@ -84,18 +68,7 @@ struct fail_point { #define FAIL_POINT_DYNAMIC_NAME 0x01 /**< Must free name on destroy */ -/** - * Internal structure tracking a single term of a complete failpoint. - * @ingroup failpoint_private - */ -struct fail_point_entry { - enum fail_point_t fe_type; /**< type of entry */ - int fe_arg; /**< argument to type (e.g. return value) */ - int fe_prob; /**< likelihood of firing in millionths */ - int fe_count; /**< number of times to fire, 0 means always */ - - TAILQ_ENTRY(fail_point_entry) fe_entries; /**< next entry in fail point */ -}; +__BEGIN_DECLS /* Private failpoint eval function -- use fail_point_eval() instead. */ enum fail_point_return_code fail_point_eval_nontrivial(struct fail_point *, @@ -152,11 +125,11 @@ fail_point_eval(struct fail_point *fp, i return (fail_point_eval_nontrivial(fp, ret)); } +__END_DECLS + /* Declare a fail_point and its sysctl in a function. */ -#define _FAIL_POINT_NAME(name) _fail_point_##name -#define _STRINGIFY_HELPER(x) #x -#define _STRINGIFY(x) _STRINGIFY_HELPER(x) -#define _FAIL_POINT_LOCATION() __FILE__ ":" _STRINGIFY(__LINE__) +#define _FAIL_POINT_NAME(name) _fail_point_##name +#define _FAIL_POINT_LOCATION() "(" __FILE__ ":" __XSTRING(__LINE__) ")" /** * Instantiate a failpoint which returns "value" from the function when triggered. @@ -202,59 +175,49 @@ fail_point_eval(struct fail_point *fp, i /** * Instantiate a failpoint which runs arbitrary code when triggered. * @param parent The parent sysctl under which to locate the sysctl - * @param name The name of the failpoint in the sysctl tree (and printouts) + * @param name The name of the failpoint in the sysctl tree + * (and printouts) * @param code The arbitrary code to run when triggered. Can reference - * "RETURN_VALUE" if desired to extract the specified user - * return-value when triggered + * "RETURN_VALUE" if desired to extract the specified + * user return-value when triggered. Note that this is + * implemented with a do-while loop so be careful of + * break and continue statements. */ #define KFAIL_POINT_CODE(parent, name, code) \ - KFAIL_POINT_START(parent, name) { \ +do { \ + int RETURN_VALUE; \ + static struct fail_point _FAIL_POINT_NAME(name) = { \ + #name, \ + _FAIL_POINT_LOCATION(), \ + TAILQ_HEAD_INITIALIZER(_FAIL_POINT_NAME(name).fp_entries), \ + 0, \ + NULL, NULL, \ + }; \ + SYSCTL_OID(parent, OID_AUTO, name, \ + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, \ + &_FAIL_POINT_NAME(name), 0, fail_point_sysctl, \ + "A", ""); \ + \ + if (__predict_false( \ + fail_point_eval(&_FAIL_POINT_NAME(name), &RETURN_VALUE))) { \ + \ code; \ - } FAIL_POINT_END + \ + } \ +} while (0) + /** * @} * (end group failpoint) */ -/** - * Internal macro to implement above #defines -- should not be used directly. - * @ingroup failpoint_private - */ -#define KFAIL_POINT_START(parent, name) \ - do { \ - int RETURN_VALUE; \ - static struct fail_point _FAIL_POINT_NAME(name) = { \ - #name, \ - _FAIL_POINT_LOCATION(), \ - TAILQ_HEAD_INITIALIZER( \ - _FAIL_POINT_NAME(name).fp_entries), \ - 0, \ - NULL, NULL, \ - }; \ - SYSCTL_OID(parent, OID_AUTO, name, \ - CTLTYPE_STRING | CTLFLAG_RW, \ - &_FAIL_POINT_NAME(name), 0, fail_point_sysctl, \ - "A", ""); \ - \ - if (__predict_false( \ - fail_point_eval(&_FAIL_POINT_NAME(name), \ - &RETURN_VALUE))) { - -/** - * Internal macro to implement above #defines -- should not be used directly. - * @ingroup failpoint_private - */ -#define FAIL_POINT_END \ - } \ - } while (0) - #ifdef _KERNEL int fail_point_sysctl(SYSCTL_HANDLER_ARGS); /* The fail point sysctl tree. */ SYSCTL_DECL(_debug_fail_point); +#define DEBUG_FP _debug_fail_point #endif -#define DEBUG_FP _debug_fail_point #endif /* _SYS_FAIL_H_ */ Modified: stable/7/sys/sys/queue.h ============================================================================== --- stable/7/sys/sys/queue.h Fri Mar 25 20:19:15 2011 (r220007) +++ stable/7/sys/sys/queue.h Fri Mar 25 20:51:20 2011 (r220008) @@ -313,6 +313,20 @@ struct { \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ } while (0) +#define STAILQ_SWAP(head1, head2, type) do { \ + struct type *swap_first = STAILQ_FIRST(head1); \ + struct type **swap_last = (head1)->stqh_last; \ + STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \ + (head1)->stqh_last = (head2)->stqh_last; \ + STAILQ_FIRST(head2) = swap_first; \ + (head2)->stqh_last = swap_last; \ + if (STAILQ_EMPTY(head1)) \ + (head1)->stqh_last = &STAILQ_FIRST(head1); \ + if (STAILQ_EMPTY(head2)) \ + (head2)->stqh_last = &STAILQ_FIRST(head2); \ +} while (0) + + /* * List declarations. */ @@ -417,6 +431,16 @@ struct { \ TRASHIT(*oldprev); \ } while (0) +#define LIST_SWAP(head1, head2, type, field) do { \ + struct type *swap_tmp = LIST_FIRST((head1)); \ + LIST_FIRST((head1)) = LIST_FIRST((head2)); \ + LIST_FIRST((head2)) = swap_tmp; \ + if ((swap_tmp = LIST_FIRST((head1))) != NULL) \ + swap_tmp->field.le_prev = &LIST_FIRST((head1)); \ + if ((swap_tmp = LIST_FIRST((head2))) != NULL) \ + swap_tmp->field.le_prev = &LIST_FIRST((head2)); \ +} while (0) + /* * Tail queue declarations. */ @@ -586,6 +610,22 @@ struct { \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) +#define TAILQ_SWAP(head1, head2, type, field) do { \ + struct type *swap_first = (head1)->tqh_first; \ + struct type **swap_last = (head1)->tqh_last; \ + (head1)->tqh_first = (head2)->tqh_first; \ + (head1)->tqh_last = (head2)->tqh_last; \ + (head2)->tqh_first = swap_first; \ + (head2)->tqh_last = swap_last; \ + if ((swap_first = (head1)->tqh_first) != NULL) \ + swap_first->field.tqe_prev = &(head1)->tqh_first; \ + else \ + (head1)->tqh_last = &(head1)->tqh_first; \ + if ((swap_first = (head2)->tqh_first) != NULL) \ + swap_first->field.tqe_prev = &(head2)->tqh_first; \ + else \ + (head2)->tqh_last = &(head2)->tqh_first; \ +} while (0) #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 20:53:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22771106566B; Fri, 25 Mar 2011 20:53:03 +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 0F33A8FC17; Fri, 25 Mar 2011 20:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PKr3Zo093250; Fri, 25 Mar 2011 20:53:03 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PKr3Hv093247; Fri, 25 Mar 2011 20:53:03 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201103252053.p2PKr3Hv093247@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 25 Mar 2011 20:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220009 - in head/sys/dev/cxgb: . common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 20:53:03 -0000 Author: np Date: Fri Mar 25 20:53:02 2011 New Revision: 220009 URL: http://svn.freebsd.org/changeset/base/220009 Log: Update T3 firmware to 7.11.0 Changes since 7.8.0 (from the official changelog): - Fixed sporadic interrupt generation for associated CQ when processing a local invalidate work request - Changes to core scheduling to avoid starving requests from the host under heavy RDMA Read Request load (e.g. packets to the wire) - Programmed the tp tx resource limiter in function of the traffic (only affects iWarp) - Increased the egress NIC gather list length from 36 to 46 entries MFC after: 1 week Modified: head/sys/dev/cxgb/common/cxgb_common.h head/sys/dev/cxgb/cxgb_t3fw.h Modified: head/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- head/sys/dev/cxgb/common/cxgb_common.h Fri Mar 25 20:51:20 2011 (r220008) +++ head/sys/dev/cxgb/common/cxgb_common.h Fri Mar 25 20:53:02 2011 (r220009) @@ -96,7 +96,7 @@ enum { enum { FW_VERSION_MAJOR = 7, - FW_VERSION_MINOR = 8, + FW_VERSION_MINOR = 11, FW_VERSION_MICRO = 0 }; Modified: head/sys/dev/cxgb/cxgb_t3fw.h ============================================================================== --- head/sys/dev/cxgb/cxgb_t3fw.h Fri Mar 25 20:51:20 2011 (r220008) +++ head/sys/dev/cxgb/cxgb_t3fw.h Fri Mar 25 20:53:02 2011 (r220009) @@ -32,8 +32,8 @@ $FreeBSD$ #define U (unsigned char) -static unsigned int t3fw_length = 30840; -static unsigned char t3fw[30840] = { +static unsigned int t3fw_length = 30976; +static unsigned char t3fw[30976] = { U 0x60, U 0x00, U 0x74, U 0x00, U 0x20, U 0x03, U 0x80, U 0x00, U 0x20, U 0x03, U 0x70, U 0x00, @@ -55,14 +55,14 @@ static unsigned char t3fw[30840] = { U 0x1F, U 0xFF, U 0xC0, U 0x00, U 0xE3, U 0x00, U 0x04, U 0x3C, U 0x02, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x6C, U 0x34, - U 0x1F, U 0xFF, U 0xC2, U 0x90, - U 0x20, U 0x00, U 0x6C, U 0x7C, - U 0x1F, U 0xFF, U 0xC2, U 0x94, - U 0x20, U 0x00, U 0x6C, U 0xBC, - U 0x1F, U 0xFF, U 0xC2, U 0x98, - U 0x20, U 0x00, U 0x6D, U 0x30, - U 0x1F, U 0xFF, U 0xC2, U 0x9C, + U 0x20, U 0x00, U 0x6C, U 0xB4, + U 0x1F, U 0xFF, U 0xC2, U 0xA0, + U 0x20, U 0x00, U 0x6C, U 0xFC, + U 0x1F, U 0xFF, U 0xC2, U 0xA4, + U 0x20, U 0x00, U 0x6D, U 0x3C, + U 0x1F, U 0xFF, U 0xC2, U 0xA8, + U 0x20, U 0x00, U 0x6D, U 0xB0, + U 0x1F, U 0xFF, U 0xC2, U 0xAC, U 0x20, U 0x00, U 0x03, U 0xC0, U 0xC0, U 0x00, U 0x00, U 0xE4, U 0x31, U 0x00, U 0xEA, U 0x31, @@ -324,105 +324,105 @@ static unsigned char t3fw[30840] = { U 0x1F, U 0xFF, U 0xC0, U 0x18, U 0xE3, U 0x00, U 0x05, U 0xE0, U 0x1F, U 0xFF, U 0xC0, U 0x18, - U 0x1F, U 0xFF, U 0xC2, U 0x90, + U 0x1F, U 0xFF, U 0xC2, U 0x94, U 0xE3, U 0x00, U 0x05, U 0xE0, - U 0x1F, U 0xFF, U 0xC2, U 0x90, - U 0x1F, U 0xFF, U 0xC2, U 0x90, - U 0xE3, U 0x00, U 0x08, U 0x58, - U 0x1F, U 0xFF, U 0xC2, U 0x90, - U 0x1F, U 0xFF, U 0xC5, U 0x8C, - U 0xE3, U 0x00, U 0x08, U 0x58, + U 0x1F, U 0xFF, U 0xC2, U 0x94, + U 0x1F, U 0xFF, U 0xC2, U 0x94, + U 0xE3, U 0x00, U 0x08, U 0x5C, + U 0x1F, U 0xFF, U 0xC2, U 0xA0, + U 0x1F, U 0xFF, U 0xC5, U 0x9C, + U 0xE3, U 0x00, U 0x08, U 0x5C, U 0x20, U 0x00, U 0x00, U 0x00, U 0x20, U 0x00, U 0x01, U 0x6A, - U 0xE3, U 0x00, U 0x0B, U 0x54, + U 0xE3, U 0x00, U 0x0B, U 0x58, U 0x20, U 0x00, U 0x01, U 0x80, U 0x20, U 0x00, U 0x01, U 0x80, - U 0xE3, U 0x00, U 0x0C, U 0xC0, + U 0xE3, U 0x00, U 0x0C, U 0xC4, U 0x20, U 0x00, U 0x02, U 0x00, U 0x20, U 0x00, U 0x02, U 0x03, - U 0xE3, U 0x00, U 0x0C, U 0xC0, + U 0xE3, U 0x00, U 0x0C, U 0xC4, U 0x20, U 0x00, U 0x02, U 0x1C, U 0x20, U 0x00, U 0x02, U 0x20, - U 0xE3, U 0x00, U 0x0C, U 0xC4, + U 0xE3, U 0x00, U 0x0C, U 0xC8, U 0x20, U 0x00, U 0x02, U 0x20, U 0x20, U 0x00, U 0x02, U 0x26, - U 0xE3, U 0x00, U 0x0C, U 0xC8, + U 0xE3, U 0x00, U 0x0C, U 0xCC, U 0x20, U 0x00, U 0x02, U 0x3C, U 0x20, U 0x00, U 0x02, U 0x40, - U 0xE3, U 0x00, U 0x0C, U 0xD0, + U 0xE3, U 0x00, U 0x0C, U 0xD4, U 0x20, U 0x00, U 0x02, U 0x40, U 0x20, U 0x00, U 0x02, U 0x49, - U 0xE3, U 0x00, U 0x0C, U 0xD4, + U 0xE3, U 0x00, U 0x0C, U 0xD8, U 0x20, U 0x00, U 0x02, U 0x4C, U 0x20, U 0x00, U 0x02, U 0x50, - U 0xE3, U 0x00, U 0x0C, U 0xE0, + U 0xE3, U 0x00, U 0x0C, U 0xE4, U 0x20, U 0x00, U 0x02, U 0x50, U 0x20, U 0x00, U 0x02, U 0x59, - U 0xE3, U 0x00, U 0x0C, U 0xE4, + U 0xE3, U 0x00, U 0x0C, U 0xE8, U 0x20, U 0x00, U 0x02, U 0x5C, U 0x20, U 0x00, U 0x02, U 0x60, - U 0xE3, U 0x00, U 0x0C, U 0xF0, + U 0xE3, U 0x00, U 0x0C, U 0xF4, U 0x20, U 0x00, U 0x02, U 0x60, U 0x20, U 0x00, U 0x02, U 0x69, - U 0xE3, U 0x00, U 0x0C, U 0xF4, + U 0xE3, U 0x00, U 0x0C, U 0xF8, U 0x20, U 0x00, U 0x02, U 0x6C, U 0x20, U 0x00, U 0x02, U 0x70, - U 0xE3, U 0x00, U 0x0D, U 0x00, + U 0xE3, U 0x00, U 0x0D, U 0x04, U 0x20, U 0x00, U 0x02, U 0x70, U 0x20, U 0x00, U 0x02, U 0x79, - U 0xE3, U 0x00, U 0x0D, U 0x04, + U 0xE3, U 0x00, U 0x0D, U 0x08, U 0x20, U 0x00, U 0x02, U 0x8C, U 0x20, U 0x00, U 0x02, U 0x8C, - U 0xE3, U 0x00, U 0x0D, U 0x10, + U 0xE3, U 0x00, U 0x0D, U 0x14, U 0x20, U 0x00, U 0x02, U 0x90, U 0x20, U 0x00, U 0x02, U 0x93, - U 0xE3, U 0x00, U 0x0D, U 0x10, + U 0xE3, U 0x00, U 0x0D, U 0x14, U 0x20, U 0x00, U 0x02, U 0xAC, U 0x20, U 0x00, U 0x02, U 0xB0, - U 0xE3, U 0x00, U 0x0D, U 0x14, + U 0xE3, U 0x00, U 0x0D, U 0x18, U 0x20, U 0x00, U 0x02, U 0xD0, U 0x20, U 0x00, U 0x02, U 0xF2, - U 0xE3, U 0x00, U 0x0D, U 0x18, + U 0xE3, U 0x00, U 0x0D, U 0x1C, U 0x20, U 0x00, U 0x03, U 0xB0, U 0x20, U 0x00, U 0x03, U 0xB0, - U 0xE3, U 0x00, U 0x0D, U 0x3C, + U 0xE3, U 0x00, U 0x0D, U 0x40, U 0x20, U 0x00, U 0x03, U 0xB0, U 0x20, U 0x00, U 0x03, U 0xB0, - U 0xE3, U 0x00, U 0x0D, U 0x3C, + U 0xE3, U 0x00, U 0x0D, U 0x40, U 0x20, U 0x00, U 0x03, U 0xB0, U 0x20, U 0x00, U 0x03, U 0xB0, - U 0xE3, U 0x00, U 0x0D, U 0x3C, + U 0xE3, U 0x00, U 0x0D, U 0x40, U 0x20, U 0x00, U 0x03, U 0xB0, U 0x20, U 0x00, U 0x03, U 0xB0, - U 0xE3, U 0x00, U 0x0D, U 0x3C, + U 0xE3, U 0x00, U 0x0D, U 0x40, U 0x20, U 0x00, U 0x03, U 0xB0, - U 0x20, U 0x00, U 0x6E, U 0x54, - U 0xE3, U 0x00, U 0x0D, U 0x3C, - U 0x20, U 0x00, U 0x6E, U 0x54, - U 0x20, U 0x00, U 0x6E, U 0x54, - U 0xE3, U 0x00, U 0x77, U 0xE0, + U 0x20, U 0x00, U 0x6E, U 0xD4, + U 0xE3, U 0x00, U 0x0D, U 0x40, + U 0x20, U 0x00, U 0x6E, U 0xD4, + U 0x20, U 0x00, U 0x6E, U 0xD4, + U 0xE3, U 0x00, U 0x78, U 0x64, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x1F, U 0xFC, U 0x00, U 0x00, U 0x1F, U 0xFC, U 0x00, U 0x00, - U 0x1F, U 0xFF, U 0xC5, U 0x90, - U 0x1F, U 0xFF, U 0xC6, U 0x70, - U 0x20, U 0x00, U 0x6E, U 0x58, - U 0x20, U 0x00, U 0x6E, U 0x58, + U 0x1F, U 0xFF, U 0xC5, U 0xA0, + U 0x1F, U 0xFF, U 0xC6, U 0x90, + U 0x20, U 0x00, U 0x6E, U 0xD8, + U 0x20, U 0x00, U 0x6E, U 0xD8, U 0xDE, U 0xFF, U 0xFE, U 0x00, U 0x00, U 0x00, U 0x08, U 0x0C, U 0xDE, U 0xAD, U 0xBE, U 0xEF, - U 0x1F, U 0xFF, U 0xC2, U 0xA0, + U 0x1F, U 0xFF, U 0xC2, U 0xB0, U 0x1F, U 0xFC, U 0xFE, U 0x00, - U 0x1F, U 0xFF, U 0xC0, U 0x94, - U 0x1F, U 0xFF, U 0xC5, U 0xC0, + U 0x1F, U 0xFF, U 0xC0, U 0xA4, + U 0x1F, U 0xFF, U 0xC5, U 0xD0, U 0x30, U 0x00, U 0x00, U 0x00, U 0x00, U 0x3F, U 0xFF, U 0xFF, U 0x80, U 0x40, U 0x00, U 0x00, U 0x10, U 0x00, U 0x00, U 0x00, U 0x08, U 0x0F, U 0xFF, U 0xFF, - U 0x1F, U 0xFF, U 0xC2, U 0x6D, + U 0x1F, U 0xFF, U 0xC2, U 0x7D, U 0x00, U 0x0F, U 0xFF, U 0xFF, U 0x80, U 0x4F, U 0xFF, U 0xFF, U 0x80, U 0x00, U 0x00, U 0x00, @@ -431,6 +431,9 @@ static unsigned char t3fw[30840] = { U 0x60, U 0x50, U 0x00, U 0x00, U 0x60, U 0x00, U 0x00, U 0x00, U 0x40, U 0x00, U 0x00, U 0x11, + U 0x20, U 0x30, U 0x00, U 0x00, + U 0x00, U 0x00, U 0xFF, U 0xFF, + U 0x00, U 0x00, U 0x0B, U 0x20, U 0x35, U 0x00, U 0x00, U 0x00, U 0x41, U 0x00, U 0x00, U 0x00, U 0x10, U 0x00, U 0x00, U 0x01, @@ -441,6 +444,7 @@ static unsigned char t3fw[30840] = { U 0x80, U 0x00, U 0x00, U 0x19, U 0x04, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x08, U 0x00, + U 0xE1, U 0x00, U 0x02, U 0x00, U 0x10, U 0x00, U 0x00, U 0x05, U 0x80, U 0x60, U 0x00, U 0x00, U 0x70, U 0x00, U 0x00, U 0x00, @@ -454,8 +458,8 @@ static unsigned char t3fw[30840] = { U 0x18, U 0x00, U 0x00, U 0x00, U 0x01, U 0x00, U 0x80, U 0x01, U 0x42, U 0x00, U 0x00, U 0x00, - U 0x1F, U 0xFF, U 0xC2, U 0x1D, - U 0x1F, U 0xFF, U 0xC0, U 0xDC, + U 0x1F, U 0xFF, U 0xC2, U 0x2D, + U 0x1F, U 0xFF, U 0xC0, U 0xEC, U 0x00, U 0x01, U 0x00, U 0x80, U 0x60, U 0x40, U 0x00, U 0x00, U 0x1A, U 0x00, U 0x00, U 0x00, @@ -472,49 +476,49 @@ static unsigned char t3fw[30840] = { U 0x80, U 0x00, U 0x00, U 0x1A, U 0x03, U 0x00, U 0x00, U 0x00, U 0x80, U 0x00, U 0x04, U 0x00, + U 0x04, U 0x03, U 0x04, U 0x03, U 0x50, U 0x00, U 0x00, U 0x03, U 0xFF, U 0xFF, U 0xBF, U 0xFF, - U 0x1F, U 0xFF, U 0xC3, U 0xD4, + U 0x1F, U 0xFF, U 0xC3, U 0xE4, U 0x00, U 0x00, U 0x0F, U 0xFF, U 0xFF, U 0xFF, U 0xF0, U 0x00, U 0x00, U 0x00, U 0x16, U 0xD0, U 0x00, U 0x00, U 0xFF, U 0xF7, U 0xA5, U 0x00, U 0x00, U 0x00, - U 0x1F, U 0xFF, U 0xC4, U 0xB0, - U 0x1F, U 0xFF, U 0xC4, U 0x61, + U 0x1F, U 0xFF, U 0xC4, U 0xC0, + U 0x1F, U 0xFF, U 0xC4, U 0x71, U 0x00, U 0x01, U 0x00, U 0x08, - U 0x00, U 0x00, U 0x0B, U 0x20, U 0x20, U 0x2F, U 0xFF, U 0x80, - U 0x1F, U 0xFF, U 0xC4, U 0x55, + U 0x1F, U 0xFF, U 0xC4, U 0x65, U 0x00, U 0x00, U 0x2C, U 0x00, U 0xFF, U 0xFE, U 0xFF, U 0xF8, U 0x00, U 0xFF, U 0xFF, U 0xFF, - U 0x1F, U 0xFF, U 0xC5, U 0x78, + U 0x1F, U 0xFF, U 0xC5, U 0x88, U 0x00, U 0x00, U 0x20, U 0x00, U 0xFF, U 0xFF, U 0xDF, U 0xFF, U 0x00, U 0x00, U 0xFF, U 0xEF, U 0x01, U 0x00, U 0x11, U 0x00, - U 0x1F, U 0xFF, U 0xC3, U 0xD2, - U 0x1F, U 0xFF, U 0xC5, U 0x90, + U 0x1F, U 0xFF, U 0xC3, U 0xE2, + U 0x1F, U 0xFF, U 0xC5, U 0xA0, U 0xFF, U 0xFF, U 0xEF, U 0xFF, U 0x00, U 0x00, U 0xFF, U 0xFB, - U 0x1F, U 0xFF, U 0xC6, U 0x30, - U 0x1F, U 0xFF, U 0xBE, U 0xA0, + U 0x1F, U 0xFF, U 0xC6, U 0x50, + U 0x1F, U 0xFF, U 0xBE, U 0xB0, U 0xFF, U 0xFF, U 0xF7, U 0xFF, - U 0x1F, U 0xFF, U 0xC0, U 0x64, + U 0x1F, U 0xFF, U 0xC0, U 0x74, U 0x00, U 0x00, U 0xFF, U 0xFD, - U 0x1F, U 0xFF, U 0xC6, U 0x20, + U 0x1F, U 0xFF, U 0xC6, U 0x40, U 0x00, U 0x01, U 0xFB, U 0xD0, - U 0x1F, U 0xFF, U 0xC5, U 0xB0, - U 0x1F, U 0xFF, U 0xC6, U 0x60, - U 0x1F, U 0xFF, U 0xC5, U 0x91, + U 0x1F, U 0xFF, U 0xC5, U 0xC0, + U 0x1F, U 0xFF, U 0xC6, U 0x80, + U 0x1F, U 0xFF, U 0xC5, U 0xA1, U 0xE0, U 0xFF, U 0xFE, U 0x00, - U 0x1F, U 0xFF, U 0xC5, U 0xA0, + U 0x1F, U 0xFF, U 0xC5, U 0xB0, U 0x00, U 0x00, U 0x80, U 0x00, - U 0x1F, U 0xFF, U 0xC5, U 0x3C, - U 0x1F, U 0xFF, U 0xC5, U 0xB4, - U 0x1F, U 0xFF, U 0xC0, U 0x68, - U 0x1F, U 0xFF, U 0xC4, U 0xD0, + U 0x1F, U 0xFF, U 0xC5, U 0x4C, + U 0x1F, U 0xFF, U 0xC5, U 0xC4, + U 0x1F, U 0xFF, U 0xC0, U 0x78, + U 0x1F, U 0xFF, U 0xC4, U 0xE4, U 0x1F, U 0xFC, U 0xFF, U 0xD8, U 0x00, U 0x01, U 0x00, U 0x81, U 0x7F, U 0xFF, U 0xFF, U 0xFF, @@ -522,21 +526,19 @@ static unsigned char t3fw[30840] = { U 0x00, U 0x00, U 0x27, U 0x10, U 0x1F, U 0xFC, U 0xFE, U 0x30, U 0x1F, U 0xFC, U 0xFE, U 0x70, - U 0xE1, U 0x00, U 0x02, U 0x00, - U 0x1F, U 0xFF, U 0xC5, U 0x38, - U 0x1F, U 0xFF, U 0xC5, U 0x50, + U 0x1F, U 0xFF, U 0xC5, U 0x48, + U 0x1F, U 0xFF, U 0xC5, U 0x60, U 0x00, U 0x03, U 0xD0, U 0x90, - U 0x1F, U 0xFF, U 0xC5, U 0x64, + U 0x1F, U 0xFF, U 0xC5, U 0x74, U 0x2B, U 0x50, U 0x63, U 0x80, U 0x2B, U 0x50, U 0x79, U 0x80, U 0x2B, U 0x50, U 0x90, U 0x80, U 0x2B, U 0x50, U 0xA6, U 0x80, - U 0x1F, U 0xFF, U 0xC4, U 0x69, + U 0x1F, U 0xFF, U 0xC4, U 0x79, U 0x01, U 0x00, U 0x11, U 0x0F, U 0x20, U 0x2F, U 0xFE, U 0x00, U 0x20, U 0x30, U 0x00, U 0x80, U 0x20, U 0x2F, U 0xFF, U 0x00, - U 0x00, U 0x00, U 0xFF, U 0xFF, U 0x00, U 0x01, U 0xFF, U 0xF8, U 0x2B, U 0x50, U 0xB2, U 0x00, U 0x2B, U 0x50, U 0xB2, U 0x08, @@ -548,24 +550,23 @@ static unsigned char t3fw[30840] = { U 0x2B, U 0x50, U 0xBD, U 0x28, U 0x2B, U 0x50, U 0xBC, U 0x80, U 0x2B, U 0x50, U 0xBD, U 0xA0, - U 0x20, U 0x30, U 0x00, U 0x00, U 0xDF, U 0xFF, U 0xFE, U 0x00, U 0x50, U 0x00, U 0x00, U 0x02, U 0x00, U 0xC0, U 0x00, U 0x00, U 0x02, U 0x00, U 0x00, U 0x00, U 0xFF, U 0xFF, U 0xF7, U 0xF4, - U 0x1F, U 0xFF, U 0xC0, U 0x6C, + U 0x1F, U 0xFF, U 0xC0, U 0x7C, U 0x00, U 0x0F, U 0xF8, U 0x00, U 0x04, U 0x40, U 0x00, U 0x00, U 0x00, U 0x10, U 0x00, U 0x00, U 0x0C, U 0x40, U 0x00, U 0x00, U 0x1C, U 0x40, U 0x00, U 0x00, U 0xE0, U 0x00, U 0x00, U 0xA0, - U 0x1F, U 0xFF, U 0xC5, U 0x40, + U 0x1F, U 0xFF, U 0xC5, U 0x50, U 0x1F, U 0xFD, U 0x00, U 0x08, - U 0x1F, U 0xFF, U 0xC5, U 0x54, - U 0x1F, U 0xFF, U 0xC5, U 0x68, - U 0x1F, U 0xFF, U 0xC5, U 0x7C, + U 0x1F, U 0xFF, U 0xC5, U 0x64, + U 0x1F, U 0xFF, U 0xC5, U 0x78, + U 0x1F, U 0xFF, U 0xC5, U 0x8C, U 0xE1, U 0x00, U 0x06, U 0x90, U 0xE1, U 0x00, U 0x06, U 0xEC, U 0x00, U 0x00, U 0x00, U 0x00, @@ -616,70 +617,70 @@ static unsigned char t3fw[30840] = { U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x55, U 0x54, - U 0x20, U 0x00, U 0x54, U 0x24, - U 0x20, U 0x00, U 0x55, U 0x54, - U 0x20, U 0x00, U 0x55, U 0x54, - U 0x20, U 0x00, U 0x53, U 0x60, - U 0x20, U 0x00, U 0x53, U 0x60, - U 0x20, U 0x00, U 0x53, U 0x60, - U 0x20, U 0x00, U 0x51, U 0xA0, - U 0x20, U 0x00, U 0x51, U 0xA0, - U 0x20, U 0x00, U 0x51, U 0x98, - U 0x20, U 0x00, U 0x51, U 0x04, - U 0x20, U 0x00, U 0x4F, U 0xAC, - U 0x20, U 0x00, U 0x4D, U 0x8C, - U 0x20, U 0x00, U 0x4B, U 0x60, - U 0x00, U 0x00, U 0x00, U 0x00, - U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x55, U 0x24, - U 0x20, U 0x00, U 0x53, U 0xF0, - U 0x20, U 0x00, U 0x54, U 0x94, - U 0x20, U 0x00, U 0x54, U 0x94, - U 0x20, U 0x00, U 0x52, U 0x48, - U 0x20, U 0x00, U 0x52, U 0x48, - U 0x20, U 0x00, U 0x52, U 0x48, - U 0x20, U 0x00, U 0x52, U 0x48, - U 0x20, U 0x00, U 0x52, U 0x48, - U 0x20, U 0x00, U 0x51, U 0x90, - U 0x20, U 0x00, U 0x52, U 0x48, - U 0x20, U 0x00, U 0x4E, U 0xCC, - U 0x20, U 0x00, U 0x4D, U 0x3C, - U 0x20, U 0x00, U 0x4B, U 0x0C, + U 0x20, U 0x00, U 0x56, U 0x20, + U 0x20, U 0x00, U 0x54, U 0xF0, + U 0x20, U 0x00, U 0x56, U 0x20, + U 0x20, U 0x00, U 0x56, U 0x20, + U 0x20, U 0x00, U 0x54, U 0x2C, + U 0x20, U 0x00, U 0x54, U 0x2C, + U 0x20, U 0x00, U 0x54, U 0x2C, + U 0x20, U 0x00, U 0x52, U 0x6C, + U 0x20, U 0x00, U 0x52, U 0x6C, + U 0x20, U 0x00, U 0x52, U 0x64, + U 0x20, U 0x00, U 0x51, U 0xD0, + U 0x20, U 0x00, U 0x50, U 0x78, + U 0x20, U 0x00, U 0x4E, U 0x58, + U 0x20, U 0x00, U 0x4C, U 0x2C, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x00, U 0x00, U 0x00, U 0x00, + U 0x20, U 0x00, U 0x55, U 0xF0, + U 0x20, U 0x00, U 0x54, U 0xBC, + U 0x20, U 0x00, U 0x55, U 0x60, + U 0x20, U 0x00, U 0x55, U 0x60, + U 0x20, U 0x00, U 0x53, U 0x14, + U 0x20, U 0x00, U 0x53, U 0x14, + U 0x20, U 0x00, U 0x53, U 0x14, + U 0x20, U 0x00, U 0x53, U 0x14, + U 0x20, U 0x00, U 0x53, U 0x14, + U 0x20, U 0x00, U 0x52, U 0x5C, + U 0x20, U 0x00, U 0x53, U 0x14, + U 0x20, U 0x00, U 0x4F, U 0x98, + U 0x20, U 0x00, U 0x4E, U 0x08, + U 0x20, U 0x00, U 0x4B, U 0xD8, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x0B, U 0xE8, - U 0x20, U 0x00, U 0x3A, U 0xA8, + U 0x20, U 0x00, U 0x0B, U 0xF0, + U 0x20, U 0x00, U 0x3B, U 0x74, U 0x20, U 0x00, U 0x04, U 0xC0, - U 0x20, U 0x00, U 0x46, U 0xFC, - U 0x20, U 0x00, U 0x0B, U 0xE0, - U 0x20, U 0x00, U 0x41, U 0xC0, + U 0x20, U 0x00, U 0x47, U 0xC8, + U 0x20, U 0x00, U 0x0B, U 0xE8, + U 0x20, U 0x00, U 0x42, U 0x8C, U 0x20, U 0x00, U 0x03, U 0xF0, - U 0x20, U 0x00, U 0x46, U 0xBC, - U 0x20, U 0x00, U 0x4A, U 0xE8, - U 0x20, U 0x00, U 0x3E, U 0xCC, - U 0x20, U 0x00, U 0x3D, U 0xE8, - U 0x20, U 0x00, U 0x3A, U 0x24, - U 0x20, U 0x00, U 0x38, U 0xB4, - U 0x20, U 0x00, U 0x36, U 0x24, - U 0x20, U 0x00, U 0x31, U 0x84, - U 0x20, U 0x00, U 0x3C, U 0x44, - U 0x20, U 0x00, U 0x2D, U 0xB0, - U 0x20, U 0x00, U 0x28, U 0x44, - U 0x20, U 0x00, U 0x67, U 0xD8, - U 0x20, U 0x00, U 0x23, U 0xD0, - U 0x20, U 0x00, U 0x20, U 0xB0, - U 0x20, U 0x00, U 0x20, U 0x5C, - U 0x20, U 0x00, U 0x1D, U 0x48, - U 0x20, U 0x00, U 0x18, U 0x40, - U 0x20, U 0x00, U 0x15, U 0x68, - U 0x20, U 0x00, U 0x0E, U 0x4C, - U 0x20, U 0x00, U 0x0C, U 0x2C, - U 0x20, U 0x00, U 0x11, U 0x2C, - U 0x20, U 0x00, U 0x13, U 0x18, - U 0x20, U 0x00, U 0x43, U 0xB8, - U 0x20, U 0x00, U 0x3E, U 0x80, - U 0x20, U 0x00, U 0x0B, U 0xF0, + U 0x20, U 0x00, U 0x47, U 0x88, + U 0x20, U 0x00, U 0x4B, U 0xB4, + U 0x20, U 0x00, U 0x3F, U 0x98, + U 0x20, U 0x00, U 0x3E, U 0xB4, + U 0x20, U 0x00, U 0x3A, U 0xF0, + U 0x20, U 0x00, U 0x39, U 0x80, + U 0x20, U 0x00, U 0x36, U 0xF0, + U 0x20, U 0x00, U 0x32, U 0x50, + U 0x20, U 0x00, U 0x3D, U 0x10, + U 0x20, U 0x00, U 0x2E, U 0x68, + U 0x20, U 0x00, U 0x28, U 0xFC, + U 0x20, U 0x00, U 0x68, U 0x58, + U 0x20, U 0x00, U 0x24, U 0x88, + U 0x20, U 0x00, U 0x21, U 0x68, + U 0x20, U 0x00, U 0x21, U 0x14, + U 0x20, U 0x00, U 0x1E, U 0x00, + U 0x20, U 0x00, U 0x18, U 0xF8, + U 0x20, U 0x00, U 0x16, U 0x20, + U 0x20, U 0x00, U 0x0E, U 0xD4, + U 0x20, U 0x00, U 0x0C, U 0x34, + U 0x20, U 0x00, U 0x11, U 0xCC, + U 0x20, U 0x00, U 0x13, U 0xB8, + U 0x20, U 0x00, U 0x44, U 0x84, + U 0x20, U 0x00, U 0x3F, U 0x4C, + U 0x20, U 0x00, U 0x0B, U 0xF8, U 0x20, U 0x00, U 0x04, U 0xC0, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, @@ -851,22 +852,22 @@ static unsigned char t3fw[30840] = { U 0x0B, U 0xBB, U 0x90, U 0x00, U 0x53, U 0x00, U 0x00, U 0x00, U 0x63, U 0xFF, U 0xFC, U 0x00, - U 0x20, U 0x00, U 0x6C, U 0x10, + U 0x20, U 0x00, U 0x6C, U 0x90, U 0x10, U 0xFF, U 0xFF, U 0x0A, U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x6C, U 0x34, + U 0x20, U 0x00, U 0x6C, U 0xB4, U 0x00, U 0xD2, U 0x31, U 0x10, U 0xFF, U 0xFE, U 0x0A, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x6C, U 0x7C, + U 0x20, U 0x00, U 0x6C, U 0xFC, U 0x00, U 0xD3, U 0x31, U 0x10, U 0xFF, U 0xFE, U 0x0A, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x6C, U 0xBC, + U 0x20, U 0x00, U 0x6D, U 0x3C, U 0x00, U 0xD4, U 0x31, U 0x10, U 0xFF, U 0xFE, U 0x0A, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, - U 0x20, U 0x00, U 0x6D, U 0x30, + U 0x20, U 0x00, U 0x6D, U 0xB0, U 0x00, U 0xD5, U 0x31, U 0x10, U 0xFF, U 0xFE, U 0x0A, U 0x00, U 0x00, U 0x00, U 0x00, U 0x00, @@ -883,8 +884,8 @@ static unsigned char t3fw[30840] = { U 0xFF, U 0xFC, U 0x00, U 0x00, U 0x1F, U 0xFF, U 0xD0, U 0x00, U 0x00, U 0x04, U 0x00, U 0x20, - U 0x1F, U 0xFF, U 0xC5, U 0x90, - U 0x1F, U 0xFF, U 0xC6, U 0x70, + U 0x1F, U 0xFF, U 0xC5, U 0xA0, + U 0x1F, U 0xFF, U 0xC6, U 0x90, U 0x20, U 0x0A, U 0x00, U 0x11, U 0xFF, U 0xFB, U 0x13, U 0xFF, U 0xFB, U 0x03, U 0xE6, U 0x31, @@ -893,8 +894,8 @@ static unsigned char t3fw[30840] = { U 0xFA, U 0xD3, U 0x0F, U 0x77, U 0x6B, U 0x06, U 0x90, U 0x60, U 0xB4, U 0x66, U 0x77, U 0x63, - U 0xF8, U 0x54, U 0x15, U 0xE6, - U 0x54, U 0x1A, U 0x91, U 0x0F, + U 0xF8, U 0x54, U 0x16, U 0x19, + U 0x54, U 0x1A, U 0xB1, U 0x0F, U 0x14, U 0x00, U 0x63, U 0xFF, U 0xF9, U 0x00, U 0x00, U 0x00, U 0x6C, U 0x10, U 0x04, U 0xC0, @@ -954,43 +955,45 @@ static unsigned char t3fw[30840] = { U 0xC1, U 0xE8, U 0xC1, U 0xC7, U 0x2B, U 0x22, U 0x1E, U 0x28, U 0x22, U 0x1D, U 0xC0, U 0xD0, - U 0x7B, U 0x81, U 0x31, U 0x29, + U 0x7B, U 0x81, U 0x35, U 0x29, U 0x20, U 0x06, U 0x0B, U 0xB7, U 0x02, U 0x29, U 0x9C, U 0xFA, U 0x65, U 0x50, U 0x08, U 0x28, U 0x20, U 0x72, U 0x28, U 0x8C, U 0xFF, U 0x28, U 0x24, U 0x72, - U 0x64, U 0x91, U 0x5C, U 0x2A, + U 0x64, U 0x91, U 0x64, U 0x2A, U 0xB0, U 0x00, U 0x0C, U 0xA8, - U 0x0C, U 0x64, U 0x81, U 0x67, + U 0x0C, U 0x64, U 0x81, U 0x6F, U 0x0E, U 0xA9, U 0x0C, U 0x64, - U 0x92, U 0xB3, U 0x7F, U 0xA1, - U 0x37, U 0x69, U 0xAC, U 0x2F, - U 0x60, U 0x00, U 0x34, U 0x00, - U 0x00, U 0x28, U 0x20, U 0x06, - U 0xD7, U 0xD0, U 0x28, U 0x8C, - U 0xFA, U 0xCC, U 0x57, U 0x2A, - U 0x20, U 0x72, U 0x2A, U 0xAC, - U 0xFF, U 0x2A, U 0x24, U 0x72, - U 0x64, U 0x81, U 0x35, U 0x2A, - U 0xD0, U 0x00, U 0x0C, U 0xA9, - U 0x0C, U 0x64, U 0x91, U 0x64, - U 0x0E, U 0xAC, U 0x0C, U 0x64, - U 0xC3, U 0x1B, U 0x7F, U 0xA1, - U 0x07, U 0x68, U 0xAC, U 0x07, - U 0xC0, U 0x20, U 0xD1, U 0x0F, - U 0x00, U 0x2D, U 0x25, U 0x02, + U 0x92, U 0xBB, U 0x7F, U 0xA1, + U 0x3F, U 0xC1, U 0xCE, U 0x7C, + U 0xA1, U 0x36, U 0x69, U 0xAC, + U 0x33, U 0x60, U 0x00, U 0x37, + U 0x00, U 0x29, U 0x20, U 0x06, + U 0xD7, U 0xD0, U 0x29, U 0x9C, + U 0xFA, U 0xCC, U 0x57, U 0x28, + U 0x20, U 0x72, U 0x28, U 0x8C, + U 0xFF, U 0x28, U 0x24, U 0x72, + U 0x64, U 0x91, U 0x39, U 0x2A, + U 0xD0, U 0x00, U 0x0C, U 0xA8, + U 0x0C, U 0x64, U 0x81, U 0x68, + U 0x0E, U 0xA9, U 0x0C, U 0x64, + U 0x93, U 0x1F, U 0x7F, U 0xA1, + U 0x0B, U 0xC1, U 0xCE, U 0x7C, + U 0xA1, U 0x02, U 0x68, U 0xAC, + U 0x06, U 0xC0, U 0x20, U 0xD1, + U 0x0F, U 0x2D, U 0x25, U 0x02, U 0x8A, U 0x32, U 0xC0, U 0x90, U 0x0A, U 0x6E, U 0x50, U 0x65, U 0xE5, U 0xB5, U 0x29, U 0x24, U 0x67, U 0x09, U 0x0F, U 0x47, U 0x65, U 0xF5, U 0xB1, U 0x2C, U 0x20, U 0x0C, U 0x1F, U 0xEE, - U 0xB5, U 0x0C, U 0xCE, U 0x11, + U 0xB3, U 0x0C, U 0xCE, U 0x11, U 0xAF, U 0xEE, U 0x29, U 0xE2, U 0x86, U 0xB4, U 0x48, U 0x79, U 0x83, U 0x02, U 0x60, U 0x05, - U 0x82, U 0x19, U 0xEE, U 0xB1, + U 0x82, U 0x19, U 0xEE, U 0xAF, U 0x09, U 0xC9, U 0x0A, U 0x29, U 0x92, U 0xA3, U 0x68, U 0x90, U 0x07, U 0x8F, U 0x20, U 0x09, @@ -1002,16 +1005,16 @@ static unsigned char t3fw[30840] = { U 0xD9, U 0xB0, U 0x60, U 0x00, U 0x02, U 0x00, U 0xC0, U 0x90, U 0x8B, U 0x94, U 0x17, U 0xEE, - U 0xA7, U 0x0B, U 0x88, U 0x14, + U 0xA5, U 0x0B, U 0x88, U 0x14, U 0x87, U 0x74, U 0x0B, U 0x0B, U 0x47, U 0xA8, U 0x77, U 0x18, - U 0xEE, U 0xA5, U 0x09, U 0xBB, + U 0xEE, U 0xA3, U 0x09, U 0xBB, U 0x10, U 0x08, U 0x77, U 0x02, U 0x97, U 0xF0, U 0x18, U 0xEE, - U 0xA3, U 0x17, U 0xEE, U 0xA4, + U 0xA1, U 0x17, U 0xEE, U 0xA2, U 0x08, U 0xA8, U 0x01, U 0x0B, U 0x88, U 0x02, U 0x07, U 0x47, - U 0x02, U 0x1B, U 0xEE, U 0xA0, + U 0x02, U 0x1B, U 0xEE, U 0x9E, U 0x97, U 0xF1, U 0x0B, U 0x88, U 0x02, U 0x98, U 0xF2, U 0x27, U 0x90, U 0x23, U 0x2B, U 0x90, @@ -1022,7 +1025,7 @@ static unsigned char t3fw[30840] = { U 0x07, U 0x77, U 0x10, U 0x0C, U 0x88, U 0x10, U 0x07, U 0x88, U 0x02, U 0x0B, U 0x88, U 0x02, - U 0x17, U 0xEE, U 0x98, U 0x8B, + U 0x17, U 0xEE, U 0x96, U 0x8B, U 0x33, U 0x07, U 0xBB, U 0x01, U 0x87, U 0x34, U 0x0B, U 0x88, U 0x02, U 0x98, U 0xF3, U 0x97, @@ -1030,9 +1033,9 @@ static unsigned char t3fw[30840] = { U 0x95, U 0x87, U 0x39, U 0x9B, U 0xF5, U 0x88, U 0x96, U 0x8B, U 0x38, U 0x98, U 0xF6, U 0x88, - U 0x97, U 0x97, U 0xF9, U 0x9B, - U 0xF8, U 0x98, U 0xF7, U 0x17, - U 0xEE, U 0x8F, U 0x28, U 0xE2, + U 0x97, U 0x9B, U 0xF8, U 0x97, + U 0xF9, U 0x98, U 0xF7, U 0x17, + U 0xEE, U 0x8D, U 0x28, U 0xE2, U 0x85, U 0x07, U 0xC7, U 0x08, U 0x2D, U 0x74, U 0xCF, U 0x08, U 0x48, U 0x0B, U 0x28, U 0xE6, @@ -1040,18 +1043,18 @@ static unsigned char t3fw[30840] = { U 0x2B, U 0x22, U 0x1E, U 0x28, U 0x22, U 0x1D, U 0x7B, U 0x89, U 0x02, U 0x2B, U 0x0A, U 0x00, - U 0x64, U 0xBF, U 0x04, U 0x2C, + U 0x64, U 0xBF, U 0x05, U 0x2C, U 0xB0, U 0x07, U 0x28, U 0xB0, U 0x00, U 0xDA, U 0x20, U 0x06, U 0x88, U 0x0A, U 0x28, U 0x82, U 0x4C, U 0xC0, U 0xD1, U 0x0B, U 0x80, U 0x00, U 0xDB, U 0xA0, U 0x65, U 0xAF, U 0xE7, U 0x63, - U 0xFE, U 0xE9, U 0x00, U 0x00, + U 0xFE, U 0xEA, U 0x00, U 0x00, U 0x29, U 0x20, U 0x72, U 0x65, - U 0x9E, U 0x9C, U 0x60, U 0x04, + U 0x9E, U 0x94, U 0x60, U 0x04, U 0xE7, U 0x2A, U 0x20, U 0x72, - U 0x65, U 0xAE, U 0xC3, U 0x60, + U 0x65, U 0xAE, U 0xBF, U 0x60, U 0x04, U 0xDE, U 0x00, U 0x00, U 0x2E, U 0xB0, U 0x03, U 0x2C, U 0x20, U 0x67, U 0xD4, U 0xE0, @@ -1060,7 +1063,7 @@ static unsigned char t3fw[30840] = { U 0xFF, U 0x50, U 0x0C, U 0x45, U 0x54, U 0xBC, U 0x55, U 0x64, U 0xF4, U 0xEB, U 0x19, U 0xEE, - U 0x74, U 0x88, U 0x2A, U 0x09, + U 0x72, U 0x88, U 0x2A, U 0x09, U 0xA9, U 0x01, U 0x09, U 0x88, U 0x0C, U 0x64, U 0x82, U 0x1F, U 0xC0, U 0x92, U 0x60, U 0x00, @@ -1071,7 +1074,7 @@ static unsigned char t3fw[30840] = { U 0x0A, U 0xFC, U 0x50, U 0x0B, U 0x45, U 0x54, U 0xBC, U 0x55, U 0x64, U 0xC4, U 0xBE, U 0x19, - U 0xEE, U 0x69, U 0x88, U 0x2A, + U 0xEE, U 0x67, U 0x88, U 0x2A, U 0x09, U 0xA9, U 0x01, U 0x79, U 0x89, U 0xD5, U 0x0B, U 0xEA, U 0x50, U 0x64, U 0xA4, U 0xE3, @@ -1107,7 +1110,7 @@ static unsigned char t3fw[30840] = { U 0xFC, U 0x13, U 0x2C, U 0x16, U 0x18, U 0x2B, U 0x12, U 0x1A, U 0x2A, U 0x12, U 0x1B, U 0xDC, - U 0x50, U 0x58, U 0x19, U 0xA4, + U 0x50, U 0x58, U 0x19, U 0xC2, U 0xC0, U 0xD0, U 0xC0, U 0x90, U 0x2E, U 0x5C, U 0xF4, U 0x2C, U 0x12, U 0x17, U 0x28, U 0x12, @@ -1124,25 +1127,25 @@ static unsigned char t3fw[30840] = { U 0x03, U 0x89, U 0x75, U 0xB1, U 0xEA, U 0x2A, U 0x74, U 0x03, U 0xB0, U 0x99, U 0x09, U 0x49, - U 0x0C, U 0x65, U 0x9D, U 0xB3, + U 0x0C, U 0x65, U 0x9D, U 0xB4, U 0x2B, U 0x20, U 0x67, U 0x2D, U 0x25, U 0x02, U 0x65, U 0xB3, U 0xFA, U 0x2B, U 0x22, U 0x1E, U 0x2C, U 0x22, U 0x1D, U 0x7B, U 0xC9, U 0x01, U 0xC0, U 0xB0, - U 0x64, U 0xBD, U 0x9C, U 0x2C, + U 0x64, U 0xBD, U 0x9D, U 0x2C, U 0xB0, U 0x07, U 0x28, U 0xB0, U 0x00, U 0xDA, U 0x20, U 0x06, U 0x88, U 0x0A, U 0x28, U 0x82, U 0x4C, U 0xC0, U 0xD1, U 0x0B, U 0x80, U 0x00, U 0xDB, U 0xA0, U 0x65, U 0xAF, U 0xE7, U 0x63, - U 0xFD, U 0x81, U 0x89, U 0xBA, + U 0xFD, U 0x82, U 0x89, U 0xBA, U 0xB1, U 0x99, U 0x65, U 0x90, U 0x97, U 0x88, U 0x34, U 0x1C, - U 0xEE, U 0x25, U 0x98, U 0xBA, + U 0xEE, U 0x23, U 0x98, U 0xBA, U 0x8F, U 0x33, U 0x1E, U 0xEE, - U 0x1E, U 0x0F, U 0x4F, U 0x54, + U 0x1C, U 0x0F, U 0x4F, U 0x54, U 0x2F, U 0xB4, U 0x2C, U 0x8D, U 0x2A, U 0x8A, U 0x32, U 0x0E, U 0xDD, U 0x02, U 0x0C, U 0xAC, @@ -1180,8 +1183,8 @@ static unsigned char t3fw[30840] = { U 0xC0, U 0x2C, U 0x20, U 0x67, U 0x2D, U 0x25, U 0x02, U 0x65, U 0xC3, U 0x11, U 0x1D, U 0xED, - U 0xF8, U 0x8A, U 0x32, U 0x1E, - U 0xED, U 0xFD, U 0x0D, U 0xAD, + U 0xF6, U 0x8A, U 0x32, U 0x1E, + U 0xED, U 0xFB, U 0x0D, U 0xAD, U 0x01, U 0x0E, U 0xDD, U 0x0C, U 0x65, U 0xD2, U 0x8A, U 0x0A, U 0x4E, U 0x51, U 0x6F, U 0xE2, @@ -1191,14 +1194,14 @@ static unsigned char t3fw[30840] = { U 0x65, U 0xF2, U 0xF8, U 0x28, U 0x22, U 0x1D, U 0x7B, U 0x89, U 0x02, U 0x2B, U 0x0A, U 0x00, - U 0x64, U 0xBC, U 0xA8, U 0x2C, + U 0x64, U 0xBC, U 0xA9, U 0x2C, U 0xB0, U 0x07, U 0x28, U 0xB0, U 0x00, U 0xDA, U 0x20, U 0x06, U 0x88, U 0x0A, U 0x28, U 0x82, U 0x4C, U 0xC0, U 0xD1, U 0x0B, U 0x80, U 0x00, U 0xDB, U 0xA0, U 0x65, U 0xAF, U 0xE7, U 0x63, - U 0xFC, U 0x8D, U 0x00, U 0x00, + U 0xFC, U 0x8E, U 0x00, U 0x00, U 0x0C, U 0xE9, U 0x50, U 0x64, U 0x92, U 0xED, U 0x0C, U 0xEF, U 0x11, U 0xC0, U 0x80, U 0x28, @@ -1226,9 +1229,9 @@ static unsigned char t3fw[30840] = { U 0xCA, U 0x2C, U 0x0A, U 0x01, U 0x64, U 0xCE, U 0x0D, U 0x60, U 0x02, U 0x8E, U 0x88, U 0x34, - U 0x1B, U 0xED, U 0xCF, U 0x98, + U 0x1B, U 0xED, U 0xCD, U 0x98, U 0xDA, U 0x8F, U 0x33, U 0x1E, - U 0xED, U 0xC8, U 0x0F, U 0x4F, + U 0xED, U 0xC6, U 0x0F, U 0x4F, U 0x54, U 0x2F, U 0xD4, U 0x2C, U 0x8C, U 0x2A, U 0x8A, U 0x32, U 0x0E, U 0xCC, U 0x02, U 0x0B, @@ -1345,7 +1348,7 @@ static unsigned char t3fw[30840] = { U 0xFC, U 0x2A, U 0x00, U 0x00, U 0x64, U 0x50, U 0xC0, U 0xDA, U 0x20, U 0xDB, U 0xC0, U 0x58, - U 0x16, U 0x78, U 0xC0, U 0x20, + U 0x16, U 0x96, U 0xC0, U 0x20, U 0xD1, U 0x0F, U 0xC0, U 0x91, U 0x63, U 0xFD, U 0x7A, U 0x00, U 0xC0, U 0x91, U 0x63, U 0xFA, @@ -1354,15 +1357,15 @@ static unsigned char t3fw[30840] = { U 0x0A, U 0x80, U 0xC0, U 0x9A, U 0x29, U 0x24, U 0x68, U 0x2C, U 0x70, U 0x07, U 0x58, U 0x15, - U 0x68, U 0xD2, U 0xA0, U 0xD1, + U 0x82, U 0xD2, U 0xA0, U 0xD1, U 0x0F, U 0x03, U 0x47, U 0x0B, - U 0x18, U 0xED, U 0x4F, U 0xDB, + U 0x18, U 0xED, U 0x4D, U 0xDB, U 0x70, U 0xA8, U 0x28, U 0x78, U 0x73, U 0x02, U 0x2B, U 0x7D, U 0xF8, U 0xD9, U 0xB0, U 0x63, U 0xFA, U 0x61, U 0x00, U 0x00, U 0x2A, U 0x2C, U 0x74, U 0xDB, - U 0x40, U 0x58, U 0x0E, U 0xE3, + U 0x40, U 0x58, U 0x0F, U 0x14, U 0x63, U 0xFA, U 0xE4, U 0x00, U 0x00, U 0x29, U 0x22, U 0x1D, U 0x2D, U 0x25, U 0x02, U 0x7B, @@ -1377,16 +1380,16 @@ static unsigned char t3fw[30840] = { U 0xD1, U 0x0F, U 0xC0, U 0x91, U 0x63, U 0xFB, U 0xFF, U 0x00, U 0x02, U 0x2A, U 0x02, U 0x58, - U 0x02, U 0x4C, U 0x0A, U 0xA2, + U 0x02, U 0x72, U 0x0A, U 0xA2, U 0x02, U 0x06, U 0x00, U 0x00, U 0x02, U 0x2A, U 0x02, U 0x58, - U 0x02, U 0x49, U 0x0A, U 0xA2, + U 0x02, U 0x6F, U 0x0A, U 0xA2, U 0x02, U 0x06, U 0x00, U 0x00, U 0xDB, U 0x70, U 0xDA, U 0x20, U 0xC0, U 0xD1, U 0x2E, U 0x0A, U 0x80, U 0xC0, U 0x9E, U 0x29, U 0x24, U 0x68, U 0x2C, U 0x70, - U 0x07, U 0x58, U 0x15, U 0x47, + U 0x07, U 0x58, U 0x15, U 0x61, U 0xC0, U 0x20, U 0xD1, U 0x0F, U 0xC0, U 0x94, U 0x63, U 0xFB, U 0xC9, U 0xC0, U 0x96, U 0x63, @@ -1394,7 +1397,7 @@ static unsigned char t3fw[30840] = { U 0x63, U 0xFB, U 0xBF, U 0x00, U 0x2A, U 0x2C, U 0x74, U 0xDB, U 0x30, U 0xDC, U 0x40, U 0x5B, - U 0xFE, U 0x11, U 0xDB, U 0xA0, + U 0xFE, U 0x0F, U 0xDB, U 0xA0, U 0xC2, U 0xA0, U 0x2A, U 0xB4, U 0x00, U 0x2C, U 0x20, U 0x0C, U 0x63, U 0xFF, U 0x27, U 0x00, @@ -1416,7 +1419,7 @@ static unsigned char t3fw[30840] = { U 0x2A, U 0x25, U 0x02, U 0x7B, U 0x89, U 0x01, U 0xDB, U 0xA0, U 0xC9, U 0xB9, U 0x13, U 0xED, - U 0x06, U 0xDA, U 0x20, U 0x28, + U 0x04, U 0xDA, U 0x20, U 0x28, U 0xB0, U 0x00, U 0x2C, U 0xB0, U 0x07, U 0x03, U 0x88, U 0x0A, U 0x28, U 0x82, U 0x4C, U 0xC0, @@ -1428,53 +1431,54 @@ static unsigned char t3fw[30840] = { U 0x20, U 0x06, U 0x2A, U 0x21, U 0x02, U 0x68, U 0xC8, U 0x05, U 0x28, U 0xCC, U 0xF9, U 0x65, - U 0x81, U 0x2E, U 0x0A, U 0x09, - U 0x4C, U 0x65, U 0x91, U 0x04, + U 0x81, U 0x32, U 0x0A, U 0x09, + U 0x4C, U 0x65, U 0x91, U 0x08, U 0x8F, U 0x30, U 0xC1, U 0xB8, U 0x0F, U 0x8F, U 0x14, U 0x7F, U 0xB0, U 0x05, U 0x28, U 0x21, - U 0x23, U 0x65, U 0x81, U 0x27, - U 0x16, U 0xEC, U 0xF5, U 0x29, + U 0x23, U 0x65, U 0x81, U 0x2B, + U 0x16, U 0xEC, U 0xF3, U 0x29, U 0x62, U 0x9E, U 0x6F, U 0x98, - U 0x02, U 0x60, U 0x00, U 0xF8, - U 0x19, U 0xEC, U 0xF1, U 0x29, + U 0x02, U 0x60, U 0x00, U 0xFC, + U 0x19, U 0xEC, U 0xEF, U 0x29, U 0x92, U 0x26, U 0x68, U 0x90, U 0x07, U 0x8A, U 0x20, U 0x09, U 0xAA, U 0x0C, U 0x65, U 0xA0, - U 0xE7, U 0x2A, U 0x62, U 0x9D, - U 0x64, U 0xA0, U 0xE1, U 0x2B, + U 0xEB, U 0x2A, U 0x62, U 0x9D, + U 0x64, U 0xA0, U 0xE5, U 0x2B, U 0x20, U 0x0C, U 0x0C, U 0xB9, U 0x11, U 0xA6, U 0x99, U 0x2D, U 0x92, U 0x86, U 0x6F, U 0xD9, - U 0x02, U 0x60, U 0x00, U 0xDB, - U 0x1D, U 0xEC, U 0xE9, U 0x0D, + U 0x02, U 0x60, U 0x00, U 0xDF, + U 0x1D, U 0xEC, U 0xE7, U 0x0D, U 0xBD, U 0x0A, U 0x2D, U 0xD2, U 0xA3, U 0x68, U 0xD0, U 0x07, U 0x8E, U 0x20, U 0x0D, U 0xEE, - U 0x0C, U 0x65, U 0xE0, U 0xC7, + U 0x0C, U 0x65, U 0xE0, U 0xCB, U 0x27, U 0x92, U 0x85, U 0xC0, - U 0xE0, U 0x64, U 0x70, U 0xBF, - U 0x1D, U 0xEC, U 0xEE, U 0x68, - U 0x43, U 0x4E, U 0x1C, U 0xEC, - U 0xED, U 0x8A, U 0x2B, U 0x0C, + U 0xE0, U 0x64, U 0x70, U 0xC3, + U 0x1D, U 0xEC, U 0xEC, U 0x68, + U 0x43, U 0x52, U 0x1C, U 0xEC, + U 0xEB, U 0x8A, U 0x2B, U 0x0C, U 0xAA, U 0x02, U 0x9A, U 0x70, U 0x89, U 0x20, U 0x08, U 0x99, U 0x11, U 0x0D, U 0x99, U 0x02, U 0x99, U 0x71, U 0x88, U 0x2A, U 0x98, U 0x74, U 0x8F, U 0x32, U 0x9F, U 0x75, U 0x28, U 0x21, - U 0x04, U 0x08, U 0x88, U 0x11, - U 0x98, U 0x77, U 0x18, U 0xEC, - U 0xDE, U 0x0C, U 0xBF, U 0x11, - U 0xA6, U 0xFF, U 0x2D, U 0xF2, - U 0x85, U 0xA8, U 0xB8, U 0x2E, - U 0x84, U 0xCF, U 0x2D, U 0xDC, - U 0x28, U 0x2D, U 0xF6, U 0x85, - U 0xC8, U 0x5A, U 0x2A, U 0x2C, - U 0x74, U 0xDB, U 0x40, U 0x58, - U 0x0E, U 0x76, U 0xD2, U 0xA0, - U 0xD1, U 0x0F, U 0xC0, U 0x20, - U 0xD1, U 0x0F, U 0x00, U 0x00, + U 0x04, U 0x9E, U 0x76, U 0x9E, + U 0x78, U 0x9E, U 0x79, U 0x08, + U 0x88, U 0x11, U 0x98, U 0x77, + U 0x18, U 0xEC, U 0xDB, U 0x0C, + U 0xBF, U 0x11, U 0xA6, U 0xFF, + U 0x2D, U 0xF2, U 0x85, U 0xA8, + U 0xB8, U 0x2E, U 0x84, U 0xCF, + U 0x2D, U 0xDC, U 0x28, U 0x2D, + U 0xF6, U 0x85, U 0xC8, U 0x5A, + U 0x2A, U 0x2C, U 0x74, U 0xDB, + U 0x40, U 0x58, U 0x0E, U 0xA5, + U 0xD2, U 0xA0, U 0xD1, U 0x0F, + U 0xC0, U 0x20, U 0xD1, U 0x0F, U 0x00, U 0x29, U 0xCC, U 0xF9, U 0x64, U 0x90, U 0xB1, U 0x2C, U 0x20, U 0x66, U 0x89, U 0x31, @@ -1483,7 +1487,7 @@ static unsigned char t3fw[30840] = { U 0x6E, U 0xC6, U 0x02, U 0x60, U 0x00, U 0x85, U 0x09, U 0xF8, U 0x50, U 0x65, U 0x80, U 0x7F, - U 0x1C, U 0xEC, U 0xD3, U 0x8A, + U 0x1C, U 0xEC, U 0xD0, U 0x8A, U 0x2B, U 0x0F, U 0x08, U 0x40, U 0x0B, U 0x88, U 0x10, U 0x08, U 0xAA, U 0x02, U 0x0C, U 0xAA, @@ -1494,30 +1498,30 @@ static unsigned char t3fw[30840] = { U 0x73, U 0x8C, U 0x32, U 0x9C, U 0x72, U 0x8A, U 0x2A, U 0x9A, U 0x74, U 0x89, U 0x34, U 0x99, - U 0x75, U 0x63, U 0xFF, U 0x7D, + U 0x75, U 0x63, U 0xFF, U 0x79, U 0x00, U 0xCC, U 0x57, U 0xDA, U 0x20, U 0xDB, U 0x30, U 0xDC, - U 0x40, U 0x58, U 0x15, U 0x4D, + U 0x40, U 0x58, U 0x15, U 0x6A, U 0xC0, U 0x20, U 0xD1, U 0x0F, U 0x00, U 0xDA, U 0x20, U 0xC0, - U 0xB6, U 0x58, U 0x15, U 0xDC, + U 0xB6, U 0x58, U 0x15, U 0xF9, U 0x63, U 0xFF, U 0xE5, U 0x00, U 0xDA, U 0x20, U 0x58, U 0x15, - U 0xDA, U 0x63, U 0xFF, U 0xDC, + U 0xF7, U 0x63, U 0xFF, U 0xDC, U 0x00, U 0xDA, U 0x20, U 0xDB, U 0x30, U 0xDC, U 0x40, U 0xDD, - U 0x50, U 0x58, U 0x16, U 0x68, + U 0x50, U 0x58, U 0x16, U 0x85, U 0xD2, U 0xA0, U 0xD1, U 0x0F, U 0xC8, U 0x58, U 0xDA, U 0x20, U 0xDB, U 0x30, U 0x58, U 0x14, - U 0xBA, U 0x2A, U 0x21, U 0x02, + U 0xD4, U 0x2A, U 0x21, U 0x02, U 0x65, U 0xAF, U 0xBD, U 0xC0, U 0x94, U 0x09, U 0xA9, U 0x02, U 0x29, U 0x25, U 0x02, U 0x63, U 0xFF, U 0xB2, U 0x00, U 0x00, U 0x2B, U 0x21, U 0x04, U 0x58, - U 0x14, U 0x66, U 0x1D, U 0xEC, - U 0xAF, U 0xC0, U 0xE0, U 0x2E, + U 0x14, U 0x80, U 0x1D, U 0xEC, + U 0xAC, U 0xC0, U 0xE0, U 0x2E, U 0x24, U 0x66, U 0x8F, U 0x30, U 0x2B, U 0x20, U 0x0C, U 0x0F, U 0x8F, U 0x14, U 0x63, U 0xFF, @@ -1527,7 +1531,7 @@ static unsigned char t3fw[30840] = { U 0xFC, U 0x50, U 0x64, U 0xCF, U 0x56, U 0x2B, U 0x21, U 0x04, U 0xC0, U 0xC0, U 0x58, U 0x14, - U 0x5B, U 0x1D, U 0xEC, U 0xA4, + U 0x75, U 0x1D, U 0xEC, U 0xA1, U 0xC0, U 0xE0, U 0x8F, U 0x30, U 0x2B, U 0x20, U 0x0C, U 0x0F, U 0x8F, U 0x14, U 0x63, U 0xFF, @@ -1535,23 +1539,23 @@ static unsigned char t3fw[30840] = { U 0x2B, U 0x21, U 0x04, U 0xB1, U 0xCC, U 0x0C, U 0x0C, U 0x47, U 0x2C, U 0x24, U 0x66, U 0x58, - U 0x14, U 0x53, U 0x1D, U 0xEC, - U 0x9C, U 0xC0, U 0xE0, U 0x2E, + U 0x14, U 0x6D, U 0x1D, U 0xEC, + U 0x99, U 0xC0, U 0xE0, U 0x2E, U 0x24, U 0x66, U 0x8F, U 0x30, U 0x2B, U 0x20, U 0x0C, U 0x0F, U 0x8F, U 0x14, U 0x63, U 0xFF, U 0x1A, U 0x00, U 0x00, U 0x00, U 0x6C, U 0x10, U 0x04, U 0xC0, U 0xB7, U 0xC0, U 0xA1, U 0x16, - U 0xEC, U 0x98, U 0x15, U 0xEC, - U 0x8A, U 0xD7, U 0x20, U 0xD8, + U 0xEC, U 0x95, U 0x15, U 0xEC, + U 0x87, U 0xD7, U 0x20, U 0xD8, U 0x40, U 0xB8, U 0x22, U 0xC0, U 0x40, U 0x05, U 0x35, U 0x02, U 0x96, U 0x71, U 0x95, U 0x70, U 0x02, U 0xA4, U 0x38, U 0x04, U 0x04, U 0x42, U 0xC9, U 0x4B, - U 0x1A, U 0xEC, U 0x7D, U 0x19, - U 0xEC, U 0x7E, U 0x29, U 0xA6, + U 0x1A, U 0xEC, U 0x7A, U 0x19, + U 0xEC, U 0x7B, U 0x29, U 0xA6, U 0x7E, U 0xC1, U 0x40, U 0xD3, U 0x0F, U 0x6D, U 0x4A, U 0x05, U 0x00, U 0x80, U 0x88, U 0x00, @@ -1560,105 +1564,137 @@ static unsigned char t3fw[30840] = { U 0x0F, U 0xC0, U 0x50, U 0x08, U 0xA5, U 0x38, U 0x75, U 0xB0, U 0xE3, U 0x63, U 0xFF, U 0xD7, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 22:00:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6938110656E5; Fri, 25 Mar 2011 22:00:43 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 577958FC18; Fri, 25 Mar 2011 22:00:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PM0hhb094758; Fri, 25 Mar 2011 22:00:43 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PM0hJ2094756; Fri, 25 Mar 2011 22:00:43 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103252200.p2PM0hJ2094756@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 22:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220010 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 22:00:43 -0000 Author: mdf Date: Fri Mar 25 22:00:43 2011 New Revision: 220010 URL: http://svn.freebsd.org/changeset/base/220010 Log: MFC r216058 and r216059: r216058: Use the SYSCTL_CHILDREN macro in kern_sysctl.c to help de-obfuscate the code. r216059: Slightly modify the logic in sysctl_find_oid to reduce the indentation. There should be no functional change. Modified: stable/7/sys/kern/kern_sysctl.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_sysctl.c ============================================================================== --- stable/7/sys/kern/kern_sysctl.c Fri Mar 25 20:53:02 2011 (r220009) +++ stable/7/sys/kern/kern_sysctl.c Fri Mar 25 22:00:43 2011 (r220010) @@ -673,7 +673,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) if (oid->oid_handler) break; - lsp2 = (struct sysctl_oid_list *)oid->oid_arg1; + lsp2 = SYSCTL_CHILDREN(oid); break; } lsp = lsp2; @@ -704,7 +704,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_ if (oidp->oid_handler) /* We really should call the handler here...*/ return (0); - lsp = (struct sysctl_oid_list *)oidp->oid_arg1; + lsp = SYSCTL_CHILDREN(oidp); if (!sysctl_sysctl_next_ls(lsp, 0, 0, next+1, len, level+1, oidpp)) return (0); @@ -719,7 +719,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_ return (0); if (oidp->oid_handler) return (0); - lsp = (struct sysctl_oid_list *)oidp->oid_arg1; + lsp = SYSCTL_CHILDREN(oidp); if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1, len, level+1, oidpp)) return (0); @@ -731,7 +731,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_ if (oidp->oid_handler) continue; - lsp = (struct sysctl_oid_list *)oidp->oid_arg1; + lsp = SYSCTL_CHILDREN(oidp); if (!sysctl_sysctl_next_ls(lsp, name+1, namelen-1, next+1, len, level+1, oidpp)) return (0); @@ -809,7 +809,7 @@ name2oid(char *name, int *oid, int *len, if (oidp->oid_handler) break; - lsp = (struct sysctl_oid_list *)oidp->oid_arg1; + lsp = SYSCTL_CHILDREN(oidp); oidp = SLIST_FIRST(lsp); name = p+1; for (p = name; *p && *p != '.'; p++) @@ -1311,37 +1311,39 @@ int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, int *nindx, struct sysctl_req *req) { + struct sysctl_oid_list *lsp; struct sysctl_oid *oid; int indx; SYSCTL_ASSERT_LOCKED(); - oid = SLIST_FIRST(&sysctl__children); + lsp = &sysctl__children; indx = 0; - while (oid && indx < CTL_MAXNAME) { - if (oid->oid_number == name[indx]) { - indx++; - if (oid->oid_kind & CTLFLAG_NOLOCK) - req->lock = REQ_UNLOCKED; - if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { - if (oid->oid_handler != NULL || - indx == namelen) { - *noid = oid; - if (nindx != NULL) - *nindx = indx; - return (0); - } - oid = SLIST_FIRST( - (struct sysctl_oid_list *)oid->oid_arg1); - } else if (indx == namelen) { + while (indx < CTL_MAXNAME) { + SLIST_FOREACH(oid, lsp, oid_link) { + if (oid->oid_number == name[indx]) + break; + } + if (oid == NULL) + return (ENOENT); + + indx++; + if (oid->oid_kind & CTLFLAG_NOLOCK) + req->lock = REQ_UNLOCKED; + if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { + if (oid->oid_handler != NULL || indx == namelen) { *noid = oid; if (nindx != NULL) *nindx = indx; return (0); - } else { - return (ENOTDIR); } + lsp = SYSCTL_CHILDREN(oid); + } else if (indx == namelen) { + *noid = oid; + if (nindx != NULL) + *nindx = indx; + return (0); } else { - oid = SLIST_NEXT(oid, oid_link); + return (ENOTDIR); } } return (ENOENT); From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 22:11:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39321065672; Fri, 25 Mar 2011 22:11:39 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1B538FC15; Fri, 25 Mar 2011 22:11:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PMBdjs095049; Fri, 25 Mar 2011 22:11:39 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PMBd0l095046; Fri, 25 Mar 2011 22:11:39 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103252211.p2PMBd0l095046@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 22:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220011 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 22:11:39 -0000 Author: mdf Date: Fri Mar 25 22:11:39 2011 New Revision: 220011 URL: http://svn.freebsd.org/changeset/base/220011 Log: MFC r216060. This differs from the original commit in that it preserves the KBI size of struct sysctl_oid. Also, on stable/8 the compiler thinks that 'len' in sysctl_sysctl_name2oid() is used uninitialized. Do not hold the sysctl lock across a call to the handler. This fixes a general LOR issue where the sysctl lock had no good place in the hierarchy. One specific instance is #284 on http://sources.zabbadoz.net/freebsd/lor.html . Modified: stable/8/sys/kern/kern_sysctl.c stable/8/sys/sys/sysctl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_sysctl.c ============================================================================== --- stable/8/sys/kern/kern_sysctl.c Fri Mar 25 22:00:43 2011 (r220010) +++ stable/8/sys/kern/kern_sysctl.c Fri Mar 25 22:11:39 2011 (r220011) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ktrace.h" #include +#include #include #include #include @@ -85,13 +86,12 @@ static MALLOC_DEFINE(M_SYSCTLTMP, "sysct static struct sx sysctllock; static struct sx sysctlmemlock; -#define SYSCTL_SLOCK() sx_slock(&sysctllock) -#define SYSCTL_SUNLOCK() sx_sunlock(&sysctllock) #define SYSCTL_XLOCK() sx_xlock(&sysctllock) #define SYSCTL_XUNLOCK() sx_xunlock(&sysctllock) #define SYSCTL_ASSERT_XLOCKED() sx_assert(&sysctllock, SA_XLOCKED) -#define SYSCTL_ASSERT_LOCKED() sx_assert(&sysctllock, SA_LOCKED) #define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") +#define SYSCTL_SLEEP(ch, wmesg, timo) \ + sx_sleep(ch, &sysctllock, 0, wmesg, timo) static int sysctl_root(SYSCTL_HANDLER_ARGS); @@ -105,7 +105,7 @@ sysctl_find_oidname(const char *name, st { struct sysctl_oid *oidp; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); SLIST_FOREACH(oidp, list, oid_link) { if (strcmp(oidp->oid_name, name) == 0) { return (oidp); @@ -312,7 +312,7 @@ sysctl_ctx_entry_find(struct sysctl_ctx_ { struct sysctl_ctx_entry *e; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); if (clist == NULL || oidp == NULL) return(NULL); TAILQ_FOREACH(e, clist, link) { @@ -408,6 +408,16 @@ sysctl_remove_oid_locked(struct sysctl_o } sysctl_unregister_oid(oidp); if (del) { + /* + * Wait for all threads running the handler to drain. + * This preserves the previous behavior when the + * sysctl lock was held across a handler invocation, + * and is necessary for module unload correctness. + */ + while (oidp->oid_running > 0) { + oidp->oid_kind |= CTLFLAG_DYING; + SYSCTL_SLEEP(&oidp->oid_running, "oidrm", 0); + } if (oidp->oid_descr) free((void *)(uintptr_t)(const void *)oidp->oid_descr, M_SYSCTLOID); free((void *)(uintptr_t)(const void *)oidp->oid_name, @@ -580,7 +590,7 @@ sysctl_sysctl_debug_dump_node(struct sys int k; struct sysctl_oid *oidp; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); SLIST_FOREACH(oidp, l, oid_link) { for (k=0; ktd, PRIV_SYSCTL_DEBUG); if (error) return (error); + SYSCTL_XLOCK(); sysctl_sysctl_debug_dump_node(&sysctl__children, 0); + SYSCTL_XUNLOCK(); return (ENOENT); } @@ -639,7 +651,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) struct sysctl_oid_list *lsp = &sysctl__children, *lsp2; char buf[10]; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_XLOCK(); while (namelen) { if (!lsp) { snprintf(buf,sizeof(buf),"%d",*name); @@ -648,7 +660,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) if (!error) error = SYSCTL_OUT(req, buf, strlen(buf)); if (error) - return (error); + goto out; namelen--; name++; continue; @@ -664,7 +676,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) error = SYSCTL_OUT(req, oid->oid_name, strlen(oid->oid_name)); if (error) - return (error); + goto out; namelen--; name++; @@ -680,7 +692,10 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) } lsp = lsp2; } - return (SYSCTL_OUT(req, "", 1)); + error = SYSCTL_OUT(req, "", 1); + out: + SYSCTL_XUNLOCK(); + return (error); } static SYSCTL_NODE(_sysctl, 1, name, CTLFLAG_RD, sysctl_sysctl_name, ""); @@ -691,7 +706,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_ { struct sysctl_oid *oidp; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); *len = level; SLIST_FOREACH(oidp, lsp, oid_link) { *next = oidp->oid_number; @@ -755,7 +770,9 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) struct sysctl_oid_list *lsp = &sysctl__children; int newoid[CTL_MAXNAME]; + SYSCTL_XLOCK(); i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid); + SYSCTL_XUNLOCK(); if (i) return (ENOENT); error = SYSCTL_OUT(req, newoid, j * sizeof (int)); @@ -772,7 +789,7 @@ name2oid(char *name, int *oid, int *len, struct sysctl_oid_list *lsp = &sysctl__children; char *p; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); if (!*name) return (ENOENT); @@ -830,8 +847,6 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR int error, oid[CTL_MAXNAME], len; struct sysctl_oid *op = 0; - SYSCTL_ASSERT_LOCKED(); - if (!req->newlen) return (ENOENT); if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */ @@ -846,8 +861,10 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR } p [req->newlen] = '\0'; - + len = 0; + SYSCTL_XLOCK(); error = name2oid(p, oid, &len, &op); + SYSCTL_XUNLOCK(); free(p, M_SYSCTL); @@ -867,16 +884,21 @@ sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS struct sysctl_oid *oid; int error; + SYSCTL_XLOCK(); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) - return (error); + goto out; - if (!oid->oid_fmt) - return (ENOENT); + if (oid->oid_fmt == NULL) { + error = ENOENT; + goto out; + } error = SYSCTL_OUT(req, &oid->oid_kind, sizeof(oid->oid_kind)); if (error) - return (error); + goto out; error = SYSCTL_OUT(req, oid->oid_fmt, strlen(oid->oid_fmt) + 1); + out: + SYSCTL_XUNLOCK(); return (error); } @@ -890,13 +912,18 @@ sysctl_sysctl_oiddescr(SYSCTL_HANDLER_AR struct sysctl_oid *oid; int error; + SYSCTL_XLOCK(); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) - return (error); + goto out; - if (!oid->oid_descr) - return (ENOENT); + if (oid->oid_descr == NULL) { + error = ENOENT; + goto out; + } error = SYSCTL_OUT(req, oid->oid_descr, strlen(oid->oid_descr) + 1); + out: + SYSCTL_XUNLOCK(); return (error); } @@ -1176,9 +1203,9 @@ kernel_sysctl(struct thread *td, int *na req.newfunc = sysctl_new_kernel; req.lock = REQ_LOCKED; - SYSCTL_SLOCK(); + SYSCTL_XLOCK(); error = sysctl_root(0, name, namelen, &req); - SYSCTL_SUNLOCK(); + SYSCTL_XUNLOCK(); if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); @@ -1306,7 +1333,7 @@ sysctl_find_oid(int *name, u_int namelen struct sysctl_oid *oid; int indx; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); lsp = &sysctl__children; indx = 0; while (indx < CTL_MAXNAME) { @@ -1325,6 +1352,8 @@ sysctl_find_oid(int *name, u_int namelen *noid = oid; if (nindx != NULL) *nindx = indx; + KASSERT((oid->oid_kind & CTLFLAG_DYING) == 0, + ("%s found DYING node %p", __func__, oid)); return (0); } lsp = SYSCTL_CHILDREN(oid); @@ -1332,6 +1361,8 @@ sysctl_find_oid(int *name, u_int namelen *noid = oid; if (nindx != NULL) *nindx = indx; + KASSERT((oid->oid_kind & CTLFLAG_DYING) == 0, + ("%s found DYING node %p", __func__, oid)); return (0); } else { return (ENOTDIR); @@ -1351,7 +1382,7 @@ sysctl_root(SYSCTL_HANDLER_ARGS) struct sysctl_oid *oid; int error, indx, lvl; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); error = sysctl_find_oid(arg1, arg2, &oid, &indx, req); if (error) @@ -1415,12 +1446,21 @@ sysctl_root(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); #endif + oid->oid_running++; + SYSCTL_XUNLOCK(); + if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_lock(&Giant); error = oid->oid_handler(oid, arg1, arg2, req); if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_unlock(&Giant); + KFAIL_POINT_ERROR(_debug_fail_point, sysctl_running, error); + + SYSCTL_XLOCK(); + oid->oid_running--; + if (oid->oid_running == 0 && (oid->oid_kind & CTLFLAG_DYING) != 0) + wakeup(&oid->oid_running); return (error); } @@ -1520,9 +1560,9 @@ userland_sysctl(struct thread *td, int * for (;;) { req.oldidx = 0; req.newidx = 0; - SYSCTL_SLOCK(); + SYSCTL_XLOCK(); error = sysctl_root(0, name, namelen, &req); - SYSCTL_SUNLOCK(); + SYSCTL_XUNLOCK(); if (error != EAGAIN) break; uio_yield(); Modified: stable/8/sys/sys/sysctl.h ============================================================================== --- stable/8/sys/sys/sysctl.h Fri Mar 25 22:00:43 2011 (r220010) +++ stable/8/sys/sys/sysctl.h Fri Mar 25 22:11:39 2011 (r220011) @@ -87,6 +87,7 @@ struct ctlname { #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ #define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) +#define CTLFLAG_DYING 0x00010000 /* oid is being removed */ /* * Secure level. Note that CTLFLAG_SECURE == CTLFLAG_SECURE1. @@ -164,7 +165,8 @@ struct sysctl_oid { const char *oid_name; int (*oid_handler)(SYSCTL_HANDLER_ARGS); const char *oid_fmt; - int oid_refcnt; + int16_t oid_refcnt; + uint16_t oid_running; const char *oid_descr; }; @@ -224,7 +226,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ static struct sysctl_oid sysctl__##parent##_##name = { \ &sysctl_##parent##_children, { NULL }, nbr, kind, \ - a1, a2, #name, handler, fmt, 0, __DESCR(descr) }; \ + a1, a2, #name, handler, fmt, 0, 0, __DESCR(descr) }; \ DATA_SET(sysctl_set, sysctl__##parent##_##name) #define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 22:11:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E76CF1065708; Fri, 25 Mar 2011 22:11:54 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D606F8FC2B; Fri, 25 Mar 2011 22:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PMBs8F095090; Fri, 25 Mar 2011 22:11:54 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PMBs1V095087; Fri, 25 Mar 2011 22:11:54 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103252211.p2PMBs1V095087@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 22:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220012 - in stable/7/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 22:11:55 -0000 Author: mdf Date: Fri Mar 25 22:11:54 2011 New Revision: 220012 URL: http://svn.freebsd.org/changeset/base/220012 Log: MFC r216060. This differs from the original commit in that it preserves the KBI size of struct sysctl_oid. Also, on stable/8 the compiler thinks that 'len' in sysctl_sysctl_name2oid() is used uninitialized. Do not hold the sysctl lock across a call to the handler. This fixes a general LOR issue where the sysctl lock had no good place in the hierarchy. One specific instance is #284 on http://sources.zabbadoz.net/freebsd/lor.html . Modified: stable/7/sys/kern/kern_sysctl.c stable/7/sys/sys/sysctl.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_sysctl.c ============================================================================== --- stable/7/sys/kern/kern_sysctl.c Fri Mar 25 22:11:39 2011 (r220011) +++ stable/7/sys/kern/kern_sysctl.c Fri Mar 25 22:11:54 2011 (r220012) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "opt_mac.h" #include +#include #include #include #include @@ -83,13 +84,12 @@ static MALLOC_DEFINE(M_SYSCTLTMP, "sysct static struct sx sysctllock; static struct sx sysctlmemlock; -#define SYSCTL_SLOCK() sx_slock(&sysctllock) -#define SYSCTL_SUNLOCK() sx_sunlock(&sysctllock) #define SYSCTL_XLOCK() sx_xlock(&sysctllock) #define SYSCTL_XUNLOCK() sx_xunlock(&sysctllock) #define SYSCTL_ASSERT_XLOCKED() sx_assert(&sysctllock, SA_XLOCKED) -#define SYSCTL_ASSERT_LOCKED() sx_assert(&sysctllock, SA_LOCKED) #define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") +#define SYSCTL_SLEEP(ch, wmesg, timo) \ + sx_sleep(ch, &sysctllock, 0, wmesg, timo) static int sysctl_root(SYSCTL_HANDLER_ARGS); @@ -103,7 +103,7 @@ sysctl_find_oidname(const char *name, st { struct sysctl_oid *oidp; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); SLIST_FOREACH(oidp, list, oid_link) { if (strcmp(oidp->oid_name, name) == 0) { return (oidp); @@ -310,7 +310,7 @@ sysctl_ctx_entry_find(struct sysctl_ctx_ { struct sysctl_ctx_entry *e; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); if (clist == NULL || oidp == NULL) return(NULL); TAILQ_FOREACH(e, clist, link) { @@ -406,6 +406,16 @@ sysctl_remove_oid_locked(struct sysctl_o } sysctl_unregister_oid(oidp); if (del) { + /* + * Wait for all threads running the handler to drain. + * This preserves the previous behavior when the + * sysctl lock was held across a handler invocation, + * and is necessary for module unload correctness. + */ + while (oidp->oid_running > 0) { + oidp->oid_kind |= CTLFLAG_DYING; + SYSCTL_SLEEP(&oidp->oid_running, "oidrm", 0); + } if (oidp->oid_descr) free((void *)(uintptr_t)(const void *)oidp->oid_descr, M_SYSCTLOID); free((void *)(uintptr_t)(const void *)oidp->oid_name, @@ -578,7 +588,7 @@ sysctl_sysctl_debug_dump_node(struct sys int k; struct sysctl_oid *oidp; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); SLIST_FOREACH(oidp, l, oid_link) { for (k=0; ktd, PRIV_SYSCTL_DEBUG); if (error) return (error); + SYSCTL_XLOCK(); sysctl_sysctl_debug_dump_node(&sysctl__children, 0); + SYSCTL_XUNLOCK(); return (ENOENT); } @@ -637,7 +649,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) struct sysctl_oid_list *lsp = &sysctl__children, *lsp2; char buf[10]; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_XLOCK(); while (namelen) { if (!lsp) { snprintf(buf,sizeof(buf),"%d",*name); @@ -646,7 +658,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) if (!error) error = SYSCTL_OUT(req, buf, strlen(buf)); if (error) - return (error); + goto out; namelen--; name++; continue; @@ -662,7 +674,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) error = SYSCTL_OUT(req, oid->oid_name, strlen(oid->oid_name)); if (error) - return (error); + goto out; namelen--; name++; @@ -678,7 +690,10 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) } lsp = lsp2; } - return (SYSCTL_OUT(req, "", 1)); + error = SYSCTL_OUT(req, "", 1); + out: + SYSCTL_XUNLOCK(); + return (error); } static SYSCTL_NODE(_sysctl, 1, name, CTLFLAG_RD, sysctl_sysctl_name, ""); @@ -689,7 +704,7 @@ sysctl_sysctl_next_ls(struct sysctl_oid_ { struct sysctl_oid *oidp; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); *len = level; SLIST_FOREACH(oidp, lsp, oid_link) { *next = oidp->oid_number; @@ -753,7 +768,9 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) struct sysctl_oid_list *lsp = &sysctl__children; int newoid[CTL_MAXNAME]; + SYSCTL_XLOCK(); i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid); + SYSCTL_XUNLOCK(); if (i) return (ENOENT); error = SYSCTL_OUT(req, newoid, j * sizeof (int)); @@ -770,7 +787,7 @@ name2oid(char *name, int *oid, int *len, struct sysctl_oid_list *lsp = &sysctl__children; char *p; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); if (!*name) return (ENOENT); @@ -828,8 +845,6 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR int error, oid[CTL_MAXNAME], len; struct sysctl_oid *op = 0; - SYSCTL_ASSERT_LOCKED(); - if (!req->newlen) return (ENOENT); if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */ @@ -844,8 +859,10 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR } p [req->newlen] = '\0'; - + len = 0; + SYSCTL_XLOCK(); error = name2oid(p, oid, &len, &op); + SYSCTL_XUNLOCK(); free(p, M_SYSCTL); @@ -865,16 +882,21 @@ sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS struct sysctl_oid *oid; int error; + SYSCTL_XLOCK(); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) - return (error); + goto out; - if (!oid->oid_fmt) - return (ENOENT); + if (oid->oid_fmt == NULL) { + error = ENOENT; + goto out; + } error = SYSCTL_OUT(req, &oid->oid_kind, sizeof(oid->oid_kind)); if (error) - return (error); + goto out; error = SYSCTL_OUT(req, oid->oid_fmt, strlen(oid->oid_fmt) + 1); + out: + SYSCTL_XUNLOCK(); return (error); } @@ -888,13 +910,18 @@ sysctl_sysctl_oiddescr(SYSCTL_HANDLER_AR struct sysctl_oid *oid; int error; + SYSCTL_XLOCK(); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) - return (error); + goto out; - if (!oid->oid_descr) - return (ENOENT); + if (oid->oid_descr == NULL) { + error = ENOENT; + goto out; + } error = SYSCTL_OUT(req, oid->oid_descr, strlen(oid->oid_descr) + 1); + out: + SYSCTL_XUNLOCK(); return (error); } @@ -1174,9 +1201,9 @@ kernel_sysctl(struct thread *td, int *na req.newfunc = sysctl_new_kernel; req.lock = REQ_LOCKED; - SYSCTL_SLOCK(); + SYSCTL_XLOCK(); error = sysctl_root(0, name, namelen, &req); - SYSCTL_SUNLOCK(); + SYSCTL_XUNLOCK(); if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); @@ -1315,7 +1342,7 @@ sysctl_find_oid(int *name, u_int namelen struct sysctl_oid *oid; int indx; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); lsp = &sysctl__children; indx = 0; while (indx < CTL_MAXNAME) { @@ -1334,6 +1361,8 @@ sysctl_find_oid(int *name, u_int namelen *noid = oid; if (nindx != NULL) *nindx = indx; + KASSERT((oid->oid_kind & CTLFLAG_DYING) == 0, + ("%s found DYING node %p", __func__, oid)); return (0); } lsp = SYSCTL_CHILDREN(oid); @@ -1341,6 +1370,8 @@ sysctl_find_oid(int *name, u_int namelen *noid = oid; if (nindx != NULL) *nindx = indx; + KASSERT((oid->oid_kind & CTLFLAG_DYING) == 0, + ("%s found DYING node %p", __func__, oid)); return (0); } else { return (ENOTDIR); @@ -1360,7 +1391,7 @@ sysctl_root(SYSCTL_HANDLER_ARGS) struct sysctl_oid *oid; int error, indx, lvl; - SYSCTL_ASSERT_LOCKED(); + SYSCTL_ASSERT_XLOCKED(); error = sysctl_find_oid(arg1, arg2, &oid, &indx, req); if (error) @@ -1416,12 +1447,21 @@ sysctl_root(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); #endif + oid->oid_running++; + SYSCTL_XUNLOCK(); + if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_lock(&Giant); error = oid->oid_handler(oid, arg1, arg2, req); if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_unlock(&Giant); + KFAIL_POINT_ERROR(_debug_fail_point, sysctl_running, error); + + SYSCTL_XLOCK(); + oid->oid_running--; + if (oid->oid_running == 0 && (oid->oid_kind & CTLFLAG_DYING) != 0) + wakeup(&oid->oid_running); return (error); } @@ -1520,9 +1560,9 @@ userland_sysctl(struct thread *td, int * for (;;) { req.oldidx = 0; req.newidx = 0; - SYSCTL_SLOCK(); + SYSCTL_XLOCK(); error = sysctl_root(0, name, namelen, &req); - SYSCTL_SUNLOCK(); + SYSCTL_XUNLOCK(); if (error != EAGAIN) break; uio_yield(); Modified: stable/7/sys/sys/sysctl.h ============================================================================== --- stable/7/sys/sys/sysctl.h Fri Mar 25 22:11:39 2011 (r220011) +++ stable/7/sys/sys/sysctl.h Fri Mar 25 22:11:54 2011 (r220012) @@ -86,6 +86,7 @@ struct ctlname { #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) +#define CTLFLAG_DYING 0x00010000 /* oid is being removed */ /* * Secure level. Note that CTLFLAG_SECURE == CTLFLAG_SECURE1. @@ -164,6 +165,7 @@ struct sysctl_oid { int (*oid_handler)(SYSCTL_HANDLER_ARGS); const char *oid_fmt; int oid_refcnt; + u_int oid_running; const char *oid_descr; }; @@ -219,7 +221,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ static struct sysctl_oid sysctl__##parent##_##name = { \ &sysctl_##parent##_children, { 0 }, \ - nbr, kind, a1, a2, #name, handler, fmt, 0, __DESCR(descr) }; \ + nbr, kind, a1, a2, #name, handler, fmt, 0, 0, __DESCR(descr) }; \ DATA_SET(sysctl_set, sysctl__##parent##_##name) #define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 22:17:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3741F106564A; Fri, 25 Mar 2011 22:17:25 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26C138FC08; Fri, 25 Mar 2011 22:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PMHPM4095257; Fri, 25 Mar 2011 22:17:25 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PMHPQD095255; Fri, 25 Mar 2011 22:17:25 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201103252217.p2PMHPQD095255@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 25 Mar 2011 22:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220013 - stable/7/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 22:17:25 -0000 Author: mdf Date: Fri Mar 25 22:17:24 2011 New Revision: 220013 URL: http://svn.freebsd.org/changeset/base/220013 Log: Fix r220012 (MFC of r216060); the KBI of sysctl_oid was *supposed* to be preserved, but I was hasty. Modified: stable/7/sys/sys/sysctl.h Modified: stable/7/sys/sys/sysctl.h ============================================================================== --- stable/7/sys/sys/sysctl.h Fri Mar 25 22:11:54 2011 (r220012) +++ stable/7/sys/sys/sysctl.h Fri Mar 25 22:17:24 2011 (r220013) @@ -164,8 +164,8 @@ struct sysctl_oid { const char *oid_name; int (*oid_handler)(SYSCTL_HANDLER_ARGS); const char *oid_fmt; - int oid_refcnt; - u_int oid_running; + int16_t oid_refcnt; + uint16_t oid_running; const char *oid_descr; }; From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 22:31:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3BE61065670; Fri, 25 Mar 2011 22:31:28 +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 B39EE8FC15; Fri, 25 Mar 2011 22:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2PMVSFR095592; Fri, 25 Mar 2011 22:31:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2PMVSNq095590; Fri, 25 Mar 2011 22:31:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103252231.p2PMVSNq095590@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Mar 2011 22:31: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: r220014 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 22:31:28 -0000 Author: kib Date: Fri Mar 25 22:31:28 2011 New Revision: 220014 URL: http://svn.freebsd.org/changeset/base/220014 Log: Report EBUSY instead of EROFS for attempt of deleting or renaming the root directory of msdosfs mount. The VFS code would handle deletion case itself too, assuming VV_ROOT flag is not lost. The msdosfs_rename() should also note attempt to rename root via doscheckpath() or different mount point check leading to EXDEV. Nonetheless, keep the checks for now. The change is inspired by NetBSD change referenced in PR, but return EBUSY like kern_unlinkat() does. PR: kern/152079 MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_lookup.c Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Fri Mar 25 22:17:24 2011 (r220013) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Fri Mar 25 22:31:28 2011 (r220014) @@ -458,7 +458,7 @@ foundroot: * Don't allow deleting the root. */ if (blkoff == MSDOSFSROOT_OFS) - return EROFS; /* really? XXX */ + return (EBUSY); /* * Write access to directory required to delete files. @@ -491,7 +491,7 @@ foundroot: */ if (nameiop == RENAME && (flags & ISLASTCN)) { if (blkoff == MSDOSFSROOT_OFS) - return EROFS; /* really? XXX */ + return (EBUSY); error = VOP_ACCESS(vdp, VWRITE, cnp->cn_cred, cnp->cn_thread); if (error) From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 00:34:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52168106566B; Sat, 26 Mar 2011 00:34:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4230B8FC12; Sat, 26 Mar 2011 00:34:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q0YacG098238; Sat, 26 Mar 2011 00:34:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q0YaC0098236; Sat, 26 Mar 2011 00:34:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201103260034.p2Q0YaC0098236@svn.freebsd.org> From: Doug Barton Date: Sat, 26 Mar 2011 00:34: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: r220015 - head/usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 00:34:36 -0000 Author: dougb Date: Sat Mar 26 00:34:35 2011 New Revision: 220015 URL: http://svn.freebsd.org/changeset/base/220015 Log: Add an example for the use of the entry to help others who are as slow as I am. Discussed with: gordon Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.conf.5 Fri Mar 25 22:31:28 2011 (r220014) +++ head/usr.sbin/newsyslog/newsyslog.conf.5 Sat Mar 26 00:34:35 2011 (r220015) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd January 31, 2011 +.Dd February 25, 2011 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -349,6 +349,11 @@ If this field is not present, then a .Dv SIGHUP signal will be sent. .El +.Sh EXAMPLES +The following is an example of the +.Dq Aq Li include +entry: +.Dl " /etc/newsyslog-local.conf" .Sh SEE ALSO .Xr bzip2 1 , .Xr gzip 1 , From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 00:54:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95EE0106564A; Sat, 26 Mar 2011 00:54:01 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 848798FC17; Sat, 26 Mar 2011 00:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q0s15N098692; Sat, 26 Mar 2011 00:54:01 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q0s1X7098684; Sat, 26 Mar 2011 00:54:01 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201103260054.p2Q0s1X7098684@svn.freebsd.org> From: Jeff Roberson Date: Sat, 26 Mar 2011 00:54: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: r220016 - in head/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 00:54:01 -0000 Author: jeff Date: Sat Mar 26 00:54:01 2011 New Revision: 220016 URL: http://svn.freebsd.org/changeset/base/220016 Log: - Implement wake-on-lan support in mlxen. Modified: head/sys/ofed/drivers/net/mlx4/en_ethtool.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/fw.c head/sys/ofed/drivers/net/mlx4/fw.h head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/drivers/net/mlx4/mlx4_en.h head/sys/ofed/include/linux/mlx4/device.h Modified: head/sys/ofed/drivers/net/mlx4/en_ethtool.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_ethtool.c Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/drivers/net/mlx4/en_ethtool.c Sat Mar 26 00:54:01 2011 (r220016) @@ -494,6 +494,7 @@ const struct ethtool_ops mlx4_en_ethtool .get_ethtool_stats = mlx4_en_get_ethtool_stats, .self_test = mlx4_en_self_test, .get_wol = mlx4_en_get_wol, + .set_wol = mlx4_en_set_wol, .get_msglevel = mlx4_en_get_msglevel, .set_msglevel = mlx4_en_set_msglevel, .get_coalesce = mlx4_en_get_coalesce, Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Mar 26 00:54:01 2011 (r220016) @@ -532,6 +532,7 @@ int mlx4_en_start_port(struct net_device struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_cq *cq; struct mlx4_en_tx_ring *tx_ring; + u64 config; int rx_index = 0; int tx_index = 0; int err = 0; @@ -662,6 +663,25 @@ int mlx4_en_start_port(struct net_device else priv->rx_csum = 0; + err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); + if (err) { + en_err(priv, "Failed to get WoL info, unable to modify\n"); + goto wol_err; + } + if (dev->if_capenable & IFCAP_WOL_MAGIC) { + config |= MLX4_EN_WOL_DO_MODIFY | MLX4_EN_WOL_ENABLED | + MLX4_EN_WOL_MAGIC; + } else { + config &= ~(MLX4_EN_WOL_ENABLED | MLX4_EN_WOL_MAGIC); + config |= MLX4_EN_WOL_DO_MODIFY; + } + + err = mlx4_wol_write(priv->mdev->dev, config, priv->port); + if (err) { + en_err(priv, "Failed to set WoL information\n"); + goto wol_err; + } + priv->port_up = true; /* Populate multicast list */ @@ -676,6 +696,10 @@ int mlx4_en_start_port(struct net_device return 0; +wol_err: + /* close port*/ + mlx4_CLOSE_PORT(mdev->dev, priv->port); + mac_err: mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index); tx_err: @@ -1095,6 +1119,8 @@ static int mlx4_en_ioctl(struct ifnet *d dev->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (mask & IFCAP_VLAN_HWFILTER) dev->if_capenable ^= IFCAP_VLAN_HWFILTER; + if (mask & IFCAP_WOL_MAGIC) + dev->if_capenable ^= IFCAP_WOL_MAGIC; if (dev->if_drv_flags & IFF_DRV_RUNNING) mlx4_en_init(priv); VLAN_CAPABILITIES(dev); @@ -1534,14 +1560,23 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; -#if 0 /* Not yet */ - dev->if_capabilities |= IFCAP_WOL; -#endif if (mdev->LSO_support) dev->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; if (mdev->profile.num_lro) dev->if_capabilities |= IFCAP_LRO; dev->if_capenable = dev->if_capabilities; + /* + * Setup wake-on-lan. + */ + if (priv->mdev->dev->caps.wol) { + u64 config; + if (mlx4_wol_read(priv->mdev->dev, &config, priv->port) == 0) { + if (config & MLX4_EN_WOL_MAGIC) + dev->if_capabilities |= IFCAP_WOL_MAGIC; + if (config & MLX4_EN_WOL_ENABLED) + dev->if_capenable |= IFCAP_WOL_MAGIC; + } + } /* Register for VLAN events */ priv->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, Modified: head/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/fw.c Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/drivers/net/mlx4/fw.c Sat Mar 26 00:54:01 2011 (r220016) @@ -289,6 +289,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->udp_rss = field & 0x1; MLX4_GET(field, outbox, QUERY_DEV_CAP_ETH_UC_LOOPBACK_OFFSET); dev_cap->loopback_support = field & 0x1; + dev_cap->wol = field & 0x40; MLX4_GET(tmp1, outbox, QUERY_DEV_CAP_EXT_FLAGS_OFFSET); MLX4_GET(tmp2, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); dev_cap->flags = tmp2 | (u64)tmp1 << 32; @@ -969,6 +970,25 @@ int mlx4_NOP(struct mlx4_dev *dev) return mlx4_cmd(dev, 0, 0x1f, 0, MLX4_CMD_NOP, 100); } +#define MLX4_WOL_SETUP_MODE (5 << 28) +int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port) +{ + u32 in_mod = MLX4_WOL_SETUP_MODE | port << 8; + + return mlx4_cmd_imm(dev, 0, config, in_mod, 0x3, + MLX4_CMD_MOD_STAT_CFG, MLX4_CMD_TIME_CLASS_A); +} +EXPORT_SYMBOL_GPL(mlx4_wol_read); + +int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port) +{ + u32 in_mod = MLX4_WOL_SETUP_MODE | port << 8; + + return mlx4_cmd(dev, config, in_mod, 0x1, MLX4_CMD_MOD_STAT_CFG, + MLX4_CMD_TIME_CLASS_A); +} +EXPORT_SYMBOL_GPL(mlx4_wol_write); + int mlx4_query_diag_counters(struct mlx4_dev *dev, int array_length, u8 op_modifier, u32 in_offset[], u32 counter_out[]) { Modified: head/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/fw.h Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/drivers/net/mlx4/fw.h Sat Mar 26 00:54:01 2011 (r220016) @@ -80,6 +80,7 @@ struct mlx4_dev_cap { u16 stat_rate_support; int udp_rss; int loopback_support; + int wol; u64 flags; int reserved_uars; int uar_size; Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/drivers/net/mlx4/main.c Sat Mar 26 00:54:01 2011 (r220016) @@ -331,6 +331,7 @@ static int mlx4_dev_cap(struct mlx4_dev dev->caps.stat_rate_support = dev_cap->stat_rate_support; dev->caps.udp_rss = dev_cap->udp_rss; dev->caps.loopback_support = dev_cap->loopback_support; + dev->caps.wol = dev_cap->wol; dev->caps.max_gso_sz = dev_cap->max_gso_sz; dev->caps.reserved_xrcds = (dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC) ? dev_cap->reserved_xrcds : 0; Modified: head/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4_en.h Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/drivers/net/mlx4/mlx4_en.h Sat Mar 26 00:54:01 2011 (r220016) @@ -164,7 +164,7 @@ enum { #define MLX4_EN_DEF_TX_RING_SIZE 512 #define MLX4_EN_DEF_TX_QUEUE_SIZE 4096 #define MLX4_EN_DEF_RX_RING_SIZE 1024 -#define MLX4_EN_MAX_RX_POLL 16 +#define MLX4_EN_MAX_RX_POLL 1024 /* Target number of bytes to coalesce with interrupt moderation */ #define MLX4_EN_RX_COAL_TARGET 0x20000 @@ -537,6 +537,7 @@ struct mlx4_en_priv { u16 num_frags; u16 log_rx_info; int ip_reasm; + bool wol; struct mlx4_en_tx_ring tx_ring[MAX_TX_RINGS]; struct mlx4_en_rx_ring rx_ring[MAX_RX_RINGS]; @@ -561,6 +562,11 @@ struct mlx4_en_priv { struct sysctl_ctx_list stat_ctx; }; +enum mlx4_en_wol { + MLX4_EN_WOL_MAGIC = (1ULL << 61), + MLX4_EN_WOL_ENABLED = (1ULL << 62), + MLX4_EN_WOL_DO_MODIFY = (1ULL << 63), +}; int mlx4_en_transmit(struct net_device *dev, struct mbuf *mb); void mlx4_en_qflush(struct net_device *dev); Modified: head/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- head/sys/ofed/include/linux/mlx4/device.h Sat Mar 26 00:34:35 2011 (r220015) +++ head/sys/ofed/include/linux/mlx4/device.h Sat Mar 26 00:54:01 2011 (r220016) @@ -251,6 +251,7 @@ struct mlx4_caps { u16 stat_rate_support; int udp_rss; int loopback_support; + int wol; u8 port_width_cap[MLX4_MAX_PORTS + 1]; int max_gso_sz; int reserved_qps_cnt[MLX4_NUM_QP_REGION]; @@ -535,6 +536,9 @@ int mlx4_mtt_init(struct mlx4_dev *dev, struct mlx4_mtt *mtt); void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt); u64 mlx4_mtt_addr(struct mlx4_dev *dev, struct mlx4_mtt *mtt); +int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); +int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); + int mlx4_mr_reserve_range(struct mlx4_dev *dev, int cnt, int align, u32 *base_mridx); void mlx4_mr_release_range(struct mlx4_dev *dev, u32 base_mridx, int cnt); From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 01:24:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11BDE1065670; Sat, 26 Mar 2011 01:24:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 023268FC13; Sat, 26 Mar 2011 01:24:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q1OtoH099312; Sat, 26 Mar 2011 01:24:55 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q1Otbv099311; Sat, 26 Mar 2011 01:24:55 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201103260124.p2Q1Otbv099311@svn.freebsd.org> From: Doug Barton Date: Sat, 26 Mar 2011 01:24: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: r220017 - head/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 01:24:56 -0000 Author: dougb Date: Sat Mar 26 01:24:55 2011 New Revision: 220017 URL: http://svn.freebsd.org/changeset/base/220017 Log: Add the svn:executable property to the scripts that are missing it Modified: Directory Properties: head/etc/periodic/daily/404.status-zfs (props changed) head/etc/periodic/daily/405.status-ata-raid (props changed) head/etc/periodic/daily/406.status-gmirror (props changed) head/etc/periodic/daily/407.status-graid3 (props changed) head/etc/periodic/daily/408.status-gstripe (props changed) head/etc/periodic/daily/409.status-gconcat (props changed) head/etc/periodic/daily/480.status-ntpd (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 01:57:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id E02C21065670; Sat, 26 Mar 2011 01:57:21 +0000 (UTC) Date: Sat, 26 Mar 2011 01:57:21 +0000 From: Alexander Best To: Doug Barton Message-ID: <20110326015721.GA25582@freebsd.org> References: <201103260034.p2Q0YaC0098236@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201103260034.p2Q0YaC0098236@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220015 - head/usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 01:57:22 -0000 On Sat Mar 26 11, Doug Barton wrote: > Author: dougb > Date: Sat Mar 26 00:34:35 2011 > New Revision: 220015 > URL: http://svn.freebsd.org/changeset/base/220015 > > Log: > Add an example for the use of the entry to help others > who are as slow as I am. shouldn't that be march 25th? ;) > > Discussed with: gordon > > Modified: > head/usr.sbin/newsyslog/newsyslog.conf.5 > > Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 > ============================================================================== > --- head/usr.sbin/newsyslog/newsyslog.conf.5 Fri Mar 25 22:31:28 2011 (r220014) > +++ head/usr.sbin/newsyslog/newsyslog.conf.5 Sat Mar 26 00:34:35 2011 (r220015) > @@ -21,7 +21,7 @@ > .\" the suitability of this software for any purpose. It is > .\" provided "as is" without express or implied warranty. > .\" > -.Dd January 31, 2011 > +.Dd February 25, 2011 > .Dt NEWSYSLOG.CONF 5 > .Os > .Sh NAME > @@ -349,6 +349,11 @@ If this field is not present, then a > .Dv SIGHUP > signal will be sent. > .El > +.Sh EXAMPLES > +The following is an example of the > +.Dq Aq Li include > +entry: > +.Dl " /etc/newsyslog-local.conf" > .Sh SEE ALSO > .Xr bzip2 1 , > .Xr gzip 1 , -- a13x From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 02:02:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 853D71065673; Sat, 26 Mar 2011 02:02: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 745248FC0A; Sat, 26 Mar 2011 02:02:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q227U4000182; Sat, 26 Mar 2011 02:02:07 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q227ur000177; Sat, 26 Mar 2011 02:02:07 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201103260202.p2Q227ur000177@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 26 Mar 2011 02:02: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: r220018 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 02:02:07 -0000 Author: jkim Date: Sat Mar 26 02:02:07 2011 New Revision: 220018 URL: http://svn.freebsd.org/changeset/base/220018 Log: Improve CPU identifications of various IDT/Centaur/VIA, Rise and Transmeta CPUs. These CPUs need explicit MSR configuration to expose ceratin CPU capabilities (e.g., CMPXCHG8B) to work around compatibility issues with ancient software. Unfortunately, Rise mP6 does not set the CX8 bit in CPUID and there is no MSR to expose the feature although all mP6 processors are capable of CMPXCHG8B according to datasheets I found from the Net. Clean up and simplify VIA PadLock detection while I am in the neighborhood. Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/amd64/initcpu.c head/sys/i386/i386/identcpu.c head/sys/i386/i386/initcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Sat Mar 26 01:24:55 2011 (r220017) +++ head/sys/amd64/amd64/identcpu.c Sat Mar 26 02:02:07 2011 (r220018) @@ -385,7 +385,7 @@ printcpuinfo(void) ); } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR) + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); if ((cpu_feature & CPUID_HTT) && @@ -643,25 +643,7 @@ print_via_padlock_info(void) { u_int regs[4]; - /* Check for supported models. */ - switch (cpu_id & 0xff0) { - case 0x690: - if ((cpu_id & 0xf) < 3) - return; - case 0x6a0: - case 0x6d0: - case 0x6f0: - break; - default: - return; - } - - do_cpuid(0xc0000000, regs); - if (regs[0] >= 0xc0000001) - do_cpuid(0xc0000001, regs); - else - return; - + do_cpuid(0xc0000001, regs); printf("\n VIA Padlock Features=0x%b", regs[3], "\020" "\003RNG" /* RNG */ Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Sat Mar 26 01:24:55 2011 (r220017) +++ head/sys/amd64/amd64/initcpu.c Sat Mar 26 02:02:07 2011 (r220018) @@ -74,72 +74,47 @@ u_int cpu_mxcsr_mask; /* Valid bits in u_int cpu_clflush_line_size = 32; SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, - &via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU"); + &via_feature_rng, 0, "VIA RNG feature available in CPU"); SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, - &via_feature_xcrypt, 0, "VIA C3/C7 xcrypt feature available in CPU"); + &via_feature_xcrypt, 0, "VIA xcrypt feature available in CPU"); /* - * Initialize special VIA C3/C7 features + * Initialize special VIA features */ static void init_via(void) { u_int regs[4], val; - u_int64_t msreg; + /* + * Check extended CPUID for PadLock features. + * + * http://www.via.com.tw/en/downloads/whitepapers/initiatives/padlock/programming_guide.pdf + */ do_cpuid(0xc0000000, regs); - val = regs[0]; - if (val >= 0xc0000001) { + if (regs[0] >= 0xc0000001) { do_cpuid(0xc0000001, regs); val = regs[3]; } else - val = 0; + return; - /* Enable RNG if present and disabled */ - if (val & VIA_CPUID_HAS_RNG) { - if (!(val & VIA_CPUID_DO_RNG)) { - msreg = rdmsr(0x110B); - msreg |= 0x40; - wrmsr(0x110B, msreg); - } + /* Enable RNG if present. */ + if ((val & VIA_CPUID_HAS_RNG) != 0) { via_feature_rng = VIA_HAS_RNG; + wrmsr(0x110B, rdmsr(0x110B) | VIA_CPUID_DO_RNG); } - /* Enable AES engine if present and disabled */ - if (val & VIA_CPUID_HAS_ACE) { - if (!(val & VIA_CPUID_DO_ACE)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28); - wrmsr(0x1107, msreg); - } + + /* Enable PadLock if present. */ + if ((val & VIA_CPUID_HAS_ACE) != 0) via_feature_xcrypt |= VIA_HAS_AES; - } - /* Enable ACE2 engine if present and disabled */ - if (val & VIA_CPUID_HAS_ACE2) { - if (!(val & VIA_CPUID_DO_ACE2)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28); - wrmsr(0x1107, msreg); - } + if ((val & VIA_CPUID_HAS_ACE2) != 0) via_feature_xcrypt |= VIA_HAS_AESCTR; - } - /* Enable SHA engine if present and disabled */ - if (val & VIA_CPUID_HAS_PHE) { - if (!(val & VIA_CPUID_DO_PHE)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28/**/); - wrmsr(0x1107, msreg); - } + if ((val & VIA_CPUID_HAS_PHE) != 0) via_feature_xcrypt |= VIA_HAS_SHA; - } - /* Enable MM engine if present and disabled */ - if (val & VIA_CPUID_HAS_PMM) { - if (!(val & VIA_CPUID_DO_PMM)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28/**/); - wrmsr(0x1107, msreg); - } + if ((val & VIA_CPUID_HAS_PMM) != 0) via_feature_xcrypt |= VIA_HAS_MM; - } + if (via_feature_xcrypt != 0) + wrmsr(0x1107, rdmsr(0x1107) | (1 << 28)); } /* @@ -159,9 +134,7 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR && - CPUID_TO_FAMILY(cpu_id) == 0x6 && - CPUID_TO_MODEL(cpu_id) >= 0xf) + if (cpu_vendor_id == CPU_VENDOR_CENTAUR) init_via(); } Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Sat Mar 26 01:24:55 2011 (r220017) +++ head/sys/i386/i386/identcpu.c Sat Mar 26 02:02:07 2011 (r220018) @@ -560,7 +560,8 @@ printcpuinfo(void) } else if (cpu_vendor_id == CPU_VENDOR_RISE) { strcpy(cpu_model, "Rise "); switch (cpu_id & 0xff0) { - case 0x500: + case 0x500: /* 6401 and 6441 (Kirin) */ + case 0x520: /* 6510 (Lynx) */ strcat(cpu_model, "mP6"); break; default: @@ -570,11 +571,20 @@ printcpuinfo(void) switch (cpu_id & 0xff0) { case 0x540: strcpy(cpu_model, "IDT WinChip C6"); + /* + * http://www.centtech.com/c6_data_sheet.pdf + * + * I-12 RDTSC may return incoherent values in EDX:EAX + * I-13 RDTSC hangs when certain event counters are used + */ tsc_freq = 0; break; case 0x580: strcpy(cpu_model, "IDT WinChip 2"); break; + case 0x590: + strcpy(cpu_model, "IDT WinChip 3"); + break; case 0x660: strcpy(cpu_model, "VIA C3 Samuel"); break; @@ -852,7 +862,7 @@ printcpuinfo(void) ); } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR) + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); if ((cpu_feature & CPUID_HTT) && @@ -1127,6 +1137,12 @@ finishidentcpu(void) do_cpuid(0x80000008, regs); cpu_procinfo2 = regs[2]; } + } else if (cpu_vendor_id == CPU_VENDOR_CENTAUR) { + init_exthigh(); + if (cpu_exthigh >= 0x80000001) { + do_cpuid(0x80000001, regs); + amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); + } } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { if (cpu == CPU_486) { /* @@ -1560,25 +1576,7 @@ print_via_padlock_info(void) { u_int regs[4]; - /* Check for supported models. */ - switch (cpu_id & 0xff0) { - case 0x690: - if ((cpu_id & 0xf) < 3) - return; - case 0x6a0: - case 0x6d0: - case 0x6f0: - break; - default: - return; - } - - do_cpuid(0xc0000000, regs); - if (regs[0] >= 0xc0000001) - do_cpuid(0xc0000001, regs); - else - return; - + do_cpuid(0xc0000001, regs); printf("\n VIA Padlock Features=0x%b", regs[3], "\020" "\003RNG" /* RNG */ Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Sat Mar 26 01:24:55 2011 (r220017) +++ head/sys/i386/i386/initcpu.c Sat Mar 26 02:02:07 2011 (r220018) @@ -100,9 +100,9 @@ u_int cpu_vendor_id = 0; /* CPU vendor I u_int cpu_clflush_line_size = 32; SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, - &via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU"); + &via_feature_rng, 0, "VIA RNG feature available in CPU"); SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, - &via_feature_xcrypt, 0, "VIA C3/C7 xcrypt feature available in CPU"); + &via_feature_xcrypt, 0, "VIA xcrypt feature available in CPU"); #ifdef CPU_ENABLE_SSE u_int cpu_fxsr; /* SSE enabled */ @@ -420,6 +420,38 @@ init_6x86(void) } #endif /* I486_CPU */ +#ifdef I586_CPU +/* + * IDT WinChip C6/2/2A/2B/3 + * + * http://www.centtech.com/winchip_bios_writers_guide_v4_0.pdf + */ +static void +init_winchip(void) +{ + u_int regs[4]; + uint64_t fcr; + + fcr = rdmsr(0x0107); + + /* + * Set ECX8, DSMC, DTLOCK/EDCTLB, EMMX, and ERETSTK and clear DPDC. + */ + fcr |= (1 << 1) | (1 << 7) | (1 << 8) | (1 << 9) | (1 << 16); + fcr &= ~(1ULL << 11); + + /* + * Additioanlly, set EBRPRED, E2MMX and EAMD3D for WinChip 2 and 3. + */ + if (CPUID_TO_MODEL(cpu_id) >= 8) + fcr |= (1 << 12) | (1 << 19) | (1 << 20); + + wrmsr(0x0107, fcr); + do_cpuid(1, regs); + cpu_feature = regs[3]; +} +#endif + #ifdef I686_CPU /* * Cyrix 6x86MX (code-named M2) @@ -538,71 +570,72 @@ init_mendocino(void) } /* - * Initialize special VIA C3/C7 features + * Initialize special VIA features */ static void init_via(void) { u_int regs[4], val; - u_int64_t msreg; + uint64_t fcr; + + /* + * Explicitly enable CX8 and PGE on C3. + * + * http://www.via.com.tw/download/mainboards/6/13/VIA_C3_EBGA%20datasheet110.pdf + */ + if (CPUID_TO_MODEL(cpu_id) <= 9) + fcr = (1 << 1) | (1 << 7); + else + fcr = 0; + /* + * Check extended CPUID for PadLock features. + * + * http://www.via.com.tw/en/downloads/whitepapers/initiatives/padlock/programming_guide.pdf + */ do_cpuid(0xc0000000, regs); - val = regs[0]; - if (val >= 0xc0000001) { + if (regs[0] >= 0xc0000001) { do_cpuid(0xc0000001, regs); val = regs[3]; } else val = 0; - /* Enable RNG if present and disabled */ - if (val & VIA_CPUID_HAS_RNG) { - if (!(val & VIA_CPUID_DO_RNG)) { - msreg = rdmsr(0x110B); - msreg |= 0x40; - wrmsr(0x110B, msreg); - } + /* Enable RNG if present. */ + if ((val & VIA_CPUID_HAS_RNG) != 0) { via_feature_rng = VIA_HAS_RNG; + wrmsr(0x110B, rdmsr(0x110B) | VIA_CPUID_DO_RNG); } - /* Enable AES engine if present and disabled */ - if (val & VIA_CPUID_HAS_ACE) { - if (!(val & VIA_CPUID_DO_ACE)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28); - wrmsr(0x1107, msreg); - } + + /* Enable PadLock if present. */ + if ((val & VIA_CPUID_HAS_ACE) != 0) via_feature_xcrypt |= VIA_HAS_AES; - } - /* Enable ACE2 engine if present and disabled */ - if (val & VIA_CPUID_HAS_ACE2) { - if (!(val & VIA_CPUID_DO_ACE2)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28); - wrmsr(0x1107, msreg); - } + if ((val & VIA_CPUID_HAS_ACE2) != 0) via_feature_xcrypt |= VIA_HAS_AESCTR; - } - /* Enable SHA engine if present and disabled */ - if (val & VIA_CPUID_HAS_PHE) { - if (!(val & VIA_CPUID_DO_PHE)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28/**/); - wrmsr(0x1107, msreg); - } + if ((val & VIA_CPUID_HAS_PHE) != 0) via_feature_xcrypt |= VIA_HAS_SHA; - } - /* Enable MM engine if present and disabled */ - if (val & VIA_CPUID_HAS_PMM) { - if (!(val & VIA_CPUID_DO_PMM)) { - msreg = rdmsr(0x1107); - msreg |= (0x01 << 28/**/); - wrmsr(0x1107, msreg); - } + if ((val & VIA_CPUID_HAS_PMM) != 0) via_feature_xcrypt |= VIA_HAS_MM; - } + if (via_feature_xcrypt != 0) + fcr |= 1 << 28; + + wrmsr(0x1107, rdmsr(0x1107) | fcr); } #endif /* I686_CPU */ +#if defined(I586_CPU) || defined(I686_CPU) +static void +init_transmeta(void) +{ + u_int regs[0]; + + /* Expose all hidden features. */ + wrmsr(0x80860004, rdmsr(0x80860004) | ~0UL); + do_cpuid(1, regs); + cpu_feature = regs[3]; +} +#endif + /* * Initialize CR4 (Control register 4) to enable SSE instructions. */ @@ -644,12 +677,25 @@ initializecpu(void) init_6x86(); break; #endif /* I486_CPU */ +#ifdef I586_CPU + case CPU_586: + switch (cpu_vendor_id) { + case CPU_VENDOR_CENTAUR: + init_winchip(); + break; + case CPU_VENDOR_TRANSMETA: + init_transmeta(); + break; + } + break; +#endif #ifdef I686_CPU case CPU_M2: init_6x86MX(); break; case CPU_686: - if (cpu_vendor_id == CPU_VENDOR_INTEL) { + switch (cpu_vendor_id) { + case CPU_VENDOR_INTEL: switch (cpu_id & 0xff0) { case 0x610: init_ppro(); @@ -658,8 +704,9 @@ initializecpu(void) init_mendocino(); break; } - } else if (cpu_vendor_id == CPU_VENDOR_AMD) { -#if defined(I686_CPU) && defined(CPU_ATHLON_SSE_HACK) + break; +#ifdef CPU_ATHLON_SSE_HACK + case CPU_VENDOR_AMD: /* * Sometimes the BIOS doesn't enable SSE instructions. * According to AMD document 20734, the mobile @@ -676,21 +723,14 @@ initializecpu(void) do_cpuid(1, regs); cpu_feature = regs[3]; } + break; #endif - } else if (cpu_vendor_id == CPU_VENDOR_CENTAUR) { - switch (cpu_id & 0xff0) { - case 0x690: - if ((cpu_id & 0xf) < 3) - break; - /* fall through. */ - case 0x6a0: - case 0x6d0: - case 0x6f0: - init_via(); - break; - default: - break; - } + case CPU_VENDOR_CENTAUR: + init_via(); + break; + case CPU_VENDOR_TRANSMETA: + init_transmeta(); + break; } #ifdef PAE if ((amd_feature & AMDID_NX) != 0) { From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 02:52:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EEB8106564A; Sat, 26 Mar 2011 02:52:04 +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 8F6018FC12; Sat, 26 Mar 2011 02:52:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q2q43P001280; Sat, 26 Mar 2011 02:52:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q2q4ng001278; Sat, 26 Mar 2011 02:52:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103260252.p2Q2q4ng001278@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 02:52: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: r220019 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 02:52:04 -0000 Author: adrian Date: Sat Mar 26 02:52:04 2011 New Revision: 220019 URL: http://svn.freebsd.org/changeset/base/220019 Log: Update ath_hal.4 to include the latest chipset support. ath_hal needs a lot more work to encompass the list of supported cards, as the AR5416/AR9160/AR9280/AR9285 list is quite long and extensive. In addition, there's a lot of AR5212/AR5213 based cards that aren't on this list. Modified: head/share/man/man4/ath_hal.4 Modified: head/share/man/man4/ath_hal.4 ============================================================================== --- head/share/man/man4/ath_hal.4 Sat Mar 26 02:02:07 2011 (r220018) +++ head/share/man/man4/ath_hal.4 Sat Mar 26 02:52:04 2011 (r220019) @@ -57,8 +57,8 @@ or .Sh DESCRIPTION The hal provides hardware support for wireless network adapters based on the Atheros AR5210, AR5211, AR5212, AR5213, AR2413, AR2417, AR2425, -AR5413, AR5416, AR5418, AR5424, AR9160, and AR9280 chips (and companion -RF/baseband parts). +AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, and AR9285 chips +(and companion RF/baseband parts). This code is part of the .Xr ath 4 driver but configured separately to allow fine-grained control @@ -66,13 +66,14 @@ over the set of chips supported. Selecting .Nm enables support for all PCI and Cardbus devices. -Note this includes AR5416, AR9160, and AR9280 devices and -must be accompanied by the +Note this includes AR5416, AR9160, AR9220, AR9280 and AR9285 devices +and must be accompanied by the AH_SUPPORT_AR5416 option to enable the extended hardware descriptor format used by AR5416 and later devices. .Pp -Devices supported come in either Cardbus or mini-PCI packages. +Some devices come in Cardbus/MiniPCI/PCI format. +Others (AR9280, AR9285) come in PCIe, Mini-PCIe or ExpressCard format. .Pp Historically this code has been released in a binary-only form and packaged as a separate module. From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 03:01:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78283106564A; Sat, 26 Mar 2011 03:01:48 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D79E8FC15; Sat, 26 Mar 2011 03:01:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q31mXg001629; Sat, 26 Mar 2011 03:01:48 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q31m2Z001626; Sat, 26 Mar 2011 03:01:48 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201103260301.p2Q31m2Z001626@svn.freebsd.org> From: Doug Barton Date: Sat, 26 Mar 2011 03:01: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: r220020 - in head/etc: defaults periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 03:01:48 -0000 Author: dougb Date: Sat Mar 26 03:01:48 2011 New Revision: 220020 URL: http://svn.freebsd.org/changeset/base/220020 Log: Add a daily period script to back up /var/db/pkg The final product contains work from the originator, and Florent Thoumie . The final product contains considerable re-working by me, so all responsibility for bugs rests under my pointy hat. PR: ports/145957 Submitted by: Eitan Adler Added: head/etc/periodic/daily/220.backup-pkgdb (contents, props changed) Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Sat Mar 26 02:52:04 2011 (r220019) +++ head/etc/defaults/periodic.conf Sat Mar 26 03:01:48 2011 (r220020) @@ -74,6 +74,10 @@ daily_backup_passwd_enable="YES" # Bac # 210.backup-aliases daily_backup_aliases_enable="YES" # Backup mail aliases +# 220.backup-pkgdb +daily_backup_pkgdb_enable="YES" # Backup /var/db/pkg +daily_backup_pkgdb_dir="/var/backups" + # 300.calendar daily_calendar_enable="NO" # Run calendar -a Added: head/etc/periodic/daily/220.backup-pkgdb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/220.backup-pkgdb Sat Mar 26 03:01:48 2011 (r220020) @@ -0,0 +1,50 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 + +case "$daily_backup_pkgdb_enable" in + [Yy][Ee][Ss]) + bak="${daily_backup_pkgdb_dir:-/var/backups}" + bak_file="${bak}/pkgdb.bak.tbz" + + pkg_dbdir=`make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null` + + if [ ! -d "$bak" ] + then + install -d -o root -g wheel -m 750 $bak || { + echo '$daily_backup_pkgdb_enable is enabled but' \ + "$daily_backup_pkgdb_dbdir doesn't exist" ; + exit 2 ; } + fi + + echo '' + echo 'Backing up package db directory:' + + new_bak_file=`mktemp ${bak_file}-XXXXX` + + if tar -cjf "${new_bak_file}" "$pkg_dbdir"; then + chmod 644 "${new_bak_file}" + + if [ -e "${bak_file}.2" -a -e "${bak_file}" ]; then + unlink "${bak_file}.2" + mv "${bak_file}" "${bak_file}.2" + fi + [ -e "${bak_file}" ] && mv "${bak_file}" "${bak_file}.2" + mv "${new_bak_file}" "${bak_file}" + else + rc=3 + fi ;; +esac + +exit $rc From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 06:21:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6D691065673; Sat, 26 Mar 2011 06:21:05 +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 B89EB8FC1F; Sat, 26 Mar 2011 06:21:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q6L55Q005631; Sat, 26 Mar 2011 06:21:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q6L54o005628; Sat, 26 Mar 2011 06:21:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201103260621.p2Q6L54o005628@svn.freebsd.org> From: Alan Cox Date: Sat, 26 Mar 2011 06:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220021 - in head/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 06:21:05 -0000 Author: alc Date: Sat Mar 26 06:21:05 2011 New Revision: 220021 URL: http://svn.freebsd.org/changeset/base/220021 Log: Move an external declaration to the appropriate header file. Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/amd64/include/pmap.h Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Sat Mar 26 03:01:48 2011 (r220020) +++ head/sys/amd64/amd64/minidump_machdep.c Sat Mar 26 06:21:05 2011 (r220021) @@ -53,8 +53,6 @@ CTASSERT(sizeof(struct kerneldumpheader) #define MD_ALIGN(x) (((off_t)(x) + PAGE_MASK) & ~PAGE_MASK) #define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1)) -extern uint64_t KPDPphys; - uint64_t *vm_page_dump; int vm_page_dump_size; Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Sat Mar 26 03:01:48 2011 (r220020) +++ head/sys/amd64/include/pmap.h Sat Mar 26 06:21:05 2011 (r220021) @@ -180,6 +180,7 @@ typedef u_int64_t pml4_entry_t; #define PML4map ((pd_entry_t *)(addr_PML4map)) #define PML4pml4e ((pd_entry_t *)(addr_PML4pml4e)) +extern u_int64_t KPDPphys; /* physical address of kernel level 3 */ extern u_int64_t KPML4phys; /* physical address of kernel level 4 */ /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 07:15:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DE3B1065670; Sat, 26 Mar 2011 07:15:35 +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 60BC68FC0C; Sat, 26 Mar 2011 07:15:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q7FZjF006833; Sat, 26 Mar 2011 07:15:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q7FZwf006831; Sat, 26 Mar 2011 07:15:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103260715.p2Q7FZwf006831@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 07:15: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: r220022 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 07:15:35 -0000 Author: adrian Date: Sat Mar 26 07:15:35 2011 New Revision: 220022 URL: http://svn.freebsd.org/changeset/base/220022 Log: Shuffle around the HAL_RX_FILTER bits to be slightly more sensible. The phyerr, radar and bssid-match bits aren't real bits, they map to enabling bits in other registers. Move those out of the way of valid RX filter bits. Add a few new fields from ath9k - compba, ps-poll, mcast-bcast-all. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Mar 26 06:21:05 2011 (r220021) +++ head/sys/dev/ath/ath_hal/ah.h Sat Mar 26 07:15:35 2011 (r220022) @@ -290,6 +290,10 @@ typedef enum { /* Rx Filter Frame Types */ typedef enum { + /* + * These bits correspond to AR_RX_FILTER for all chips. + * Not all bits are supported by all chips. + */ HAL_RX_FILTER_UCAST = 0x00000001, /* Allow unicast frames */ HAL_RX_FILTER_MCAST = 0x00000002, /* Allow multicast frames */ HAL_RX_FILTER_BCAST = 0x00000004, /* Allow broadcast frames */ @@ -297,10 +301,20 @@ typedef enum { HAL_RX_FILTER_BEACON = 0x00000010, /* Allow beacon frames */ HAL_RX_FILTER_PROM = 0x00000020, /* Promiscuous mode */ HAL_RX_FILTER_PROBEREQ = 0x00000080, /* Allow probe request frames */ - HAL_RX_FILTER_PHYERR = 0x00000100, /* Allow phy errors */ - HAL_RX_FILTER_PHYRADAR = 0x00000200, /* Allow phy radar errors */ HAL_RX_FILTER_COMPBAR = 0x00000400, /* Allow compressed BAR */ - HAL_RX_FILTER_BSSID = 0x00000800, /* Disable BSSID match */ + HAL_RX_FILTER_COMP_BA = 0x00000800, /* Allow compressed blockack */ + HAL_RX_FILTER_PSPOLL = 0x00004000, /* Allow PS-POLL frames */ + HAL_RX_FILTER_MCAST_BCAST_ALL = 0x00008000, + /* Allow all mcast/bcast frames */ + + /* + * Magic RX filter flags that aren't targetting hardware bits + * but instead the HAL sets individual bits - eg PHYERR will result + * in OFDM/CCK timing error frames being received. + */ + HAL_RX_FILTER_PHYERR = 0x10000000, /* Allow phy errors */ + HAL_RX_FILTER_PHYRADAR = 0x20000000, /* Allow phy radar errors */ + HAL_RX_FILTER_BSSID = 0x40000000, /* Disable BSSID match */ } HAL_RX_FILTER; typedef enum { From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 07:15:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75F941065674; Sat, 26 Mar 2011 07:15:57 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6741A8FC17; Sat, 26 Mar 2011 07:15:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q7Fv9L006874; Sat, 26 Mar 2011 07:15:57 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q7FvDg006872; Sat, 26 Mar 2011 07:15:57 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103260715.p2Q7FvDg006872@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 26 Mar 2011 07:15: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: r220023 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 07:15:57 -0000 Author: pjd Date: Sat Mar 26 07:15:57 2011 New Revision: 220023 URL: http://svn.freebsd.org/changeset/base/220023 Log: Follow style(9) in example code and handle opendir(3) error. Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 ============================================================================== --- head/lib/libc/gen/directory.3 Sat Mar 26 07:15:35 2011 (r220022) +++ head/lib/libc/gen/directory.3 Sat Mar 26 07:15:57 2011 (r220023) @@ -209,13 +209,16 @@ Sample code which searches a directory f .Bd -literal -offset indent len = strlen(name); dirp = opendir("."); -while ((dp = readdir(dirp)) != NULL) - if (dp->d_namlen == len && !strcmp(dp->d_name, name)) { +if (dirp == NULL) + return (ERROR); +while ((dp = readdir(dirp)) != NULL) { + if (dp->d_namlen == len && strcmp(dp->d_name, name) == 0) { (void)closedir(dirp); - return FOUND; + return (FOUND); } +} (void)closedir(dirp); -return NOT_FOUND; +return (NOT_FOUND); .Ed .Sh SEE ALSO .Xr close 2 , From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 07:17:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BC511065670; Sat, 26 Mar 2011 07:17:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3638FC15; Sat, 26 Mar 2011 07:17:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q7HO1C006943; Sat, 26 Mar 2011 07:17:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q7HOA4006941; Sat, 26 Mar 2011 07:17:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103260717.p2Q7HOA4006941@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 26 Mar 2011 07:17: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: r220024 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 07:17:24 -0000 Author: pjd Date: Sat Mar 26 07:17:24 2011 New Revision: 220024 URL: http://svn.freebsd.org/changeset/base/220024 Log: Don't calculate len too early. Modified: head/lib/libc/gen/directory.3 Modified: head/lib/libc/gen/directory.3 ============================================================================== --- head/lib/libc/gen/directory.3 Sat Mar 26 07:15:57 2011 (r220023) +++ head/lib/libc/gen/directory.3 Sat Mar 26 07:17:24 2011 (r220024) @@ -207,10 +207,10 @@ see .Pp Sample code which searches a directory for entry ``name'' is: .Bd -literal -offset indent -len = strlen(name); dirp = opendir("."); if (dirp == NULL) return (ERROR); +len = strlen(name); while ((dp = readdir(dirp)) != NULL) { if (dp->d_namlen == len && strcmp(dp->d_name, name) == 0) { (void)closedir(dirp); From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 07:29:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EF0F1065670; Sat, 26 Mar 2011 07:29:49 +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 2FEE88FC0A; Sat, 26 Mar 2011 07:29:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q7TnDD007212; Sat, 26 Mar 2011 07:29:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q7Tn9Z007210; Sat, 26 Mar 2011 07:29:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103260729.p2Q7Tn9Z007210@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 07:29: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: r220025 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 07:29:49 -0000 Author: adrian Date: Sat Mar 26 07:29:48 2011 New Revision: 220025 URL: http://svn.freebsd.org/changeset/base/220025 Log: Put these two back to mirror what ath9k does. Even though they map to setting the error filter register, ath9k also writes them untouched to AR_RX_FILTER. The Force-BSSID match bit can stay high, as it maps to a misc mode register setting rather than an RX filter bit. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Mar 26 07:17:24 2011 (r220024) +++ head/sys/dev/ath/ath_hal/ah.h Sat Mar 26 07:29:48 2011 (r220025) @@ -301,8 +301,10 @@ typedef enum { HAL_RX_FILTER_BEACON = 0x00000010, /* Allow beacon frames */ HAL_RX_FILTER_PROM = 0x00000020, /* Promiscuous mode */ HAL_RX_FILTER_PROBEREQ = 0x00000080, /* Allow probe request frames */ + HAL_RX_FILTER_PHYERR = 0x00000100, /* Allow phy errors */ HAL_RX_FILTER_COMPBAR = 0x00000400, /* Allow compressed BAR */ HAL_RX_FILTER_COMP_BA = 0x00000800, /* Allow compressed blockack */ + HAL_RX_FILTER_PHYRADAR = 0x00002000, /* Allow phy radar errors */ HAL_RX_FILTER_PSPOLL = 0x00004000, /* Allow PS-POLL frames */ HAL_RX_FILTER_MCAST_BCAST_ALL = 0x00008000, /* Allow all mcast/bcast frames */ @@ -312,8 +314,6 @@ typedef enum { * but instead the HAL sets individual bits - eg PHYERR will result * in OFDM/CCK timing error frames being received. */ - HAL_RX_FILTER_PHYERR = 0x10000000, /* Allow phy errors */ - HAL_RX_FILTER_PHYRADAR = 0x20000000, /* Allow phy radar errors */ HAL_RX_FILTER_BSSID = 0x40000000, /* Disable BSSID match */ } HAL_RX_FILTER; From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 09:25:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 440EC1065673; Sat, 26 Mar 2011 09:25:36 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3345B8FC15; Sat, 26 Mar 2011 09:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2Q9Pa7S009602; Sat, 26 Mar 2011 09:25:36 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2Q9Pa4T009599; Sat, 26 Mar 2011 09:25:36 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201103260925.p2Q9Pa4T009599@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 26 Mar 2011 09:25: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: r220026 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 09:25:36 -0000 Author: dchagin Date: Sat Mar 26 09:25:35 2011 New Revision: 220026 URL: http://svn.freebsd.org/changeset/base/220026 Log: Export the correct AT_PLATFORM value. Since signal trampolines are copied to the shared page do not need to leave place on the stack for it. Forgotten in the previous commit. MFC after: 1 Week Modified: head/sys/amd64/linux32/linux32_sysvec.c head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Sat Mar 26 07:29:48 2011 (r220025) +++ head/sys/amd64/linux32/linux32_sysvec.c Sat Mar 26 09:25:35 2011 (r220026) @@ -249,8 +249,7 @@ elf_linux_fixup(register_t **stack_base, struct linux32_ps_strings *arginfo; arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; - uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szsigcode - - linux_szplatform); + uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szplatform); KASSERT(curthread->td_proc == imgp->proc, ("unsafe elf_linux_fixup(), should be curproc")); Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Sat Mar 26 07:29:48 2011 (r220025) +++ head/sys/i386/linux/linux_sysvec.c Sat Mar 26 09:25:35 2011 (r220026) @@ -249,8 +249,7 @@ elf_linux_fixup(register_t **stack_base, p = imgp->proc; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; - uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szsigcode - - linux_szplatform); + uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szplatform); args = (Elf32_Auxargs *)imgp->auxargs; pos = *stack_base + (imgp->args->argc + imgp->args->envc + 2); From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 10:47:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB102106564A; Sat, 26 Mar 2011 10:47: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 B138B8FC16; Sat, 26 Mar 2011 10:47:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QAlH4N019427; Sat, 26 Mar 2011 10:47:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QAlHil019423; Sat, 26 Mar 2011 10:47:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103261047.p2QAlHil019423@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 10:47: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: r220027 - in head/sys/dev/ath/ath_hal: . ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 10:47:17 -0000 Author: adrian Date: Sat Mar 26 10:47:17 2011 New Revision: 220027 URL: http://svn.freebsd.org/changeset/base/220027 Log: Introduce hardware PS-POLL support in the HAL. Linux ath9k only enables this for AR9280 and later NICs; so create a capability for it so it isn't enabled for earlier NICs. Enabling hardware PS-POLL support will come in a later commit and will be disabled by default. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat Mar 26 09:25:35 2011 (r220026) +++ head/sys/dev/ath/ath_hal/ah.c Sat Mar 26 10:47:17 2011 (r220027) @@ -599,8 +599,10 @@ ath_hal_getcapability(struct ath_hal *ah default: return HAL_ENOTSUPP; } - case HAP_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ + case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_HAS_PSPOLL: /* hardware has ps-poll support */ + return pCap->halHasPsPollSupport ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat Mar 26 09:25:35 2011 (r220026) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat Mar 26 10:47:17 2011 (r220027) @@ -780,6 +780,8 @@ ar9280FillCapabilityInfo(struct ath_hal #endif pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->hal4kbSplitTransSupport = AH_FALSE; + if (AR_SREV_MERLIN_20_OR_LATER(ah)) + pCap->halHasPsPollSupport = AH_TRUE; pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat Mar 26 09:25:35 2011 (r220026) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat Mar 26 10:47:17 2011 (r220027) @@ -380,6 +380,9 @@ ar9285FillCapabilityInfo(struct ath_hal #endif pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->hal4kbSplitTransSupport = AH_FALSE; + if (AR_SREV_KITE_12_OR_LATER(ah)) + pCap->halHasPsPollSupport = AH_TRUE; + pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 10:51:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EB6F1065670; Sat, 26 Mar 2011 10:51: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 6FB0F8FC13; Sat, 26 Mar 2011 10:51:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QApuMK019550; Sat, 26 Mar 2011 10:51:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QApu2p019547; Sat, 26 Mar 2011 10:51:56 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103261051.p2QApu2p019547@svn.freebsd.org> From: Andriy Gapon Date: Sat, 26 Mar 2011 10:51: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: r220028 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 10:51:56 -0000 Author: avg Date: Sat Mar 26 10:51:56 2011 New Revision: 220028 URL: http://svn.freebsd.org/changeset/base/220028 Log: linux compat: add non-dummy capget and capset system calls PR: kern/149168 Submitted by: John Wehle Reviewed by: netchild MFC after: 2 weeks Modified: head/sys/amd64/linux32/syscalls.master head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sat Mar 26 10:47:17 2011 (r220027) +++ head/sys/amd64/linux32/syscalls.master Sat Mar 26 10:51:56 2011 (r220028) @@ -326,8 +326,10 @@ l_uid16_t uid, l_gid16_t gid); } 183 AUE_GETCWD STD { int linux_getcwd(char *buf, \ l_ulong bufsize); } -184 AUE_CAPGET STD { int linux_capget(void); } -185 AUE_CAPSET STD { int linux_capset(void); } +184 AUE_CAPGET STD { int linux_capget(struct l_user_cap_header *hdrp, \ + struct l_user_cap_data *datap); } +185 AUE_CAPSET STD { int linux_capset(struct l_user_cap_header *hdrp, \ + struct l_user_cap_data *datap); } 186 AUE_NULL STD { int linux_sigaltstack(l_stack_t *uss, \ l_stack_t *uoss); } 187 AUE_SENDFILE STD { int linux_sendfile(void); } Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sat Mar 26 10:47:17 2011 (r220027) +++ head/sys/i386/linux/syscalls.master Sat Mar 26 10:51:56 2011 (r220028) @@ -328,8 +328,10 @@ l_uid16_t uid, l_gid16_t gid); } 183 AUE_GETCWD STD { int linux_getcwd(char *buf, \ l_ulong bufsize); } -184 AUE_CAPGET STD { int linux_capget(void); } -185 AUE_CAPSET STD { int linux_capset(void); } +184 AUE_CAPGET STD { int linux_capget(struct l_user_cap_header *hdrp, \ + struct l_user_cap_data *datap); } +185 AUE_CAPSET STD { int linux_capset(struct l_user_cap_header *hdrp, \ + struct l_user_cap_data *datap); } 186 AUE_NULL STD { int linux_sigaltstack(l_stack_t *uss, \ l_stack_t *uoss); } 187 AUE_SENDFILE STD { int linux_sendfile(void); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 10:52:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C0391065672; Sat, 26 Mar 2011 10:52:38 +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 2D04B8FC22; Sat, 26 Mar 2011 10:52:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QAqcHV019609; Sat, 26 Mar 2011 10:52:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QAqcQg019607; Sat, 26 Mar 2011 10:52:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103261052.p2QAqcQg019607@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 10:52: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: r220029 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 10:52:38 -0000 Author: adrian Date: Sat Mar 26 10:52:37 2011 New Revision: 220029 URL: http://svn.freebsd.org/changeset/base/220029 Log: Add in the hardware PS-POLL frame reception setting, but leave it disabled by default. Adventourous souls with an AR9220/AR9280 or later and who have a device that sends PS-POLL frames may wish to try tinkering with this option and get back to me. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Mar 26 10:51:56 2011 (r220028) +++ head/sys/dev/ath/if_ath.c Sat Mar 26 10:52:37 2011 (r220029) @@ -1927,6 +1927,19 @@ ath_calcrxfilter(struct ath_softc *sc) if (ic->ic_opmode == IEEE80211_M_HOSTAP && IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) rfilt |= HAL_RX_FILTER_BEACON; + +#if 0 + /* + * Enable hardware PS-POLL only for hostap mode; + * STA mode sends PS-POLL frames but never + * sends them. + */ + if (ath_hal_getcapability(ah, HAL_CAP_HAS_PSPOLL, + 0, NULL) == HAL_OK && + ic->ic_opmode == IEEE80211_M_HOSTAP) + rfilt |= HAL_RX_FILTER_PSPOLL; +#endif + if (sc->sc_nmeshvaps) { rfilt |= HAL_RX_FILTER_BEACON; if (sc->sc_hasbmatch) @@ -1936,8 +1949,14 @@ ath_calcrxfilter(struct ath_softc *sc) } if (ic->ic_opmode == IEEE80211_M_MONITOR) rfilt |= HAL_RX_FILTER_CONTROL; + + /* + * Enable RX of compressed BAR frames only when doing + * 802.11n. Required for A-MPDU. + */ if (IEEE80211_IS_CHAN_HT(ic->ic_curchan)) rfilt |= HAL_RX_FILTER_COMPBAR; + DPRINTF(sc, ATH_DEBUG_MODE, "%s: RX filter 0x%x, %s if_flags 0x%x\n", __func__, rfilt, ieee80211_opmode_name[ic->ic_opmode], ifp->if_flags); return rfilt; From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 10:59:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A11FE1065673; Sat, 26 Mar 2011 10:59:24 +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 90CC78FC18; Sat, 26 Mar 2011 10:59:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QAxOTp019858; Sat, 26 Mar 2011 10:59:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QAxOeu019845; Sat, 26 Mar 2011 10:59:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103261059.p2QAxOeu019845@svn.freebsd.org> From: Andriy Gapon Date: Sat, 26 Mar 2011 10:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220030 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 10:59:24 -0000 Author: avg Date: Sat Mar 26 10:59:24 2011 New Revision: 220030 URL: http://svn.freebsd.org/changeset/base/220030 Log: linux compat: add non-dummy capget and capset system calls, regenerate And drop dummy definitions for those system calls. This may transiently break the build. PR: kern/149168 Submitted by: John Wehle Reviewed by: netchild MFC after: 2 weeks Modified: head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/amd64/linux32/linux32_dummy.c Sat Mar 26 10:59:24 2011 (r220030) @@ -54,8 +54,6 @@ DUMMY(sysfs); DUMMY(query_module); DUMMY(nfsservctl); DUMMY(rt_sigqueueinfo); -DUMMY(capget); -DUMMY(capset); DUMMY(sendfile); DUMMY(setfsuid); DUMMY(setfsgid); Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/amd64/linux32/linux32_proto.h Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 2011-03-26 10:51:56Z avg */ #ifndef _LINUX_SYSPROTO_H_ @@ -589,10 +589,12 @@ struct linux_getcwd_args { char bufsize_l_[PADL_(l_ulong)]; l_ulong bufsize; char bufsize_r_[PADR_(l_ulong)]; }; struct linux_capget_args { - register_t dummy; + char hdrp_l_[PADL_(struct l_user_cap_header *)]; struct l_user_cap_header * hdrp; char hdrp_r_[PADR_(struct l_user_cap_header *)]; + char datap_l_[PADL_(struct l_user_cap_data *)]; struct l_user_cap_data * datap; char datap_r_[PADR_(struct l_user_cap_data *)]; }; struct linux_capset_args { - register_t dummy; + char hdrp_l_[PADL_(struct l_user_cap_header *)]; struct l_user_cap_header * hdrp; char hdrp_r_[PADR_(struct l_user_cap_header *)]; + char datap_l_[PADL_(struct l_user_cap_data *)]; struct l_user_cap_data * datap; char datap_r_[PADR_(struct l_user_cap_data *)]; }; struct linux_sigaltstack_args { char uss_l_[PADL_(l_stack_t *)]; l_stack_t * uss; char uss_r_[PADR_(l_stack_t *)]; Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/amd64/linux32/linux32_syscall.h Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 2011-03-26 10:51:56Z avg */ #define LINUX_SYS_exit 1 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/amd64/linux32/linux32_syscalls.c Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 2011-03-26 10:51:56Z avg */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/amd64/linux32/linux32_sysent.c Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 2011-03-26 10:51:56Z avg */ #include "opt_compat.h" @@ -203,8 +203,8 @@ struct sysent linux_sysent[] = { { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 181 = linux_pwrite */ { AS(linux_chown16_args), (sy_call_t *)linux_chown16, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 182 = linux_chown16 */ { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 183 = linux_getcwd */ - { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 184 = linux_capget */ - { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 185 = linux_capset */ + { AS(linux_capget_args), (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 184 = linux_capget */ + { AS(linux_capset_args), (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 185 = linux_capset */ { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 186 = linux_sigaltstack */ { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 187 = linux_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 188 = getpmsg */ Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/amd64/linux32/linux32_systrace_args.c Sat Mar 26 10:59:24 2011 (r220030) @@ -1284,12 +1284,18 @@ systrace_args(int sysnum, void *params, } /* linux_capget */ case 184: { - *n_args = 0; + struct linux_capget_args *p = params; + uarg[0] = (intptr_t) p->hdrp; /* struct l_user_cap_header * */ + uarg[1] = (intptr_t) p->datap; /* struct l_user_cap_data * */ + *n_args = 2; break; } /* linux_capset */ case 185: { - *n_args = 0; + struct linux_capset_args *p = params; + uarg[0] = (intptr_t) p->hdrp; /* struct l_user_cap_header * */ + uarg[1] = (intptr_t) p->datap; /* struct l_user_cap_data * */ + *n_args = 2; break; } /* linux_sigaltstack */ @@ -4051,9 +4057,29 @@ systrace_setargdesc(int sysnum, int ndx, break; /* linux_capget */ case 184: + switch(ndx) { + case 0: + p = "struct l_user_cap_header *"; + break; + case 1: + p = "struct l_user_cap_data *"; + break; + default: + break; + }; break; /* linux_capset */ case 185: + switch(ndx) { + case 0: + p = "struct l_user_cap_header *"; + break; + case 1: + p = "struct l_user_cap_data *"; + break; + default: + break; + }; break; /* linux_sigaltstack */ case 186: Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/i386/linux/linux_dummy.c Sat Mar 26 10:59:24 2011 (r220030) @@ -57,8 +57,6 @@ DUMMY(vm86); DUMMY(query_module); DUMMY(nfsservctl); DUMMY(rt_sigqueueinfo); -DUMMY(capget); -DUMMY(capset); DUMMY(sendfile); /* different semantics */ DUMMY(setfsuid); DUMMY(setfsgid); Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/i386/linux/linux_proto.h Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/i386/linux/syscalls.master 220028 2011-03-26 10:51:56Z avg */ #ifndef _LINUX_SYSPROTO_H_ @@ -586,10 +586,12 @@ struct linux_getcwd_args { char bufsize_l_[PADL_(l_ulong)]; l_ulong bufsize; char bufsize_r_[PADR_(l_ulong)]; }; struct linux_capget_args { - register_t dummy; + char hdrp_l_[PADL_(struct l_user_cap_header *)]; struct l_user_cap_header * hdrp; char hdrp_r_[PADR_(struct l_user_cap_header *)]; + char datap_l_[PADL_(struct l_user_cap_data *)]; struct l_user_cap_data * datap; char datap_r_[PADR_(struct l_user_cap_data *)]; }; struct linux_capset_args { - register_t dummy; + char hdrp_l_[PADL_(struct l_user_cap_header *)]; struct l_user_cap_header * hdrp; char hdrp_r_[PADR_(struct l_user_cap_header *)]; + char datap_l_[PADL_(struct l_user_cap_data *)]; struct l_user_cap_data * datap; char datap_r_[PADR_(struct l_user_cap_data *)]; }; struct linux_sigaltstack_args { char uss_l_[PADL_(l_stack_t *)]; l_stack_t * uss; char uss_r_[PADR_(l_stack_t *)]; Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/i386/linux/linux_syscall.h Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/i386/linux/syscalls.master 220028 2011-03-26 10:51:56Z avg */ #define LINUX_SYS_exit 1 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/i386/linux/linux_syscalls.c Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/i386/linux/syscalls.master 220028 2011-03-26 10:51:56Z avg */ const char *linux_syscallnames[] = { Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/i386/linux/linux_sysent.c Sat Mar 26 10:59:24 2011 (r220030) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 219559 2011-03-12 08:51:43Z avg + * created from FreeBSD: head/sys/i386/linux/syscalls.master 220028 2011-03-26 10:51:56Z avg */ #include @@ -202,8 +202,8 @@ struct sysent linux_sysent[] = { { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite, AUE_PWRITE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 181 = linux_pwrite */ { AS(linux_chown16_args), (sy_call_t *)linux_chown16, AUE_CHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 182 = linux_chown16 */ { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd, AUE_GETCWD, NULL, 0, 0, 0, SY_THR_STATIC }, /* 183 = linux_getcwd */ - { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 184 = linux_capget */ - { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 185 = linux_capset */ + { AS(linux_capget_args), (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 184 = linux_capget */ + { AS(linux_capset_args), (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 185 = linux_capset */ { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 186 = linux_sigaltstack */ { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 187 = linux_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 188 = getpmsg */ Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Sat Mar 26 10:52:37 2011 (r220029) +++ head/sys/i386/linux/linux_systrace_args.c Sat Mar 26 10:59:24 2011 (r220030) @@ -1327,12 +1327,18 @@ systrace_args(int sysnum, void *params, } /* linux_capget */ case 184: { - *n_args = 0; + struct linux_capget_args *p = params; + uarg[0] = (intptr_t) p->hdrp; /* struct l_user_cap_header * */ + uarg[1] = (intptr_t) p->datap; /* struct l_user_cap_data * */ + *n_args = 2; break; } /* linux_capset */ case 185: { - *n_args = 0; + struct linux_capset_args *p = params; + uarg[0] = (intptr_t) p->hdrp; /* struct l_user_cap_header * */ + uarg[1] = (intptr_t) p->datap; /* struct l_user_cap_data * */ + *n_args = 2; break; } /* linux_sigaltstack */ @@ -4203,9 +4209,29 @@ systrace_setargdesc(int sysnum, int ndx, break; /* linux_capget */ case 184: + switch(ndx) { + case 0: + p = "struct l_user_cap_header *"; + break; + case 1: + p = "struct l_user_cap_data *"; + break; + default: + break; + }; break; /* linux_capset */ case 185: + switch(ndx) { + case 0: + p = "struct l_user_cap_header *"; + break; + case 1: + p = "struct l_user_cap_data *"; + break; + default: + break; + }; break; /* linux_sigaltstack */ case 186: From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 11:05:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26611065670; Sat, 26 Mar 2011 11:05: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 A23208FC13; Sat, 26 Mar 2011 11:05:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QB5rb7020039; Sat, 26 Mar 2011 11:05:53 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QB5rmA020034; Sat, 26 Mar 2011 11:05:53 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103261105.p2QB5rmA020034@svn.freebsd.org> From: Andriy Gapon Date: Sat, 26 Mar 2011 11:05: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: r220031 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 11:05:53 -0000 Author: avg Date: Sat Mar 26 11:05:53 2011 New Revision: 220031 URL: http://svn.freebsd.org/changeset/base/220031 Log: linux compat: improve and fix sendmsg/recvmsg compatibility - implement baseic stubs for capget, capset, prctl PR_GET_KEEPCAPS and prctl PR_SET_KEEPCAPS. - add SCM_CREDS support to sendmsg and recvmsg - modify sendmsg to ignore control messages if not using UNIX domain sockets This should allow linux pulse audio daemon and client work on FreeBSD and interoperate with native counter-parts modulo the differences in pulseaudio versions. PR: kern/149168 Submitted by: John Wehle Reviewed by: netchild MFC after: 2 weeks Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h head/sys/compat/linux/linux_socket.c head/sys/compat/linux/linux_socket.h Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sat Mar 26 10:59:24 2011 (r220030) +++ head/sys/compat/linux/linux_misc.c Sat Mar 26 11:05:53 2011 (r220031) @@ -1679,6 +1679,100 @@ linux_exit_group(struct thread *td, stru return (0); } +#define _LINUX_CAPABILITY_VERSION 0x19980330 + +struct l_user_cap_header { + l_int version; + l_int pid; +}; + +struct l_user_cap_data { + l_int effective; + l_int permitted; + l_int inheritable; +}; + +int +linux_capget(struct thread *td, struct linux_capget_args *args) +{ + struct l_user_cap_header luch; + struct l_user_cap_data lucd; + int error; + + if (args->hdrp == NULL) + return (EFAULT); + + error = copyin(args->hdrp, &luch, sizeof(luch)); + if (error != 0) + return (error); + + if (luch.version != _LINUX_CAPABILITY_VERSION) { + luch.version = _LINUX_CAPABILITY_VERSION; + error = copyout(&luch, args->hdrp, sizeof(luch)); + if (error) + return (error); + return (EINVAL); + } + + if (luch.pid) + return (EPERM); + + if (args->datap) { + /* + * The current implementation doesn't support setting + * a capability (it's essentially a stub) so indicate + * that no capabilities are currently set or available + * to request. + */ + bzero (&lucd, sizeof(lucd)); + error = copyout(&lucd, args->datap, sizeof(lucd)); + } + + return (error); +} + +int +linux_capset(struct thread *td, struct linux_capset_args *args) +{ + struct l_user_cap_header luch; + struct l_user_cap_data lucd; + int error; + + if (args->hdrp == NULL || args->datap == NULL) + return (EFAULT); + + error = copyin(args->hdrp, &luch, sizeof(luch)); + if (error != 0) + return (error); + + if (luch.version != _LINUX_CAPABILITY_VERSION) { + luch.version = _LINUX_CAPABILITY_VERSION; + error = copyout(&luch, args->hdrp, sizeof(luch)); + if (error) + return (error); + return (EINVAL); + } + + if (luch.pid) + return (EPERM); + + error = copyin(args->datap, &lucd, sizeof(lucd)); + if (error != 0) + return (error); + + /* We currently don't support setting any capabilities. */ + if (lucd.effective || lucd.permitted || lucd.inheritable) { + linux_msg(td, + "capset effective=0x%x, permitted=0x%x, " + "inheritable=0x%x is not implemented", + (int)lucd.effective, (int)lucd.permitted, + (int)lucd.inheritable); + return (EPERM); + } + + return (0); +} + int linux_prctl(struct thread *td, struct linux_prctl_args *args) { @@ -1712,6 +1806,21 @@ linux_prctl(struct thread *td, struct li (void *)(register_t)args->arg2, sizeof(pdeath_signal)); break; + case LINUX_PR_GET_KEEPCAPS: + /* + * Indicate that we always clear the effective and + * permitted capability sets when the user id becomes + * non-zero (actually the capability sets are simply + * always zero in the current implementation). + */ + td->td_retval[0] = 0; + break; + case LINUX_PR_SET_KEEPCAPS: + /* + * Ignore requests to keep the effective and permitted + * capability sets when the user id becomes non-zero. + */ + break; case LINUX_PR_SET_NAME: /* * To be on the safe side we need to make sure to not Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sat Mar 26 10:59:24 2011 (r220030) +++ head/sys/compat/linux/linux_misc.h Sat Mar 26 11:05:53 2011 (r220031) @@ -37,6 +37,8 @@ * Second arg is a ptr to return the * signal. */ +#define LINUX_PR_GET_KEEPCAPS 7 /* Get drop capabilities on setuid */ +#define LINUX_PR_SET_KEEPCAPS 8 /* Set drop capabilities on setuid */ #define LINUX_PR_SET_NAME 15 /* Set process name. */ #define LINUX_PR_GET_NAME 16 /* Get process name. */ Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Sat Mar 26 10:59:24 2011 (r220030) +++ head/sys/compat/linux/linux_socket.c Sat Mar 26 11:05:53 2011 (r220031) @@ -433,6 +433,8 @@ linux_to_bsd_cmsg_type(int cmsg_type) switch (cmsg_type) { case LINUX_SCM_RIGHTS: return (SCM_RIGHTS); + case LINUX_SCM_CREDENTIALS: + return (SCM_CREDS); } return (-1); } @@ -444,6 +446,8 @@ bsd_to_linux_cmsg_type(int cmsg_type) switch (cmsg_type) { case SCM_RIGHTS: return (LINUX_SCM_RIGHTS); + case SCM_CREDS: + return (LINUX_SCM_CREDENTIALS); } return (-1); } @@ -459,7 +463,16 @@ linux_to_bsd_msghdr(struct msghdr *bhdr, bhdr->msg_iov = PTRIN(lhdr->msg_iov); bhdr->msg_iovlen = lhdr->msg_iovlen; bhdr->msg_control = PTRIN(lhdr->msg_control); - bhdr->msg_controllen = lhdr->msg_controllen; + + /* + * msg_controllen is skipped since BSD and LINUX control messages + * are potentially different sizes (e.g. the cred structure used + * by SCM_CREDS is different between the two operating system). + * + * The caller can set it (if necessary) after converting all the + * control messages. + */ + bhdr->msg_flags = linux_to_bsd_msg_flags(lhdr->msg_flags); return (0); } @@ -472,7 +485,16 @@ bsd_to_linux_msghdr(const struct msghdr lhdr->msg_iov = PTROUT(bhdr->msg_iov); lhdr->msg_iovlen = bhdr->msg_iovlen; lhdr->msg_control = PTROUT(bhdr->msg_control); - lhdr->msg_controllen = bhdr->msg_controllen; + + /* + * msg_controllen is skipped since BSD and LINUX control messages + * are potentially different sizes (e.g. the cred structure used + * by SCM_CREDS is different between the two operating system). + * + * The caller can set it (if necessary) after converting all the + * control messages. + */ + /* msg_flags skipped */ return (0); } @@ -1092,6 +1114,7 @@ static int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) { struct cmsghdr *cmsg; + struct cmsgcred cmcred; struct mbuf *control; struct msghdr msg; struct l_cmsghdr linux_cmsg; @@ -1099,15 +1122,14 @@ linux_sendmsg(struct thread *td, struct struct l_msghdr linux_msg; struct iovec *iov; socklen_t datalen; + struct sockaddr *sa; + sa_family_t sa_family; void *data; int error; error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); if (error) return (error); - error = linux_to_bsd_msghdr(&msg, &linux_msg); - if (error) - return (error); /* * Some Linux applications (ping) define a non-NULL control data @@ -1116,8 +1138,12 @@ linux_sendmsg(struct thread *td, struct * order to handle this case. This should be checked, but allows the * Linux ping to work. */ - if (msg.msg_control != NULL && msg.msg_controllen == 0) - msg.msg_control = NULL; + if (PTRIN(linux_msg.msg_control) != NULL && linux_msg.msg_controllen == 0) + linux_msg.msg_control = PTROUT(NULL); + + error = linux_to_bsd_msghdr(&msg, &linux_msg); + if (error) + return (error); #ifdef COMPAT_LINUX32 error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, @@ -1128,13 +1154,21 @@ linux_sendmsg(struct thread *td, struct if (error) return (error); - if (msg.msg_control != NULL) { + control = NULL; + cmsg = NULL; + + if ((ptr_cmsg = LINUX_CMSG_FIRSTHDR(&linux_msg)) != NULL) { + error = kern_getsockname(td, args->s, &sa, &datalen); + if (error) + goto bad; + sa_family = sa->sa_family; + free(sa, M_SONAME); + error = ENOBUFS; cmsg = malloc(CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); control = m_get(M_WAIT, MT_CONTROL); if (control == NULL) goto bad; - ptr_cmsg = LINUX_CMSG_FIRSTHDR(&msg); do { error = copyin(ptr_cmsg, &linux_cmsg, @@ -1147,28 +1181,58 @@ linux_sendmsg(struct thread *td, struct goto bad; /* - * Now we support only SCM_RIGHTS, so return EINVAL - * in any other cmsg_type + * Now we support only SCM_RIGHTS and SCM_CRED, + * so return EINVAL in any other cmsg_type */ - if ((cmsg->cmsg_type = - linux_to_bsd_cmsg_type(linux_cmsg.cmsg_type)) == -1) - goto bad; + cmsg->cmsg_type = + linux_to_bsd_cmsg_type(linux_cmsg.cmsg_type); cmsg->cmsg_level = linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); + if (cmsg->cmsg_type == -1 + || cmsg->cmsg_level != SOL_SOCKET) + goto bad; + /* + * Some applications (e.g. pulseaudio) attempt to + * send ancillary data even if the underlying protocol + * doesn't support it which is not allowed in the + * FreeBSD system call interface. + */ + if (sa_family != AF_UNIX) + continue; + + data = LINUX_CMSG_DATA(ptr_cmsg); datalen = linux_cmsg.cmsg_len - L_CMSG_HDRSZ; + + switch (cmsg->cmsg_type) + { + case SCM_RIGHTS: + break; + + case SCM_CREDS: + data = &cmcred; + datalen = sizeof(cmcred); + + /* + * The lower levels will fill in the structure + */ + bzero(data, datalen); + break; + } + cmsg->cmsg_len = CMSG_LEN(datalen); - data = LINUX_CMSG_DATA(ptr_cmsg); error = ENOBUFS; if (!m_append(control, CMSG_HDRSZ, (c_caddr_t) cmsg)) goto bad; if (!m_append(control, datalen, (c_caddr_t) data)) goto bad; - } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(&msg, ptr_cmsg))); - } else { - control = NULL; - cmsg = NULL; + } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(&linux_msg, ptr_cmsg))); + + if (m_length(control, NULL) == 0) { + m_freem(control); + control = NULL; + } } msg.msg_iov = iov; @@ -1193,9 +1257,11 @@ static int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args) { struct cmsghdr *cm; + struct cmsgcred *cmcred; struct msghdr msg; struct l_cmsghdr *linux_cmsg = NULL; - socklen_t datalen, outlen, clen; + struct l_ucred linux_ucred; + socklen_t datalen, outlen; struct l_msghdr linux_msg; struct iovec *iov, *uiov; struct mbuf *control = NULL; @@ -1252,39 +1318,35 @@ linux_recvmsg(struct thread *td, struct goto bad; } - if (control) { + outbuf = PTRIN(linux_msg.msg_control); + outlen = 0; + if (control) { linux_cmsg = malloc(L_CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); - outbuf = PTRIN(linux_msg.msg_control); - cm = mtod(control, struct cmsghdr *); - outlen = 0; - clen = control->m_len; - while (cm != NULL) { + msg.msg_control = mtod(control, struct cmsghdr *); + msg.msg_controllen = control->m_len; + + cm = CMSG_FIRSTHDR(&msg); - if ((linux_cmsg->cmsg_type = - bsd_to_linux_cmsg_type(cm->cmsg_type)) == -1) + while (cm != NULL) { + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + if (linux_cmsg->cmsg_type == -1 + || cm->cmsg_level != SOL_SOCKET) { error = EINVAL; goto bad; } + data = CMSG_DATA(cm); datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; - switch (linux_cmsg->cmsg_type) + switch (cm->cmsg_type) { - case LINUX_SCM_RIGHTS: - if (outlen + LINUX_CMSG_LEN(datalen) > - linux_msg.msg_controllen) { - if (outlen == 0) { - error = EMSGSIZE; - goto bad; - } else { - linux_msg.msg_flags |= - LINUX_MSG_CTRUNC; - goto out; - } - } + case SCM_RIGHTS: if (args->flags & LINUX_MSG_CMSG_CLOEXEC) { fds = datalen / sizeof(int); fdp = data; @@ -1295,11 +1357,40 @@ linux_recvmsg(struct thread *td, struct } } break; + + case SCM_CREDS: + /* + * Currently LOCAL_CREDS is never in + * effect for Linux so no need to worry + * about sockcred + */ + if (datalen != sizeof (*cmcred)) { + error = EMSGSIZE; + goto bad; + } + cmcred = (struct cmsgcred *)data; + bzero(&linux_ucred, sizeof(linux_ucred)); + linux_ucred.pid = cmcred->cmcred_pid; + linux_ucred.uid = cmcred->cmcred_uid; + linux_ucred.gid = cmcred->cmcred_gid; + data = &linux_ucred; + datalen = sizeof(linux_ucred); + break; + } + + if (outlen + LINUX_CMSG_LEN(datalen) > + linux_msg.msg_controllen) { + if (outlen == 0) { + error = EMSGSIZE; + goto bad; + } else { + linux_msg.msg_flags |= + LINUX_MSG_CTRUNC; + goto out; + } } linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen); - linux_cmsg->cmsg_level = - bsd_to_linux_sockopt_level(cm->cmsg_level); error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); if (error) @@ -1312,18 +1403,13 @@ linux_recvmsg(struct thread *td, struct outbuf += LINUX_CMSG_ALIGN(datalen); outlen += LINUX_CMSG_LEN(datalen); - linux_msg.msg_controllen = outlen; - if (CMSG_SPACE(datalen) < clen) { - clen -= CMSG_SPACE(datalen); - cm = (struct cmsghdr *) - ((caddr_t)cm + CMSG_SPACE(datalen)); - } else - cm = NULL; + cm = CMSG_NXTHDR(&msg, cm); } } out: + linux_msg.msg_controllen = outlen; error = copyout(&linux_msg, PTRIN(args->msg), sizeof(linux_msg)); bad: Modified: head/sys/compat/linux/linux_socket.h ============================================================================== --- head/sys/compat/linux/linux_socket.h Sat Mar 26 10:59:24 2011 (r220030) +++ head/sys/compat/linux/linux_socket.h Sat Mar 26 11:05:53 2011 (r220031) @@ -53,6 +53,7 @@ /* Socket-level control message types */ #define LINUX_SCM_RIGHTS 0x01 +#define LINUX_SCM_CREDENTIALS 0x02 /* Ancilliary data object information macros */ @@ -66,13 +67,14 @@ #define LINUX_CMSG_FIRSTHDR(msg) \ ((msg)->msg_controllen >= \ sizeof(struct l_cmsghdr) ? \ - (struct l_cmsghdr *)((msg)->msg_control) : \ + (struct l_cmsghdr *) \ + PTRIN((msg)->msg_control) : \ (struct l_cmsghdr *)(NULL)) #define LINUX_CMSG_NXTHDR(msg, cmsg) \ ((((char *)(cmsg) + \ LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \ sizeof(*(cmsg))) > \ - (((char *)(msg)->msg_control) + \ + (((char *)PTRIN((msg)->msg_control)) + \ (msg)->msg_controllen)) ? \ (struct l_cmsghdr *) NULL : \ (struct l_cmsghdr *)((char *)(cmsg) + \ From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 11:25:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEA0C106566C; Sat, 26 Mar 2011 11:25: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 94AFA8FC13; Sat, 26 Mar 2011 11:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QBPadt020443; Sat, 26 Mar 2011 11:25:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QBPa19020439; Sat, 26 Mar 2011 11:25:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201103261125.p2QBPa19020439@svn.freebsd.org> From: Andriy Gapon Date: Sat, 26 Mar 2011 11:25: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: r220032 - in head/sys: amd64/linux32 compat/linux i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 11:25:36 -0000 Author: avg Date: Sat Mar 26 11:25:36 2011 New Revision: 220032 URL: http://svn.freebsd.org/changeset/base/220032 Log: linux compat: add SO_PASSCRED option with basic handling This seems to have been a part of a bigger patch by dchagin that either haven't been committed or committed partially. Submitted by: dchagin, nox MFC after: 2 weeks Modified: head/sys/amd64/linux32/linux.h head/sys/compat/linux/linux_socket.c head/sys/i386/linux/linux.h Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sat Mar 26 11:05:53 2011 (r220031) +++ head/sys/amd64/linux32/linux.h Sat Mar 26 11:25:36 2011 (r220032) @@ -695,6 +695,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Sat Mar 26 11:05:53 2011 (r220031) +++ head/sys/compat/linux/linux_socket.c Sat Mar 26 11:25:36 2011 (r220032) @@ -300,6 +300,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); + case LINUX_SO_PASSCRED: + return (LOCAL_CREDS); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: @@ -1467,6 +1469,12 @@ linux_setsockopt(struct thread *td, stru switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + /* FreeBSD bug? socket level opts at non socket level */ + bsd_args.level = 0; + break; + } switch (name) { case SO_RCVTIMEO: /* FALLTHROUGH */ @@ -1544,6 +1552,12 @@ linux_getsockopt(struct thread *td, stru switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + /* FreeBSD bug? socket level opts at non socket level */ + bsd_args.level = 0; + break; + } switch (name) { case SO_RCVTIMEO: /* FALLTHROUGH */ Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sat Mar 26 11:05:53 2011 (r220031) +++ head/sys/i386/linux/linux.h Sat Mar 26 11:25:36 2011 (r220032) @@ -671,6 +671,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 11:29:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D48931065680; Sat, 26 Mar 2011 11:29:19 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B41668FC0C; Sat, 26 Mar 2011 11:29:18 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA28227; Sat, 26 Mar 2011 13:29:16 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Q3RgC-000PK5-Db; Sat, 26 Mar 2011 13:29:16 +0200 Message-ID: <4D8DCE0B.5040808@freebsd.org> Date: Sat, 26 Mar 2011 13:29:15 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110308 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: src-committers@freebsd.org References: <201103261125.p2QBPa19020439@svn.freebsd.org> In-Reply-To: <201103261125.p2QBPa19020439@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220032 - in head/sys: amd64/linux32 compat/linux i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 11:29:19 -0000 on 26/03/2011 13:25 Andriy Gapon said the following: > Author: avg > Date: Sat Mar 26 11:25:36 2011 > New Revision: 220032 > URL: http://svn.freebsd.org/changeset/base/220032 > > Log: > linux compat: add SO_PASSCRED option with basic handling > > This seems to have been a part of a bigger patch by dchagin that either > haven't been committed or committed partially. > > Submitted by: dchagin, nox > MFC after: 2 weeks Dear linuxulator guys, apologies for wading into your territory and possibly making some mess while there. But I really couldn't wait any longer for these patches to get finally committed. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 11:58:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13DD106566B; Sat, 26 Mar 2011 11:58: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 A1D5F8FC0C; Sat, 26 Mar 2011 11:58:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QBwTn5021081; Sat, 26 Mar 2011 11:58:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QBwTLH021079; Sat, 26 Mar 2011 11:58:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103261158.p2QBwTLH021079@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 11:58: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: r220033 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 11:58:29 -0000 Author: adrian Date: Sat Mar 26 11:58:29 2011 New Revision: 220033 URL: http://svn.freebsd.org/changeset/base/220033 Log: If 802.11n is enabled, bump the number of buffers used up to a larger level. This is important for AMPDU RX as each burst is multiple packets in a row. Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Mar 26 11:25:36 2011 (r220032) +++ head/sys/dev/ath/if_athvar.h Sat Mar 26 11:58:29 2011 (r220033) @@ -43,6 +43,14 @@ #define ATH_TIMEOUT 1000 +/* + * 802.11n requires more TX and RX buffers to do AMPDU. + */ +#ifdef AH_ENABLE_11N +#define ATH_TXBUF 512 +#define ATH_RXBUF 512 +#endif + #ifndef ATH_RXBUF #define ATH_RXBUF 40 /* number of RX buffers */ #endif From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 11:59:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8910106564A; Sat, 26 Mar 2011 11:59:18 +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 B91FE8FC1F; Sat, 26 Mar 2011 11:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QBxIQw021141; Sat, 26 Mar 2011 11:59:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QBxIgS021139; Sat, 26 Mar 2011 11:59:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103261159.p2QBxIgS021139@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 11:59: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: r220034 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 11:59:18 -0000 Author: adrian Date: Sat Mar 26 11:59:18 2011 New Revision: 220034 URL: http://svn.freebsd.org/changeset/base/220034 Log: This was missing from the previous HAL commit - it fixes a typo and introduces the PS-POLL hardware support. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sat Mar 26 11:58:29 2011 (r220033) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sat Mar 26 11:59:18 2011 (r220034) @@ -196,7 +196,8 @@ typedef struct { halEnhancedPmSupport : 1, halMbssidAggrSupport : 1, halBssidMatchSupport : 1, - hal4kbSplitTransSupport : 1; + hal4kbSplitTransSupport : 1, + halHasPsPollSupport : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; uint16_t halKeyCacheSize; From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 13:06:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D073106564A; Sat, 26 Mar 2011 13:06:44 +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 1CDEA8FC0A; Sat, 26 Mar 2011 13:06:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QD6iGE022710; Sat, 26 Mar 2011 13:06:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QD6hJj022708; Sat, 26 Mar 2011 13:06:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103261306.p2QD6hJj022708@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 13:06: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: r220035 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 13:06:44 -0000 Author: adrian Date: Sat Mar 26 13:06:43 2011 New Revision: 220035 URL: http://svn.freebsd.org/changeset/base/220035 Log: .. And another missed commit - add the PSPOLL capability. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Mar 26 11:59:18 2011 (r220034) +++ head/sys/dev/ath/ath_hal/ah.h Sat Mar 26 13:06:43 2011 (r220035) @@ -112,7 +112,8 @@ typedef enum { HAL_CAP_INTRMASK = 37, /* bitmask of supported interrupts */ HAL_CAP_BSSIDMATCH = 38, /* hardware has disable bssid match */ HAL_CAP_STREAMS = 39, /* how many 802.11n spatial streams are available */ - HAP_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */ + HAL_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */ + HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */ } HAL_CAPABILITY_TYPE; /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 13:07:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB11A106566B; Sat, 26 Mar 2011 13:07:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90F428FC2A; Sat, 26 Mar 2011 13:07:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QD77Ot022758; Sat, 26 Mar 2011 13:07:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QD77v4022755; Sat, 26 Mar 2011 13:07:07 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103261307.p2QD77v4022755@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Mar 2011 13:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220036 - stable/8/sys/dev/aic7xxx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 13:07:07 -0000 Author: marius Date: Sat Mar 26 13:07:07 2011 New Revision: 220036 URL: http://svn.freebsd.org/changeset/base/220036 Log: MFC: r219577 Allocate the DMA memory shared between the host and the controller as coherent. Approved by: gibbs Modified: stable/8/sys/dev/aic7xxx/aic79xx.c stable/8/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic79xx.c Sat Mar 26 13:06:43 2011 (r220035) +++ stable/8/sys/dev/aic7xxx/aic79xx.c Sat Mar 26 13:07:07 2011 (r220036) @@ -6099,7 +6099,8 @@ ahd_alloc_scbs(struct ahd_softc *ahd) /* Allocate the next batch of hardware SCBs */ if (aic_dmamem_alloc(ahd, scb_data->hscb_dmat, (void **)&hscb_map->vaddr, - BUS_DMA_NOWAIT, &hscb_map->dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &hscb_map->dmamap) != 0) { free(hscb_map, M_DEVBUF); return (0); } @@ -6132,7 +6133,8 @@ ahd_alloc_scbs(struct ahd_softc *ahd) /* Allocate the next batch of S/G lists */ if (aic_dmamem_alloc(ahd, scb_data->sg_dmat, (void **)&sg_map->vaddr, - BUS_DMA_NOWAIT, &sg_map->dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &sg_map->dmamap) != 0) { free(sg_map, M_DEVBUF); return (0); } @@ -6397,7 +6399,7 @@ ahd_init(struct ahd_softc *ahd) /* Allocation of driver data */ if (aic_dmamem_alloc(ahd, ahd->shared_data_dmat, (void **)&ahd->shared_data_map.vaddr, - BUS_DMA_NOWAIT, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &ahd->shared_data_map.dmamap) != 0) { return (ENOMEM); } Modified: stable/8/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic7xxx.c Sat Mar 26 13:06:43 2011 (r220035) +++ stable/8/sys/dev/aic7xxx/aic7xxx.c Sat Mar 26 13:07:07 2011 (r220036) @@ -4381,7 +4381,8 @@ ahc_init_scbdata(struct ahc_softc *ahc) /* Allocation for our hscbs */ if (aic_dmamem_alloc(ahc, scb_data->hscb_dmat, (void **)&scb_data->hscbs, - BUS_DMA_NOWAIT, &scb_data->hscb_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &scb_data->hscb_dmamap) != 0) { goto error_exit; } @@ -4549,7 +4550,8 @@ ahc_alloc_scbs(struct ahc_softc *ahc) /* Allocate S/G space for the next batch of SCBS */ if (aic_dmamem_alloc(ahc, scb_data->sg_dmat, (void **)&sg_map->sg_vaddr, - BUS_DMA_NOWAIT, &sg_map->sg_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &sg_map->sg_dmamap) != 0) { free(sg_map, M_DEVBUF); return (0); } @@ -4941,7 +4943,8 @@ ahc_init(struct ahc_softc *ahc) /* Allocation of driver data */ if (aic_dmamem_alloc(ahc, ahc->shared_data_dmat, (void **)&ahc->qoutfifo, - BUS_DMA_NOWAIT, &ahc->shared_data_dmamap) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &ahc->shared_data_dmamap) != 0) { return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 13:58:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C129106566B; Sat, 26 Mar 2011 13:58:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3648FC12; Sat, 26 Mar 2011 13:58:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QDwiAZ023787; Sat, 26 Mar 2011 13:58:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QDwinN023784; Sat, 26 Mar 2011 13:58:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201103261358.p2QDwinN023784@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 26 Mar 2011 13:58: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: r220037 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 13:58:44 -0000 Author: nwhitehorn Date: Sat Mar 26 13:58:44 2011 New Revision: 220037 URL: http://svn.freebsd.org/changeset/base/220037 Log: Cause the release target to set up its object directory. It is designed to be a meta-target, and having it do this avoids it spewing files all over the source tree by default (and possible recursive tarring if distributing a src tarball). Modified: head/release/Makefile head/release/generate-release.sh Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Sat Mar 26 13:07:07 2011 (r220036) +++ head/release/Makefile Sat Mar 26 13:58:44 2011 (r220037) @@ -142,7 +142,7 @@ ftp: packagesystem mkdir ${.OBJDIR}/ftp cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST ${.OBJDIR}/ftp -release: ${RELEASE_TARGETS} +release: obj ${RELEASE_TARGETS} clean: chflags -R noschg ${.OBJDIR} Modified: head/release/generate-release.sh ============================================================================== --- head/release/generate-release.sh Sat Mar 26 13:07:07 2011 (r220036) +++ head/release/generate-release.sh Sat Mar 26 13:58:44 2011 (r220037) @@ -60,7 +60,7 @@ if [ -d $2/usr/doc ]; then fi chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make obj release" || exit 1 +chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 mkdir $2/R cp -pRP $2/usr/obj/usr/src/release/release.iso $2/usr/obj/usr/src/release/memstick $2/usr/obj/usr/src/release/ftp $2/R From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 16:49:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDAF31065670; Sat, 26 Mar 2011 16:49:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABE2A8FC08; Sat, 26 Mar 2011 16:49:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QGnC28027444; Sat, 26 Mar 2011 16:49:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QGnCVV027435; Sat, 26 Mar 2011 16:49:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103261649.p2QGnCVV027435@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Mar 2011 16: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: r220038 - in head/sys: conf sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 16:49:12 -0000 Author: marius Date: Sat Mar 26 16:49:12 2011 New Revision: 220038 URL: http://svn.freebsd.org/changeset/base/220038 Log: - Merge the *_SET macros from fire(4) which generally print out the register changes when compiled with SCHIZO_DEBUG and take advantage of them. - Add support for the XMITS Fireplane/Safari to PCI-X bridges. I tought I'd need this for a Sun Fire 3800, which then turned out to not being equipped with such a bridge though. The support for these should be complete but given that it hasn't actually been tested probing is disabled for now. This required a way to alter the XMITS configuration in case a PCI-X device is found further down the device tree so the sparc64 specific ofw_pci kobj was revived with a ofw_pci_setup_device method, which is called by the ofw_pcibus code for every device added. - A closer inspection of the OpenSolaris code indicates that consistent DMA flushing/syncing as well as the block store workaround should be applied with every BUS_DMASYNC_POSTREAD instead of in a wrapper around interrupt handlers for devices behind PCI-PCI bridges only as suggested by the documentation (code for the latter actually exists in OpenSolaris but is disabled by default), which also makes more sense. - Add a workaround for Casinni/Skyhawk combinations. Chances are that this solves the crashes seen when using the the on-board Casinni NICs of Sun Fire V480 equipped with centerplanes other than 501-6780 or 501-6790. This also takes advantage of the ofw_pci_setup_device method. - Mark some unused parameters as such. Modified: head/sys/conf/files.sparc64 head/sys/conf/files.sun4v head/sys/sparc64/pci/ofw_pci.h head/sys/sparc64/pci/ofw_pci_if.m head/sys/sparc64/pci/ofw_pcibus.c head/sys/sparc64/pci/schizo.c head/sys/sparc64/pci/schizoreg.h head/sys/sparc64/pci/schizovar.h Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/conf/files.sparc64 Sat Mar 26 16:49:12 2011 (r220038) @@ -79,6 +79,7 @@ sparc64/pci/fire.c optional pci sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci +sparc64/pci/ofw_pci_if.m optional pci sparc64/pci/psycho.c optional pci sparc64/pci/sbbc.c optional sbbc uart sparc64/pci/schizo.c optional pci Modified: head/sys/conf/files.sun4v ============================================================================== --- head/sys/conf/files.sun4v Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/conf/files.sun4v Sat Mar 26 16:49:12 2011 (r220038) @@ -56,6 +56,7 @@ sun4v/sun4v/trap_trace.S optional trap_t sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci +sparc64/pci/ofw_pci_if.m optional pci # XXX hvcons should be optional sun4v/sun4v/hvcons.c standard Modified: head/sys/sparc64/pci/ofw_pci.h ============================================================================== --- head/sys/sparc64/pci/ofw_pci.h Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/sparc64/pci/ofw_pci.h Sat Mar 26 16:49:12 2011 (r220038) @@ -64,6 +64,8 @@ #include +#include "ofw_pci_if.h" + typedef uint32_t ofw_pci_intr_t; /* PCI range child spaces. XXX: are these MI? */ Modified: head/sys/sparc64/pci/ofw_pci_if.m ============================================================================== --- head/sys/sparc64/pci/ofw_pci_if.m Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/sparc64/pci/ofw_pci_if.m Sat Mar 26 16:49:12 2011 (r220038) @@ -1,5 +1,6 @@ #- # Copyright (c) 2001, 2003 by Thomas Moestl +# Copyright (c) 2011 Marius Strobl # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,28 +27,22 @@ #include -#include - -#include - INTERFACE ofw_pci; CODE { - static ofw_pci_intr_pending_t ofw_pci_default_intr_pending; + static ofw_pci_setup_device_t ofw_pci_default_setup_device; - static int - ofw_pci_default_intr_pending(device_t dev, ofw_pci_intr_t intr) + static void + ofw_pci_default_setup_device(device_t dev, device_t child) { if (device_get_parent(dev) != NULL) - return (OFW_PCI_INTR_PENDING(device_get_parent(dev), - intr)); - return (0); + OFW_PCI_SETUP_DEVICE(device_get_parent(dev), child); } }; -# Return whether an interrupt request is pending for the INO intr. -METHOD int intr_pending { +# Setup a device further upward in the tree. +METHOD void setup_device { device_t dev; - ofw_pci_intr_t intr; -} DEFAULT ofw_pci_default_intr_pending; + device_t child; +} DEFAULT ofw_pci_default_setup_device; Modified: head/sys/sparc64/pci/ofw_pcibus.c ============================================================================== --- head/sys/sparc64/pci/ofw_pcibus.c Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/sparc64/pci/ofw_pcibus.c Sat Mar 26 16:49:12 2011 (r220038) @@ -277,6 +277,7 @@ ofw_pcibus_attach(device_t dev) continue; } pci_add_child(dev, (struct pci_devinfo *)dinfo); + OFW_PCI_SETUP_DEVICE(pcib, dinfo->opd_dinfo.cfg.dev); } return (bus_generic_attach(dev)); Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/sparc64/pci/schizo.c Sat Mar 26 16:49:12 2011 (r220038) @@ -1,7 +1,7 @@ /*- * Copyright (c) 1999, 2000 Matthew R. Green * Copyright (c) 2001 - 2003 by Thomas Moestl - * Copyright (c) 2005, 2007, 2008 by Marius Strobl + * Copyright (c) 2005 - 2011 by Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,8 @@ __FBSDID("$FreeBSD$"); /* - * Driver for `Schizo' Fireplane/Safari to PCI 2.1 and `Tomatillo' JBus to - * PCI 2.2 bridges + * Driver for `Schizo' Fireplane/Safari to PCI 2.1, `Tomatillo' JBus to + * PCI 2.2 and `XMITS' Fireplane/Safari to PCI-X bridges */ #include "opt_ofw_pci.h" @@ -80,8 +80,10 @@ __FBSDID("$FreeBSD$"); static const struct schizo_desc *schizo_get_desc(device_t); static void schizo_set_intr(struct schizo_softc *, u_int, u_int, driver_filter_t); -static driver_filter_t schizo_dma_sync_stub; -static driver_filter_t ichip_dma_sync_stub; +static void schizo_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, + bus_dmasync_op_t op); +static void ichip_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, + bus_dmasync_op_t op); static void schizo_intr_enable(void *); static void schizo_intr_disable(void *); static void schizo_intr_assign(void *); @@ -109,18 +111,17 @@ static device_probe_t schizo_probe; static device_attach_t schizo_attach; static bus_read_ivar_t schizo_read_ivar; static bus_setup_intr_t schizo_setup_intr; -static bus_teardown_intr_t schizo_teardown_intr; static bus_alloc_resource_t schizo_alloc_resource; static bus_activate_resource_t schizo_activate_resource; static bus_deactivate_resource_t schizo_deactivate_resource; static bus_release_resource_t schizo_release_resource; -static bus_describe_intr_t schizo_describe_intr; static bus_get_dma_tag_t schizo_get_dma_tag; static pcib_maxslots_t schizo_maxslots; static pcib_read_config_t schizo_read_config; static pcib_write_config_t schizo_write_config; static pcib_route_interrupt_t schizo_route_interrupt; static ofw_bus_get_node_t schizo_get_node; +static ofw_pci_setup_device_t schizo_setup_device; static device_method_t schizo_methods[] = { /* Device interface */ @@ -134,12 +135,11 @@ static device_method_t schizo_methods[] DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, schizo_read_ivar), DEVMETHOD(bus_setup_intr, schizo_setup_intr), - DEVMETHOD(bus_teardown_intr, schizo_teardown_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_alloc_resource, schizo_alloc_resource), DEVMETHOD(bus_activate_resource, schizo_activate_resource), DEVMETHOD(bus_deactivate_resource, schizo_deactivate_resource), DEVMETHOD(bus_release_resource, schizo_release_resource), - DEVMETHOD(bus_describe_intr, schizo_describe_intr), DEVMETHOD(bus_get_dma_tag, schizo_get_dma_tag), /* pcib interface */ @@ -151,6 +151,9 @@ static device_method_t schizo_methods[] /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, schizo_get_node), + /* ofw_pci interface */ + DEVMETHOD(ofw_pci_setup_device, schizo_setup_device), + KOBJMETHOD_END }; @@ -177,25 +180,27 @@ struct schizo_icarg { bus_addr_t sica_clr; }; -struct schizo_dma_sync { - struct schizo_softc *sds_sc; - driver_filter_t *sds_handler; - void *sds_arg; - void *sds_cookie; - uint64_t sds_syncval; - device_t sds_ppb; /* farest PCI-PCI bridge */ - uint8_t sds_bus; /* bus of farest PCI dev. */ - uint8_t sds_slot; /* slot of farest PCI dev. */ - uint8_t sds_func; /* func. of farest PCI dev. */ -}; - #define SCHIZO_PERF_CNT_QLTY 100 +#define SCHIZO_SPC_BARRIER(spc, sc, offs, len, flags) \ + bus_barrier((sc)->sc_mem_res[(spc)], (offs), (len), (flags)) #define SCHIZO_SPC_READ_8(spc, sc, offs) \ bus_read_8((sc)->sc_mem_res[(spc)], (offs)) #define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ bus_write_8((sc)->sc_mem_res[(spc)], (offs), (v)) +#ifndef SCHIZO_DEBUG +#define SCHIZO_SPC_SET(spc, sc, offs, reg, v) \ + SCHIZO_SPC_WRITE_8((spc), (sc), (offs), (v)) +#else +#define SCHIZO_SPC_SET(spc, sc, offs, reg, v) do { \ + device_printf((sc)->sc_dev, reg " 0x%016llx -> 0x%016llx\n", \ + (unsigned long long)SCHIZO_SPC_READ_8((spc), (sc), (offs)), \ + (unsigned long long)(v)); \ + SCHIZO_SPC_WRITE_8((spc), (sc), (offs), (v)); \ + } while (0) +#endif + #define SCHIZO_PCI_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCI, (sc), (offs)) #define SCHIZO_PCI_WRITE_8(sc, offs, v) \ @@ -213,6 +218,11 @@ struct schizo_dma_sync { #define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) +#define SCHIZO_PCI_SET(sc, offs, v) \ + SCHIZO_SPC_SET(STX_PCI, (sc), (offs), # offs, (v)) +#define SCHIZO_CTRL_SET(sc, offs, v) \ + SCHIZO_SPC_SET(STX_CTRL, (sc), (offs), # offs, (v)) + struct schizo_desc { const char *sd_string; int sd_mode; @@ -221,6 +231,9 @@ struct schizo_desc { static const struct schizo_desc const schizo_compats[] = { { "pci108e,8001", SCHIZO_MODE_SCZ, "Schizo" }, +#if 0 + { "pci108e,8002", SCHIZO_MODE_XMS, "XMITS" }, +#endif { "pci108e,a801", SCHIZO_MODE_TOM, "Tomatillo" }, { NULL, 0, NULL } }; @@ -340,65 +353,70 @@ schizo_attach(device_t dev) if (OF_getprop(node, "version#", &sc->sc_ver, sizeof(sc->sc_ver)) == -1) panic("%s: could not determine version", __func__); + if (mode == SCHIZO_MODE_XMS && OF_getprop(node, "module-revision#", + &sc->sc_mrev, sizeof(sc->sc_mrev)) == -1) + panic("%s: could not determine module-revision", __func__); if (OF_getprop(node, "clock-frequency", &prop, sizeof(prop)) == -1) prop = 33000000; - device_printf(dev, "%s, version %d, IGN %#x, bus %c, %dMHz\n", - desc->sd_name, sc->sc_ver, sc->sc_ign, 'A' + sc->sc_half, - prop / 1000 / 1000); + if (mode == SCHIZO_MODE_XMS && (SCHIZO_PCI_READ_8(sc, STX_PCI_CTRL) & + XMS_PCI_CTRL_X_MODE) != 0) { + if (sc->sc_mrev < 1) + panic("PCI-X mode unsupported"); + sc->sc_flags |= SCHIZO_FLAGS_XMODE; + } + + device_printf(dev, "%s, version %d, ", desc->sd_name, sc->sc_ver); + if (mode == SCHIZO_MODE_XMS) + printf("module-revision %d, ", sc->sc_mrev); + printf("IGN %#x, bus %c, PCI%s mode, %dMHz\n", sc->sc_ign, + 'A' + sc->sc_half, (sc->sc_flags & SCHIZO_FLAGS_XMODE) != 0 ? + "-X" : "", prop / 1000 / 1000); /* Set up the PCI interrupt retry timer. */ -#ifdef SCHIZO_DEBUG - device_printf(dev, "PCI IRT 0x%016llx\n", (unsigned long long) - SCHIZO_PCI_READ_8(sc, STX_PCI_INTR_RETRY_TIM)); -#endif - SCHIZO_PCI_WRITE_8(sc, STX_PCI_INTR_RETRY_TIM, 5); + SCHIZO_PCI_SET(sc, STX_PCI_INTR_RETRY_TIM, 5); /* Set up the PCI control register. */ reg = SCHIZO_PCI_READ_8(sc, STX_PCI_CTRL); + reg &= ~(TOM_PCI_CTRL_DTO_IEN | STX_PCI_CTRL_ARB_PARK | + STX_PCI_CTRL_ARB_MASK); reg |= STX_PCI_CTRL_MMU_IEN | STX_PCI_CTRL_SBH_IEN | - STX_PCI_CTRL_ERR_IEN | STX_PCI_CTRL_ARB_MASK; - reg &= ~(TOM_PCI_CTRL_DTO_IEN | STX_PCI_CTRL_ARB_PARK); + STX_PCI_CTRL_ERR_IEN; if (OF_getproplen(node, "no-bus-parking") < 0) reg |= STX_PCI_CTRL_ARB_PARK; + if (mode == SCHIZO_MODE_XMS && sc->sc_mrev == 1) + reg |= XMS_PCI_CTRL_XMITS10_ARB_MASK; + else + reg |= STX_PCI_CTRL_ARB_MASK; if (mode == SCHIZO_MODE_TOM) { reg |= TOM_PCI_CTRL_PRM | TOM_PCI_CTRL_PRO | TOM_PCI_CTRL_PRL; if (sc->sc_ver <= 1) /* revision <= 2.0 */ reg |= TOM_PCI_CTRL_DTO_IEN; else reg |= STX_PCI_CTRL_PTO; + } else if (mode == SCHIZO_MODE_XMS) { + SCHIZO_PCI_SET(sc, XMS_PCI_PARITY_DETECT, 0x3fff); + SCHIZO_PCI_SET(sc, XMS_PCI_UPPER_RETRY_COUNTER, 0x3e8); + reg |= XMS_PCI_CTRL_X_ERRINT_EN; } -#ifdef SCHIZO_DEBUG - device_printf(dev, "PCI CSR 0x%016llx -> 0x%016llx\n", - (unsigned long long)SCHIZO_PCI_READ_8(sc, STX_PCI_CTRL), - (unsigned long long)reg); -#endif - SCHIZO_PCI_WRITE_8(sc, STX_PCI_CTRL, reg); + SCHIZO_PCI_SET(sc, STX_PCI_CTRL, reg); /* Set up the PCI diagnostic register. */ reg = SCHIZO_PCI_READ_8(sc, STX_PCI_DIAG); reg &= ~(SCZ_PCI_DIAG_RTRYARB_DIS | STX_PCI_DIAG_RETRY_DIS | STX_PCI_DIAG_INTRSYNC_DIS); -#ifdef SCHIZO_DEBUG - device_printf(dev, "PCI DR 0x%016llx -> 0x%016llx\n", - (unsigned long long)SCHIZO_PCI_READ_8(sc, STX_PCI_DIAG), - (unsigned long long)reg); -#endif - SCHIZO_PCI_WRITE_8(sc, STX_PCI_DIAG, reg); + SCHIZO_PCI_SET(sc, STX_PCI_DIAG, reg); /* * Enable DMA write parity error interrupts of version >= 7 (i.e. - * revision >= 2.5) Schizo. + * revision >= 2.5) Schizo and XMITS (enabling it on XMITS < 3.0 has + * no effect though). */ - if (mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 7) { + if ((mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 7) || + mode == SCHIZO_MODE_XMS) { reg = SCHIZO_PCI_READ_8(sc, SX_PCI_CFG_ICD); reg |= SX_PCI_CFG_ICD_DMAW_PERR_IEN; -#ifdef SCHIZO_DEBUG - device_printf(dev, "PCI CFG/ICD 0x%016llx -> 0x%016llx\n", - (unsigned long long)SCHIZO_PCI_READ_8(sc, SX_PCI_CFG_ICD), - (unsigned long long)reg); -#endif - SCHIZO_PCI_WRITE_8(sc, SX_PCI_CFG_ICD, reg); + SCHIZO_PCI_SET(sc, SX_PCI_CFG_ICD, reg); } /* @@ -406,7 +424,7 @@ schizo_attach(device_t dev) * Jalapeno bug). */ if (mode == SCHIZO_MODE_TOM) - SCHIZO_PCI_WRITE_8(sc, TOM_PCI_IOC_CSR, TOM_PCI_IOC_PW | + SCHIZO_PCI_SET(sc, TOM_PCI_IOC_CSR, TOM_PCI_IOC_PW | (1 << TOM_PCI_IOC_PREF_OFF_SHIFT) | TOM_PCI_IOC_CPRM | TOM_PCI_IOC_CPRO | TOM_PCI_IOC_CPRL); @@ -457,7 +475,7 @@ schizo_attach(device_t dev) * "pair" of Tomatillos, too. */ if (sc->sc_half == 0) { - SCHIZO_CTRL_WRITE_8(sc, STX_CTRL_PERF, + SCHIZO_CTRL_SET(sc, STX_CTRL_PERF, (STX_CTRL_PERF_DIS << STX_CTRL_PERF_CNT1_SHIFT) | (STX_CTRL_PERF_BUSCYC << STX_CTRL_PERF_CNT0_SHIFT)); tc = malloc(sizeof(*tc), M_DEVBUF, M_NOWAIT | M_ZERO); @@ -486,12 +504,15 @@ schizo_attach(device_t dev) * buffer, in Schizo version < 5 (i.e. revision < 2.3) it's * affected by several errata and basically unusable though. */ - sc->sc_is.is_flags = IOMMU_PRESERVE_PROM; - sc->sc_is.is_pmaxaddr = IOMMU_MAXADDR(STX_IOMMU_BITS); - sc->sc_is.is_sb[0] = sc->sc_is.is_sb[1] = 0; + memcpy(&sc->sc_dma_methods, &iommu_dma_methods, + sizeof(sc->sc_dma_methods)); + sc->sc_is.sis_sc = sc; + sc->sc_is.sis_is.is_flags = IOMMU_PRESERVE_PROM; + sc->sc_is.sis_is.is_pmaxaddr = IOMMU_MAXADDR(STX_IOMMU_BITS); + sc->sc_is.sis_is.is_sb[0] = sc->sc_is.sis_is.is_sb[1] = 0; if (OF_getproplen(node, "no-streaming-cache") < 0 && !(sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver < 5)) - sc->sc_is.is_sb[0] = STX_PCI_STRBUF; + sc->sc_is.sis_is.is_sb[0] = STX_PCI_STRBUF; #define TSBCASE(x) \ case (IOTSB_BASESZ << (x)) << (IO_PAGE_SHIFT - IOTTE_SHIFT): \ @@ -564,12 +585,13 @@ schizo_attach(device_t dev) sc->sc_pci_iot = schizo_alloc_bus_tag(sc, PCI_IO_BUS_SPACE); sc->sc_pci_cfgt = schizo_alloc_bus_tag(sc, PCI_CONFIG_BUS_SPACE); if (bus_dma_tag_create(bus_get_dma_tag(dev), 8, 0, - sc->sc_is.is_pmaxaddr, ~0, NULL, NULL, sc->sc_is.is_pmaxaddr, - 0xff, 0xffffffff, 0, NULL, NULL, &sc->sc_pci_dmat) != 0) + sc->sc_is.sis_is.is_pmaxaddr, ~0, NULL, NULL, + sc->sc_is.sis_is.is_pmaxaddr, 0xff, 0xffffffff, 0, NULL, NULL, + &sc->sc_pci_dmat) != 0) panic("%s: bus_dma_tag_create failed", __func__); /* Customize the tag. */ sc->sc_pci_dmat->dt_cookie = &sc->sc_is; - sc->sc_pci_dmat->dt_mt = &iommu_dma_methods; + sc->sc_pci_dmat->dt_mt = &sc->sc_dma_methods; /* * Get the bus range from the firmware. @@ -591,10 +613,8 @@ schizo_attach(device_t dev) PCIB_WRITE_CONFIG(dev, sc->sc_pci_secbus, STX_CS_DEVICE, STX_CS_FUNC, PCIR_STATUS, PCIB_READ_CONFIG(dev, sc->sc_pci_secbus, STX_CS_DEVICE, STX_CS_FUNC, PCIR_STATUS, 2), 2); - SCHIZO_PCI_WRITE_8(sc, STX_PCI_CTRL, - SCHIZO_PCI_READ_8(sc, STX_PCI_CTRL)); - SCHIZO_PCI_WRITE_8(sc, STX_PCI_AFSR, - SCHIZO_PCI_READ_8(sc, STX_PCI_AFSR)); + SCHIZO_PCI_SET(sc, STX_PCI_CTRL, SCHIZO_PCI_READ_8(sc, STX_PCI_CTRL)); + SCHIZO_PCI_SET(sc, STX_PCI_AFSR, SCHIZO_PCI_READ_8(sc, STX_PCI_AFSR)); /* * Establish handlers for interesting interrupts... @@ -671,9 +691,10 @@ schizo_attach(device_t dev) if ((sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 5) || sc->sc_mode == SCHIZO_MODE_TOM || sc->sc_mode == SCHIZO_MODE_XMS) { - sc->sc_flags |= SCHIZO_FLAGS_CDMA; if (sc->sc_mode == SCHIZO_MODE_SCZ) { - sc->sc_cdma_state = SCHIZO_CDMA_STATE_DONE; + sc->sc_dma_methods.dm_dmamap_sync = + schizo_dmamap_sync; + sc->sc_cdma_state = SCHIZO_CDMA_STATE_IDLE; /* * Some firmware versions include the CDMA interrupt * at RID 4 but most don't. With the latter we add @@ -700,6 +721,14 @@ schizo_attach(device_t dev) &sc->sc_cdma_clr); schizo_set_intr(sc, 5, i, schizo_cdma); } + } else { + if (sc->sc_mode == SCHIZO_MODE_XMS) + mtx_init(&sc->sc_sync_mtx, "pcib_sync_mtx", + NULL, MTX_SPIN); + sc->sc_sync_val = 1ULL << (STX_PCIERR_A_INO + + sc->sc_half); + sc->sc_dma_methods.dm_dmamap_sync = + ichip_dmamap_sync; } if (sc->sc_mode == SCHIZO_MODE_TOM && sc->sc_ver <= 4) sc->sc_flags |= SCHIZO_FLAGS_BSWAR; @@ -820,7 +849,7 @@ static int schizo_pci_bus(void *arg) { struct schizo_softc *sc = arg; - uint64_t afar, afsr, csr, iommu; + uint64_t afar, afsr, csr, iommu, xstat; uint32_t status; u_int fatal; @@ -832,6 +861,10 @@ schizo_pci_bus(void *arg) afsr = SCHIZO_PCI_READ_8(sc, STX_PCI_AFSR); csr = SCHIZO_PCI_READ_8(sc, STX_PCI_CTRL); iommu = SCHIZO_PCI_READ_8(sc, STX_PCI_IOMMU); + if ((sc->sc_flags & SCHIZO_FLAGS_XMODE) != 0) + xstat = SCHIZO_PCI_READ_8(sc, XMS_PCI_X_ERR_STAT); + else + xstat = 0; status = PCIB_READ_CONFIG(sc->sc_dev, sc->sc_pci_secbus, STX_CS_DEVICE, STX_CS_FUNC, PCIR_STATUS, 2); @@ -858,14 +891,19 @@ schizo_pci_bus(void *arg) STX_PCI_AFSR_P_RTRY | STX_PCI_AFSR_P_PERR | STX_PCI_AFSR_P_TTO | STX_PCI_AFSR_P_UNUS)) != 0) fatal = 1; + if (xstat & (XMS_PCI_X_ERR_STAT_P_SC_DSCRD | + XMS_PCI_X_ERR_STAT_P_SC_TTO | XMS_PCI_X_ERR_STAT_P_SDSTAT | + XMS_PCI_X_ERR_STAT_P_SMMU | XMS_PCI_X_ERR_STAT_P_CDSTAT | + XMS_PCI_X_ERR_STAT_P_CMMU | XMS_PCI_X_ERR_STAT_PERR_RCV)) + fatal = 1; if (fatal == 0) sc->sc_stats_pci_non_fatal++; device_printf(sc->sc_dev, "PCI bus %c error AFAR %#llx AFSR %#llx " - "PCI CSR %#llx IOMMU %#llx STATUS %#llx\n", 'A' + sc->sc_half, - (unsigned long long)afar, (unsigned long long)afsr, - (unsigned long long)csr, (unsigned long long)iommu, - (unsigned long long)status); + "PCI CSR %#llx IOMMU %#llx PCI-X %#llx STATUS %#x\n", + 'A' + sc->sc_half, (unsigned long long)afar, + (unsigned long long)afsr, (unsigned long long)csr, + (unsigned long long)iommu, (unsigned long long)xstat, status); /* Clear the error bits that we caught. */ PCIB_WRITE_CONFIG(sc->sc_dev, sc->sc_pci_secbus, STX_CS_DEVICE, @@ -873,6 +911,8 @@ schizo_pci_bus(void *arg) SCHIZO_PCI_WRITE_8(sc, STX_PCI_CTRL, csr); SCHIZO_PCI_WRITE_8(sc, STX_PCI_AFSR, afsr); SCHIZO_PCI_WRITE_8(sc, STX_PCI_IOMMU, iommu); + if ((sc->sc_flags & SCHIZO_FLAGS_XMODE) != 0) + SCHIZO_PCI_WRITE_8(sc, XMS_PCI_X_ERR_STAT, xstat); mtx_unlock_spin(sc->sc_mtx); @@ -945,7 +985,7 @@ schizo_cdma(void *arg) { struct schizo_softc *sc = arg; - atomic_store_rel_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE); + atomic_store_rel_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_RECEIVED); return (FILTER_HANDLED); } @@ -954,17 +994,18 @@ schizo_iommu_init(struct schizo_softc *s { /* Punch in our copies. */ - sc->sc_is.is_bustag = rman_get_bustag(sc->sc_mem_res[STX_PCI]); - sc->sc_is.is_bushandle = rman_get_bushandle(sc->sc_mem_res[STX_PCI]); - sc->sc_is.is_iommu = STX_PCI_IOMMU; - sc->sc_is.is_dtag = STX_PCI_IOMMU_TLB_TAG_DIAG; - sc->sc_is.is_ddram = STX_PCI_IOMMU_TLB_DATA_DIAG; - sc->sc_is.is_dqueue = STX_PCI_IOMMU_QUEUE_DIAG; - sc->sc_is.is_dva = STX_PCI_IOMMU_SVADIAG; - sc->sc_is.is_dtcmp = STX_PCI_IOMMU_TLB_CMP_DIAG; + sc->sc_is.sis_is.is_bustag = rman_get_bustag(sc->sc_mem_res[STX_PCI]); + sc->sc_is.sis_is.is_bushandle = + rman_get_bushandle(sc->sc_mem_res[STX_PCI]); + sc->sc_is.sis_is.is_iommu = STX_PCI_IOMMU; + sc->sc_is.sis_is.is_dtag = STX_PCI_IOMMU_TLB_TAG_DIAG; + sc->sc_is.sis_is.is_ddram = STX_PCI_IOMMU_TLB_DATA_DIAG; + sc->sc_is.sis_is.is_dqueue = STX_PCI_IOMMU_QUEUE_DIAG; + sc->sc_is.sis_is.is_dva = STX_PCI_IOMMU_SVADIAG; + sc->sc_is.sis_is.is_dtcmp = STX_PCI_IOMMU_TLB_CMP_DIAG; - iommu_init(device_get_nameunit(sc->sc_dev), &sc->sc_is, tsbsize, - dvmabase, 0); + iommu_init(device_get_nameunit(sc->sc_dev), + (struct iommu_state *)&sc->sc_is, tsbsize, dvmabase, 0); } static int @@ -1103,67 +1144,100 @@ schizo_read_ivar(device_t dev, device_t return (ENOENT); } -static int -schizo_dma_sync_stub(void *arg) +static void +schizo_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, bus_dmasync_op_t op) { struct timeval cur, end; - struct schizo_dma_sync *sds = arg; - struct schizo_softc *sc = sds->sds_sc; - uint32_t state; - - (void)PCIB_READ_CONFIG(sds->sds_ppb, sds->sds_bus, sds->sds_slot, - sds->sds_func, PCIR_VENDOR, 2); - for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, - SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) - ; - SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); - microuptime(&cur); - end.tv_sec = 1; - end.tv_usec = 0; - timevaladd(&end, &cur); - for (; (state = atomic_load_32(&sc->sc_cdma_state)) != - SCHIZO_CDMA_STATE_DONE && timevalcmp(&cur, &end, <=);) + struct schizo_iommu_state *sis = dt->dt_cookie; + struct schizo_softc *sc = sis->sis_sc; + int res; + + if ((map->dm_flags & DMF_STREAMED) != 0) { + iommu_dma_methods.dm_dmamap_sync(dt, map, op); + return; + } + + if ((map->dm_flags & DMF_LOADED) == 0) + return; + + if ((op & BUS_DMASYNC_POSTREAD) != 0) { + /* + * Note that in order to allow this function to be called from + * filters we would need to use a spin mutex for serialization + * but given that these disable interrupts we have to emulate + * one. + */ + for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, + SCHIZO_CDMA_STATE_IDLE, SCHIZO_CDMA_STATE_PENDING) == 0;) + ; + SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); - if (state != SCHIZO_CDMA_STATE_DONE) - panic("%s: DMA does not sync", __func__); - return (sds->sds_handler(sds->sds_arg)); + end.tv_sec = 1; + end.tv_usec = 0; + timevaladd(&end, &cur); + for (; (res = atomic_cmpset_rel_32(&sc->sc_cdma_state, + SCHIZO_CDMA_STATE_RECEIVED, SCHIZO_CDMA_STATE_IDLE)) == + 0 && timevalcmp(&cur, &end, <=);) + microuptime(&cur); + if (res == 0) + panic("%s: DMA does not sync", __func__); + } + + if ((op & BUS_DMASYNC_PREWRITE) != 0) + membar(Sync); } #define VIS_BLOCKSIZE 64 -static int -ichip_dma_sync_stub(void *arg) +static void +ichip_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, bus_dmasync_op_t op) { static u_char buf[VIS_BLOCKSIZE] __aligned(VIS_BLOCKSIZE); struct timeval cur, end; - struct schizo_dma_sync *sds = arg; - struct schizo_softc *sc = sds->sds_sc; + struct schizo_iommu_state *sis = dt->dt_cookie; + struct schizo_softc *sc = sis->sis_sc; register_t reg, s; - (void)PCIB_READ_CONFIG(sds->sds_ppb, sds->sds_bus, sds->sds_slot, - sds->sds_func, PCIR_VENDOR, 2); - SCHIZO_PCI_WRITE_8(sc, TOMXMS_PCI_DMA_SYNC_PEND, sds->sds_syncval); - microuptime(&cur); - end.tv_sec = 1; - end.tv_usec = 0; - timevaladd(&end, &cur); - for (; ((reg = SCHIZO_PCI_READ_8(sc, TOMXMS_PCI_DMA_SYNC_PEND)) & - sds->sds_syncval) != 0 && timevalcmp(&cur, &end, <=);) + if ((map->dm_flags & DMF_STREAMED) != 0) { + iommu_dma_methods.dm_dmamap_sync(dt, map, op); + return; + } + + if ((map->dm_flags & DMF_LOADED) == 0) + return; + + if ((op & BUS_DMASYNC_POSTREAD) != 0) { + if (sc->sc_mode == SCHIZO_MODE_XMS) + mtx_lock_spin(&sc->sc_sync_mtx); + SCHIZO_PCI_WRITE_8(sc, TOMXMS_PCI_DMA_SYNC_PEND, + sc->sc_sync_val); microuptime(&cur); - if ((reg & sds->sds_syncval) != 0) - panic("%s: DMA does not sync", __func__); + end.tv_sec = 1; + end.tv_usec = 0; + timevaladd(&end, &cur); + for (; ((reg = SCHIZO_PCI_READ_8(sc, + TOMXMS_PCI_DMA_SYNC_PEND)) & sc->sc_sync_val) != 0 && + timevalcmp(&cur, &end, <=);) + microuptime(&cur); + if ((reg & sc->sc_sync_val) != 0) + panic("%s: DMA does not sync", __func__); + if (sc->sc_mode == SCHIZO_MODE_XMS) + mtx_unlock_spin(&sc->sc_sync_mtx); + else if ((sc->sc_flags & SCHIZO_FLAGS_BSWAR) != 0) { + s = intr_disable(); + reg = rd(fprs); + wr(fprs, reg | FPRS_FEF, 0); + __asm __volatile("stda %%f0, [%0] %1" + : : "r" (buf), "n" (ASI_BLK_COMMIT_S)); + membar(Sync); + wr(fprs, reg, 0); + intr_restore(s); + return; + } + } - if ((sc->sc_flags & SCHIZO_FLAGS_BSWAR) != 0) { - s = intr_disable(); - reg = rd(fprs); - wr(fprs, reg | FPRS_FEF, 0); - __asm __volatile("stda %%f0, [%0] %1" - : : "r" (buf), "n" (ASI_BLK_COMMIT_S)); + if ((op & BUS_DMASYNC_PREWRITE) != 0) membar(Sync); - wr(fprs, reg, 0); - intr_restore(s); - } - return (sds->sds_handler(sds->sds_arg)); } static void @@ -1209,12 +1283,9 @@ schizo_setup_intr(device_t dev, device_t int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { - devclass_t pci_devclass; - device_t cdev, pdev, pcidev; - struct schizo_dma_sync *sds; struct schizo_softc *sc; u_long vec; - int error, found; + int error; sc = device_get_softc(dev); /* @@ -1252,112 +1323,10 @@ schizo_setup_intr(device_t dev, device_t "invalid interrupt controller for vector 0x%lx\n", vec); return (EINVAL); } - - /* - * Install a a wrapper for CDMA flushing/syncing for devices - * behind PCI-PCI bridges if possible. - */ - pcidev = NULL; - found = 0; - pci_devclass = devclass_find("pci"); - for (cdev = child; cdev != dev; cdev = pdev) { - pdev = device_get_parent(cdev); - if (pcidev == NULL) { - if (device_get_devclass(pdev) != pci_devclass) - continue; - pcidev = cdev; - continue; - } - if (pci_get_class(cdev) == PCIC_BRIDGE && - pci_get_subclass(cdev) == PCIS_BRIDGE_PCI) - found = 1; - } - if ((sc->sc_flags & SCHIZO_FLAGS_CDMA) != 0) { - sds = malloc(sizeof(*sds), M_DEVBUF, M_NOWAIT | M_ZERO); - if (sds == NULL) - return (ENOMEM); - if (found != 0 && pcidev != NULL) { - sds->sds_sc = sc; - sds->sds_arg = arg; - sds->sds_ppb = - device_get_parent(device_get_parent(pcidev)); - sds->sds_bus = pci_get_bus(pcidev); - sds->sds_slot = pci_get_slot(pcidev); - sds->sds_func = pci_get_function(pcidev); - sds->sds_syncval = 1ULL << INTINO(vec); - if (bootverbose) - device_printf(dev, "installed DMA sync " - "wrapper for device %d.%d on bus %d\n", - sds->sds_slot, sds->sds_func, - sds->sds_bus); - -#define DMA_SYNC_STUB \ - (sc->sc_mode == SCHIZO_MODE_SCZ ? schizo_dma_sync_stub : \ - ichip_dma_sync_stub) - - if (intr == NULL) { - sds->sds_handler = filt; - error = bus_generic_setup_intr(dev, child, - ires, flags, DMA_SYNC_STUB, intr, sds, - cookiep); - } else { - sds->sds_handler = (driver_filter_t *)intr; - error = bus_generic_setup_intr(dev, child, - ires, flags, filt, (driver_intr_t *) - DMA_SYNC_STUB, sds, cookiep); - } - -#undef DMA_SYNC_STUB - - } else - error = bus_generic_setup_intr(dev, child, ires, - flags, filt, intr, arg, cookiep); - if (error != 0) { - free(sds, M_DEVBUF); - return (error); - } - sds->sds_cookie = *cookiep; - *cookiep = sds; - return (error); - } else if (found != 0) - device_printf(dev, "WARNING: using devices behind PCI-PCI " - "bridges may cause data corruption\n"); return (bus_generic_setup_intr(dev, child, ires, flags, filt, intr, arg, cookiep)); } -static int -schizo_teardown_intr(device_t dev, device_t child, struct resource *vec, - void *cookie) -{ - struct schizo_dma_sync *sds; - struct schizo_softc *sc; - int error; - - sc = device_get_softc(dev); - if ((sc->sc_flags & SCHIZO_FLAGS_CDMA) != 0) { - sds = cookie; - error = bus_generic_teardown_intr(dev, child, vec, - sds->sds_cookie); - if (error == 0) - free(sds, M_DEVBUF); - return (error); - } - return (bus_generic_teardown_intr(dev, child, vec, cookie)); -} - -static int -schizo_describe_intr(device_t dev, device_t child, struct resource *vec, - void *cookie, const char *descr) -{ - struct schizo_softc *sc; - - sc = device_get_softc(dev); - if ((sc->sc_flags & SCHIZO_FLAGS_CDMA) != 0) - cookie = ((struct schizo_dma_sync *)cookie)->sds_cookie; - return (bus_generic_describe_intr(dev, child, vec, cookie, descr)); -} - static struct resource * schizo_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -1476,7 +1445,7 @@ schizo_release_resource(device_t bus, de } static bus_dma_tag_t -schizo_get_dma_tag(device_t bus, device_t child) +schizo_get_dma_tag(device_t bus, device_t child __unused) { struct schizo_softc *sc; @@ -1485,7 +1454,7 @@ schizo_get_dma_tag(device_t bus, device_ } static phandle_t -schizo_get_node(device_t bus, device_t dev) +schizo_get_node(device_t bus, device_t child __unused) { struct schizo_softc *sc; @@ -1494,6 +1463,42 @@ schizo_get_node(device_t bus, device_t d return (sc->sc_node); } +static void +schizo_setup_device(device_t bus, device_t child) +{ + struct schizo_softc *sc; + uint64_t reg; + int capreg; + + sc = device_get_softc(bus); + /* + * Disable bus parking in order to work around a bus hang caused by + * Casinni/Skyhawk combinations. + */ + if (OF_getproplen(ofw_bus_get_node(child), "pci-req-removal") >= 0) + SCHIZO_PCI_SET(sc, STX_PCI_CTRL, SCHIZO_PCI_READ_8(sc, + STX_PCI_CTRL) & ~STX_PCI_CTRL_ARB_PARK); + + if (sc->sc_mode == SCHIZO_MODE_XMS) { + /* XMITS NCPQ WAR: set outstanding split transactions to 1. */ + if ((sc->sc_flags & SCHIZO_FLAGS_XMODE) != 0 && + (pci_read_config(child, PCIR_HDRTYPE, 1) & + PCIM_HDRTYPE) != PCIM_HDRTYPE_BRIDGE && + pci_find_cap(child, PCIY_PCIX, &capreg) == 0) + pci_write_config(child, capreg + PCIXR_COMMAND, + pci_read_config(child, capreg + PCIXR_COMMAND, + 2) & 0x7c, 2); + /* XMITS 3.x WAR: set BUGCNTL iff value is unexpected. */ + if (sc->sc_mrev >= 4) { + reg = ((sc->sc_flags & SCHIZO_FLAGS_XMODE) != 0 ? + 0xa0UL : 0xffUL) << XMS_PCI_X_DIAG_BUGCNTL_SHIFT; + if ((SCHIZO_PCI_READ_8(sc, XMS_PCI_X_DIAG) & + XMS_PCI_X_DIAG_BUGCNTL_MASK) != reg) + SCHIZO_PCI_SET(sc, XMS_PCI_X_DIAG, reg); + } + } +} + static bus_space_tag_t schizo_alloc_bus_tag(struct schizo_softc *sc, int type) { Modified: head/sys/sparc64/pci/schizoreg.h ============================================================================== --- head/sys/sparc64/pci/schizoreg.h Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/sparc64/pci/schizoreg.h Sat Mar 26 16:49:12 2011 (r220038) @@ -55,9 +55,13 @@ #define STX_PCI_AFSR 0x02010 #define STX_PCI_AFAR 0x02018 #define STX_PCI_DIAG 0x02020 +#define XMS_PCI_PARITY_DETECT 0x02040 #define TOM_PCI_IOC_CSR 0x02248 #define TOM_PCI_IOC_TAG 0x02290 #define TOM_PCI_IOC_DATA 0x02290 +#define XMS_PCI_X_ERR_STAT 0x02300 +#define XMS_PCI_X_DIAG 0x02308 +#define XMS_PCI_UPPER_RETRY_COUNTER 0x02310 #define STX_PCI_STRBUF 0x02800 #define STX_PCI_STRBUF_CTXFLUSH 0x02818 #define STX_PCI_IOMMU_SVADIAG 0x0a400 @@ -68,7 +72,7 @@ #define STX_PCI_IOBIO_DIAG 0x0a808 #define STX_PCI_STRBUF_CTXMATCH 0x10000 -/* PCI configuration/idle check diagnostic registers */ +/* PCI configuration/idle check diagnostic register */ #define SX_PCI_CFG_ICD_PCI_2_0_COMPAT 0x0000000000008000ULL #define SX_PCI_CFG_ICD_DMAW_PERR_IEN 0x0000000000004000ULL #define SX_PCI_CFG_ICD_IFC_NOT_IDLE 0x0000000000000010ULL @@ -77,7 +81,7 @@ #define SX_PCI_CFG_ICD_PBM_NOT_IDLE 0x0000000000000002ULL #define SX_PCI_CFG_ICD_STC_NOT_IDLE 0x0000000000000001ULL -/* PCI IOMMU control registers */ +/* PCI IOMMU control register */ #define TOM_PCI_IOMMU_ERR_BAD_VA 0x0000000010000000ULL #define TOM_PCI_IOMMU_ERR_ILLTSBTBW 0x0000000008000000ULL #define TOM_PCI_IOMMU_ECC_ERR 0x0000000006000000ULL @@ -94,6 +98,7 @@ #define TOM_PCI_CTRL_DTO_ERR 0x4000000000000000ULL #define TOM_PCI_CTRL_DTO_IEN 0x2000000000000000ULL #define SCZ_PCI_CTRL_ESLCK 0x0008000000000000ULL +#define XMS_PCI_CTRL_DMA_WR_PERR 0x0008000000000000ULL #define SCZ_PCI_CTRL_ERRSLOT 0x0007000000000000ULL #define STX_PCI_CTRL_TTO_ERR 0x0000004000000000ULL #define STX_PCI_CTRL_RTRY_ERR 0x0000002000000000ULL @@ -101,16 +106,19 @@ #define SCZ_PCI_CTRL_SBH_ERR 0x0000000800000000ULL #define STX_PCI_CTRL_SERR 0x0000000400000000ULL #define SCZ_PCI_CTRL_PCISPD 0x0000000200000000ULL +#define XMS_PCI_CTRL_X_MODE 0x0000000100000000ULL #define TOM_PCI_CTRL_PRM 0x0000000040000000ULL #define TOM_PCI_CTRL_PRO 0x0000000020000000ULL #define TOM_PCI_CTRL_PRL 0x0000000010000000ULL #define STX_PCI_CTRL_PTO 0x0000000003000000ULL +#define XMS_PCI_CTRL_X_ERRINT_EN 0x0000000000100000ULL #define STX_PCI_CTRL_MMU_IEN 0x0000000000080000ULL #define STX_PCI_CTRL_SBH_IEN 0x0000000000040000ULL #define STX_PCI_CTRL_ERR_IEN 0x0000000000020000ULL #define STX_PCI_CTRL_ARB_PARK 0x0000000000010000ULL #define SCZ_PCI_CTRL_PCIRST 0x0000000000000100ULL #define STX_PCI_CTRL_ARB_MASK 0x00000000000000ffULL +#define XMS_PCI_CTRL_XMITS10_ARB_MASK 0x000000000000000fULL /* PCI asynchronous fault status register */ #define STX_PCI_AFSR_P_MA 0x8000000000000000ULL @@ -160,6 +168,32 @@ #define TOM_PCI_IOC_CPRO 0x0000000000000002ULL #define TOM_PCI_IOC_CPRL 0x0000000000000001ULL +/* XMITS PCI-X error status register */ +#define XMS_PCI_X_ERR_STAT_P_SC_DSCRD 0x8000000000000000ULL +#define XMS_PCI_X_ERR_STAT_P_SC_TTO 0x4000000000000000ULL +#define XMS_PCI_X_ERR_STAT_P_SDSTAT 0x2000000000000000ULL +#define XMS_PCI_X_ERR_STAT_P_SMMU 0x1000000000000000ULL +#define XMS_PCI_X_ERR_STAT_P_CDSTAT 0x0800000000000000ULL +#define XMS_PCI_X_ERR_STAT_P_CMMU 0x0400000000000000ULL +#define XMS_PCI_X_ERR_STAT_S_SC_DSCRD 0x0080000000000000ULL +#define XMS_PCI_X_ERR_STAT_S_SC_TTO 0x0040000000000000ULL +#define XMS_PCI_X_ERR_STAT_S_SDSTAT 0x0020000000000000ULL +#define XMS_PCI_X_ERR_STAT_S_SMMU 0x0010000000000000ULL +#define XMS_PCI_X_ERR_STAT_S_CDSTAT 0x0008000000000000ULL +#define XMS_PCI_X_ERR_STAT_S_CMMU 0x0004000000000000ULL +#define XMS_PCI_X_ERR_STAT_PERR_RCV_IEN 0x0000000400000000ULL +#define XMS_PCI_X_ERR_STAT_PERR_RCV 0x0000000200000000ULL +#define XMS_PCI_X_ERR_STAT_SERR_ON_PERR 0x0000000100000000ULL + +/* XMITS PCI-X diagnostic register */ +#define XMS_PCI_X_DIAG_DIS_FAIR 0x0000000000080000ULL +#define XMS_PCI_X_DIAG_CRCQ_VALID 0x0000000000040000ULL +#define XMS_PCI_X_DIAG_SRCQ_ONE 0x0000000000000200ULL +#define XMS_PCI_X_DIAG_CRCQ_FLUSH 0x0000000000000100ULL +#define XMS_PCI_X_DIAG_BUGCNTL_MASK 0x0000ffff00000000ULL +#define XMS_PCI_X_DIAG_BUGCNTL_SHIFT 32 +#define XMS_PCI_X_DIAG_SRCQ_MASK 0x00000000000000ffULL + /* Controller configuration and status registers */ /* Note that these are shared on Schizo but per-PBM on Tomatillo. */ #define STX_CTRL_BUS_ERRLOG 0x00018 Modified: head/sys/sparc64/pci/schizovar.h ============================================================================== --- head/sys/sparc64/pci/schizovar.h Sat Mar 26 13:58:44 2011 (r220037) +++ head/sys/sparc64/pci/schizovar.h Sat Mar 26 16:49:12 2011 (r220038) @@ -31,9 +31,21 @@ #ifndef _SPARC64_PCI_SCHIZOVAR_H_ #define _SPARC64_PCI_SCHIZOVAR_H_ +struct schizo_softc; + +struct schizo_iommu_state { + struct iommu_state sis_is; + struct schizo_softc *sis_sc; +}; + struct schizo_softc { + struct bus_dma_methods sc_dma_methods; + device_t sc_dev; + struct mtx sc_sync_mtx; + uint64_t sc_sync_val; + struct mtx *sc_mtx; phandle_t sc_node; @@ -45,22 +57,24 @@ struct schizo_softc { u_int sc_flags; #define SCHIZO_FLAGS_BSWAR (1 << 0) -#define SCHIZO_FLAGS_CDMA (1 << 1) +#define SCHIZO_FLAGS_XMODE (1 << 1) bus_addr_t sc_cdma_clr; uint32_t sc_cdma_state; -#define SCHIZO_CDMA_STATE_DONE (1 << 0) +#define SCHIZO_CDMA_STATE_IDLE (1 << 0) #define SCHIZO_CDMA_STATE_PENDING (1 << 1) +#define SCHIZO_CDMA_STATE_RECEIVED (1 << 2) u_int sc_half; uint32_t sc_ign; uint32_t sc_ver; + uint32_t sc_mrev; struct resource *sc_mem_res[TOM_NREG]; struct resource *sc_irq_res[STX_NINTR]; void *sc_ihand[STX_NINTR]; - struct iommu_state sc_is; + struct schizo_iommu_state sc_is; struct rman sc_pci_mem_rman; struct rman sc_pci_io_rman; From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 16:52:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB7F106566B; Sat, 26 Mar 2011 16:52:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2991D8FC16; Sat, 26 Mar 2011 16:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QGqWXA027548; Sat, 26 Mar 2011 16:52:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QGqWP0027545; Sat, 26 Mar 2011 16:52:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103261652.p2QGqWP0027545@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Mar 2011 16:52: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: r220039 - head/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 16:52:32 -0000 Author: marius Date: Sat Mar 26 16:52:31 2011 New Revision: 220039 URL: http://svn.freebsd.org/changeset/base/220039 Log: - A closer inspection of the OpenSolaris code indicates that the DMA syncing for Hummingbird and Sabre bridges should be applied with every BUS_DMASYNC_POSTREAD instead of in a wrapper around interrupt handlers for devices behind PCI-PCI bridges only as suggested by the documentation (code for the latter actually exists in OpenSolaris but is disabled by default), which also makes more sense. - Take advantage of the ofw_pci_setup_device method introduced in r220038 for disabling bus parking for certain EBus bridges in order to - Mark some unused parameters as such. Modified: head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/psychovar.h Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Sat Mar 26 16:49:12 2011 (r220038) +++ head/sys/sparc64/pci/psycho.c Sat Mar 26 16:52:31 2011 (r220039) @@ -83,7 +83,8 @@ static void psycho_set_intr(struct psych driver_filter_t, driver_intr_t); static int psycho_find_intrmap(struct psycho_softc *, u_int, bus_addr_t *, bus_addr_t *, u_long *); -static driver_filter_t psycho_dma_sync_stub; +static void sabre_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, + bus_dmasync_op_t op); static void psycho_intr_enable(void *); static void psycho_intr_disable(void *); static void psycho_intr_assign(void *); @@ -110,18 +111,17 @@ static device_probe_t psycho_probe; static device_attach_t psycho_attach; static bus_read_ivar_t psycho_read_ivar; static bus_setup_intr_t psycho_setup_intr; -static bus_teardown_intr_t psycho_teardown_intr; static bus_alloc_resource_t psycho_alloc_resource; static bus_activate_resource_t psycho_activate_resource; static bus_deactivate_resource_t psycho_deactivate_resource; static bus_release_resource_t psycho_release_resource; -static bus_describe_intr_t psycho_describe_intr; static bus_get_dma_tag_t psycho_get_dma_tag; static pcib_maxslots_t psycho_maxslots; static pcib_read_config_t psycho_read_config; static pcib_write_config_t psycho_write_config; static pcib_route_interrupt_t psycho_route_interrupt; static ofw_bus_get_node_t psycho_get_node; +static ofw_pci_setup_device_t psycho_setup_device; static device_method_t psycho_methods[] = { /* Device interface */ @@ -135,12 +135,12 @@ static device_method_t psycho_methods[] DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, psycho_read_ivar), DEVMETHOD(bus_setup_intr, psycho_setup_intr), - DEVMETHOD(bus_teardown_intr, psycho_teardown_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_alloc_resource, psycho_alloc_resource), DEVMETHOD(bus_activate_resource, psycho_activate_resource), DEVMETHOD(bus_deactivate_resource, psycho_deactivate_resource), DEVMETHOD(bus_release_resource, psycho_release_resource), - DEVMETHOD(bus_describe_intr, psycho_describe_intr), + DEVMETHOD(bus_describe_intr, bus_generic_describe_intr), DEVMETHOD(bus_get_dma_tag, psycho_get_dma_tag), /* pcib interface */ @@ -152,6 +152,9 @@ static device_method_t psycho_methods[] /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, psycho_get_node), + /* ofw_pci interface */ + DEVMETHOD(ofw_pci_setup_device, psycho_setup_device), + KOBJMETHOD_END }; @@ -178,17 +181,6 @@ struct psycho_icarg { bus_addr_t pica_clr; }; -struct psycho_dma_sync { - struct psycho_softc *pds_sc; - driver_filter_t *pds_handler; /* handler to call */ - void *pds_arg; /* argument for the handler */ - void *pds_cookie; /* parent bus int. cookie */ - device_t pds_ppb; /* farest PCI-PCI bridge */ - uint8_t pds_bus; /* bus of farest PCI dev. */ - uint8_t pds_slot; /* slot of farest PCI dev. */ - uint8_t pds_func; /* func. of farest PCI dev. */ -}; - #define PSYCHO_READ8(sc, off) \ bus_read_8((sc)->sc_mem_res, (off)) #define PSYCHO_WRITE8(sc, off, v) \ @@ -288,16 +280,14 @@ psycho_probe(device_t dev) static int psycho_attach(device_t dev) { - char name[sizeof("pci108e,1000")]; struct psycho_icarg *pica; struct psycho_softc *asc, *sc, *osc; struct ofw_pci_ranges *range; const struct psycho_desc *desc; bus_addr_t intrclr, intrmap; uint64_t csr, dr; - phandle_t child, node; + phandle_t node; uint32_t dvmabase, prop, prop_array[2]; - int32_t rev; u_int rerun, ver; int i, j; @@ -387,23 +377,9 @@ psycho_attach(device_t dev) /* Set up the PCI control and PCI diagnostic registers. */ - /* - * Revision 0 EBus bridges have a bug which prevents them from - * working when bus parking is enabled. - */ - rev = -1; csr = PCICTL_READ8(sc, PCR_CS); csr &= ~PCICTL_ARB_PARK; - for (child = OF_child(node); child != 0; child = OF_peer(child)) { - if (OF_getprop(child, "name", name, sizeof(name)) == -1) - continue; - if ((strcmp(name, "ebus") == 0 || - strcmp(name, "pci108e,1000") == 0) && - OF_getprop(child, "revision-id", &rev, sizeof(rev)) > 0 && - rev == 0) - break; - } - if (rev != 0 && OF_getproplen(node, "no-bus-parking") < 0) + if (OF_getproplen(node, "no-bus-parking") < 0) csr |= PCICTL_ARB_PARK; /* Workarounds for version specific bugs. */ @@ -553,15 +529,19 @@ psycho_attach(device_t dev) * * For the moment, 32KB should be more than enough. */ + memcpy(&sc->sc_dma_methods, &iommu_dma_methods, + sizeof(sc->sc_dma_methods)); sc->sc_is = malloc(sizeof(struct iommu_state), M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->sc_is == NULL) panic("%s: malloc iommu_state failed", __func__); sc->sc_is->is_flags = IOMMU_PRESERVE_PROM; - if (sc->sc_mode == PSYCHO_MODE_SABRE) + if (sc->sc_mode == PSYCHO_MODE_SABRE) { + sc->sc_dma_methods.dm_dmamap_sync = + sabre_dmamap_sync; sc->sc_is->is_pmaxaddr = IOMMU_MAXADDR(SABRE_IOMMU_BITS); - else + } else sc->sc_is->is_pmaxaddr = IOMMU_MAXADDR(PSYCHO_IOMMU_BITS); sc->sc_is->is_sb[0] = sc->sc_is->is_sb[1] = 0; @@ -587,7 +567,7 @@ psycho_attach(device_t dev) panic("%s: bus_dma_tag_create failed", __func__); /* Customize the tag. */ sc->sc_pci_dmat->dt_cookie = sc->sc_is; - sc->sc_pci_dmat->dt_mt = &iommu_dma_methods; + sc->sc_pci_dmat->dt_mt = &sc->sc_dma_methods; i = OF_getprop(node, "bus-range", (void *)prop_array, sizeof(prop_array)); @@ -1092,15 +1072,20 @@ psycho_read_ivar(device_t dev, device_t return (ENOENT); } -static int -psycho_dma_sync_stub(void *arg) +static void +sabre_dmamap_sync(bus_dma_tag_t dt, bus_dmamap_t map, bus_dmasync_op_t op) { - struct psycho_dma_sync *pds = arg; + struct iommu_state *is = dt->dt_cookie; + + if ((map->dm_flags & DMF_LOADED) == 0) + return; + + if ((op & BUS_DMASYNC_POSTREAD) != 0) + (void)bus_space_read_8(is->is_bustag, is->is_bushandle, + PSR_DMA_WRITE_SYNC); - (void)PCIB_READ_CONFIG(pds->pds_ppb, pds->pds_bus, pds->pds_slot, - pds->pds_func, PCIR_VENDOR, 2); - (void)PSYCHO_READ8(pds->pds_sc, PSR_DMA_WRITE_SYNC); - return (pds->pds_handler(pds->pds_arg)); + if ((op & BUS_DMASYNC_PREWRITE) != 0) + membar(Sync); } static void @@ -1146,16 +1131,8 @@ psycho_setup_intr(device_t dev, device_t int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { - struct { - int apb:1; - int ppb:1; - } found; - devclass_t pci_devclass; - device_t cdev, pdev, pcidev; struct psycho_softc *sc; - struct psycho_dma_sync *pds; u_long vec; - int error; sc = device_get_softc(dev); /* @@ -1168,114 +1145,10 @@ psycho_setup_intr(device_t dev, device_t device_printf(dev, "invalid interrupt vector 0x%lx\n", vec); return (EINVAL); } - - /* - * The Sabre-APB-combination does not automatically flush DMA - * write data for devices behind additional PCI-PCI bridges - * underneath the APB PCI-PCI bridge. The procedure for a - * manual flush is to do a PIO read on the far side of the - * farthest PCI-PCI bridge followed by a read of the PCI DMA - * write sync register of the Sabre. - */ - if (sc->sc_mode == PSYCHO_MODE_SABRE) { - pds = malloc(sizeof(*pds), M_DEVBUF, M_NOWAIT | M_ZERO); - if (pds == NULL) - return (ENOMEM); - pcidev = NULL; - found.apb = found.ppb = 0; - pci_devclass = devclass_find("pci"); - for (cdev = child; cdev != dev; cdev = pdev) { - pdev = device_get_parent(cdev); - if (pcidev == NULL) { - if (device_get_devclass(pdev) != pci_devclass) - continue; - pcidev = cdev; - continue; - } - /* - * NB: APB would also match as PCI-PCI bridges. - */ - if (pci_get_vendor(cdev) == 0x108e && - pci_get_device(cdev) == 0x5000) { - found.apb = 1; - break; - } - if (pci_get_class(cdev) == PCIC_BRIDGE && - pci_get_subclass(cdev) == PCIS_BRIDGE_PCI) - found.ppb = 1; - } - if (found.apb && found.ppb && pcidev != NULL) { - pds->pds_sc = sc; - pds->pds_arg = arg; - pds->pds_ppb = - device_get_parent(device_get_parent(pcidev)); - pds->pds_bus = pci_get_bus(pcidev); - pds->pds_slot = pci_get_slot(pcidev); - pds->pds_func = pci_get_function(pcidev); - if (bootverbose) - device_printf(dev, "installed DMA sync " - "wrapper for device %d.%d on bus %d\n", - pds->pds_slot, pds->pds_func, - pds->pds_bus); - if (intr == NULL) { - pds->pds_handler = filt; - error = bus_generic_setup_intr(dev, child, - ires, flags, psycho_dma_sync_stub, intr, - pds, cookiep); - } else { - pds->pds_handler = (driver_filter_t *)intr; - error = bus_generic_setup_intr(dev, child, - ires, flags, filt, - (driver_intr_t *)psycho_dma_sync_stub, - pds, cookiep); - } - } else - error = bus_generic_setup_intr(dev, child, ires, - flags, filt, intr, arg, cookiep); - if (error != 0) { - free(pds, M_DEVBUF); - return (error); - } - pds->pds_cookie = *cookiep; - *cookiep = pds; - return (error); - } return (bus_generic_setup_intr(dev, child, ires, flags, filt, intr, arg, cookiep)); } -static int -psycho_teardown_intr(device_t dev, device_t child, struct resource *vec, - void *cookie) -{ - struct psycho_softc *sc; - struct psycho_dma_sync *pds; - int error; - - sc = device_get_softc(dev); - if (sc->sc_mode == PSYCHO_MODE_SABRE) { - pds = cookie; - error = bus_generic_teardown_intr(dev, child, vec, - pds->pds_cookie); - if (error == 0) - free(pds, M_DEVBUF); - return (error); - } - return (bus_generic_teardown_intr(dev, child, vec, cookie)); -} - -static int -psycho_describe_intr(device_t dev, device_t child, struct resource *vec, - void *cookie, const char *descr) -{ - struct psycho_softc *sc; - - sc = device_get_softc(dev); - if (sc->sc_mode == PSYCHO_MODE_SABRE) - cookie = ((struct psycho_dma_sync *)cookie)->pds_cookie; - return (bus_generic_describe_intr(dev, child, vec, cookie, descr)); -} - static struct resource * psycho_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -1394,7 +1267,7 @@ psycho_release_resource(device_t bus, de } static bus_dma_tag_t -psycho_get_dma_tag(device_t bus, device_t child) +psycho_get_dma_tag(device_t bus, device_t child __unused) { struct psycho_softc *sc; @@ -1403,7 +1276,7 @@ psycho_get_dma_tag(device_t bus, device_ } static phandle_t -psycho_get_node(device_t bus, device_t dev) +psycho_get_node(device_t bus, device_t child __unused) { struct psycho_softc *sc; @@ -1412,6 +1285,25 @@ psycho_get_node(device_t bus, device_t d return (sc->sc_node); } +static void +psycho_setup_device(device_t bus, device_t child) +{ + struct psycho_softc *sc; + uint32_t rev; + + sc = device_get_softc(bus); + /* + * Revision 0 EBus bridges have a bug which prevents them from + * working when bus parking is enabled. + */ + if ((strcmp(ofw_bus_get_name(child), "ebus") == 0 || + strcmp(ofw_bus_get_name(child), "pci108e,1000") == 0) && + OF_getprop(ofw_bus_get_node(child), "revision-id", &rev, + sizeof(rev)) > 0 && rev == 0) + PCICTL_WRITE8(sc, PCR_CS, PCICTL_READ8(sc, PCR_CS) & + ~PCICTL_ARB_PARK); +} + static bus_space_tag_t psycho_alloc_bus_tag(struct psycho_softc *sc, int type) { Modified: head/sys/sparc64/pci/psychovar.h ============================================================================== --- head/sys/sparc64/pci/psychovar.h Sat Mar 26 16:49:12 2011 (r220038) +++ head/sys/sparc64/pci/psychovar.h Sat Mar 26 16:52:31 2011 (r220039) @@ -36,6 +36,8 @@ * per pair of psychos. */ struct psycho_softc { + struct bus_dma_methods sc_dma_methods; + device_t sc_dev; struct mtx *sc_mtx; From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 17:17:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61097106566C; Sat, 26 Mar 2011 17:17:24 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5165B8FC13; Sat, 26 Mar 2011 17:17:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QHHOWd028094; Sat, 26 Mar 2011 17:17:24 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QHHOx2028092; Sat, 26 Mar 2011 17:17:24 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201103261717.p2QHHOx2028092@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 26 Mar 2011 17:17: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: r220040 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 17:17:24 -0000 Author: jh Date: Sat Mar 26 17:17:24 2011 New Revision: 220040 URL: http://svn.freebsd.org/changeset/base/220040 Log: Fix some style issues in r219925. Reported by: bde MFC after: 1 month Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sat Mar 26 16:52:31 2011 (r220039) +++ head/sys/kern/vfs_mount.c Sat Mar 26 17:17:24 2011 (r220040) @@ -182,8 +182,7 @@ vfs_isopt_ro(const char *opt) if (strcmp(opt, "ro") == 0 || strcmp(opt, "rdonly") == 0 || strcmp(opt, "norw") == 0) return (1); - else - return (0); + return (0); } static int @@ -192,8 +191,7 @@ vfs_isopt_rw(const char *opt) if (strcmp(opt, "rw") == 0 || strcmp(opt, "noro") == 0) return (1); - else - return (0); + return (0); } /* @@ -228,7 +226,6 @@ vfs_equalopts(const char *opt1, const ch if ((vfs_isopt_ro(opt1) || vfs_isopt_rw(opt1)) && (vfs_isopt_ro(opt2) || vfs_isopt_rw(opt2))) return (1); - return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 19:09:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14876106564A; Sat, 26 Mar 2011 19:09:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 044EE8FC08; Sat, 26 Mar 2011 19:09:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QJ9S3R032040; Sat, 26 Mar 2011 19:09:28 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QJ9SVG032038; Sat, 26 Mar 2011 19:09:28 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201103261909.p2QJ9SVG032038@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 26 Mar 2011 19:09: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: r220041 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 19:09:29 -0000 Author: ru Date: Sat Mar 26 19:09:28 2011 New Revision: 220041 URL: http://svn.freebsd.org/changeset/base/220041 Log: Fixed sockets display somewhat (-L, -T, -x, -Lx, with and without -A). (I didn't try to fix negative TCP timers with -x.) MFC after: 3 days Modified: head/usr.bin/netstat/inet.c Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Sat Mar 26 17:17:24 2011 (r220040) +++ head/usr.bin/netstat/inet.c Sat Mar 26 19:09:28 2011 (r220041) @@ -411,44 +411,47 @@ protopr(u_long off, const char *name, in "Current listen queue sizes (qlen/incqlen/maxqlen)"); putchar('\n'); if (Aflag) - printf("%-8.8s ", "Tcpcb"); + printf("%-*s ", 2 * (int)sizeof(void *), "Tcpcb"); if (Lflag) - printf("%-5.5s %-14.14s %-22.22s\n", + printf((Aflag && !Wflag) ? + "%-5.5s %-14.14s %-18.18s" : + "%-5.5s %-14.14s %-22.22s", "Proto", "Listen", "Local Address"); - if (Tflag) + else if (Tflag) printf((Aflag && !Wflag) ? - "%-5.5s %-6.6s %-6.6s %-6.6s %-18.18s %s\n" : - "%-5.5s %-6.6s %-6.6s %-6.6s %-22.22s %s\n", + "%-5.5s %-6.6s %-6.6s %-6.6s %-18.18s %s" : + "%-5.5s %-6.6s %-6.6s %-6.6s %-22.22s %s", "Proto", "Rexmit", "OOORcv", "0-win", "Local Address", "Foreign Address"); + else { + printf((Aflag && !Wflag) ? + "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s" : + "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", + "Proto", "Recv-Q", "Send-Q", + "Local Address", "Foreign Address"); + if (!xflag) + printf(" (state)"); + } if (xflag) { - printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s ", + printf(" %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s", "R-MBUF", "S-MBUF", "R-CLUS", "S-CLUS", "R-HIWA", "S-HIWA", "R-LOWA", "S-LOWA", "R-BCNT", "S-BCNT", "R-BMAX", "S-BMAX"); - printf("%7.7s %7.7s %7.7s %7.7s %7.7s %7.7s %s\n", + printf(" %7.7s %7.7s %7.7s %7.7s %7.7s %7.7s", "rexmt", "persist", "keep", - "2msl", "delack", "rcvtime", - "(state)"); - } - if (!xflag && !Tflag) { - printf((Aflag && !Wflag) ? - "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s" : - "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", - "Proto", "Recv-Q", "Send-Q", - "Local Address", "Foreign Address"); - printf("(state)\n"); + "2msl", "delack", "rcvtime"); } + putchar('\n'); first = 0; } if (Lflag && so->so_qlimit == 0) continue; if (Aflag) { if (istcp) - printf("%8lx ", (u_long)inp->inp_ppcb); + printf("%*lx ", 2 * (int)sizeof(void *), (u_long)inp->inp_ppcb); else - printf("%8lx ", (u_long)so->so_pcb); + printf("%*lx ", 2 * (int)sizeof(void *), (u_long)so->so_pcb); } #ifdef INET6 if ((inp->inp_vflag & INP_IPV6) != 0) @@ -527,32 +530,21 @@ protopr(u_long off, const char *name, in #endif /* INET6 */ } if (xflag) { - if (Lflag) - printf("%21s %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u ", - " ", - so->so_rcv.sb_mcnt, so->so_snd.sb_mcnt, - so->so_rcv.sb_ccnt, so->so_snd.sb_ccnt, - so->so_rcv.sb_hiwat, so->so_snd.sb_hiwat, - so->so_rcv.sb_lowat, so->so_snd.sb_lowat, - so->so_rcv.sb_mbcnt, so->so_snd.sb_mbcnt, - so->so_rcv.sb_mbmax, so->so_snd.sb_mbmax); - else { - printf("%6u %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u ", - so->so_rcv.sb_mcnt, so->so_snd.sb_mcnt, - so->so_rcv.sb_ccnt, so->so_snd.sb_ccnt, - so->so_rcv.sb_hiwat, so->so_snd.sb_hiwat, - so->so_rcv.sb_lowat, so->so_snd.sb_lowat, - so->so_rcv.sb_mbcnt, so->so_snd.sb_mbcnt, - so->so_rcv.sb_mbmax, so->so_snd.sb_mbmax); - if (timer != NULL) - printf("%4d.%02d %4d.%02d %4d.%02d %4d.%02d %4d.%02d %4d.%02d ", - timer->tt_rexmt / 1000, (timer->tt_rexmt % 1000) / 10, - timer->tt_persist / 1000, (timer->tt_persist % 1000) / 10, - timer->tt_keep / 1000, (timer->tt_keep % 1000) / 10, - timer->tt_2msl / 1000, (timer->tt_2msl % 1000) / 10, - timer->tt_delack / 1000, (timer->tt_delack % 1000) / 10, - timer->t_rcvtime / 1000, (timer->t_rcvtime % 1000) / 10); - } + printf("%6u %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u %6u", + so->so_rcv.sb_mcnt, so->so_snd.sb_mcnt, + so->so_rcv.sb_ccnt, so->so_snd.sb_ccnt, + so->so_rcv.sb_hiwat, so->so_snd.sb_hiwat, + so->so_rcv.sb_lowat, so->so_snd.sb_lowat, + so->so_rcv.sb_mbcnt, so->so_snd.sb_mbcnt, + so->so_rcv.sb_mbmax, so->so_snd.sb_mbmax); + if (timer != NULL) + printf(" %4d.%02d %4d.%02d %4d.%02d %4d.%02d %4d.%02d %4d.%02d", + timer->tt_rexmt / 1000, (timer->tt_rexmt % 1000) / 10, + timer->tt_persist / 1000, (timer->tt_persist % 1000) / 10, + timer->tt_keep / 1000, (timer->tt_keep % 1000) / 10, + timer->tt_2msl / 1000, (timer->tt_2msl % 1000) / 10, + timer->tt_delack / 1000, (timer->tt_delack % 1000) / 10, + timer->t_rcvtime / 1000, (timer->t_rcvtime % 1000) / 10); } if (istcp && !Lflag && !xflag && !Tflag) { if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 20:40:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9202A106567E; Sat, 26 Mar 2011 20:40:33 +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 8182A8FC14; Sat, 26 Mar 2011 20:40:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QKeXvI035123; Sat, 26 Mar 2011 20:40:33 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QKeX2A035121; Sat, 26 Mar 2011 20:40:33 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201103262040.p2QKeX2A035121@svn.freebsd.org> From: Alan Cox Date: Sat, 26 Mar 2011 20:40: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: r220042 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 20:40:34 -0000 Author: alc Date: Sat Mar 26 20:40:33 2011 New Revision: 220042 URL: http://svn.freebsd.org/changeset/base/220042 Log: Eliminate an unused definition. Reviewed by: marcel Modified: head/sys/ia64/include/pmap.h Modified: head/sys/ia64/include/pmap.h ============================================================================== --- head/sys/ia64/include/pmap.h Sat Mar 26 19:09:28 2011 (r220041) +++ head/sys/ia64/include/pmap.h Sat Mar 26 20:40:33 2011 (r220042) @@ -54,9 +54,6 @@ #ifdef _KERNEL -#ifndef NKPT -#define NKPT 30 /* initial number of kernel page tables */ -#endif #define MAXKPT (PAGE_SIZE/sizeof(vm_offset_t)) #define vtophys(va) pmap_kextract((vm_offset_t)(va)) From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 21:12:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C92B5106564A; Sat, 26 Mar 2011 21:12:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA0BE8FC0A; Sat, 26 Mar 2011 21:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QLCrNt036310; Sat, 26 Mar 2011 21:12:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QLCrQl036308; Sat, 26 Mar 2011 21:12:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103262112.p2QLCrQl036308@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 26 Mar 2011 21:12: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: r220043 - head/gnu/usr.bin/gdb/libgdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 21:12:54 -0000 Author: kib Date: Sat Mar 26 21:12:53 2011 New Revision: 220043 URL: http://svn.freebsd.org/changeset/base/220043 Log: Print the raw value of si_code, that is esp. useful for undecoded values. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/gnu/usr.bin/gdb/libgdb/fbsd-threads.c Modified: head/gnu/usr.bin/gdb/libgdb/fbsd-threads.c ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/fbsd-threads.c Sat Mar 26 20:40:33 2011 (r220042) +++ head/gnu/usr.bin/gdb/libgdb/fbsd-threads.c Sat Mar 26 21:12:53 2011 (r220043) @@ -1393,9 +1393,10 @@ fbsd_thread_signal_cmd (char *exp, int f code = "UNKNOWN"; break; } - printf_filtered("si_code %s si_pid %d si_uid %d si_status %x si_addr %p\n", - code, ti.ti_siginfo.si_pid, ti.ti_siginfo.si_uid, ti.ti_siginfo.si_status, - ti.ti_siginfo.si_addr); + printf_filtered("si_code %s (%d) si_pid %d si_uid %d si_status %x " + "si_addr %p\n", + code, ti.ti_siginfo.si_code, ti.ti_siginfo.si_pid, ti.ti_siginfo.si_uid, + ti.ti_siginfo.si_status, ti.ti_siginfo.si_addr); } } From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 21:29:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A70A106566C; Sat, 26 Mar 2011 21:29:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 007278FC16; Sat, 26 Mar 2011 21:29:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QLTdri036939; Sat, 26 Mar 2011 21:29:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QLTdZF036936; Sat, 26 Mar 2011 21:29:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103262129.p2QLTdZF036936@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 26 Mar 2011 21:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220044 - stable/8/sys/dev/vte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 21:29:40 -0000 Author: yongari Date: Sat Mar 26 21:29:39 2011 New Revision: 220044 URL: http://svn.freebsd.org/changeset/base/220044 Log: MFC r219787: Correct broadcast frame handling. Setting bit6 of MCR0 register enables broadcast filtering. Make sure to clear the bit to receive broadcast frames. While I'm here rename the bit definition to reflect reality. Reported by: brad@OpenBSD Modified: stable/8/sys/dev/vte/if_vte.c stable/8/sys/dev/vte/if_vtereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/vte/if_vte.c ============================================================================== --- stable/8/sys/dev/vte/if_vte.c Sat Mar 26 21:12:53 2011 (r220043) +++ stable/8/sys/dev/vte/if_vte.c Sat Mar 26 21:29:39 2011 (r220044) @@ -1963,9 +1963,10 @@ vte_rxfilter(struct vte_softc *sc) } mcr = CSR_READ_2(sc, VTE_MCR0); - mcr &= ~(MCR0_PROMISC | MCR0_BROADCAST | MCR0_MULTICAST); + mcr &= ~(MCR0_PROMISC | MCR0_MULTICAST); + mcr |= MCR0_BROADCAST_DIS; if ((ifp->if_flags & IFF_BROADCAST) != 0) - mcr |= MCR0_BROADCAST; + mcr &= ~MCR0_BROADCAST_DIS; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { if ((ifp->if_flags & IFF_PROMISC) != 0) mcr |= MCR0_PROMISC; Modified: stable/8/sys/dev/vte/if_vtereg.h ============================================================================== --- stable/8/sys/dev/vte/if_vtereg.h Sat Mar 26 21:12:53 2011 (r220043) +++ stable/8/sys/dev/vte/if_vtereg.h Sat Mar 26 21:29:39 2011 (r220044) @@ -48,7 +48,7 @@ #define MCR0_ACCPT_LONG_PKT 0x0008 #define MCR0_ACCPT_DRIBBLE 0x0010 #define MCR0_PROMISC 0x0020 -#define MCR0_BROADCAST 0x0040 +#define MCR0_BROADCAST_DIS 0x0040 #define MCR0_RX_EARLY_INTR 0x0080 #define MCR0_MULTICAST 0x0100 #define MCR0_FC_ENB 0x0200 From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 21:32:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4DFF1065672; Sat, 26 Mar 2011 21:32:10 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 951618FC08; Sat, 26 Mar 2011 21:32:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QLWADE037084; Sat, 26 Mar 2011 21:32:10 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QLWAEJ037081; Sat, 26 Mar 2011 21:32:10 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201103262132.p2QLWAEJ037081@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 26 Mar 2011 21:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220045 - stable/7/sys/dev/vte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 21:32:10 -0000 Author: yongari Date: Sat Mar 26 21:32:10 2011 New Revision: 220045 URL: http://svn.freebsd.org/changeset/base/220045 Log: MFC r219787: Correct broadcast frame handling. Setting bit6 of MCR0 register enables broadcast filtering. Make sure to clear the bit to receive broadcast frames. While I'm here rename the bit definition to reflect reality. Reported by: brad@OpenBSD Modified: stable/7/sys/dev/vte/if_vte.c stable/7/sys/dev/vte/if_vtereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/vte/if_vte.c ============================================================================== --- stable/7/sys/dev/vte/if_vte.c Sat Mar 26 21:29:39 2011 (r220044) +++ stable/7/sys/dev/vte/if_vte.c Sat Mar 26 21:32:10 2011 (r220045) @@ -1963,9 +1963,10 @@ vte_rxfilter(struct vte_softc *sc) } mcr = CSR_READ_2(sc, VTE_MCR0); - mcr &= ~(MCR0_PROMISC | MCR0_BROADCAST | MCR0_MULTICAST); + mcr &= ~(MCR0_PROMISC | MCR0_MULTICAST); + mcr |= MCR0_BROADCAST_DIS; if ((ifp->if_flags & IFF_BROADCAST) != 0) - mcr |= MCR0_BROADCAST; + mcr &= ~MCR0_BROADCAST_DIS; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { if ((ifp->if_flags & IFF_PROMISC) != 0) mcr |= MCR0_PROMISC; Modified: stable/7/sys/dev/vte/if_vtereg.h ============================================================================== --- stable/7/sys/dev/vte/if_vtereg.h Sat Mar 26 21:29:39 2011 (r220044) +++ stable/7/sys/dev/vte/if_vtereg.h Sat Mar 26 21:32:10 2011 (r220045) @@ -48,7 +48,7 @@ #define MCR0_ACCPT_LONG_PKT 0x0008 #define MCR0_ACCPT_DRIBBLE 0x0010 #define MCR0_PROMISC 0x0020 -#define MCR0_BROADCAST 0x0040 +#define MCR0_BROADCAST_DIS 0x0040 #define MCR0_RX_EARLY_INTR 0x0080 #define MCR0_MULTICAST 0x0100 #define MCR0_FC_ENB 0x0200 From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 22:39:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 747E4106566B; Sat, 26 Mar 2011 22:39:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 656A98FC08; Sat, 26 Mar 2011 22:39:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QMdNRK039295; Sat, 26 Mar 2011 22:39:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QMdNVn039293; Sat, 26 Mar 2011 22:39:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201103262239.p2QMdNVn039293@svn.freebsd.org> From: Marius Strobl Date: Sat, 26 Mar 2011 22:39: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: r220046 - head/sys/dev/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2011 22:39:23 -0000 Author: marius Date: Sat Mar 26 22:39:23 2011 New Revision: 220046 URL: http://svn.freebsd.org/changeset/base/220046 Log: Wait until the DMA engine is stopped before unmapping buffers and descriptors, which fixes DMA errors seen on sparc64. Obtained from: OpenBSD MFC after: 1 week Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Sat Mar 26 21:32:10 2011 (r220045) +++ head/sys/dev/dc/if_dc.c Sat Mar 26 22:39:23 2011 (r220046) @@ -3917,7 +3917,7 @@ dc_stop(struct dc_softc *sc) struct dc_list_data *ld; struct dc_chain_data *cd; int i; - uint32_t ctl; + uint32_t ctl, isr; DC_LOCK_ASSERT(sc); @@ -3932,6 +3932,30 @@ dc_stop(struct dc_softc *sc) ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_RX_ON | DC_NETCFG_TX_ON)); + + for (i = 0; i < DC_TIMEOUT; i++) { + isr = CSR_READ_4(sc, DC_ISR); + if ((isr & DC_ISR_TX_IDLE || + (isr & DC_ISR_TX_STATE) == DC_TXSTATE_RESET) && + (isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED) + break; + DELAY(10); + } + + if (i == DC_TIMEOUT) { + if (!((isr & DC_ISR_TX_IDLE) || + (isr & DC_ISR_TX_STATE) == DC_TXSTATE_RESET) && + !DC_IS_ASIX(sc) && !DC_IS_DAVICOM(sc)) + device_printf(sc->dc_dev, + "%s: failed to force tx to idle state\n", + __func__); + if (!((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED) && + !DC_HAS_BROKEN_RXSTATE(sc)) + device_printf(sc->dc_dev, + "%s: failed to force rx to idle state\n", + __func__); + } + CSR_WRITE_4(sc, DC_IMR, 0x00000000); CSR_WRITE_4(sc, DC_TXADDR, 0x00000000); CSR_WRITE_4(sc, DC_RXADDR, 0x00000000);